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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  Auto assist trigger

Auto assist trigger

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Graham Hillman   (5 posts)  [Biography] bio
Date Wed 06 Dec 2023 07:51 AM (UTC)
Message
Hi could someone please help?

Complete noob here,

I am looking to create a trigger that recognises what my group buddies are attacking and automatically attack the same mob

the line it would need to recognise is;

(Person) moves aggressively toward ......

and the send text would need to be something along the lines of;

Kill .....

Could someone please help me complete the dots?

Thank you
[Go to top] top

Posted by Fiendish   USA  (2,525 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Wed 06 Dec 2023 04:20 PM (UTC)
Message
Nick made a video about how to make triggers https://www.mushclient.com/forum/?id=9626

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Graham Hillman   (5 posts)  [Biography] bio
Date Reply #2 on Thu 07 Dec 2023 07:26 AM (UTC)

Amended on Sun 10 Dec 2023 07:00 AM (UTC) by Nick Gammon

Message
Thank you but this video doesn't really explain what i am trying to achieve.

i have managed to work out that i can do

trigger - moves aggressively towards *
send - kill %1

issue now is that where the * is, is followed by punctuation (!) and when it is sent back to the MUD it doesnt like it. Any way to remove the punctuation?


<triggers>
  <trigger
   enabled="y"
   match="moves aggressively towards *"
   sequence="100"
  >
  <send>kill %1</send>
  </trigger>
</triggers>


Thankyou
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sun 10 Dec 2023 07:01 AM (UTC)
Message
Please copy/paste an example from the MUD of what you are trying to match on.

- Nick Gammon

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

Posted by Graham Hillman   (5 posts)  [Biography] bio
Date Reply #4 on Tue 12 Dec 2023 10:57 AM (UTC)
Message
Nick Gammon said:

Please copy/paste an example from the MUD of what you are trying to match on.


An example of that i am trying to match. (Copy and paste)

moves aggressively towards the cockroach!

where "the cockroach!" could be anything.

I have in the match box - moves aggressively toward *

I have in the send box - kill %1

Sent to the mud is - kill the cockroach!

i need to remove the ! and "the" if possible please

thank you
[Go to top] top

Posted by Fiendish   USA  (2,525 posts)  [Biography] bio   Global Moderator
Date Reply #5 on Tue 12 Dec 2023 05:08 PM (UTC)
Message

<triggers>
  <trigger
   enabled="y"
   match="moves aggressively towards *"
   sequence="100"
   send_to="12"
  >
  <send>
    target = "%1"
    target = target:gsub("!$", ""):gsub("^the ", "")
    Send("kill " .. target)
  </send>
  </trigger>
</triggers>

https://github.com/fiendish/aardwolfclientpackage
[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.


2,740 views.

It is now over 60 days since the last post. This thread is closed.     [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.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]