Jump to content
  • 0

DeviL Square AFK and Dual Restrictions


Landb4Time

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   0
  • Joined:  01/16/12
  • Last Seen:  

Hello i want to add some thing on my Devil Square.

 

 

Prevent People from AFking inside that can cause into abuse.

Prevent dual accounts in entering Devil Square.

 

 

Hope someone can help me.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


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

Post your current Devil Square script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   0
  • Joined:  01/16/12
  • Last Seen:  

I just need the add on 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:  

Hello i want to add some thing on my Devil Square.

 

 

Prevent People from AFking inside that can cause into abuse.

OnCheckIdle:
	while( .start ) {
		sleep 2000;
		for( .@i = 0; .@i < .register_num; .@i++ )
			if( checkidle( rid2name( .register_aid[ .@i ] ) ) > 60 )
				unitkill .register_aid[ .@i ];
	}
	end;
donpcevent strnpcinfo(0)+"::OnCheckIdle";

 

 

 

Prevent dual accounts in entering Devil Square.

	for( .@i = 0; .@i < .register_num; .@i++ )
		if( getcharip( .register_aid[ .@i ] ) == getcharip() ) {
			mes "you can't enter";
			close;
		}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   0
  • Joined:  01/16/12
  • Last Seen:  

Thanks ill try this



Im Confused where to put this ...

IS it possible it give a warning msg first before it warp people back to save point when hes afk.

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:  

Thanks ill try this

Im Confused where to put this ...

 

Well that's why I asked you to post your script

I don't know if you made your script, or which one Devil Square you have so I based my post on Annieruru's Devil Square

 

.register_aid save the account ID of the player

.register_num is the size of the array .register_aid

 

IS it possible it give a warning msg first before it warp people back to save point when hes afk.

OnCheckIdle:
	while( .start ) { // if event on and player on map
		sleep 2000;
		for( .@i = 0; .@i < .register_num; .@i++ ) {
			if( checkidle( rid2name( .register_aid[ .@i ] ) ) >= 60 && checkidle( rid2name( .register_aid[ .@i ] ) ) < 62 )
				mapannounce "<your map>", rid2name( .register_aid[ .@i ] ) +" is AFK ! Wake up !",0;
			else if( checkidle( rid2name( .register_aid[ .@i ] ) ) >= 82 ) { // check if idle > than 82 sec
				unitkill .register_aid[ .@i ];
				unitwarp .register_aid[ .@i ],"prontera,0,0;
			}
		}
	}
	end;

Good luck ;)

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   0
  • Joined:  01/16/12
  • Last Seen:  

I Pm You

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...