Jump to content
  • 0
OmarAcero

Police Afk in the woe!

Question

Hello friends, I would like to ask for help, in to make a script that activates police only in woe, and to detect users who are in afk for 5 minutes and transferred to your point saved or  kick of server...

 

-	script	afkwoe	-1,{//-- If woe on, Start the ScriptOnAgitStart:attachnpctimer ""+strcharinfo(0)+"";initnpctimer;end;}OnTimer30000://Check if only users afkif(checkvending() >= 1 || checkchatting() == 1) {dispbottom "The Police, has detected him as bot because you were in afk  a long time  during woe";stopnpctimer;//atcommand "@kick "+strcharinfo(0)+"";warp "SavePoint",0,0;end;}
Edited by OmarAcero

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

something like this:

 

-	script	afkwoe	-1,{OnAgitStart:	attachnpctimer ""+strcharinfo(0)+"";	initnpctimer;	end;OnTimer30000:	if(checkafk() > 0 && getmapflag(strcharinfo (3), mf_gvg_castle)) {		dispbottom "The Police, has detected him as bot because you were in afk  a long time  during woe";		stopnpctimer;		warp "SavePoint",0,0;		end;	}}

(not tested)

Share this post


Link to post
Share on other sites
  • 0

hmm error!  9(>.<)9"

A question,  exist the función "checkafk"  ????

 

Sin_t_tulo.jpg

Edited by OmarAcero

Share this post


Link to post
Share on other sites
  • 0

man, not work, i am trying with:   mf_gvg_castle ;   mf_gvg;   and   mf_nowarp ;   this is result: 

-	script	afkwoe	-1,{OnAgitStart:	attachnpctimer ""+strcharinfo(0)+"";	initnpctimer;	end;                                                               OnTimer30000:	if(checkidle() > 0 && getmapflag(strcharinfo (3), mf_nowarp)) {		dispbottom "The Police, has detected him as bot because you were in afk a long time during woe";		stopnpctimer;		warp "SavePoint",0,0;		end;	}}

Sin_t_tulo2.jpg

Edited by OmarAcero

Share this post


Link to post
Share on other sites
  • 0

Uhh. That script will not work. First of all who are you attaching script to? I'd suggest adding OnMapLoadEvent and add loadevent mapflag to the maps that interest you. Second of all, using checkidle like this will net you kicking almost all players that haven't moved for a sec or more.

-	script	afkwoe	-1,{OnLoadMapEvent:	if( !woetimer && (agitcheck() || agitcheck2()) && (getmapflag(strcharinfo (3), mf_gvg_castle) || getmapflag(strcharinfo (3), mf_gvg)) ) {		addtimer 30000,strnpcinfo(0) + "::OnCheck";		woetimer = 1; //To prevent multiple timers on same character	}	end;OnCheck:	if( checkidle() > 300 && (agitcheck() || agitcheck2()) && (getmapflag(strcharinfo (3), mf_gvg_castle) || getmapflag(strcharinfo (3), mf_gvg)) ) { //He's still on GvG map and was AFK for 300 seconds (5 minutes)		dispbottom "You were kicked for being AFK for more than 5 minutes inside GvG zone.";		warp "SavePoint",0,0;		woetimer = 0;		end;	} else if( !(getmapflag(strcharinfo (3), mf_gvg_castle) || getmapflag(strcharinfo (3), mf_gvg)) || !(agitcheck() || agitcheck2()) ) { //He's not in castle anymore or WoE ended		woetimer = 0;		end;	}	addtimer 30000,strnpcinfo(0) + "::OnCheck"; //Still on map, WoE still going, and not idling for 5 minutes. Need a recheck in another 30 secs.	end;	OnPCLogoutEvent:	woetimer = 0; //To keep it clean, if you have some central PCLogoutEvent, may add it there.	end;}

But not tested.

Share this post


Link to post
Share on other sites
  • 0
-	script	afkwoe	-1,{OnInit:	.timetocheck = 30;		//Seconds after which idle is checked.	.idle_time = 30;		//Idle time in seconds, from which one can be warped.end;OnPCLoginEvent:	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";	end;                                                               OnCheckAFK:	if(checkidle() >= .idle_time && getmapflag(strcharinfo (3), mf_gvg)) {		dispbottom "The Police, has detected him as bot because you were in afk a long time during woe";		warp "SavePoint",0,0;		end;	}	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";} 

Share this post


Link to post
Share on other sites
  • 0

 

-	script	afkwoe	-1,{OnInit:	.timetocheck = 30;		//Seconds after which idle is checked.	.idle_time = 30;		//Idle time in seconds, from which one can be warped.end;OnPCLoginEvent:	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";	end;                                                               OnCheckAFK:	if(checkidle() >= .idle_time && getmapflag(strcharinfo (3), mf_gvg)) {		dispbottom "The Police, has detected him as bot because you were in afk a long time during woe";		warp "SavePoint",0,0;		end;	}	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";} 

Working good*

Share this post


Link to post
Share on other sites
  • 0

The script is working, but it only works the first time, if after you ever go to castle, no longer works, only works 1 time.  :huh: !?¿

Share this post


Link to post
Share on other sites
  • 0

hhmmm I do not understand :huh:  pls  one example.

 

How I can make it work for the entire time of woe? 

Edited by OmarAcero

Share this post


Link to post
Share on other sites
  • 0
-    script    afkwoe    -1,{OnInit:    .timetocheck = 30;        //Seconds after which idle is checked.    .idle_time = 30;        //Idle time in seconds, from which one can be warped.end;OnPCLoginEvent:    addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";    end;                                                               OnCheckAFK:    addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckAFK";    if(checkidle() >= .idle_time && getmapflag(strcharinfo (3), mf_gvg)) {        dispbottom "The Police, has detected him as bot because you were in afk a long time during woe";        warp "SavePoint",0,0;        end;    }}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.