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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  dual wield/disarm trigger

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)
Message
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



<aliases>
<alias
name="d_wield_A1"
script="on_dual"
match="Dual *"
enabled="y"
sequence="100"
>
<send>Dual *</send>
</alias>
</aliases>



<triggers>
<trigger
custom_colour="7"
enabled="y"
ignore_case="y"
match="* disarms you and sends your offhand weapon flying!"
match_bold="y"
match_inverse="y"
match_italic="y"
sequence="99"
>
<send>get @Offhand
wear @Offhand</send>
</trigger>
</triggers>




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)
Message
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>


becomes

<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

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


11,720 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]