Slicer 16 Posted May 14, 2014 Hello, I wonder if anyone would have an NPC that sends the player to the chair who use dual acc on some maps, I tried but I can not create this npc, someone of good heart could please help me?thank you very much already. Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted May 14, 2014 (edited) - script dualclientkicker -1,{ //by skormOnPCLoadMapEvent: 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); set .@len, query_sql("select account_id from `char` right join login on login.account_id = `char`.account_id where `char`.online = 1 and login.last_ip = '"+ getcharip() +"'",.@a ); //Annieruru Addition. if(.@len-1) { for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) { getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d])); if(.@charmap$==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) { dispbottom "Duel accounts not allowed in WOE."; warp "geffen",0,0; // change this. to atcommand "@jail "+strcharinfo(0); } } } end; OnInit: setarray .maps$ , "aldeg_cas01", "gefg_cas01", "payg_cas01", "prtg_cas01"; set .lens , getarraysize(.maps$) ; for(set(.a,0);.a<.lens;set(.a,.a+1)) { setmapflag .maps$[.a], mf_loadevent ; set .tmp$ ,.tmp$+.maps$[.a]+","; }} Edited May 14, 2014 by quesoph 1 Slicer reacted to this Quote Share this post Link to post Share on other sites
0 Slicer 16 Posted May 15, 2014 - script dualclientkicker -1,{ //by skormOnPCLoadMapEvent: 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); set .@len, query_sql("select account_id from `char` right join login on login.account_id = `char`.account_id where `char`.online = 1 and login.last_ip = '"+ getcharip() +"'",.@a ); //Annieruru Addition. if(.@len-1) { for(set(.@d,0);.@d<.@len;set(.@d,.@d+1)) { getmapxy(.@map$,.@x,.@y,0,rid2name(.@a[.@d])); if(.@charmap$==.@map$&&rid2name(.@a[.@d])!=strcharinfo(0)) { dispbottom "Duel accounts not allowed in WOE."; warp "geffen",0,0; // change this. to atcommand "@jail "+strcharinfo(0); } } } end; OnInit: setarray .maps$ , "aldeg_cas01", "gefg_cas01", "payg_cas01", "prtg_cas01"; set .lens , getarraysize(.maps$) ; for(set(.a,0);.a<.lens;set(.a,.a+1)) { setmapflag .maps$[.a], mf_loadevent ; set .tmp$ ,.tmp$+.maps$[.a]+","; }} Very good man, thanks. Would like to ban the player? using this same npc? Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted May 15, 2014 change: warp "geffen",0,0; into the ban command Quote Share this post Link to post Share on other sites
0 Slicer 16 Posted May 15, 2014 (edited) Works, but the npc is banning players who left an open shop and login with another account, as it has not banish this case? Edited May 15, 2014 by Usui Quote Share this post Link to post Share on other sites
Hello, I wonder if anyone would have an NPC that sends the player to the chair who use dual acc on some maps, I tried but I can not create this npc, someone of good heart could please help me?
thank you very much already.
Share this post
Link to post
Share on other sites