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, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ How would I do this?

How would I do this?

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


Posted by Matthias   (28 posts)  Bio
Date Fri 08 Aug 2003 12:54 AM (UTC)
Message
I'm trying to make a sort of thing that uses 2 buttons, 1 to switch weapons, and one that uses it. How would I use it, if to switch, I would have to:
unwield weapon1
wield weapon2
while weilding one weapon1 to switch, and use:
unwield weapon2
wield weapon1
In one button?
And the weapons use different attacks, also. Weapon1 uses jab, and weapon2 uses bop. So how would I use variables and stuff to make it work?

Give a man a fire and you warm him for a day.
Set a man on fire and you warm him for the rest of his life.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #1 on Sat 09 Aug 2003 09:08 PM (UTC)
Message
OK, I can't type a lot due to minor surgery that makes me stand up, but I'd say you could write aliases to do that and then assign them to the macro buttons.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 10 Aug 2003 08:58 PM (UTC)
Message
Make an alias that looks like this (you can copy this and paste into the alias configuration window) ...


<aliases>
  <alias
   match="x"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>if GetVariable ("weapon") = "1" then
  Send "unwield weapon1"
  Send "wield weapon2"
  SetVariable "weapon", "2"
else
  Send "unwield weapon2"
  Send "wield weapon1"
  SetVariable "weapon", "1"
end if

</send>
  </alias>
</aliases>


In my example I made the alias "x" so you could type it quickly (see the "match" line). If you want to make it a button (eg. F2) then make a macro in the macros configuration screen that sends the alias (eg. sends "x" in this case). Then hitting that button will switch weapons.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


11,201 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.