Meteor91
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Meteor91
-
-
4 hours ago, hendra814 said:
try my script below
you can edit the map and the condition
- script dualclientkicker -1,{ OnPCLoadMapEvent: set .@charmap$, strcharinfo(3); if(!compare(.tmp$,.@charmap$)) end; set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE`account_id` IN (SELECT `account_id` FROM `login` WHERE `last_ip` =(SELECT `last_ip` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND`online` <> 0;",.@a); for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) { if(!getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d])) && .@charmap$==.@map$) set .@c,.@c+ 1; } if(.@c > .limitacc ) { dispbottom "Dual accounts not allowed in PVP."; warp "prontera",0,0; } end; OnInit: set .limitacc,1; setarray .maps$,"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5","turbo_e_4","turbo_e_8","turbo_e_16", "pvp_y_1-1","pvp_y_1-2","pvp_y_1-3","pvp_y_1-4","pvp_y_1-5","pvp_y_2-1","pvp_y_2-2","pvp_y_2-3","pvp_y_2-4","pvp_y_2-5", "pvp_y_3-1","pvp_y_3-2","pvp_y_3-3","pvp_y_3-4","pvp_y_3-5","pvp_y_4-1","pvp_y_4-2","pvp_y_4-3","pvp_y_4-4","pvp_y_4-5", "pvp_y_5-1","pvp_y_5-2","pvp_y_5-3","pvp_y_5-4","pvp_y_5-5","pvp_y_6-1","pvp_y_6-2","pvp_y_6-3","pvp_y_6-4","pvp_y_6-5", "pvp_y_7-1","pvp_y_7-2","pvp_y_7-3","pvp_y_7-4","pvp_y_7-5","pvp_y_8-1","pvp_y_8-2","pvp_y_8-3","pvp_y_8-4","pvp_y_8-5", "pvp_n_1-1","pvp_n_1-2","pvp_n_1-3","pvp_n_1-4","pvp_n_1-5","pvp_n_2-1","pvp_n_2-2","pvp_n_2-3","pvp_n_2-4","pvp_n_2-5", "pvp_n_3-1","pvp_n_3-2","pvp_n_3-3","pvp_n_3-4","pvp_n_3-5","pvp_n_4-1","pvp_n_4-2","pvp_n_4-3","pvp_n_4-4","pvp_n_4-5", "pvp_n_5-1","pvp_n_5-2","pvp_n_5-3","pvp_n_5-4","pvp_n_5-5","pvp_n_6-1","pvp_n_6-2","pvp_n_6-3","pvp_n_6-4","pvp_n_6-5", "pvp_n_7-1","pvp_n_7-2","pvp_n_7-3","pvp_n_7-4","pvp_n_7-5","pvp_n_8-1","pvp_n_8-2","pvp_n_8-3","pvp_n_8-4","pvp_n_8-5", "pvp_2vs2"; set .lens , getarraysize(.maps$) ; for(set(.a,0);.a<.lens;set(.a,.a+1)) { setmapflag .maps$[.a], mf_loadevent ; set .tmp$ ,.tmp$+.maps$[.a]+","; } }
hi hendra814, thanks for the script. i have look into it, for me i wanna to make only prontera can have multiple login do this means i need to put all map inside the array? how about the server processing? is it taking alot of resource or not?
-
Thanks for the fast response @hendra814, i look into it. anything i will ping here.
-
Hello Team,
i would like to get support for this script below. i found this ip limit script in this forum, the script working fine and i use it until now. the problem is, i want to make an adjustment where at prontera city there were no ip limit but when the player warp to dungeon map or other place the script will check whether they have 3 other chars outside prontera. if they have then the 4th login will be kick. i have try to make <if (strcharinfo(3) == "prontera") end;> it is not working means player can use this as advantage to login more than 3 id. kindly guide and assist me on this. below is the code:-
- script Only3perIP -1,{ OnPCLoginEvent: if (getgmlevel() >= 99) end; set .@myname$, strcharinfo(0); if (query_sql("SELECT `char`.`name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_ip='"+getcharip()+"' AND `char`.online=1 AND `char`.char_id!="+getcharid(0), .@name$) >= 3) { for (set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) { if (checkvending(.@name$[.@i]) != 2) set .@sameip, .@sameip +1; } if (.@sameip >= 3) { announce "Sorry, only 3 accounts per IP can be logged in at a time.", bc_self; sleep 1000; atcommand "@kick " + .@myname$; } } end; }
R > IP limit with extra conditions
in Script Requests
Posted
thanks for reply. the script only works in prontera because of mapflag. my intention to make the check outside of prontera which mean prontera can have dual login other map cannot. by using OnPCLoadMapEvent: it already nice but the problem is it need mapflag to trigger to avoid something like said in the documentation "The fact that this label requires a mapflag for it to work is because, otherwise, it'd be server-wide and trigger every time a player would change maps. Imagine the server load with 1,000 players (oh the pain...)". i like your idea from previous script, but im just need to supply all the map exist in RO for the array. oh what a pain.. hahaha