I found this script and wanted to request a few additions...
1) How to make it works per multiple maps? ex. prtg_cas01 and aldeg_cas01? (Currently only works on 1 map)
2) How to make it so that the accepted/whitelist IP can only open a max of two clients in these maps? (Currently allows unlimit clients)
I have asked for a solution on other forums, but their solution it didnt work. D:
Can rAthena please help?
- script WoE_IP_Kick -1,{
OnInit:
setmapflag "prtg_cas01", mf_loadevent;
set .whitelist$, "xx.xx.xx.xx | xx.xx.xx.xx";
end;
// Trigger when a player enters a map with "loadevent" mapflag.
OnPCLoadMapEvent:
// Only run for map "prtg_cas01".
if (strcharinfo(3) != "prtg_cas01") end;
set .@my_ip$, getcharip();
if ( compare( .@my_ip$, .whitelist$ ) ) end;
// Get list of accounts with attached character's IP address.
set .@size, query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+ .@my_ip$ +"'",.@aid);
// Passed check if only the attached player is returned.
if (.@size < 2) end;
// Check all online characters using the IP address if they are on a Battlegrounds map.
set .@self, getcharid(3);
for(set .@i,0; .@i<.@size; set .@i,.@i+1) {
if (.@aid[.@i] == .@self)
continue;
if (attachrid(.@aid[.@i])) {
if (compare(strcharinfo(3),"prtg_cas01")) {
set .@name$, strcharinfo(0);
attachrid(.@self);
message strcharinfo(0),"Character "+.@name$+" is already present in this map with your IP. Kicking....";
sleep2 2000;
atcommand "@kick "+strcharinfo(0);
end;
}
}
}
// Passed check.
end;
}
Question
HristDead
I found this script and wanted to request a few additions...
1) How to make it works per multiple maps? ex. prtg_cas01 and aldeg_cas01? (Currently only works on 1 map)
2) How to make it so that the accepted/whitelist IP can only open a max of two clients in these maps? (Currently allows unlimit clients)
I have asked for a solution on other forums, but their solution it didnt work. D:
Can rAthena please help?
Link to comment
Share on other sites
10 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.