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 ➜ VBscript ➜ dual wield/disarm trigger

dual wield/disarm trigger

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


Posted by PJ   USA  (48 posts)  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..
Top

Posted by Ked   Russia  (524 posts)  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. :)
Top

Posted by PJ   USA  (48 posts)  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.
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.


13,077 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.