LearningRO Posted January 31, 2019 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 73 Joined: 02/10/12 Last Seen: 2 hours ago Share Posted January 31, 2019 (edited) hi, after i update my rathena into this commit https://github.com/rathena/rathena/commit/26720f041a3cd0edbaa975bfc70345a30e9bf706 this script not working anymore - script kjdshfksfj FAKE_NPC,{ OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa", 14, 99; end; Onaaa: freeloop true; .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@aid, .@cid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid$["+ .@b_ip_size[.@j] +"]", .@cid[.@i] +""; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { getmapxy .@map$, .@x, .@y, BL_PC, getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid$["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end; } i get error like this on console [Error]: buildin_getmapxy: Player with map id '0' is not found. Edited February 2, 2019 by melv0 wrong explains :D Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted January 31, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 31, 2019 (edited) LMAO !!! this script was made for over 4 years, and only today I found out it has a bughttp://herc.ws/board/topic/11445-sameip-command-for-rathena/ .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@aid, .@cid, .@ip$ ); look closely, name, char_id, account_id, === BUT .@name$, .@aid, .@cid up version 0.3 //===== Hercules Script ====================================== //= @sameip //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 0.3 //===== Compatible With: ===================================== //= Hercules 2019-02-01 //===== Description: ========================================= //= list all players with same ip address //===== Topic ================================================ //= https://rathena.org/board/topic/118137-error-buildin_getmapxy/ //===== Additional Comments: ================================= //= it always list all players online, unable to limit to a single map currently //============================================================ - script kjdshfksfj FAKE_NPC,{ OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa"; end; Onaaa: freeloop true; .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@cid, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid["+ .@b_ip_size[.@j] +"]", .@cid[.@i]; setd ".@b_ip"+ .@j +"_aid["+ .@b_ip_size[.@j] +"]", .@aid[.@i]; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { getmapxy .@map$, .@x, .@y, UNITTYPE_PC, getd( ".@b_ip"+ .@i +"_aid["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end; } EDIT: I think should write another version 0.4 since rathena has already upgrade the script engine quite some time ago the only optimization I can think of is using inarray script command, so nah Edited January 31, 2019 by AnnieRuru 2 Quote Link to comment Share on other sites More sharing options...
0 LearningRO Posted February 1, 2019 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 73 Joined: 02/10/12 Last Seen: 2 hours ago Author Share Posted February 1, 2019 18 hours ago, AnnieRuru said: LMAO !!! this script was made for over 4 years, and only today I found out it has a bughttp://herc.ws/board/topic/11445-sameip-command-for-rathena/ .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@aid, .@cid, .@ip$ ); look closely, name, char_id, account_id, === BUT .@name$, .@aid, .@cid up version 0.3 //===== Hercules Script ====================================== //= @sameip //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 0.3 //===== Compatible With: ===================================== //= Hercules 2019-02-01 //===== Description: ========================================= //= list all players with same ip address //===== Topic ================================================ //= https://rathena.org/board/topic/118137-error-buildin_getmapxy/ //===== Additional Comments: ================================= //= it always list all players online, unable to limit to a single map currently //============================================================ - script kjdshfksfj FAKE_NPC,{ OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa"; end; Onaaa: freeloop true; .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@cid, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid["+ .@b_ip_size[.@j] +"]", .@cid[.@i]; setd ".@b_ip"+ .@j +"_aid["+ .@b_ip_size[.@j] +"]", .@aid[.@i]; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { getmapxy .@map$, .@x, .@y, UNITTYPE_PC, getd( ".@b_ip"+ .@i +"_aid["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end; } EDIT: I think should write another version 0.4 since rathena has already upgrade the script engine quite some time ago the only optimization I can think of is using inarray script command, so nah thanks annie someone was help me to and working too with based your script btw in last version rathena UNITTYPE_PC change into BL_PC - script kjdshfksfj FAKE_NPC,{ OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa", 14, 99; end; Onaaa: freeloop true; .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@cid, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid$["+ .@b_ip_size[.@j] +"]", .@cid[.@i] +""; setd ".@b_ip"+ .@j +"_aid["+ .@b_ip_size[.@j] +"]", .@aid[.@i] +""; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; .@origin = getcharid(3); for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { .@rid = getd( ".@b_ip"+ .@i +"_aid["+ .@j +"]" ) + ""; if (attachrid(.@rid)) { getmapxy(.@map$, .@x, .@y); attachrid .@origin; dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid$["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end; } Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted February 1, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 1, 2019 (edited) 1 hour ago, melv0 said: btw in last version rathena UNITTYPE_PC change into BL_PC of course I know, I mean com'on, this script only compatible with latest latest rathena, because before that commit, rathena couldn't even insert RID on the getmapxy btw I instantly recognized this is my script when I see npc name is kjdshfksfj and account_id as aaa, no other member do like this I wonder where you got this script from ... because you say things like "my script not working anymore" and " someone was help me to and working too" Edited February 1, 2019 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
0 LearningRO Posted February 2, 2019 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 73 Joined: 02/10/12 Last Seen: 2 hours ago Author Share Posted February 2, 2019 (edited) 8 hours ago, AnnieRuru said: of course I know, I mean com'on, this script only compatible with latest latest rathena, because before that commit, rathena couldn't even insert RID on the getmapxy btw I instantly recognized this is my script when I see npc name is kjdshfksfj and account_id as aaa, no other member do like this I wonder where you got this script from ... because you say things like "my script not working anymore" and " someone was help me to and working too" sorry i don't mean like this i mean "my script" actually I mean I use this script, and i don't claim this script made by me sorry my english not good i choose wrong word ill edit the frist post Edited February 2, 2019 by melv0 Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted February 2, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 2, 2019 (edited) nonono, I thought you got scam that you bought this script from unknown person you know, this happens a lot I have a habit that most of my useful scripts are never put to release, and most of my scripts are hidden inside script request section and I heard a few story that some scammer has claim my script as theirs and sell them in paid service that's why now I have started to reorganize all my past work into my google drive Edited February 2, 2019 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
0 LearningRO Posted February 2, 2019 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 73 Joined: 02/10/12 Last Seen: 2 hours ago Author Share Posted February 2, 2019 (edited) 3 hours ago, AnnieRuru said: nonono, I thought you got scam that you bought this script from unknown person you know, this happens a lot I have a habit that most of my useful scripts are never put to release, and most of my scripts are hidden inside script request section and I heard a few story that some scammer has claim my script as theirs and sell them in paid service that's why now I have started to reorganize all my past work into my google drive I'm sorry for the misunderstand, and thanks for reminding of the scammer im really sorry about that ,if this offend you i hope you can forgive me about this misunderstanding btw, i just copy paste from that link without change anything from your postingHere Edited February 2, 2019 by melv0 typo Quote Link to comment Share on other sites More sharing options...
0 Ezra Edwin Posted June 15, 2023 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 12 Reputation: 3 Joined: 01/13/18 Last Seen: June 30, 2023 Share Posted June 15, 2023 (edited) Wrong comment Edited June 15, 2023 by Ezra Edwin Sorry wrong comment Quote Link to comment Share on other sites More sharing options...
Question
LearningRO
hi, after i update my rathena into this commit https://github.com/rathena/rathena/commit/26720f041a3cd0edbaa975bfc70345a30e9bf706
this script not working anymore
i get error like this on console
[Error]: buildin_getmapxy: Player with map id '0' is not found.
Edited by melv0wrong explains :D
Link to comment
Share on other sites
7 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.