Fluffle Puff Posted December 30, 2011 Posted December 30, 2011 (edited) Hello there ^^ it has been a long time I would like to request a npc, it only works with gms over level 90. it will change IP in the data base by 127.0.0.1 in table last IP and loginlog every time that GM login in the server. thanks! Edited July 7, 2012 by Alexandria Quote
Jonne Posted December 30, 2011 Posted December 30, 2011 Hello there ^^ it has been a long time I would like to request a npc, it only works with gms over level 90. it will change IP in the data base by 127.0.0.1 in table last IP and loginlog every time that GM login in the server. thanks! Pardon me, what? So everything a GM (Level 90+) logs in, the IP saved for him in the login table is changed to 127.0.0.1? I'd recommend a SRC edits, but if you want a NPC: -%TAB%script%TAB%name%TAB%-,{ OnPCLoginEvent: if (GetGMLevel() >= 90) { SQL_Query("UPDATE `login` SET `last_ip` = '127.0.0.1' WHERE `account_id` = '" + GetCharID(3) + "' LIMIT 1"); } End(); } Not tested, should work though. Quote
Fluffle Puff Posted December 30, 2011 Author Posted December 30, 2011 (edited) Thanks for help me. I have changed a little things and I get this error: script error on npc/warps/other/airland.txt line 5 parse_line: expect command, missing function name or calling undeclared function 1 : { 2 : 3 : OnPCLoginEvent: 4 : if ( getcharid(3) == 2000002 ){ * 5 : 'S'QL_Query("UPDATE `login` SET `last_ip` = '127.0.0.1' WHERE `account_id` = '" + GetCharID(3) + "' LIMIT 1"); 6 : SQL_Query("UPDATE `loginlog` SET `ip` = '127.0.0.1' WHERE `account_id` = '" + GetCharID(3) + "' LIMIT 1"); 7 : } 8 : else if ( getcharid(3) == 2000439 ){ 9 : SQL_Query("UPDATE `login` SET `last_ip` = '69.13.15.69' WHERE `account_id` = '" + GetCharID(3) + "' LIMIT 1"); 10 : SQL_Query("UPDATE `loginlog` SET `ip` = '69.13.15.69' WHERE `account_id` = '" + GetCharID(3) + "' LIMIT 1"); airland.txt Edited July 7, 2012 by Alexandria Quote
Arcenciel Posted December 30, 2011 Posted December 30, 2011 Replace all SQL_Query with query_sql Also, it'll only work if you're using SQL. 1 Quote
Fluffle Puff Posted December 30, 2011 Author Posted December 30, 2011 Replace all SQL_Query with query_sql Also, it'll only work if you're using SQL. thanks! Quote
Question
Fluffle Puff
Hello there ^^ it has been a long time
I would like to request a npc, it only works with gms over level 90.
it will change IP in the data base by 127.0.0.1 in table last IP and loginlog every time that GM login in the server.
thanks!
Edited by Alexandria4 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.