Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DW_CHECK:
- var DW.Barb_1handed_stave nightstick|tanbo
- var DW.Barb_1handed_polearm allarh
- if matchre("$WeaponType", "(THE|THB|BOW|SLINGS)") then return
- if ("$guild") = "Barbarian" then goto DW_BARB
- if (%DW.Time < 200) then return
- if (%DW.Time > 200) then goto DW_SWITCH
- return
- DW_SWITCH:
- echo
- echo **** SWITCHING DUAL WIELD WEAPON
- echo
- gosub stow %CurrentDW
- pause 0.2
- if ("%CurrentDW" = "%DW.Weapon1") && (toupper("%DW.Weapon2") != "NULL") && !matchre("%WEAPON", "%DW.Weapon2") then goto DW2
- if ("%CurrentDW" = "%DW.Weapon1") && (toupper("%DW.Weapon3") != "NULL") && !matchre("%WEAPON", "%DW.Weapon3") then goto DW3
- if ("%CurrentDW" = "%DW.Weapon2") && (toupper("%DW.Weapon3") != "NULL") && !matchre("%WEAPON", "%DW.Weapon3") then goto DW3
- if ("%CurrentDW" = "%DW.Weapon2") && (toupper("%DW.Weapon1") != "NULL") && !matchre("%WEAPON", "%DW.Weapon1") then goto DW1
- if ("%CurrentDW" = "%DW.Weapon3") && (toupper("%DW.Weapon1") != "NULL") && !matchre("%WEAPON", "%DW.Weapon1") then goto DW1
- if ("%CurrentDW" = "%DW.Weapon3") && (toupper("%DW.Weapon2") != "NULL") && !matchre("%WEAPON", "%DW.Weapon2") then goto DW2
- return
- DW1:
- pause 0.2
- gosub GET %DW.Weapon1
- var CurrentDW %DW.Weapon1
- pause 0.3
- return
- DW2:
- pause 0.2
- gosub GET %DW.Weapon2
- var CurrentDW %DW.Weapon2
- pause 0.3
- return
- DW3:
- pause 0.2
- gosub GET %DW.Weapon3
- var CurrentDW %DW.Weapon3
- pause 0.3
- return
- DW_BARB:
- debug 5
- var DW_county 0
- if ("%SEWEAPON" != "NULL") then math DW_county add 1
- if ("%LEWEAPON" != "NULL") then math DW_county add 1
- if ("%SBWEAPON" != "NULL") then math DW_county add 1
- if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") then math DW_county add 1
- if ("%LBWEAPON" != "NULL") then math DW_county add 1
- if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") then math DW_county add 1
- var DW_counted %DW_county
- var DW_county 0
- if ("%SEWEAPON" != "NULL") then math DW_county add $Small_Edged.LearningRate
- if ("%LEWEAPON" != "NULL") then math DW_county add $Large_Edged.LearningRate
- if ("%SBWEAPON" != "NULL") then math DW_county add $Small_Blunt.LearningRate
- if ("%LBWEAPON" != "NULL") then math DW_county add $Large_Blunt.LearningRate
- if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") then math DW_county add $Staves.LearningRate
- if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") then math DW_county add $Polearms.LearningRate
- evalmath DW_weapon_avg %DW_county / %DW_counted
- if ("%WEAPON" != "%SEWEAPON") then var DW_weapon_skill Small_Edged
- if ("%WEAPON" = "%SEWEAPON") then var DW_weapon_skill Small_Blunt
- if ("%SEWEAPON" != "NULL") && ("%SEWEAPON" != "%WEAPON") && ($Small_Edged.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Small_Edged
- if ("%LEWEAPON" != "NULL") && ("%LEWEAPON" != "%WEAPON") && ($Large_Edged.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Large_Edged
- if ("%SBWEAPON" != "NULL") && ("%SBWEAPON" != "%WEAPON") && ($Small_Blunt.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Small_Blunt
- if ("%LBWEAPON" != "NULL") && ("%LBWEAPON" != "%WEAPON") && ($Large_Blunt.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Large_Blunt
- if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") && ("%STAVES" != "%WEAPON") && ($Staves.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Staves
- if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") && ("%POLEARMS" != "%WEAPON") && ($Polearms.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Polearms
- if ("%DW_weapon_skill" = "Small_Edged") then var DW_preselect %SEWEAPON
- if ("%DW_weapon_skill" = "Large_Edged") then var DW_preselect %LEWEAPON
- if ("%DW_weapon_skill" = "Small_Blunt") then var DW_preselect %SBWEAPON
- if ("%DW_weapon_skill" = "Large_Blunt") then var DW_preselect %LBWEAPON
- if ("%DW_weapon_skill" = "Staves") then var DW_preselect %STAVES
- if ("%DW_weapon_skill" = "Polearms") then var DW_preselect %POLEARMS
- var DW.Barb_final_check 0
- DW.Barb_final_checks:
- evalmath DW.Barb_final_check %DW.Barb_final_check add 1
- if ("%SEWEAPON" != "NULL") && ("%SEWEAPON" != "%WEAPON") && ($Small_Edged.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Small_Edged
- if ("%LEWEAPON" != "NULL") && ("%LEWEAPON" != "%WEAPON") && ($Large_Edged.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Large_Edged
- if ("%SBWEAPON" != "NULL") && ("%SBWEAPON" != "%WEAPON") && ($Small_Blunt.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Small_Blunt
- if ("%LBWEAPON" != "NULL") && ("%LBWEAPON" != "%WEAPON") && ($Large_Blunt.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Large_Blunt
- if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") && ("%STAVES" != "%WEAPON") && ($Staves.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Staves
- if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") && ("%POLEARMS" != "%WEAPON") && ($Polearms.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Polearms
- if (%DW.Barb_final_check < 2) then goto DW.Barb_final_checks
- if ("%DW_weapon_skill" = "Small_Edged") then var DW_preselect %SEWEAPON
- if ("%DW_weapon_skill" = "Large_Edged") then var DW_preselect %LEWEAPON
- if ("%DW_weapon_skill" = "Small_Blunt") then var DW_preselect %SBWEAPON
- if ("%DW_weapon_skill" = "Large_Blunt") then var DW_preselect %LBWEAPON
- if ("%DW_weapon_skill" = "Staves") then var DW_preselect %STAVES
- if ("%DW_weapon_skill" = "Polearms") then var DW_preselect %POLEARMS
- if ("%CurrentDW" != "%DW_preselect") && ("$lefthand" != "Empty") then gosub stow %CurrentDW
- if ("%CurrentDW" != "%DW_preselect") then gosub GET %DW_preselect
- if ("%CurrentDW" != "%DW_preselect") then if matchre(tolower("%DW_preselect") , "$ALLSWAPPABLE") || matchre("$lefthand", "$ALLSWAPPABLE") then gosub DW.SWAPPABLE
- var CurrentDW %DW_preselect
- debug 0
- return
- DW.SWAPPABLE:
- delay 0.0001
- DW.SWAPPABLE_1:
- var LOCATION DW.SWAPPABLE_1
- if (!$standing) then gosub STAND
- matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.|you don't feel like fighting
- matchre STUNNED ^You are still stunned
- matchre WEBBED ^You can't do that while entangled in a web
- matchre IMMOBILE ^You don't seem to be able to move to do that
- matchre RETURN ^You turn your|^You must have two free hands to use
- put swap my $lefthandnoun
- matchwait
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement