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


Register forum user name 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, 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.
[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  Walking trigger(or script)

Walking trigger(or script)

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


Posted by Chippy   USA  (1 post)  [Biography] bio
Date Sat 01 Aug 2009 08:14 PM (UTC)
Message
Before I get the "bot" flames, I'll start by stating Project Bob(the mud which I will be discussing) allows for "solo" accounts, which in short, are legal bots that can play but not interact with other players.

I have used Mushclient for years, and have a basic understanding of triggers, aliases, macros, and so forth. I have zero understanding of scripting.

On Project Bob there is the opportunity to goto the quest master and "quest mission", which creates a random instance filled with random mobs. At the end of the mission lies a boss and the rewards.

Here is my problem:
Project Bob displays unexplored exits in cyan, and explored exits in dark gray. I have tried everything I can think of to make the client go in the direction of the "cyan" exit(I haven't even began to ponder picking an exit when multiple exits are in cyan).

I did try a "wander bot", in which it just tried all the exits until one worked. Aside from the obvious problems, I don't know how to "pause" the trigger, kill the mob, then resume the wandering.

Can anyone help me in tackling this? I guess in short I am asking for a bot, and I know many people are against that. But really, I'm just asking for you to make robot legs... which could potentially be used for good, instead of evil!

Basically I want something that will start exploring the mission area, stopping to kill mobs, and make it to the end boss. Oh.. and there are dead ends, which would result in trying to navigate back through gray exits. Crap. Is this even possible?

projectbob.game-host.org
port:4000
In case anyone is interested.

Thanks in advance to anyone who can provide any level of assistance!
[Go to top] top

Posted by Nick Gammon   Australia  (23,044 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 01 Aug 2009 10:22 PM (UTC)
Message
It could be done alright.

Quote:

I have zero understanding of scripting.


However it will be tricky. :)

My first approach would be to detect the cyan exits. A trigger which calls a script in your script file gets the "style runs" of the matching line. By iterating through those style runs you could work out which word or words are in cyan.

One approach would be to use string.find to find, on the exits line, every possible exit. That is, search one at a time for "north", "south", "east" and so on. Then for each one, use GetStyle for the matching column number to find the colour of that word. See:

http://www.gammon.com.au/forum/?id=7818

This will give you one or more exits. You may as well take the first if there are more than one, as next time that one won't be there.

Quote:

Oh.. and there are dead ends, which would result in trying to navigate back through gray exits.


This will be tricky too. However it is probably a sub-set of the problem of escaping from the instance at the end, or do you just portal out?

What I would be doing here is "lay a trail of breadcrumbs" from a room that you know *does* have an exit in it. Basically this would involve remembering where you went, then backtrack to get back.

For example, if you kept a speedwalk string of what directions you went (eg. N S S E S) then you could apply ReverseSpeedwalk to it to get a speedwalk that would take you back out.

http://www.gammon.com.au/scripts/doc.php?function=ReverseSpeedwalk


Quote:

Aside from the obvious problems, I don't know how to "pause" the trigger, kill the mob, then resume the wandering.


You probably need a special trigger inside a coroutine, as described here:

http://www.gammon.com.au/forum/?id=4957

That describes how you can do something, wait for output, and then do something else.

- 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.


10,327 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]