Jump to content
  • 0

afk on bg maps


Nokia

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

hey can i request a simple afk check script for bg maps?

 

like..:

 

if a player is afk for 60 seconds:

 

"please move or you will get kicked"

 

30 seconds later

 

"you got 30 seconds to move"

 

after 30 seconds warp the char to save point

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  83
  • Reputation:   8
  • Joined:  12/27/11
  • Last Seen:  

search for annieruru's  anti afk script.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Maybe something like this ?

-	script	iubiu	-1,{
OnInit:
	setarray .@map_name$, "bat_c01", "bat_c02";
	.@size_map = getarraysize( .@map_name$ );
	for ( .@i = 0; .@i < .@size_map; .@i++ )
		setmapflag .@map_name$[.@i], mf_loadevent;
	.bg_map$ = implode( .@map_name$, "|" );
	end;
OnPCLoadMapEvent:
	if ( !compare( .bg_map$, strcharinfo(3) ) || !getcharid(4) || getgmlevel() || @loop_bg ) end;
	@loop_bg++;
	while( compare( .bg_map$, strcharinfo(3) ) && getcharid(4) ) {
		sleep2 10000;
		if( checkidle() > 60 && checkidle() <= 70 )
			announce "please move or you will get kicked", bc_self;
		else if( checkidle() > 90 && checkidle() <= 100 )
			announce "you got 30 seconds to move", bc_self;
		else if( checkidle() > 120 ) {
			warp "SavePoint", 0, 0;
			break;
		}
	}
	@loop_bg = 0;
	end;
}
  • Upvote 1
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...