Xamzter Posted June 6, 2007 Posted June 6, 2007 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 } }
lil Toady Posted June 6, 2007 Posted June 6, 2007 /* AFKSCRIPT RAPED BY LIL_TOADY */ 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. $+(.timerafk,$1,%a) 1 20 mta.kick $1 %a } } } elseif ($3 == !back) { if ($timer($+(afk,$1,$2))) { $+(.timerafk,$1,$2) off mta.pm $1 $2 You are no longer undergoing an afk check and wont be kicked. } }
Xamzter Posted June 6, 2007 Author Posted June 6, 2007 Thank you! Gonna test it out =) EDIT: It worked, thanks
JB_frozen Posted June 6, 2007 Posted June 6, 2007 maybe a command what some1 other can use to elseif ($3 == !afk) { /mta.text $1 $mta.nick($1,$2) is now Afk } elseif ($3 == !back) { /mta.text $1 $mta.nick($1,$2) is now back }
Xamzter Posted June 6, 2007 Author Posted June 6, 2007 maybe a command what some1 other can use to elseif ($3 == !afk) { /mta.text $1 $mta.nick($1,$2) is now Afk } elseif ($3 == !back) { /mta.text $1 $mta.nick($1,$2) is now back } my !afk command can only be triggered by an Admin on the server like this: !afk Poppo And the player named 'Poppo' then has 20 seconds to write !back otherwise he'll get kicked out. Good to use on afkers or ppl u think are AFK.
Recommended Posts