Jump to content
  • 0

Question

Posted (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 by Alexandria

4 answers to this question

Recommended Posts

Posted

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.

Posted (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 by Alexandria

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...