EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Does $userid represent a certain value from the db? (https://www.eqemulator.org/forums/showthread.php?t=34014)

revloc02c 08-15-2011 11:12 PM

Does $userid represent a certain value from the db?
 
I was trying to use $userid to pass a parameter into a SQL stored procedure in my db. I expected the value to be from the id column of my toon in the character_ table (which = 1) but got something completely different (53?). I am wondering if the value contained in the $userid variable corresponds to a column in some table of the db, or does it come from somewhere else entirely (perhaps generated on the client side?). Anyone know?

lerxst2112 08-16-2011 12:04 AM

It looks like it is just a number that increments as things are added to the entity list.

Try Client::AccountID()

joligario 08-16-2011 12:08 AM

Yes, it is an entity id. If you want the true characterid from the database, you should use $client->CharacterID()

revloc02c 08-16-2011 12:14 AM

Quote:

Originally Posted by lerxst2112 (Post 202270)
It looks like it is just a number that increments as things are added to the entity list.

Try Client::AccountID()

Ah-ha, that makes sense. Thanks.

Quote:

Originally Posted by joligario (Post 202273)
Yes, it is an entity id. If you want the true characterid from the database, you should use $client->CharacterID()

And thanks, just what I needed.

lerxst2112 08-16-2011 12:35 AM

It looks like that gets exported as $charid as well.

revloc02c 08-16-2011 01:09 AM

Sure enough, works like a charm too. Sheesh, I prolly shoulda just tried that. Thanks again lerxst.

I looked hard for it here under the "Variables" section but it is not listed. Should it be added in there?

lerxst2112 08-16-2011 02:00 AM

Yeah, probably, but there may be others missing. I found it digging through the code, but it's on the list here as well. http://www.eqemulator.net/wiki/wikka...uestCheatSheet

If you search the code for "ExportVar" you can find them all. Some depend on which event is being triggered, but they're all pretty much in that one function.

trevius 08-16-2011 02:38 AM

Yes, it was missing, so I just went ahead and added it. Anyone is welcome to create a wiki account and add/edit pages as needed, FYI.

revloc02c 08-16-2011 09:01 PM

Quote:

Originally Posted by lerxst2112 (Post 202284)
Yeah, probably, but there may be others missing. I found it digging through the code, but it's on the list here as well. http://www.eqemulator.net/wiki/wikka...uestCheatSheet

Ah okay, I didn't look there. Heh, just used to looking in the one place.

Quote:

Originally Posted by lerxst2112 (Post 202284)
If you search the code for "ExportVar" you can find them all. Some depend on which event is being triggered, but they're all pretty much in that one function.

Good info, thanks lerxst. I am sure I'll use that sometime.

Quote:

Originally Posted by trevius (Post 202286)
Anyone is welcome to create a wiki account and add/edit pages as needed, FYI.

Oh, I didn't know that. I need to look into it, thanks Trev.


All times are GMT -4. The time now is 09:31 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.