Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Mon Aug 26, 2002 2:26 am   

Gold Counter
 
There are two things I am interested in...gold in vault and gold in bank vault. I want a trigger to locate coins, and tally up how much is in each, then echo xxxxx coins in vault...xxxxcoins in bank vault
and then clear itself. Here is output.

100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
100 gold coins in Vault.
10000 gold coins carried by Arnoff's helper mob.
A pile of coins in A small treasure trove.
100 gold coins in Vault.
1000 gold coins in Bank Vault.
1000 gold coins in Bank Vault.
The treasury in Bank Vault.
1000 gold coins in Vault.
1000 gold coins in Vault.

To capture I had %d gold coins in Vault. and %d coins in Bank Vault.


I am guessing I need to make it add to say vcoins and bvcoins...vault coins and bank vault coins respectevely, and then use something like #SAY There are currently @vcoins coins in The Vault.

My problem is I am not sure how to make it add to the variable and then clear it. Could I have an alias make two blank variable of vcoins and bvoins, then had the locate output add to it?

Evangelist
www.phidar.com
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Aug 26, 2002 2:32 am   
 
#TRIGGER {^(%d) gold coins in Bank Vault.} {#ADD BVcoins %1;#ALARM BVTallyAlarm +3 {#SAY Coins in Bank Vaults: @BVcoins;#VAR BVcoins 0}}

#TRIGGER {^(%d) gold coins in Vault.} {#ADD Vcoins %1;#ALARM VTallyAlarm +3 {#SAY Coins in Vaults: @Vcoins;#VAR Vcoins 0}}

Tallies the amounts and overwrites the alarms till the last time it sees that trigger plus 3 seconds and it shows you the tallies.

Ton Diening
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net