Landb4Time Posted March 5, 2013 Posted March 5, 2013 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. Quote
Capuche Posted March 5, 2013 Posted March 5, 2013 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; } Quote
Landb4Time Posted March 5, 2013 Author Posted March 5, 2013 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. Quote
Capuche Posted March 5, 2013 Posted March 5, 2013 (edited) 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 March 5, 2013 by Capuche Quote
Question
Landb4Time
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.
6 answers 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.