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