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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Alias and Trigger interaction to prompt movement upon condition met

Alias and Trigger interaction to prompt movement upon condition met

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


Posted by Kurokazin   (3 posts)  [Biography] bio
Date Thu 21 Jan 2016 06:05 AM (UTC)
Message
I've been bumming around on here for the past couple hours but I've come up with bumkis, either the question's never been asked or my searching skills are rusty. Anyway, this is the issue I'm running into. Currently I have a trigger setup to fire an alias once the start room's name shows up, the alias then uses a series of wait commands and a timer for attacking to clear each room in a circuit, before finally ending up at the start room, which then repeats the cycle.

Now, the issue with this current setup is that since it runs off a wait alias and timer, I'm not only losing a lot of efficiency(Some rooms may or may not have mobs in it, wasting 15 seconds which is what the wait in the alias is set to), and the attack doesn't have 100% chance of landing(It's a room clearing skill), sometimes it gets hitched up with trying to move while still being in combat, or it leaves the room with mobs still in it.

What I've been toying around with and trying to do, is have the alias only continue it's rotation after "There's no one else here to attack!" comes back from my skill, which would remove the need for the wait timer in the alias. But sadly, I have no idea how to actually get that interaction to take place. I'm completely new to scripting, so I was hoping someone might be able to fill me in on how I could set this up.

Quote:

Send ("hitall")
wait.time (15)
Send ("s")
Send ("hitall")
wait.time (15)
Send ("elbow")
Send ("w")
Send ("hitall")
wait.time (15)
Send ("elbow")
Send ("w")
Send ("hitall")
wait.time (15)
Send ("elbow")
Send ("n")


This is a portion of the alias, the timer is just "hitall" every second, and the trigger is just a simple world.execute trigger to fire off of the room name, the "elbow"(it oneshots the mobs) is just to give me some room for error in the case I'm still in combat before it tries to move to a new room.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Thu 21 Jan 2016 06:59 AM (UTC)
Message
Instead of trying to time the sequence, why not have the move trigger fire on the message that there's nobody to attack? Granted, you'll need some way of tracking how many times you've moved but that's a far simpler thing than trying to bot your way through levels with a single trigger.

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 Kurokazin   (3 posts)  [Biography] bio
Date Reply #2 on Thu 21 Jan 2016 07:11 AM (UTC)
Message
Meerclar said:

Instead of trying to time the sequence, why not have the move trigger fire on the message that there's nobody to attack? Granted, you'll need some way of tracking how many times you've moved but that's a far simpler thing than trying to bot your way through levels with a single trigger.


That's what I'm trying to figure out how to do, or at least, part of it. I need some way of "There's no one else here to attack!" to take the place of the timer, so it'd just go "Oh, no one's here anymore, time to move on north. Oh, there's no one here anymore, time to go east" and proceed down the list until a full circuit is achieved. There are a lot of duplicate rooms, so I can't just make a trigger for each individual room, unfortunately.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #3 on Thu 21 Jan 2016 07:48 PM (UTC)
Message
So use a counter. Each time you move, increment the counter and have the counter value determine the direction when the current room is cleared. Will probably take some tweaking and a possibly not quite trivial case structure but it's certainly doable.

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 Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Thu 21 Jan 2016 11:09 PM (UTC)
Message
I don't really want to encourage bot-writing, but you might find this useful: http://www.gammon.com.au/forum/?id=4957

You can script it to go to a room, and do something (like "look") to see if there are mobs there, and if you don't find any, move on.

- Nick Gammon

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

Posted by Kurokazin   (3 posts)  [Biography] bio
Date Reply #5 on Thu 21 Jan 2016 11:27 PM (UTC)
Message
Thanks Nick! And towards the whole bot writing thing, I'm never not /at/ my keyboard while it's running, when I need to step away, it gets turned off and I continue it after. I just have boxer's fractures all through my left hand and repetitive movement causes some discomfort, and unfortunately farming money in this particular mud is extremely repetitive and time consuming(Well beyond 2 weeks to get what you need). :)
[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.


15,641 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]