tr0n Posted February 25, 2012 Posted February 25, 2012 (edited) Whois Lookup I reworked my script and changed it from Chatlog Viewer into Whois Lookup. Chatlog Viewer couldn't put the whole Chatlog into the Messagebox. Only works correctly with RAthena r15572 or above. (It uses the new Group System). Files whoislookup_1.0.0.txt whoislookup_1.1.0.txt whoislookup_1.1.1.txt Changelogs 1.0.0 Release 1.1.0 Rewritten query_sql (Thanks to Brian) 1.1.1 Added "Status" & "Guild" into Character Information 1.1.1 Changed some Informations (Gender, Email) How do you use it ? Write a private message to: "npc:whois" with text: "CHARACTER NAME HERE" and your Whois Lookup shows up. Features Only GM Level 99 can use it (you can edit it) Shows a bunch of Informations about Account Shows every Character with some Informations How can you help me ? Give me feedback Report bugs Tell me if you like it tr0n Edited April 19, 2012 by tr0n 1 Quote
Pneuma Posted February 25, 2012 Posted February 25, 2012 (edited) Very Nice, wish I could test it Why not put a video up for it? Edited February 25, 2012 by Skyrim Quote
tr0n Posted February 25, 2012 Author Posted February 25, 2012 (edited) Very Nice, wish I could test it Why not put a video up for it? Thank you! I've got only a UMTS-Stick (50kb/s). That's too slow. I can't even look a video on youtube, sry. Maybe someone else can do it with faster internet? Edited February 25, 2012 by tr0n Quote
tr0n Posted February 25, 2012 Author Posted February 25, 2012 (edited) the file cant be download.. Updated to 1.1.2 ! Edited February 25, 2012 by tr0n Quote
tr0n Posted February 25, 2012 Author Posted February 25, 2012 thank you for this Nice work tr0n. Thank you Updated to 1.1.3, added some colors. Quote
Gepard Posted February 25, 2012 Posted February 25, 2012 Looks like a possible performance killer for me. I would never use a script that queries log tables from map-server. Quote
tr0n Posted February 25, 2012 Author Posted February 25, 2012 (edited) Found out that he can't put whole chatlog in Message Box, because of array limit. Kinda fail by me... sorry folks. what a blame. Maybe I could just make a whoislookup out of it. EDIT: CHANGED SCRIPT INTO WHOIS LOOKUP. Edited February 26, 2012 by tr0n Quote
Brian Posted February 25, 2012 Posted February 25, 2012 //--- Whois Lookup 1.0.0 -----------------------------------------// //----------------------------------------------------------------// // ttt 000000000 // ttt 000 000 // ttttttttt rrrrrrrrr 000 000 nnnnnnnnn // ttt rrr 000 000 nnn nnn // ttt rrr 000 000 nnn nnn // ttt rrr 000 000 nnn nnn // ttttt rrr 000000000 nnn nnn //----------------------------------------------------------------// //--- Changelogs: ------------------------------------------------// // 1.0.0 Release //----------------------------------------------------------------// //--- Main Script ------------------------------------------------// - script whois -1,{ end; OnWhisperGlobal: if(getgmlevel()!=99) end; query_sql "DELETE FROM `chatlog` WHERE `dst_charname`='npc:whois'"; query_Sql "SELECT `account_id` FROM `char` WHERE `name`='"+@whispervar0$+"'", .@account_id; if(.@account_id==0){ mes "[^FF7700Whois Lookup^000000]"; mes "Account or Character does not exist."; close; } mes "[^FF7700Account Information^000000]"; mes "-----------------------------------"; query_sql "SELECT `userid` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc1$; query_sql "SELECT `user_pass` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc2$; query_sql "SELECT `sex` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc3$; query_sql "SELECT `email` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc4$; query_sql "SELECT `group_id` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc5$; query_sql "SELECT `lastlogin` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc6$; query_sql "SELECT `last_ip` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc7$; mes "Username: ["+.@whoisacc1$+"]"; mes "Password: ["+.@whoisacc2$+"]"; mes "Gender: ["+.@whoisacc3$+"]"; mes "Email: ["+.@whoisacc4$+"]"; mes "GM Level: ["+.@whoisacc5$+"]"; mes "Last Login: ["+.@whoisacc6$+"]"; mes "Last IP: ["+.@whoisacc7$+"]"; mes "-----------------------------------"; mes "[^FF7700Character Information^000000]"; mes "-----------------------------------"; query_sql "SELECT `name` FROM `char` WHERE `account_id`="+.@account_id+" ORDER BY `char_id`", .@whoischar1$; query_sql "SELECT `char_id` FROM `char` WHERE `account_id`="+.@account_id+" ORDER BY `char_id`", .@whoischar2$; query_sql "SELECT `class` FROM `char` WHERE `account_id`="+.@account_id+" ORDER BY `char_id`", .@whoischar3$; query_sql "SELECT `base_level` FROM `char` WHERE `account_id`="+.@account_id+" ORDER BY `char_id`", .@whoischar4$; query_sql "SELECT `job_level` FROM `char` WHERE `account_id`="+.@account_id+" ORDER BY `char_id`", .@whoischar5$; query_sql "SELECT `zeny` FROM `char` WHERE `account_id`="+.@account_id+" ORDER BY `name`", .@whoischar6$; for(set .@i,0; .@i < getarraysize(.@whoischar1$); set .@i,.@i+1) { mes "Character Name: ["+.@whoischar1$[.@i]+"]"; mes "Character ID: ["+.@whoischar2$[.@i]+"]"; mes "Job Class: ["+.@whoischar3$[.@i]+"]"; mes "Level: [base: "+.@whoischar4$[.@i]+"/Job: "+.@whoischar5$[.@i]+"]"; mes "Zeny: ["+.@whoischar6$[.@i]+"]"; mes "-----------------------------------"; } close; end; } Did you know that SELECT can select more than one column?! For example, these 7 queries could be combined into one: query_sql "SELECT `userid` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc1$; query_sql "SELECT `user_pass` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc2$; query_sql "SELECT `sex` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc3$; query_sql "SELECT `email` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc4$; query_sql "SELECT `group_id` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc5$; query_sql "SELECT `lastlogin` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc6$; query_sql "SELECT `last_ip` FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc7$; query_sql "SELECT `userid`,`user_pass`,`sex`,`email`,`group_id`,`lastlogin`,`last_ip` " + "FROM `login` WHERE `account_id`="+.@account_id, .@whoisacc1$, .@whoisacc2$, .@whoisacc3$, .@whoisacc4$, .@whoisacc5$, .@whoisacc6$, .@whoisacc7$; Quote
tr0n Posted February 25, 2012 Author Posted February 25, 2012 (edited) I'm very newbie in SQL Scripting. Thank you very much. I will change it. I hope I can learn much more about SQL, I think it's great. EDIT: UPDATED TO V.1.1.1 Edited February 26, 2012 by tr0n Quote
ngek202 Posted February 26, 2012 Posted February 26, 2012 dude fantastic script very much useful for checking players and some stuffs Quote
v00m3r Posted April 29, 2012 Posted April 29, 2012 (edited) i have this DB error on my map server.. [sql]: DB error - Table 'ragnarok.chatlog' doesn't exist [Debug]: at ..srcmapscript.c:13746 - DELETE FROM `chatlog` WHERE `dst_charnam e`='npc:whois' [Debug]: Source (NPC): whois (invisible/not on a map) you got great script there ^^ Edited April 29, 2012 by v00m3r Quote
Dastgir Posted May 8, 2012 Posted May 8, 2012 query_sql "DELETE FROM `chatlog` WHERE `dst_charname`='npc:whois'"; It should be: query_logsql "DELETE FROM `chatlog` WHERE `dst_charname`='npc:whois'"; because many users don't have log db and ragnarok db the same, they may use logs in another database. 1 Quote
tr0n Posted May 8, 2012 Author Posted May 8, 2012 You are right. For People who use a different Database they should use logsql. Quote
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.