Hello. I have a script that works perfect but it only works on one map. I was wondering if someone could help me make it work on several maps? Someone in rA tried to provide me a solution, but it did not work.
it currently only runs on map "arena", but i want it to also run on prtg_cas01
this is the script:
Thank you so much Hercules!
- script BG_Check_IP -1,{OnInit: setmapflag "arena", mf_loadevent; set .whitelist$, "| 127.0.0.1 | 127.0.0.2 | etc"; end;// Trigger when a player enters a map with "loadevent" mapflag.OnPCLoadMapEvent: // Only run for map "arena". if (strcharinfo(3) != "arena") 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),"arena")) { 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;}
Hello. I have a script that works perfect but it only works on one map. I was wondering if someone could help me make it work on several maps? Someone in rA tried to provide me a solution, but it did not work.
it currently only runs on map "arena", but i want it to also run on prtg_cas01
this is the script:
Thank you so much Hercules!
Share this post
Link to post
Share on other sites