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


Joined: 11 Jan 2002
Posts: 27
Location: United Kingdom

PostPosted: Thu Apr 11, 2002 10:06 am   

Two Questions....
 
These are probably fairly easy, so here goes:

I have a disarm trigger, that works to a degree, the problem lies in the way the MUD names objects, the descriptive name, lets say elven longsword, may not match the weapons name when u ID it, say in this case longsword, so when my disarm trigger fires and it says get 'elven longsword' the MUD responds with - You do not see that here. One solution would be to modify my variable @weapon so that it is set to the last word of the weapons name, in this case longsword, for a dark mace it would be mace etc, now just to complicate matters the name can be up to five words. So how can I modify the following to do this:

#tr {DISARMS you and sends {a|an|the} &weapon flying}
get '@weapon'
wield '@weapon'

Now the other is to do with buttons, I have a number of buttons that turn on/off various classes, as an example i have a button that allows me to only loot gold from a corpse. I have found that this button remembers its state from the previous session, so it tells me it is "on" when I know I have disabled the class on start-up by checking the box in the class options. How can I set the button so that it refelcts the condition of a class it controls when I start a session
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Apr 11, 2002 12:54 pm   
 
For the first one, let me suggest a different approach:
#TRIGGER {DISARMS you and sends * flying} {get @weapon;wield @weapon}
#ALIAS wield {#VAR weapon %1;~wield %1}

This way, you have an alias named the same as your command to equip the weapon. Each time you equip a weapon, whatever keyword you use to wield it is stored in the @weapon variable. The trigger then does not need to know what weapon is disarmed, it just retrieves the weapon that you have currently stored in the variable.

For the second problem, go into the Settings Editor and edit the button. In the Advanced tab, put:
%trigger(classname)

in the Value: field, where classname is the name of the class that this button is supposed to turn on/pff.

Kjata
Reply with quote
Rowene
Beginner


Joined: 11 Jan 2002
Posts: 27
Location: United Kingdom

PostPosted: Thu Apr 11, 2002 1:18 pm   
 
Thanks for your help.

I'll just have to decide now if I should implement your changes to the disarm trigger.

If I do indeed make this change I will need to:

discipline myself to use the wield command as 'hold' can also be used.

determine if I can overcome the problem of dual holding weapons, by this I mean that although the mud does not a allow dual wielding of weapons, you can still hold two weapons, so that if u are disarmed you can continue fighting with a weapon, and u get any bonuses associatted to that second weapon, such as plus to hit. I think I will have to generate a second alias to accomodate this.

lastly as I play several chars on the mud, I will have to determine a method of associating the weapon name to the char name.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Apr 11, 2002 5:55 pm   
 
Assuming that the weapon keyword is always
the last word you can always use:

get %word(@weapon,%numwords(@weapon))
wield %word(@weapon,%numwords(@weapon))
ie: elven longsword -> longsword

As for different characters you can trigger
off the message when they wield a weapon or
something to that effect.

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