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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Help with a script?

Help with a script?

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


Posted by Antiflower   (1 post)  [Biography] bio
Date Thu 27 Jul 2023 02:41 PM (UTC)
Message
I play a MUD called Zombiemud and its common to use what they call 'runs' which allow them to speedwalk to an area, then each enemy within that area.

So what I want help understanding how to do is set up a series of buttons and variables so I can a: load a run to a specific area then use a button to move from one speed walk to the next.

I.E. I load the run for lets call it meggers, it runs me to the entrance of an orc area, I kill the enemy there, push the button it goes to next enemy in that area, repeat, it finishs the area then goes to the next in the list, basically in a sequence.
[Go to top] top

Posted by Fiendish   USA  (2,525 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Fri 28 Jul 2023 01:54 PM (UTC)

Amended on Fri 28 Jul 2023 02:03 PM (UTC) by Fiendish

Message
The basic process for making aliases is described in https://www.mushclient.com/forum/?id=6030 and https://www.mushclient.com/forum/?id=8084 and you should visit those pages first. The entire Getting started area of the forum is quite handy (https://www.mushclient.com/forum/bbshowpost.php?bbtopic_id=120)

Conceptually, I would have an alias for storing an area name in a variable and the number 1 in another variable. This is quite like a targetting alias, which is described in the second link above. Then I would have an alias that reads the number from the number-tracking mushclient variable, adds 1 to that number, puts the new number back into the same mushclient variable (that will be used to keep track of which enemy inside the area you're currently at), and then pulls a run from a table of tables based on the targeted area and number.

The table of tables would look something like (using Lua):


my_speedwalks = {
   ["area_one"] = {"run to area", "run to first enemy", "run to second enemy", "etc"},
   ["area_two"] = {"run to area", "run to first enemy", "run to second enemy", "etc"},
   ["etc"] = {"etc"}
}


and you would access the correct run with something like:


my_area = GetVariable("current_area")
which_run = tonumber(GetVariable("run_number"))
my_run = my_speedwalks[my_area][which_run]

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,126 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]