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


Joined: 21 Oct 2003
Posts: 21
Location: USA

PostPosted: Tue Dec 16, 2003 3:34 am   

Help with an alias and "targeting".
 
Hi all,

Perhaps an easy question..but I can't figure out the answer :(

I'm attempting to use a skill who'se command is:

pinch <target> beta

I can't figure out how to just be able to do something like this for an alias: pb guard
which would execute: pinch guard beta

It's a Circle mud, if that makes a difference.
Thanks all for the help!!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Dec 16, 2003 3:41 am   
 
If the target will always be a single word:
#AL pb {pinch %1 beta}
If you might use more than one word:
#AL pb {pinch %-1 beta}
Reply with quote
Garrison
Beginner


Joined: 21 Oct 2003
Posts: 21
Location: USA

PostPosted: Tue Dec 16, 2003 11:16 pm   
 
Sweet! That worked!

I tried to use that logic for the "alpha" pinch...but it didn't work..

I used the following:

#AL palp {pinch %1 alpha}


Thoughts as to why?

Thanks again!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Dec 17, 2003 3:34 pm   
 
There's nothing wrong with the alias command, so you must have the MUD command wrong.
Reply with quote
AvgGuyIA
Newbie


Joined: 04 Nov 2003
Posts: 8
Location: USA

PostPosted: Wed Dec 31, 2003 6:13 am   
 
I would like to setup a target variable so I can kill the same mob (i.e. snail) without having to type "kill snail", but I want to change the target from snail to frog and kill them without having to type kill frog. I'd rather type KILL TARGET. Would this require an alias as well?

Has anybody tried to program this? I don't know ZMUD very well.

Thanks.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 31, 2003 6:20 am   
 
#ALIAS kill {#IF (%numparam()>0) {#VAR autokilltarget %-1;~kill @autokilltarget} {~kill @autokilltarget}}

1) When you type kill something-here this will remember what target was specified.
2) Then you can go about and just type kill to kill that target name.
3) To change targets goto 1.
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Wed Dec 31, 2003 8:48 am   
 
quote:
Originally posted by TonDiening

#ALIAS kill {#IF (%numparam()>0) {#VAR autokilltarget %-1;~kill @autokilltarget} {~kill @autokilltarget}}

1) When you type kill something-here this will remember what target was specified.
2) Then you can go about and just type kill to kill that target name.
3) To change targets goto 1.


Why use %-1? It works just using %1. I'm sure there is something subtle that I still haven't learned yet Smile
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Dec 31, 2003 8:55 am   
 
%-1 takes all the parameters
%1 takes the first parameter

I play many muds where you can type "kill the second green goblin" hence my suggestion of %-1 in case something similar is needed.

See help ALIAS for other details.
ALIAS

Syntax: #AL [aliasname] [string] [classname]
Reply with quote
Kronas
Wanderer


Joined: 28 Dec 2003
Posts: 62
Location: Australia

PostPosted: Tue Jan 20, 2004 4:04 am   
 
I use a variable {#var @target}..firstly an alias t..ok
then {@target %1}{#echo: @target} then I numbered the targets 1- whatever 50 lets say t rat, 2 t frog, t snail etc,and another way is to include the target in the trigger for example I made a script like such
pattern {a mysterious cloaked figure stands here}
value {#cw high,red;#play siren.wav;t cultist}
naturally you have a macro set to in my case I had dsl @target.
so when I walked in the room it picked up the cultist and set my target
so all I had to do was to hit the macro and attacked it. Did the same thing with the canines since they are both in the same room.Once there was no more cultist when you hit look room the canine would trigger fired and the target set up already to just continue with a blink of an eye .
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