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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  dual wield/disarm trigger
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

dual wield/disarm trigger

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

Posted by PJ   USA  (48 posts)  [Biography] bio
Date Thu 13 May 2004 05:38 PM (UTC)
There are many time while playing AR (a PK mud) where I have problems with having an offhand weapon disarmed and accidentally wearing something completely wrong in that hand as a result of my current trigger (get 1.;wear 1.). Often, like if I am blinded, it will have something like this come up:

You do not see that here.
You hold a purple potion in your hand.

So I figured out a way to solve this. To wield a weapon in your offhand, you must type 'dual *'. I plan to use that as an alias so that it will send to the mud 'dual *' and then activate a subscript to set an "offhand" variable to whatever I type to dual wield. Then, the trigger for having my offhand weapon disarmed will be 'get @offhand; wear @offhand'

I believe I can get close to what to do using previous pieces of my script, but I am unsure on how to have the alias send exactly what I type and want to be sure before I go and rely on it.. Any corrections? Here goes:

sub On_Dual (aliasname, full_line, wildcards)

dim dual

dual = wildcards (1)
world.setvariable "Offhand", dual
world.note "Offhand weapon set to " & dual

end sub

match="Dual *"
<send>Dual *</send>

match="* disarms you and sends your offhand weapon flying!"
<send>get @Offhand
wear @Offhand</send>

Hrmm.. Forgot to make the trigger expand variables, but other than that..
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Thu 13 May 2004 06:04 PM (UTC)
I believe you can just have the alias <send>%0</send> and it'll send the exact string that the alias matched. Or you can reference the wildcards in the alias as %1, %2, %3, etc. So your

<send>Dual *</send>


<send>Dual %1</send>

either way should work, but the latter is preferable since you might decide that having a "dw *" alias instead of "dual *" one means less typing later on. :)
[Go to top] top

Posted by PJ   USA  (48 posts)  [Biography] bio
Date Reply #2 on Fri 14 May 2004 02:52 PM (UTC)

Amended on Fri 14 May 2004 02:54 PM (UTC) by PJ

Alright, thanks. I also take it nobody saw any problem in the script so I'll go ahead and start usin it.. Dual %1.. Sounds good.
[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.


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.


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 FutureQuest]