Hey I was wondering if anyone could make a coin addition trigger that added all your coins to equal however much plat it is? like all the copper/10 etc. until it all gets to plat?
Thanks,
------------------
Braggo Boulderbasher
Coin addition plz? :)
-
- Sojourner
- Posts: 31
- Joined: Fri Mar 16, 2001 6:01 am
- Location: Westminster, SC , USA
This works with TINTIN++ v1.84 (Beta)
Type score, and you should see a
Coins I have :
right above the Coins in bank line
#action {Coins in bank: %1 platinum %2 gold %3 silver %4 copper} {#var {ccopper} {$$4};#math {csilver} {$4/10 + $3} ;#math {cgold} {$csilver/10 + $2} ;#math {cplat} {$cgold/10 + $1} ;#math {cgold} {$cgold - $cplat*10} ;#math {csilver} {$csilver - ($csilver/10)*10};#math {ccopper} {$ccopper - ($ccopper/10)*10};#prepad {cplat} {4} {$cplat};#prepad {cgold} {5} {$cgold};#prepad {csilver} {5} {$csilver};#prepad {ccopper} {5} {$ccopper};#showme {Coins I have : $cplat platinum $cgold gold $csilver silver $ccopper copper.};#unvar cplat;#unvar cgold;#unvar csilver;#unvar ccopper}
[This message has been edited by Raiwen (edited 04-08-2001).]
Type score, and you should see a
Coins I have :
right above the Coins in bank line
#action {Coins in bank: %1 platinum %2 gold %3 silver %4 copper} {#var {ccopper} {$$4};#math {csilver} {$4/10 + $3} ;#math {cgold} {$csilver/10 + $2} ;#math {cplat} {$cgold/10 + $1} ;#math {cgold} {$cgold - $cplat*10} ;#math {csilver} {$csilver - ($csilver/10)*10};#math {ccopper} {$ccopper - ($ccopper/10)*10};#prepad {cplat} {4} {$cplat};#prepad {cgold} {5} {$cgold};#prepad {csilver} {5} {$csilver};#prepad {ccopper} {5} {$ccopper};#showme {Coins I have : $cplat platinum $cgold gold $csilver silver $ccopper copper.};#unvar cplat;#unvar cgold;#unvar csilver;#unvar ccopper}
[This message has been edited by Raiwen (edited 04-08-2001).]
-
- Sojourner
- Posts: 31
- Joined: Fri Mar 16, 2001 6:01 am
- Location: Westminster, SC , USA
-
- Sojourner
- Posts: 31
- Joined: Fri Mar 16, 2001 6:01 am
- Location: Westminster, SC , USA
Ok. here ya go. don't know if it will cut and paste properly. You may have to use this and enter your triggers manually via the settings editor.
#ALIAS worth {#var c "";#var s "";#var g "";#var p "";#var t "";#T+ coin;sco}
#TRIGGER {^Coins carried:* (%d) copper} {#if (%1 > 0) {#math c %1/1000}} coin
#TRIGGER {^Coins carried:* (%d) silver} {#if (%1 > 0) {#math s %1/100}} coin
#TRIGGER {^Coins carried:* (%d) gold} {#if (%1 > 0) {#math g %1/10}} coin
#TRIGGER {^Coins carried:* (%d) platinum} {#if (%1 > 0) {#var p %1}} coin
#TRIGGER {^Playing Time:} {#math t @c+@s+@g+@p;#say Your coins are worth @t platinum.;#T- coin} coin
The alias initializes all the variables used, turns on the coin class, and executes a sc command.
The first 4 triggers catch each coin type, checks to see if the amount you have is greater than 0, divdes it by the proper rate, and assigns each to a variable.
The last trigger adds all the variables for each coin type to the variable t. Then executes a #say to your main mud window telling you the results. finally it turns off the coin class.
This is only for coins on you. It dosent calculate coins in the bank. and it dosen't track any remainder coins.
This is written and TESTED on the mud with zMud 6.16
[This message has been edited by Sekon/Fanil (edited 04-10-2001).]
#ALIAS worth {#var c "";#var s "";#var g "";#var p "";#var t "";#T+ coin;sco}
#TRIGGER {^Coins carried:* (%d) copper} {#if (%1 > 0) {#math c %1/1000}} coin
#TRIGGER {^Coins carried:* (%d) silver} {#if (%1 > 0) {#math s %1/100}} coin
#TRIGGER {^Coins carried:* (%d) gold} {#if (%1 > 0) {#math g %1/10}} coin
#TRIGGER {^Coins carried:* (%d) platinum} {#if (%1 > 0) {#var p %1}} coin
#TRIGGER {^Playing Time:} {#math t @c+@s+@g+@p;#say Your coins are worth @t platinum.;#T- coin} coin
The alias initializes all the variables used, turns on the coin class, and executes a sc command.
The first 4 triggers catch each coin type, checks to see if the amount you have is greater than 0, divdes it by the proper rate, and assigns each to a variable.
The last trigger adds all the variables for each coin type to the variable t. Then executes a #say to your main mud window telling you the results. finally it turns off the coin class.
This is only for coins on you. It dosent calculate coins in the bank. and it dosen't track any remainder coins.
This is written and TESTED on the mud with zMud 6.16
[This message has been edited by Sekon/Fanil (edited 04-10-2001).]
Who is online
Users browsing this forum: No registered users and 22 guests