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


Joined: 27 Nov 2001
Posts: 10
Location: USA

PostPosted: Tue Nov 27, 2001 5:19 am   

Muliti Targets?
 
Currently on my file I have my triggers set up for only one target, lets say I want to kill a dragon, all I need to do is type tar dragon. How do I set it up for like 4 or 5 targets, this is what I have now on my file
#ALIAS tar {#VAR target %1}
#ALIAS recall {~recall;#RECALL}
#ALIAS rreset {#var rcount 5}
#VAR target
#VAR chp {282}
#VAR csp {170}
#VAR mhp {282}
#VAR msp {170}
#VAR rcount {5}
#TRIGGER {@target} {#cw red}
#TRIGGER {You have (%d)/(%d)hp, and (%d)/(%d)sp} {#var chp %1;#var mhp %2;#var csp %3;#var msp %4;#gag}
#TRIGGER {Your Golden Ring glows momentarily} {#math rcount (@rcount-1);#color green}

#STAT {@chp/@mhp @csp/@msp Target-@target Ring Uses Left-@rcount}


Any way to put this on on buttons and have them auto update?

You help is most wanted. Please email me with help. Remember I know about as much about zmud as I do about knowing what you look like :)

Lera
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Tue Nov 27, 2001 11:14 am   
 
If you only want to attack one target at a time (ie. you attack the dragon, and then when you kill the dragon you go to the next target) try using somthing like this.

#VAR target
#VAR TargetList
#ALIAS tar {#IF @target="" {@target = %1} {#ADDITEM TargetList %1}}

Then when you set up your button set the text of the button to:
@target

and the commands to:

@target = %item(@TargetList,1)
#DELNITEM TargetList 1

What this is doing is if you call the 'tar' alias and you don't already have a target it will make the param the target. If you already have a target it will add the param to the target list.
When you get ready to change targets pressing the button will copy the first item in the TargetList into @target. and then delete that item from the list.
Setting the text of the button to @target will put the contents of @target on the button face.

I use a similar system and it works for me, Hope it is what you were loooking for.


-Serentus-
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