|
VII Newbie
Joined: 28 May 2004 Posts: 6 Location: USA
|
Posted: Fri May 28, 2004 7:48 am
lasttarget variable? |
Ok my goal is to have a variable that captures the last target of my kill commands.
#VAR lasttarget something something (i am completely devoid of programming, im trying to learn)
The function for this would then allow me string it into aliases for different skills my character has.
for instance:
k guardian (lasttarget variable remembers 'guardian')
cranekick (guardian gets knocked out, i have to k guardian again to continue battle. however instead i use the alias with @lasttarget)
kk (kk would be the alias, #AL kk {kill @lasttarget}
this saves me alot of time, because there are a ton of skills that need to be typed fully on the mud to work, and having a last target type of variable would help alot.
if someone knows what im talking about or need more explanation, i'd be glad to post more.
thank you! |
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Fri May 28, 2004 9:31 am |
#ALIAS k {lasttarget = %1
~k %1} |
|
|
|
VII Newbie
Joined: 28 May 2004 Posts: 6 Location: USA
|
Posted: Fri May 28, 2004 7:32 pm |
what i'm trying to do is make a variable not an alias. i have 50 aliases i need to link to this @lasttarget variable.
thank you in advance |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri May 28, 2004 8:41 pm |
If you knew what you needed you'd have done it already. Vorax's alias makes the variable you want. The only changes it might need are to spell out the 'kill' command and possibly to allow multiword targets.
#AL k {lasttarget = %-1
kill %-1} |
|
|
|
VII Newbie
Joined: 28 May 2004 Posts: 6 Location: USA
|
Posted: Fri May 28, 2004 10:07 pm |
so if i want dirtkick @lasttarget, or whirl @lasttarget, it should work?
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri May 28, 2004 11:42 pm |
No, variables aren't expanded in the command line unless you have the Expand Vars preference enabled. However, those commands would work in aliases. This really seems like the kind of question that anyone could answer for themselves with about one minute's worth of experimentation.
Enter these lines at the command line and see what happens.
#AL k {lasttarget = %-1
kill %-1}
#AL dk {dirtkick @lasttarget}
#AL kk {kill @lasttarget}
#AL wh {whirl @lasttarget}
k VII
kk
dk
wh
Enjoy. |
|
|
|
VII Newbie
Joined: 28 May 2004 Posts: 6 Location: USA
|
Posted: Sat May 29, 2004 9:03 am |
thank you very much, works like a charm.
pardon my ignorance for programming :) |
|
|
|
|
|