There were wonderful scripts to show how much gold a player had.
Now with the new bank system, I am trying to get these to work. The bank box is irrelevant now and how much gold a player is carrying on them is not really what I am interested in.
It creates a file with gold in bank, gold on player, total player gold and their name.

For GoldOnPlayers it does a search for:
Code:
GoP += SearchForGold( pm.BankBox );
GoP += SearchForGold( pm.Backpack );

I do not want to search bank boxes, since it is not there, and am not sure the wording I need in it's place.
I am not really worried if it does it by player(the totals shown would be the same for each player on that account) or if it is done by account.
**I think I have been thinking too much and need to step back
If you can point me in a direction, it would be appreciated.
(I believe I have a gold issue on my server I want to STOP or else some heads will roll!)
The GoldList creates the file I have attached(in partial) so you can see what it does.

** The player gold script I will attach, but you need a docs folder and Player Gold.txt file in your server folder before you run the command or it will crash.

I appreciate your assistance,

Shazzy :confused:
 

Attachments

  • GoldList.cs
    4 KB · Views: 6
  • PlayerGold.cs
    2.3 KB · Views: 7
  • gold.txt
    754 bytes · Views: 4
This may not be quite what you are looking for... but it *might* be in the right direction?

To get the ATM to work on the slot machine I had to change one line on the slot machine gump:

// if (from.BankBox.ConsumeTotal(typeof(Gold), amount))
if (Banker.Withdraw(from, amount))

Instead of 'BankBox' it is now 'Banker'... maybe something along those lines....?
 
Try replace:
Code:
GoP += SearchForGold( pm.BankBox);

with
Code:
GoP += Banker.GetBalance( pm );

With account gold, this would report 2 characters on the same account as having identical amounts of gold (minus whatever is in their backpack), essentially creating duplicates in the list.

You could get around this by listing accounts instead of players. However you obviously don't want to be displaying account names to players, if you planned on making the information public.
 
Thanks both youo guys
Im stuck at the moment getting a "Ultima Art: Unable to read client files" so will try once this is situated, sheesh :(
 
Back