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
Baldur
Beginner


Joined: 20 Sep 2002
Posts: 26
Location: Austria

PostPosted: Thu Jul 31, 2003 7:55 am   

Change Rings
 

Hi there,

in the mud i play i can only wear two rings but i have about 7 in my inventory. So i have tried to create a litte script that will change the rings automatically. I have only accomplish some aliases but i want more [:I]
I will try to explain the real problem:
These are the Rings:
Wasserring
Daemonenring
Astralring
Zombiering
Holzring
Drachenring

Now when i change the rings i have to check which one is already on my finger because if i want to wear the Zombiering i have to take off the Astralring or Daemonenring. If i want to wear the Drachenring i have to take off the Astralring/Daemonenring/Wasserring and so on.
Can someone give me a hint how i can make this dependency and then make an alias WearAstral and than i take off the right ring.

I not sure if someone unterstands what i mean but i hope so Smile

Bye...
Reply with quote
miles2go
Beginner


Joined: 27 Jul 2001
Posts: 20

PostPosted: Thu Jul 31, 2003 2:09 pm   
 
You'll probablly need a trigger to capture which ring you are wearing to a variable. What command do you issue to check which ring you are wearing and what is the response when you issue that command?
Reply with quote
Baldur
Beginner


Joined: 20 Sep 2002
Posts: 26
Location: Austria

PostPosted: Thu Jul 31, 2003 3:07 pm   
 
Hi,

I have made some triggers to capture which ring i'm wearing:

#TRIGGER {Du ziehst den Astralring an} {#var ringlist.astralring 1} "Ringe"
#TRIGGER {Du ziehst den Astralring aus.} {#VAR RingList.astralring 0} "Ringe"
#TRIGGER {Du ziehst den feuerroten Zombiering an.} {#var ringlist.zombiering 1} "Ringe"
#TRIGGER {Du ziehst den feuerroten Zombiering aus.} {#var ringlist.zombiering 0} "Ringe"
#TRIGGER {Du ziehst den Holzring an.} {#var ringlist.holzring 1} "Ringe"
#TRIGGER {Du ziehst den Holzring aus.} {#var ringlist.holzring 0} "Ringe"
#TRIGGER {Du ziehst den Wasserring an.} {#var ringlist.wasserring 1} "Ringe"
#TRIGGER {Du ziehst den Wasserring aus.} {#var ringlist.wasserring 0} "Ringe"

After the Trigger was fired the value in the RingList will change:

#VAR RingList {zombiering0astralring1wasserring1Daemonenring0holzring0} {_nodef} "Ringe"


To change the rings i have made Aliases:

#ALIAS feaus {ziehe zombiering aus;ziehe astralring an;ShowRing} "Ringe"
#ALIAS feein {ziehe astralring aus;ziehe zombiering an;ShowRing} "Ringe"
#ALIAS rgesch {ziehe holzring aus;ziehe wasserring an;ShowRing} "Ringe"
#ALIAS rint {ziehe wasserring aus;ziehe holzring an;ShowRing} "Ringe"


After changing the rings the Alias ShowRing will change the values of a List with the current Rings:

#ALIAS ShowRing {#wa 1000;ResetRingList;AddRingList} "Ringe"
#ALIAS ResetRingList {#FORALL @RingListAktuell {#delitem RingListAktuell %i}} "Ringe"
#ALIAS AddRingList {#LOOPDB @ringlist { #if {%val=1} {#additem RingListAktuell %proper( %key)}}} "Ringe"

And now i have a list with the rings:

#VAR RingListAktuell {Astralring|Wasserring} {_nodef} "Ringe"

The problem is that i have to create an alias for each combination of changing the rings. I'm looking for an possibility
to change the rings with only one alias per ring:

Astralring
#ALIAS {Astral} {Check which ring i have to take off;change correct rings}
Wassering
#ALIAS {Wasser} {Check which ring i have to take off;change correct rings}
and so on...

So long, Baldur
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jul 31, 2003 5:34 pm   
 
The easiest method would be to select remove both rings (no matter which ones you're wearing) and then put on the two you want at that particular moment. Something like this, if I got the wording right:
#AL changering {ziehe ring aus;ziehe ring aus;ziehe %1 an;ziehe %2 an} "Ringe"

In English it would be:
#AL changering {remove ring;remove ring;wear %1;wear %2} "Ring"
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