Hi, im having a problem with a script I made for my server.
When i use !afk on someone they recieve a PM that tells them to write !back if they are there.
If they dont respond in 20 seconds they get kicked.
But the problem is, even if they write !back they get kicked for some reason and I dont know why. I've tried some different code and still same problem.
So, can anyone help me out here?
/*
AFKSCRIPT MADE BY [XL]XAM
[sWE] Xanadu-Legacy DD Maps
*/
elseif ($3 == !afk) {
if ($gus.level($1,$2) >= 3) {
if ($gus.level($1,%a) > $gus.level($1,$2)) mta.pm $1 $2 Error- You cannot use $3 on someone with higher level.
elseif (%a == -1) mta.pm $1 $2 Error - Absent ID
else {
mta.text $1 $mta.nick($1,%a) is undergoing an AFK CHECK and has 20 seconds to respond.
mta.pm $1 %a Please write !back if you are there, 20 seconds untill kick.
!writeini -n " $+ $scriptdir $+ afk.ini" NICK $mta.nick($1,%a) 1
timer 1 20 var " $+ %afkvalue $+ %a" = $readini($scriptdir $+ afk.ini,NICK,$mta.nick($1,%a))
timer 1 20 $iif(%afkvalue $+ %a = 1,mta.kick $1 %a)
}
}
}
elseif ($3 == !back) {
if ($readini($scriptdir $+ afk.ini,NICK,$mta.nick($1,$2)) == 1) {
mta.pm $1 $2 You are no longer undergoing an afk check and wont be kicked.
!writeini -n " $+ $scriptdir $+ afk.ini" NICK $mta.nick($1,$2) 0
}
}