Jump to content
  • 0

Is it possible to retrieve an accounts IP via rA scripts?


megablox

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  81
  • Reputation:   8
  • Joined:  04/08/12
  • Last Seen:  

What I mean is can you somehow read a players IP by having him/her interact with an NPC?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+";",.@IP$);
dispbottom .@IP$;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1;",.@IP$);
dispbottom .@IP$;

'-'

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1;",.@IP$);
dispbottom .@IP$;

'-'

?.. You just easily add that to an existing script or make an entire new script revolving around that little code blurb o_O :P

Edited by Mysterious
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

I supose that by account_id being primary key, mysql adds a limit 1 by default '-'.

But querys that only expects 1 result and dont have a limit 1, gives me a itch lol.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

All results from SQL queries are stored in a variable array, starting at the 0th element (as you would expect). There's nothing fancy about it. O:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

You can increase the Limit by changing 1 to whatever. But really, with that snippet, you're just getting THAT character's IP.. and knowing 1 char, he has only 1 IP attached to it, not multiple :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  81
  • Reputation:   8
  • Joined:  04/08/12
  • Last Seen:  

I see, 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...