capturing a target to enable multiple aliases

Posted by Scouse on Sat 24 Jul 2004 03:49 PM — 14 posts, 49,216 views.

#0
what i want to do , is to capture the name of whatever I am attacking , then send that name to an alias which can be triggered by the F3 , F2 etc keys .
So for example ..

* HP:Healthy SP:Bursting MV:Full - an antelope: Battered >
An antelope tries to hit you, but you parry successfully.
You strike an antelope's body very hard.

* HP:Healthy SP:Bursting MV:Full - an antelope: Beaten >
An antelope tries to hit you, but you dodge the attack.
You strike an antelope's head.

this would be a couple of the attack rounds , notice the damage varies from round to round with i think 7 different messages for how hard you hit the target .

so from here now , the target would become antelope and be sent to the F2 key say , where the alias if I put it in the old way would come out as ..

( I hit the F2 key , this gets sent to the world )
channel 'call lightening' antelope

( I hit the F3 key , this gets sent to the world )
channel 'blind' antelope

( I hit the F4 key , this gets sent to the world )
charge antelope

etc , etc

however , capturing every round would probably lag me hard ? ( im guessing here ) , if not every round of battle would be fine , otherwise is there a way to trigger the capture ? so I hit F2 , which captures the target , sends it to the rest of my F key aliases , or to a vairiable which i can run the F keys from
e.g
charge target

this is on Wotmud .

any help would be appreciated
#1
hrmm , i had an afterthought ,
in cross race pk , my targets show up differently , instead of it being like
antelope
cross race names show up as
*Nargus* ( he would also be colored blue )
*Zork* ( would be colored red )

thus it would also have to be able to include such names , im not sure if the mud will let me attack them with the asterix in place or not , without the asterix I can target then tho .
Australia Forum Administrator #2
You need a trigger like:

An * tries to hit you, but you *

Send: %1
Send to: variable
Variable name: target

Then your macro keys (F2 etc.) can call aliases that will expand variables, eg.

punch @target


#3
ok , its picking up the target perfectly , but when I hit the macros , or even if i enter the command e.g.
charge @target
all i get is a responce from the mud which is thinking that @target is someone/things name .
It looks to me like the mushclient isnt seeing @target as a key to getting the name from the variable .
Itll be something simple i know , but i cant figure it out , and cant find this situation on the board .

Help pls :)
USA #4
Do you have "expand variables" selected?
#5
yup
#6
Try using the numeric keypad for attack macros.

Im not 100% sure here, but i dont think you can
actually type kill @target, but if you set-up
say numeric keypad 1 with the following:-

Go in to keypad pref's and make 1 say charge.

Then make an alias called charge with the sent
text as charge @target making sure expand
variables is checked.

I think thats right

Amended on Sun 25 Jul 2004 06:00 PM by Assassin
Australia Forum Administrator #7
Quote:

all i get is a responce from the mud which is thinking that @target is someone/things name .


You need to direct the macro to an alias. Macros do not themselves expand variables. In my earlier reply I said "Then your macro keys (F2 etc.) can call aliases ...".

Thus what you need is for (say) F2 to send something like:

this_is_the_f2_key

Then make an alias:

match: this_is_the_f2_key
send: (whatever you want to send)
expand variables: checked

That way when you press F2 is generates the word "this_is_the_f2_key". This is immediately picked up by the command processor as an alias, and then the alias substitution occurs.
#8
:D
works awesome Nick , my thanks ,
I got one problem with it , but ill search on boards before I ask on here about it, ill learn more that way
#9
this is weird , where im up to now is this is one of the lines that sets up the target

An * tries to hit you, but you parry successfully.

works perfectly , the second line which is being used to try and capture the animal name is this

a * * tries to * you, *

then %2 would be the name of the mob , e.g.
it would pick up guard from

a mine guard tries to slash you, but you parry succesfully.

however it doesnt work , if I leave it as

a * tries to * you, *

then it picks up mine guard which wont allow me to target ,
when i put the 2nd asterix in however it wont capture the 2nd word , indeed it sends nothing to the variable.

ive checked the boards and it seems like it should work , expand variables is checked ...

any ideas on what im doing wrong ?
#10
Just use %1 that will capture mine guard, unless you
just want to capture guard then you will have to possibly
trigger exact text ie:

A mine * tries to * your, *

sending %1 will capture guard

Amended on Wed 28 Jul 2004 06:15 PM by Assassin
Australia Forum Administrator #11
I can't reproduce that.

Using this trigger:


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   match="a * * tries to * you, *"
   send_to="2"
   sequence="100"
  >
  <send>%%1 = %1
%%2 = %2</send>
  </trigger>
</triggers>


And if I feed in your text, it matches both words properly:


a mine guard tries to slash you, but you parry succesfully.
%1 = mine
%2 = guard


Maybe an earlier trigger matches first? If you have another one which only matches the first word, make the one which matches two words have a lower sequence number.
#12
hrmm , ok , now i know im a complete newb lol ,
where do i paste that to Nick ? or where do i enter it to ?

as to the other point regarding when it captures mine guard ,
1, i dont wanna make a trigger for every 2 work mob (like mine guard) in the game
2, k mine guard just results in a responce of - attack who ?

Ste
Australia Forum Administrator #13
I don't really understand the question. The example trigger, you can copy from this page between <triggers> and </triggers> and then go into MUSHclient's trigger screen. You can then hit the "paste" button to paste it in. Then modify it as desired.