|
Garrison Beginner
Joined: 21 Oct 2003 Posts: 21 Location: USA
|
Posted: 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!! |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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} |
|
|
|
Garrison Beginner
Joined: 21 Oct 2003 Posts: 21 Location: USA
|
Posted: 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! |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Dec 17, 2003 3:34 pm |
There's nothing wrong with the alias command, so you must have the MUD command wrong.
|
|
|
|
AvgGuyIA Newbie
Joined: 04 Nov 2003 Posts: 8 Location: USA
|
Posted: 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. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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. |
|
|
|
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: 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 |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: 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] |
|
|
|
Kronas Wanderer
Joined: 28 Dec 2003 Posts: 62 Location: Australia
|
Posted: 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 . |
|
|
|
|
|