Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,157,184,4 script AFKMaster -1,{
- OnPCLoginEvent:
- Counterstart:
- set @countertime,0;
- set @onArea,0;
- attachnpctimer ""+strcharinfo(0)+"";
- initnpctimer;
- end;
- OnTimer1000:
- //cek pos
- getmapxy( @map$, @x, @y );
- 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*5)){
- if(@onArea==1){
- getitem 678,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,1;
- set $map$,"prontera";
- set $X1,152;
- set $Y1,145;
- set $X2,159;
- set $Y2,178;
- end;
- }
Add Comment
Please, Sign In to add comment