|
sourcecomm Newbie
Joined: 12 May 2002 Posts: 0
|
Posted: Thu Apr 11, 2002 9:01 am
Target Variable HOW? |
Ok Here is my dilemma.
I am trying to continously heal myself without having to keep pressing the alias for heal lets say (alias c 'cast cure light').
Now..in game when I type cure light it casts cure light on me. Defaulted. It casts on yourself. Now if I type cs person, it'll cast the first cure light on that person but the rest of the cure light casting will be back to me.
I figured that I can use a variable in this situation. For instance having let's say an alias cs @healtarget
Whereby, I need to define @healtarget with another alias that will put the actual person's name in that variable.
The question is, how do I create that alias to store a persons name in that variable. This way I can even have a another target for attacking and all I have to do is always set my attacking target to whatever I want to attack then just type k because k is an alias set to k @attacktarget variable.
Any ideas? Thanks
ZmuD AddicT |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Apr 11, 2002 9:23 am |
quote:
I am trying to continously heal myself without having to keep pressing the alias for heal
You'll have to tie that into your prompt
with some fancy foot work so you aren't
spamming. There are many examples in the
forums that use flags for this. Search
for auto heal.
quote:
The question is, how do I create that alias to store a persons name in that variable.
#ALIAS c {cast cure light}
#ALIAS setheal {#VAR healtarget %prompt("","Heal target:")}
#ALIAS cs {cast cure light @healtarget}
Similiarily,
#ALIAS setkill {#VAR attacktarget%prompt("","Attack target:")}
#ALIAS k {kill @attacktarget}
There are other ways of doing this, I remember
Troubadour doing something nifty somewhere.
Ton Diening |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Apr 11, 2002 5:17 pm |
You can set the variable with the same alias that casts the spell.
#AL c {#VAR healtarget {%1};cast 'cure light' %1}
NOTE: The {} around %1 in the #VAR command are essential for recognizing a null-value.
LightBulb
All scripts untested unless otherwise noted |
|
|
|
sourcecomm Newbie
Joined: 12 May 2002 Posts: 0
|
Posted: Thu Apr 11, 2002 9:09 pm |
Thank you very much..just what I was looking for!
ZmuD AddicT |
|
|
|
|
|