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
Neco
Newbie


Joined: 24 Jun 2006
Posts: 6

PostPosted: Tue Jul 25, 2006 12:12 pm   

variable/stringlist questions
 
I'm trying to make it so I envenom my weapons with the right venoms just before I attack with them. Right now I use a simple set of aliases to set the variable, for instance with the venoms delphinium, aconite, and curare, it looks like this:

#alias 1 {envenom=delphinum|delphinum}
#alias 2 {envenom=aconite|curare}

and I have a lot of these aliases which work well with the following

#alias envenom {
~envenom @weapon1 with %item( @envenom, 1)
~envenom @weapon2 with %item( @envenom, 2)
dsl @target
}

What I want to do is have to not have to enter an alias to change the venoms every time I attack. It would be ideal if I could have one alias that would put say 5 pairs of venoms into a string instead of a single pair, and would have the venom pairs removed after used.
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Tue Jul 25, 2006 2:37 pm   
 
We would need output.. I.E.

#VAR venomlist {delphinum|curare}
#VAR usevenoms {curare}
#TRIGGER {^Your blade is dripping with the delphinum venom} {#DELITEM useVenoms Delphinum}

Then add a checkvenoms to compare the venomlist (all the venoms you want added) to the used list

Its much like a spellup script. However without any output from the mud it makes it hard to help you.
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Neco
Newbie


Joined: 24 Jun 2006
Posts: 6

PostPosted: Tue Jul 25, 2006 5:44 pm   
 
The only output that comes from the mud would be something like

You rub some delphinium on a rapier.

I have a rapier in each hand and would like to use a different venom on each rapier most of the time.
When I hit an alias I would like to be able to

envenom @weapon1 with delphinium
envenom @weapon2 with curare
dsl target (/the attack with rapiers)

next time I attack, instead of having to hit an alias to envenom with different venoms, or using the same venoms over again I would like to

envenom @weapon1 with aconite
envenom @weapon2 with delphinium
dsl target
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue Jul 25, 2006 8:02 pm   
 
Typically, you'd want to change your venoms based on the way the fight's going at that time, so auto-selecting venoms may not be a good idea. You could always do what I do and use buttons and/or macros for quick selection and attack. If you'd like to setup your alias to pick venoms from a list and cycle through them, you could do something like the following:

Code:
#VAR venom_combos {(delphinium|curare)|(aconite|delphinium)}
#VAR next_combo 1 1
#ALIAS dslv {venoms = %item(@venom_combos, @next_combo);#math next_combo {%mod(@next_combo, %numitems(@venom_combos)) + 1};envenom @weapon1 with %item(@venoms, 1);envenom @weapon1 with %item(@venoms, 2);dsl @target}


Add as many pairs of venoms as you like to the cycle and the dslv alias remains exactly the same. For a little more control, you could have macros/aliases for setting the next_combo to a specific number in the list and then let it auto-cycle from that point...
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Wed Jul 26, 2006 8:58 am   
 
Would the second @weapon be @weapon2 rather than @weapon1 in your code Larkin?
_________________
Taz :)
Reply with quote
Neco
Newbie


Joined: 24 Jun 2006
Posts: 6

PostPosted: Thu Jul 27, 2006 8:52 pm   
 
That is exactly what I was looking to do, thanks so much.
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