Coin addition plz? :)

Scripts and support for your favorite MUD client.
Braggo
Sojourner
Posts: 74
Joined: Fri Jan 26, 2001 6:01 am
Location: Anniston, AL, USA

Coin addition plz? :)

Postby Braggo » Sat Apr 07, 2001 6:09 pm

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
Sekon/Fanil
Sojourner
Posts: 31
Joined: Fri Mar 16, 2001 6:01 am
Location: Westminster, SC , USA

Postby Sekon/Fanil » Sat Apr 07, 2001 11:21 pm

Would be pretty easy ta do but I'd need ta know how ya want to apply it? (what ya wanna do with it.
Raiwen
Sojourner
Posts: 430
Joined: Sun Jan 28, 2001 6:01 am
Location: Atlanta, Ga USA
Contact:

Postby Raiwen » Sun Apr 08, 2001 4:41 pm

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).]
Braggo
Sojourner
Posts: 74
Joined: Fri Jan 26, 2001 6:01 am
Location: Anniston, AL, USA

Postby Braggo » Sun Apr 08, 2001 5:17 pm

bah sorry using zMUD 6.16..i want it to add all the copper, gold, plat, and silver and put it all into plat, like copper/10+silver/10+gold/10+plat. That explain good enough? Image
Thanks,

------------------
Braggo Boulderbasher
Raiwen
Sojourner
Posts: 430
Joined: Sun Jan 28, 2001 6:01 am
Location: Atlanta, Ga USA
Contact:

Postby Raiwen » Sun Apr 08, 2001 5:55 pm

Sorry, never used a GUI to mud Image

you should be able to convert that to zMud. It converts all your coins copper->silver->gold->plat, but it also, shows you your remainder.

Coins I have : 10 plat 7 gold 5 silver 8 copper.

Where you might have

Coins in bank: 0 plat 5 gold 587 silver 4388 copper
Sekon/Fanil
Sojourner
Posts: 31
Joined: Fri Mar 16, 2001 6:01 am
Location: Westminster, SC , USA

Postby Sekon/Fanil » Mon Apr 09, 2001 11:58 am

okie so U want a auto exchange script?
or U just want it to tell U how much plat yer coin is worth without actually exchanging it? should I use the bank conversion rate? or the base conversion?
ya gotta get specific?
Braggo
Sojourner
Posts: 74
Joined: Fri Jan 26, 2001 6:01 am
Location: Anniston, AL, USA

Postby Braggo » Mon Apr 09, 2001 8:18 pm

Want one that will add up the value of plat of all my coins without exchanging them Image Use the base conversion rate plz?


------------------
Braggo Boulderbasher
Sekon/Fanil
Sojourner
Posts: 31
Joined: Fri Mar 16, 2001 6:01 am
Location: Westminster, SC , USA

Postby Sekon/Fanil » Tue Apr 10, 2001 11:43 am

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).]
Braggo
Sojourner
Posts: 74
Joined: Fri Jan 26, 2001 6:01 am
Location: Anniston, AL, USA

Postby Braggo » Tue Apr 10, 2001 8:11 pm

nice Image thanks man it works just like I needed it Image

------------------
Braggo Boulderbasher

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 22 guests