Here is a custom patch that can be applied to your core for an extra 6 players functions to be used in scripting. The functions are as follows:
CanRemoveCoinage(gold, silver, copper);
RemoveCoinage(gold, silver, copper);
RemoveSilver(silver);
CanRemoveSilver(silver);
RemoveGold(gold);
CanRemoveGold(gold);
Pretty simple to use, here's a sample using some:
Code:
if(Player->CanRemoveGold(100))
{
// The player has at least 100 gold! STEAL SOME!
Player->RemoveCoinage(99,76,43);
//Removes 99 gold, 76 silver, 43 copper
}
else
{
// The player did not have 100 gold :<
Player->BroadcastMessage("You don't have 100 gold? Well Shit.");
}
--) ALL CREDITS GO TO ME, Gastricpenguin, FOR CODING THESE FUNCTIONS (--
Download the Patch