megablox Posted July 17, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Share Posted July 17, 2012 What I mean is can you somehow read a players IP by having him/her interact with an NPC? Quote Link to comment Share on other sites More sharing options...
Euphy Posted July 17, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted July 17, 2012 query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+";",.@IP$); dispbottom .@IP$; Quote Link to comment Share on other sites More sharing options...
herenow Posted July 18, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 36 Reputation: 4 Joined: 02/12/12 Last Seen: January 25, 2017 Share Posted July 18, 2012 query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1;",.@IP$); dispbottom .@IP$; '-' Quote Link to comment Share on other sites More sharing options...
Mystery Posted July 18, 2012 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted July 18, 2012 (edited) 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 Edited July 18, 2012 by Mysterious Quote Link to comment Share on other sites More sharing options...
herenow Posted July 18, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 36 Reputation: 4 Joined: 02/12/12 Last Seen: January 25, 2017 Share Posted July 18, 2012 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. Quote Link to comment Share on other sites More sharing options...
Euphy Posted July 18, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted July 18, 2012 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: Quote Link to comment Share on other sites More sharing options...
Mystery Posted July 18, 2012 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted July 18, 2012 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 Quote Link to comment Share on other sites More sharing options...
megablox Posted July 18, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 81 Reputation: 10 Joined: 04/08/12 Last Seen: December 14, 2020 Author Share Posted July 18, 2012 I see, thanks! Quote Link to comment Share on other sites More sharing options...
Question
megablox
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.