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 10-23-2012, 11:22 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default Little help with TakeMoneyFromPP

I am writing a little script for npc who sells items and services, but is not an actual merchant (so people can't sell to him)

However instead of giving money to npc I want script to just take money from the player.

So I need:
1. check if player has enough money
2. take the money

Now:
Code:
a=$client->GetCarriedMoney();

if (a> 999 )
{
$client->TakeMoneyFromPP(999, updateclient=false);
}

else
{
 quest::say("You don't have enough cash on you to obtain this service!");
}
Does this look right to you? (I don't have a server running atm and can't test it unfortunately)
Also - updateclient=false ? is that right? or should it be true?
Reply With Quote
  #2  
Old 10-23-2012, 11:48 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I didn't fully check this out, but I believe 'updateclient' is a client-specific requirement. (If someone can validate this... Ti = true, SoF+ = false)

If you're catering to a specfic client(ele), you might be able to avoid any checks and keep it hard-coded.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #3  
Old 10-23-2012, 11:50 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

ok if I want this to work for all clients, can just omit that part?
Reply With Quote
  #4  
Old 10-24-2012, 12:03 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Disregard..as long as you're not using the merchant interface, I think it will just be updateclient = true.

Client updates are only sent to clients that don't subtract merchant purchases automatically.


If you ARE using a merchant interface, then you will have to determine the client type.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #5  
Old 10-24-2012, 12:08 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

oh no, this is just for a regular npc which I specifically want to be a non merchant - as I said in the 1st post - i want player be able to buy, but not sell - so player just tell npc what they want to get and npc takes cash from them.
I am just trying to avoid the hassle of having players giving npc the cash directly which is always cumbersome.
Reply With Quote
  #6  
Old 10-24-2012, 12:17 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Then, yes, it needs to be true. Otherwise it would only deduct the server money and the client would still show the pre-purchase amount. (Sorry for confusion.)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #7  
Old 10-24-2012, 12:33 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

no problem, thank you for looking it over
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 07:24 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