View Single Post
  #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