Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 01-19-2013, 05:21 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default Getting Carried money from a player

I noticed that if you have certain amounts of platinum that the server goes nuts over and thinks you have negative money.

Here is an example

Code:
Sub EVENT_SAY
{
my $plat = $client->GetCarriedMoney();

if($text=~/Hail/i)
      {
       $client->Message(315, "$plat");
      }
}

Now if I am holding 2,500,000 platinum the NPC will tell me I am holding... -1,794,967,296 which I know is dealt with in copper.


Is there a way to just check how much platinum a player has through a quest script? So I can avoid this limitation of the GetCarriedMoney?


It seems 2,147,483,647 copper is the max it will tell you the player has before it starts going negative and GetCarriedMoney is an int64 which should go much higher than that.

If anyone can shed some light on this for me it would be awesome thank you!
Reply With Quote
  #2  
Old 01-19-2013, 06:27 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Look at XS_Client_GetCarriedMoney, specifically:

Code:
int		RETVAL;
My totally non-exhaustive search didn't find any 64-bit integers getting returned, so I'm not sure what would need to be different. I did see a few unsigned longs being returned though which could be bad for 64-bit Linux compiles if it doesn't just magically handle it.
Reply With Quote
  #3  
Old 01-19-2013, 10:02 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Well any idea on how to find how much platinum a player has in his inventory using Perl?
Reply With Quote
  #4  
Old 01-19-2013, 10:20 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

GetCarriedMoney() totals all carried denominations, not just platinum (and converts the total to copper value, as you already know). you'd have to modify the source to make an interface that only does platinum (or whatever denomination you chose).
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #5  
Old 01-19-2013, 05:17 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Quote:
Originally Posted by c0ncrete View Post
GetCarriedMoney() totals all carried denominations, not just platinum (and converts the total to copper value, as you already know). you'd have to modify the source to make an interface that only does platinum (or whatever denomination you chose).

So in other words I can't see the total money a player holds due to the limitations of GetCarriedMoney() ?

Without modifying the source that is.
Reply With Quote
  #6  
Old 01-19-2013, 05:31 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

sort of. i don't think perlxs can easily deal with int64 values, which is the data type that the server source is using when calculates the value of all of the different denominations of coin carried by the client.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
  #7  
Old 01-19-2013, 06:12 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Ah that sucks ... maybe we could get a GetCarriedPlatinum() .. gold silver copper ect since those at least go up to 2billion which is more than enough.

Edited my GetCarriedMoney to only show platinum and it seemed to work just fine but doesn't help my quest since its for another server heh
Reply With Quote
  #8  
Old 01-19-2013, 07:37 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Quote:
Originally Posted by c0ncrete View Post
sort of. i don't think perlxs can easily deal with int64 values, which is the data type that the server source is using when calculates the value of all of the different denominations of coin carried by the client.
Could probably just return it as a double.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:11 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3