[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  capturing a target to enable multiple aliases
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

capturing a target to enable multiple aliases

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Scouse   (17 posts)  [Biography] bio
Date Sat 24 Jul 2004 03:49 PM (UTC)  quote  ]
Message
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
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Reply #1 on Sat 24 Jul 2004 04:06 PM (UTC)  quote  ]
Message
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 .
[Go to top] top

Posted by Nick Gammon   Australia  (19,461 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sun 25 Jul 2004 12:29 AM (UTC)  quote  ]
Message
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



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Reply #3 on Sun 25 Jul 2004 03:47 PM (UTC)  quote  ]
Message
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 :)
[Go to top] top

Posted by Meerclar   USA  (584 posts)  [Biography] bio
Date Reply #4 on Sun 25 Jul 2004 05:17 PM (UTC)  quote  ]
Message
Do you have "expand variables" selected?

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Reply #5 on Sun 25 Jul 2004 05:44 PM (UTC)  quote  ]
Message
yup
[Go to top] top

Posted by Assassin   (73 posts)  [Biography] bio
Date Reply #6 on Sun 25 Jul 2004 05:59 PM (UTC)  quote  ]

Amended on Sun 25 Jul 2004 06:00 PM (UTC) by Assassin

Message
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

[Go to top] top

Posted by Nick Gammon   Australia  (19,461 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Sun 25 Jul 2004 10:23 PM (UTC)  quote  ]
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Reply #8 on Mon 26 Jul 2004 02:09 AM (UTC)  quote  ]
Message
: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
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Reply #9 on Wed 28 Jul 2004 11:03 AM (UTC)  quote  ]
Message
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 ?
[Go to top] top

Posted by Assassin   (73 posts)  [Biography] bio
Date Reply #10 on Wed 28 Jul 2004 05:51 PM (UTC)  quote  ]

Amended on Wed 28 Jul 2004 06:15 PM (UTC) by Assassin

Message
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

[Go to top] top

Posted by Nick Gammon   Australia  (19,461 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Wed 28 Jul 2004 10:14 PM (UTC)  quote  ]
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Scouse   (17 posts)  [Biography] bio
Date Reply #12 on Sat 31 Jul 2004 04:27 AM (UTC)  quote  ]
Message
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
[Go to top] top

Posted by Nick Gammon   Australia  (19,461 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Sat 31 Jul 2004 11:23 PM (UTC)  quote  ]
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


4,303 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]