Alias and Trigger interaction to prompt movement upon condition met

Posted by Kurokazin on Thu 21 Jan 2016 06:05 AM — 6 posts, 24,692 views.

#0
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.
USA #1
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.
#2
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.
USA #3
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.
Australia Forum Administrator #4
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.
#5
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). :)