Hello guys, i cant make this script work. it suppost that if you are afk with the homun for 2 minutes it uses vaporize to avoid farm
- script vaporize -1,{
OnPCLoginEvent:
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
On1min:
dispbottom "Been a minute "+strcharinfo(0);
atcommand "@useskill 244 1 "+strcharinfo(0);
getmapxy(.@m,.@x,.@y,0);
if(.@x == x && .@y == y){
set afk, afk + 1;
if(gethominfo(2) != "null"){
if(afk >= $antiafk) {
atcommand "@useskill 244 1 "+strcharinfo(0);
dispbottom "You are not allowed to farm with Homun while AFK.";
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
} else {
set afk, 0;
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
}
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
}
}
set x, .@x;
set y, .@y;
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
OnInit:
set $antiafk, 2;// how many minutes to use vaporize
end;
}
- script vaporize -1,{
OnPCLoginEvent:
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
On1min:
dispbottom "Been a minute "+strcharinfo(0);
atcommand "@useskill 244 1 "+strcharinfo(0);
getmapxy(.@m,.@x,.@y,0);
if(.@x == x && .@y == y){
set afk, afk + 1;
if(gethominfo(2) != "null"){
if(afk >= $antiafk) {
atcommand "@useskill 244 1 "+strcharinfo(0);
dispbottom "You are not allowed to farm with Homun while AFK.";
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
} else {
set afk, 0;
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
}
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
}
}
set x, .@x;
set y, .@y;
addtimer 60000,strnpcinfo(0)+"::On1min";
end;
OnInit:
set $antiafk, 2;// how many minutes to use vaporize
end;
}