dual wield/disarm trigger

Posted by PJ on Thu 13 May 2004 05:38 PM — 3 posts, 16,864 views.

USA #0
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..
Russia #1
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. :)
USA #2
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.