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


Joined: 29 Jun 2005
Posts: 6

PostPosted: Wed Jun 29, 2005 5:49 am   

Targetting (Need help)
 
Hello I am a total zMUD retard, and I was thinking on how to do something like this which I remember used to work.

like typing target monster then I would only have to type swing and it would automatically swing at the thing i targetted then I could type target monster4 and then type kick and it would automatically kick the thing I targetted if you get what i'm saying.

If anyone could give me a detailed explanation on how do to this it would be greatly appreciated.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Wed Jun 29, 2005 6:26 am   
 
Ok, first thing you would need to do is put the target name into a variable. So, we'll make an alias for that. Go to the settings editor make a new alias:

NAME: target

VALUE: #VAR target %-1

Then hit save. The alias you just made will set your target. IE, typing "target monster4" would put "monster4" in the target variable.

Now, for swing or kick. To do things to this targetted monster, you need to make a couple more aliases:

NAME: swing

VALUE: ~swing @target

With this, whenever you type "swing" it will send to the mud "swing monstername", monstername being the monster you last targetted. If you want to make it a bit more complex you can do something like:

NAME: swing

VALUE: #IF (%null(%1)) {~swing @target} {~swing %-1}

This makes it so that if you hit "swing" it will swing at your target, but if you type "swing something" it will send "swing something" rather than "swing targetmonster something".

You can do the exact same thing for kick and any other attacks by following the above pattern. I hope this was detailed and clear enough for you Smile
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
richruzz
Newbie


Joined: 29 Jun 2005
Posts: 6

PostPosted: Wed Jun 29, 2005 6:33 am   
 
Yay! I think I got it!!!! You don't know how much this helps, thanks soooo 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