Damon Posted January 12, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 32 Reputation: 1 Joined: 12/07/11 Last Seen: August 17, 2019 Share Posted January 12, 2012 Hi ! I wanted to know if it was possible a script that would forbidden two (or more) people on the same map. (For example, in BG). Thanks a lot Quote Link to comment Share on other sites More sharing options...
1 Damon Posted January 21, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 32 Reputation: 1 Joined: 12/07/11 Last Seen: August 17, 2019 Author Share Posted January 21, 2012 Hi ! Thx, its work. And if i want add other map ? (Yep, i add maps on ---Enable map OnPCLoadMapEvent--- but, I'm pretty sure : if(.@amap$!="quiz_00","quiz01") end; doesn't work. So, what i can do ? Quote Link to comment Share on other sites More sharing options...
0 NightJar Posted January 15, 2018 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 51 Reputation: 0 Joined: 12/24/17 Last Seen: December 26, 2024 Share Posted January 15, 2018 not also working for me Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted January 13, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted January 13, 2012 - script abcde -1,{ OnPCLoadMapEvent: getmapxy(.@amap$,.@mapx,.@mapy,0); if(.@amap$!="quiz_00") end; query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIp$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIp$+"'", .@AccountId); set .@aidtemp,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1) { if(attachrid(.@AccountId[.@i])) { getmapxy(.@qmap$,.@qmapx,.@qmapy,0); if (.@qmap$== .@amap$) set .@j,.@j+1; } detachrid; } attachrid .@aidtemp; if(.@j > $@MaxWimdows) warp "SavePoint",0,0; end; OnInit: set $@MaxWimdows,1; end; } //------Enable map OnPCLoadMapEvent------------------- quiz_00 mapflag loadevent 1 Quote Link to comment Share on other sites More sharing options...
Arcenciel Posted January 21, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 1315 Reputation: 372 Joined: 12/10/11 Last Seen: August 31, 2013 Share Posted January 21, 2012 if(.@amap$!="quiz_00","quiz01") end; You have to do it like this: if(.@amap$!="quiz_00" || .@amap$ !="quiz01") end; Quote Link to comment Share on other sites More sharing options...
Damon Posted January 21, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 32 Reputation: 1 Joined: 12/07/11 Last Seen: August 17, 2019 Author Share Posted January 21, 2012 Okay ! Try to do that Thanks. Quote Link to comment Share on other sites More sharing options...
Lilith Posted January 21, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Share Posted January 21, 2012 - script abcde -1,{ OnPCLoadMapEvent: getmapxy(.@amap$,.@mapx,.@mapy,0); if(.@amap$!="quiz_00") end; query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIp$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIp$+"'", .@AccountId); set .@aidtemp,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1) { if(attachrid(.@AccountId[.@i])) { getmapxy(.@qmap$,.@qmapx,.@qmapy,0); if (.@qmap$== .@amap$) set .@j,.@j+1; } detachrid; } attachrid .@aidtemp; if(.@j > $@MaxWimdows) warp "SavePoint",0,0; end; OnInit: set $@MaxWimdows,1; end; } //------Enable map OnPCLoadMapEvent------------------- quiz_00 mapflag loadevent It works only with static IP addresses. Dynamic IP's will ignore this script. Quote Link to comment Share on other sites More sharing options...
QQfoolsorellina Posted January 21, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 587 Reputation: 105 Joined: 11/19/11 Last Seen: July 7, 2019 Share Posted January 21, 2012 It works only with static IP addresses. Dynamic IP's will ignore this script. yup,I think his purpose is to avoid the same computer using multiple windows Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 24, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted January 24, 2012 if(.@amap$!="quiz_00","quiz01") end; You have to do it like this: if(.@amap$!="quiz_00" || .@amap$ !="quiz01") end; you have to use && instead of || should be if(.@amap$!="quiz_00" && .@amap$ !="quiz01") end; 1 Quote Link to comment Share on other sites More sharing options...
Landb4Time Posted February 21, 2012 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 76 Reputation: 0 Joined: 01/16/12 Last Seen: July 5, 2014 Share Posted February 21, 2012 i test it it doesnt work ..it kick me out even im not using dual . - script abcde -1,{ OnPCLoadMapEvent: getmapxy(.@amap$,.@mapx,.@mapy,0); if(.@amap$!="bat_room") end; query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIp$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIp$+"'", .@AccountId); set .@aidtemp,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1) { if(attachrid(.@AccountId[.@i])) { getmapxy(.@qmap$,.@qmapx,.@qmapy,0); if (.@qmap$== .@amap$) set .@j,.@j+1; } detachrid; } attachrid .@aidtemp; if(.@j > $@MaxWimdows) announce "Dual Account Detected!",bc_self,0xEE6AA7; warp "SavePoint",0,0; end; OnInit: set $@MaxWimdows,1; end; } bat_room mapflag loadevent Quote Link to comment Share on other sites More sharing options...
Earthlingz Posted February 21, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 187 Reputation: 35 Joined: 01/01/12 Last Seen: September 20, 2014 Share Posted February 21, 2012 you have to use && instead of || should be if(.@amap$!="quiz_00" && .@amap$ !="quiz01") end; It should be OR(||) or it wont work unless that person has 2 identity that exist in those 2 maps at the same time. 1 Quote Link to comment Share on other sites More sharing options...
Landb4Time Posted February 22, 2012 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 76 Reputation: 0 Joined: 01/16/12 Last Seen: July 5, 2014 Share Posted February 22, 2012 Bump Bump .....please Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 22, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted February 22, 2012 you have to use && instead of || should be if(.@amap$!="quiz_00" && .@amap$ !="quiz01") end; It should be OR(||) or it wont work unless that person has 2 identity that exist in those 2 maps at the same time. ...check the script carefully.... he want to NOT apply to this 2 maps only..... quiz00 or quiz01 if he is out of these 2 map....the script will run... that's why.......... when u see the inside the script...separately... it is like this .@amap$ != "quiz_00" .@amap$ != "quiz_00" as you can can see here....he using "NOT EQUAL TO" ( != ) symbol so..when your script like this... if( .@amap$!="quiz_00" || .@amap$!="quiz_00" ) end; the code run like this.. if the character not located at quiz_00 OR not located at quit_01....then script stop so....your script will never run..because your char cant be at these 2 place at the same time... so you must use && and not || the correct 1 is this if( .@amap$!="quiz_00" && .@amap$!="quiz_00" ) end; if the char is not located at quiz_00 AND not located at quiz_01 ..the script will stop.. Quote Link to comment Share on other sites More sharing options...
Landb4Time Posted February 22, 2012 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 76 Reputation: 0 Joined: 01/16/12 Last Seen: July 5, 2014 Share Posted February 22, 2012 My concerned is its not WORKING ! Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 22, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted February 22, 2012 try this - script Sample -1,{ OnPCLoadMapEvent: if( strcharinfo(3) == .Map$ ){ set .@i, query_sql("SELECT `last_ip` FROM `login` WHERE account_id="+getcharid(3)+"",.@IP); set .@i, query_sql("SELECT `account_id` FROM `login` WHERE last_ip="+.@IP+""); if( .@i >= .Limit ){ mes "We detected there is "+.Limit+" or more users with same IP Logged in."; mes "Please log off these unused account."; close2; warp "prontera",155,181; } } end; OnInit: // How many Account with Same IP to trigger this Event set .Limit,2; // What Map will trigger the script set .Map$,"payon"; setmapflag .Map$,mf_loadevent; end; } Error...so removed..and ip remained upon log off...bugged the script...dont use... Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted February 22, 2012 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 764 Reputation: 220 Joined: 11/14/11 Last Seen: November 19, 2020 Share Posted February 22, 2012 - script abcde -1,{ OnPCLoadMapEvent: getmapxy(.@amap$,.@mapx,.@mapy,0); if(.@amap$!="quiz_00") end; query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIp$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIp$+"'", .@AccountId); set .@aidtemp,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1) { if(attachrid(.@AccountId[.@i])) { getmapxy(.@qmap$,.@qmapx,.@qmapy,0); if (.@qmap$== .@amap$) set .@j,.@j+1; } detachrid; } attachrid .@aidtemp; if(.@j > $@MaxWimdows) warp "SavePoint",0,0; end; OnInit: set $@MaxWimdows,1; end; } //------Enable map OnPCLoadMapEvent------------------- quiz_00 mapflag loadevent It works only with static IP addresses. Dynamic IP's will ignore this script. It works only with static IP addresses. Dynamic IP's will ignore this script. yup,I think his purpose is to avoid the same computer using multiple windows Why should this idea not work with dynamic IP addresses? When your IP changes you are disconnected from the server -> new login -> new data in `login`.`last_ip`!BTW; Restricting things by IP is a very bad idea. Why do you want to ban brothers (for example) from being in BG together? Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 22, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted February 22, 2012 @TS you can try this.. http://pastebin.com/raw.php?i=FxGBgUxv // How many User with Same IP can logged in and stay at the specific map set .Limit,2; // What map will be restricted set .Map$,"payon"; and ya..like what Kenpachi said is so..true... >.< @kenpachi maybe his brother too pro than him..so he dont want his brother to play BG with him.. hahahahhaha Quote Link to comment Share on other sites More sharing options...
Landb4Time Posted February 22, 2012 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 76 Reputation: 0 Joined: 01/16/12 Last Seen: July 5, 2014 Share Posted February 22, 2012 @Emistry its not Working theres no error ...but nothing happend . use dual with my Gm account to test . Nothing Happend . Quote Link to comment Share on other sites More sharing options...
Earthlingz Posted February 22, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 187 Reputation: 35 Joined: 01/01/12 Last Seen: September 20, 2014 Share Posted February 22, 2012 @Emistry ohh my bad i mislooked the end; statement Quote Link to comment Share on other sites More sharing options...
Landb4Time Posted February 23, 2012 Group: Members Topic Count: 32 Topics Per Day: 0.01 Content Count: 76 Reputation: 0 Joined: 01/16/12 Last Seen: July 5, 2014 Share Posted February 23, 2012 not working ..im using eAthena SVN 15704M Quote Link to comment Share on other sites More sharing options...
Question
Damon
Hi !
I wanted to know if it was possible a script that would forbidden two (or more) people on the same map.
(For example, in BG).
Thanks a lot
Link to comment
Share on other sites
19 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.