Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Autoattack Trigger....

Autoattack Trigger....

Posting of new messages is disabled at present.

Refresh page


Pages: 1 2  

Posted by Tatewaki2365   (34 posts)  Bio
Date Sun 16 May 2004 02:21 AM (UTC)

Amended on Sun 16 May 2004 02:33 AM (UTC) by Tatewaki2365

Message
Well, I was hunting someone, and I kept on passing them - I just couldn't bloody catch him. But he kept going RIGHT by me everytime I switched directions (I.e. Spam "e", he spams "w", I spam "w", he spams "e"). I was wondering if there is a known trigger so that you can target someone, and then when that name is seen, the trigger would automaticly input 'kill/murder [person]'.


Also... I was wondering how one goes about creating a health/mana/movement bar (If that's possible).
Thanks.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 16 May 2004 04:53 AM (UTC)
Message
I don't know about a "known" trigger, but that one sounds simple enough to write.

As for the health bar, check out the plugins page for MUSHclient, and search this forum, there are quite a few posts about it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zendu   (66 posts)  Bio
Date Reply #2 on Sun 16 May 2004 05:57 AM (UTC)
Message
You could have a trigger that kills your target when he comes in from the (east|west|north|south)

God im helpless
Currently using MushClient 3.46 on Win Xp pro on [url=www.aetolia.com]Aetolia[/url]
Top

Posted by Tatewaki2365   (34 posts)  Bio
Date Reply #3 on Sun 16 May 2004 06:15 PM (UTC)
Message
Except... I don't really know how to write triggers, so I'm kind of useless on this subject.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 16 May 2004 09:43 PM (UTC)
Message
You match what you see and tell it to respond in some way. Try experimenting. It is hard for us to help more as you haven't pasted what you see, so we would be guessing.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Tatewaki2365   (34 posts)  Bio
Date Reply #5 on Mon 17 May 2004 01:18 AM (UTC)
Message
Well, if it helps (provided I have the right idea of what your asking for), it would look something like this:

[person] rides in.
--Or
[person] walks in.

And, for them just sitting there, it would be:

[person] is * here.

*Can be sitting/resting as well as nothing at all (which would be standing)

The only thing I really need is something that would input a command when the name is seen;
Such as:

[person] is here.
-command inputted would be 'kill [person]'
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #6 on Mon 17 May 2004 01:41 AM (UTC)

Amended on Mon 17 May 2004 01:45 AM (UTC) by Flannel

Message
Basically, triggers, you have two major fields.

Match Text: (this is what the mud displays to "fire" the trigger).

Send: This is what you send once the trigger fires.

Triggers can include variables, denoted with an asteriks (*). You then can use these variables in the send field, by %# where # is the number of the variable:

* walks in wearing *.
would match:
Bill walks in wearing a hat.
and %1 would contain 'Bill'
%2 would contain 'a hat'

Thats basically the basics of triggers. Otherstuff is fairly self explainatory. Punctuation/spacing and other things are important. You really need to become a stickler for details while writing triggers.
More info can be found in the help file (either the online one, or the one included with mushclient).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #7 on Mon 17 May 2004 09:13 AM (UTC)

Amended on Mon 17 May 2004 09:14 AM (UTC) by Poromenos

Message
Try this:


<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="([A-Za-z]+) (is( sitting| resting|) here|rides in|walks in)\.$"
   regexp="y"
   sequence="100"
  >
  <send>kill %1</send>
  </trigger>
</triggers>


Copy the entire thing and click "Paste" in MC's triggers window.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Tatewaki2365   (34 posts)  Bio
Date Reply #8 on Mon 17 May 2004 08:08 PM (UTC)
Message
Many thanks. I would wish to know though, how does one edit from there who the target is?
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #9 on Mon 17 May 2004 08:27 PM (UTC)
Message
The target's name is [A-Za-z]+, this means match any word. If you want someone specific, you can set that to the name, e.g. Poromenos. You can also make a variable, for example @target, and this way it will match on whatever is in the variable. You could set an alias so you would type "target <person>" and it would only kill the person you specified.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Tatewaki2365   (34 posts)  Bio
Date Reply #10 on Mon 17 May 2004 10:15 PM (UTC)
Message
Ok, so I tried it out, and replaced "[A-Za-z]+" with "A cow" (Heck... I have very little idea what's going on here, so I figured, instead of bugging you, I would give a stab at it, and try to figure it out myself... It didn't work.), this of course produced little, as there is no doubt in my mind that this was not the correct thing to do. This is the test that I used:

Fields of grain
You stand amid colossal fields of grain. Around you, long
stalks of wheatgrass rise well above your head. The yellow
grains tend to sway slowly back and forth like waves as
the mountain winds sigh through them. You have to hack and
chop your way through here to make a path, but you can see
hundreds of large scarecrows set up here.

[Exits: north south]
A cow is here, chewing her cud.

Is there something special I would have to do for this one? As I see, the trigger has "sitting" and "resting" in it, so I would sort of assume that something along the lines of "chewing her cud" might have to be thrown in there... In anycase, I just need to find out how to work this trigger, because I've heard of MANY people dying from their own triggers.

Thanks for the patience.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #11 on Tue 18 May 2004 09:22 AM (UTC)

Amended on Tue 18 May 2004 09:24 AM (UTC) by Poromenos

Message
Yes, that's right, this trigger won't match on "chewing her cud". You would have to change the trigger to:

([A-Za-z]+) (is( sitting| resting|) here|is here\, chewing her cud|rides in|walks in)\.

Regular expressions can be a bit overwhelming if you're new. There are also the normal triggers which just match something like:
* walks in.
You could use those, or you could read the document about regular expressions which comes with MC. It is very helpful, and it's in the \docs catalog in the MC directory.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Shadowfyr   USA  (1,788 posts)  Bio
Date Reply #12 on Tue 18 May 2004 07:05 PM (UTC)
Message
Actually.. It won't match on "A cow" anyway, since that is two words and you make no allowances for multiple words, only letters.
Top

Posted by Assassin   (73 posts)  Bio
Date Reply #13 on Tue 18 May 2004 07:43 PM (UTC)
Message
Try (.*?) is here etc...

Do you want just to kill * (whoever), i have a trigger
which automatically saves another mudder's character name
in a variable. Then an alias to attack.

Top

Posted by Assassin   (73 posts)  Bio
Date Reply #14 on Tue 18 May 2004 08:55 PM (UTC)
Message
Is it possible to be able to grab two pieces of
information from a trigger, and store them in
seperate variables?

*>Demonica sprays you with Venom

I need to put Demonica in one variable
and Venom in another

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.


57,447 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

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