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.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ Help with a script?

Help with a script?

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


Posted by Antiflower   (1 post)  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.
Top

Posted by Fiendish   USA  (2,533 posts)  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
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,691 views.

It is now over 60 days since the last post. This thread is closed.     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.