Jump to content
  • 0

change IP to GM


Fluffle Puff

Question


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  375
  • Reputation:   88
  • Joined:  12/30/11
  • Last Seen:  

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 Alexandria
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  375
  • Reputation:   88
  • Joined:  12/30/11
  • Last Seen:  

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 by Alexandria
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

Replace all SQL_Query with query_sql

Also, it'll only work if you're using SQL.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  375
  • Reputation:   88
  • Joined:  12/30/11
  • Last Seen:  

Replace all SQL_Query with query_sql

Also, it'll only work if you're using SQL.

thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...