set @countertime,0;
set @onArea,0;
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
OnTimer1000:
//cek pos
getmapxy( @map$, @x, @y, BL_PC );
if(@map$==$map$){
if($X2<@x && $X1>@x){
if($Y2<@y && $Y1>@y){
if(@onArea!=1){
set @onArea,1;
dispbottom "You Are now in AFK Area!";
set @warning,1;
}
}
else{
if(@warning==1){
set @onArea,0;
dispbottom "You Are Leaving AFK Area!";
set @warning,0;
stopnpctimer;
goto Counterstart;
end;
}
}
}
}
if(@map$==$map$){
if($Y2<@y && $Y1>@y){
if($X2<@x && $X1>@x){
if(@onArea!=1){
set @onArea,1;
dispbottom "You Are now in AFK Area!";
set @warning,1;
}
}
else{
if(@warning==1){
set @onArea,0;
dispbottom "You Are Leaving AFK Area!";
set @warning,0;
stopnpctimer;
goto Counterstart;
end;
}
}
}
}
//cek time & reset + set prize
set @countertime,@countertime+1;
if(@countertime==($AFKTime*60)){
if(@onArea==1){
getitem 27004,1;
dispbottom "You get AFK Point for stay in AFK AREA!";
stopnpctimer;
goto Counterstart;
}else{
dispbottom "You miss AFK Point Because not in AFK AREA!";
stopnpctimer;
goto Counterstart;
}
}
stopnpctimer;
initnpctimer;
end;
OnInit:
set $AFKTime,30;
set @map$,"core";
set $X1,158;
set $Y1,156;
set $X2,143;
set $Y2,141;
end;
}
someone can help me?this npc make my other npc debug auto close and stack..
Help me bro
Question
deceel
core,246,182,4 script AFKMaster -1,{
OnPCLoginEvent:
Counterstart:
set @countertime,0;
set @onArea,0;
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
OnTimer1000:
//cek pos
getmapxy( @map$, @x, @y, BL_PC );
if(@map$==$map$){
if($X2<@x && $X1>@x){
if($Y2<@y && $Y1>@y){
if(@onArea!=1){
set @onArea,1;
dispbottom "You Are now in AFK Area!";
set @warning,1;
}
}
else{
if(@warning==1){
set @onArea,0;
dispbottom "You Are Leaving AFK Area!";
set @warning,0;
stopnpctimer;
goto Counterstart;
end;
}
}
}
}
if(@map$==$map$){
if($Y2<@y && $Y1>@y){
if($X2<@x && $X1>@x){
if(@onArea!=1){
set @onArea,1;
dispbottom "You Are now in AFK Area!";
set @warning,1;
}
}
else{
if(@warning==1){
set @onArea,0;
dispbottom "You Are Leaving AFK Area!";
set @warning,0;
stopnpctimer;
goto Counterstart;
end;
}
}
}
}
//cek time & reset + set prize
set @countertime,@countertime+1;
if(@countertime==($AFKTime*60)){
if(@onArea==1){
getitem 27004,1;
dispbottom "You get AFK Point for stay in AFK AREA!";
stopnpctimer;
goto Counterstart;
}else{
dispbottom "You miss AFK Point Because not in AFK AREA!";
stopnpctimer;
goto Counterstart;
}
}
stopnpctimer;
initnpctimer;
end;
OnInit:
set $AFKTime,30;
set @map$,"core";
set $X1,158;
set $Y1,156;
set $X2,143;
set $Y2,141;
end;
}
someone can help me?this npc make my other npc debug auto close and stack..
Help me bro
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.