SHARE
TWEET

DW.Barb

Xeyseir Apr 25th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DW_CHECK:
  2.      var DW.Barb_1handed_stave nightstick|tanbo
  3.      var DW.Barb_1handed_polearm allarh
  4.      if matchre("$WeaponType", "(THE|THB|BOW|SLINGS)") then return
  5.      if ("$guild") = "Barbarian" then goto DW_BARB
  6.      if (%DW.Time < 200) then return
  7.      if (%DW.Time > 200) then goto DW_SWITCH
  8.      return
  9.  
  10. DW_SWITCH:
  11.      echo
  12.      echo **** SWITCHING DUAL WIELD WEAPON
  13.      echo
  14.      gosub stow %CurrentDW
  15.      pause 0.2
  16.      if ("%CurrentDW" = "%DW.Weapon1") && (toupper("%DW.Weapon2") != "NULL") && !matchre("%WEAPON", "%DW.Weapon2") then goto DW2
  17.      if ("%CurrentDW" = "%DW.Weapon1") && (toupper("%DW.Weapon3") != "NULL") && !matchre("%WEAPON", "%DW.Weapon3") then goto DW3
  18.      if ("%CurrentDW" = "%DW.Weapon2") && (toupper("%DW.Weapon3") != "NULL") && !matchre("%WEAPON", "%DW.Weapon3") then goto DW3
  19.      if ("%CurrentDW" = "%DW.Weapon2") && (toupper("%DW.Weapon1") != "NULL") && !matchre("%WEAPON", "%DW.Weapon1") then goto DW1
  20.      if ("%CurrentDW" = "%DW.Weapon3") && (toupper("%DW.Weapon1") != "NULL") && !matchre("%WEAPON", "%DW.Weapon1") then goto DW1
  21.      if ("%CurrentDW" = "%DW.Weapon3") && (toupper("%DW.Weapon2") != "NULL") && !matchre("%WEAPON", "%DW.Weapon2") then goto DW2
  22.      return
  23. DW1:
  24.      pause 0.2
  25.      gosub GET %DW.Weapon1
  26.      var CurrentDW %DW.Weapon1
  27.      pause 0.3
  28.      return
  29. DW2:
  30.      pause 0.2
  31.      gosub GET %DW.Weapon2
  32.      var CurrentDW %DW.Weapon2
  33.      pause 0.3
  34.      return
  35. DW3:
  36.      pause 0.2
  37.      gosub GET %DW.Weapon3
  38.      var CurrentDW %DW.Weapon3
  39.      pause 0.3
  40.      return
  41.      
  42.      
  43. DW_BARB:
  44. debug 5
  45. var DW_county 0
  46. if ("%SEWEAPON" != "NULL") then math DW_county add 1
  47. if ("%LEWEAPON" != "NULL") then math DW_county add 1
  48. if ("%SBWEAPON" != "NULL") then math DW_county add 1
  49. if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") then math DW_county add 1
  50. if ("%LBWEAPON" != "NULL") then math DW_county add 1
  51. if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") then math DW_county add 1
  52. var DW_counted %DW_county
  53.  
  54. var DW_county 0
  55. if ("%SEWEAPON" != "NULL") then math DW_county add $Small_Edged.LearningRate
  56. if ("%LEWEAPON" != "NULL") then math DW_county add $Large_Edged.LearningRate
  57. if ("%SBWEAPON" != "NULL") then math DW_county add $Small_Blunt.LearningRate
  58. if ("%LBWEAPON" != "NULL") then math DW_county add $Large_Blunt.LearningRate
  59. if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") then math DW_county add $Staves.LearningRate
  60. if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") then math DW_county add $Polearms.LearningRate
  61. evalmath DW_weapon_avg %DW_county / %DW_counted
  62.  
  63. if ("%WEAPON" != "%SEWEAPON") then var DW_weapon_skill Small_Edged
  64. if ("%WEAPON" = "%SEWEAPON") then var DW_weapon_skill Small_Blunt
  65. if ("%SEWEAPON" != "NULL") && ("%SEWEAPON" != "%WEAPON") && ($Small_Edged.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Small_Edged
  66. if ("%LEWEAPON" != "NULL") && ("%LEWEAPON" != "%WEAPON") && ($Large_Edged.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Large_Edged
  67. if ("%SBWEAPON" != "NULL") && ("%SBWEAPON" != "%WEAPON") && ($Small_Blunt.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Small_Blunt
  68. if ("%LBWEAPON" != "NULL") && ("%LBWEAPON" != "%WEAPON") && ($Large_Blunt.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Large_Blunt
  69. if matchre("%STAVES" , "%DW.Barb_1handed_stave") then if ("%STAVES" != "NULL") && ("%STAVES" != "%WEAPON") && ($Staves.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Staves
  70. if matchre("%POLEARMS" , "%DW.Barb_1handed_polearm") then if ("%POLEARMS" != "NULL") && ("%POLEARMS" != "%WEAPON") && ($Polearms.LearningRate <= %DW_weapon_avg) then var DW_weapon_skill Polearms
  71.  
  72. if ("%DW_weapon_skill" = "Small_Edged") then var DW_preselect %SEWEAPON
  73. if ("%DW_weapon_skill" = "Large_Edged") then var DW_preselect %LEWEAPON
  74. if ("%DW_weapon_skill" = "Small_Blunt") then var DW_preselect %SBWEAPON
  75. if ("%DW_weapon_skill" = "Large_Blunt") then var DW_preselect %LBWEAPON
  76. if ("%DW_weapon_skill" = "Staves") then var DW_preselect %STAVES
  77. if ("%DW_weapon_skill" = "Polearms") then var DW_preselect %POLEARMS
  78.  
  79. var DW.Barb_final_check 0
  80. DW.Barb_final_checks:
  81. evalmath DW.Barb_final_check add 1
  82.  
  83. if ("%SEWEAPON" != "NULL") && ("%SEWEAPON" != "%WEAPON") && ($Small_Edged.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Small_Edged
  84. if ("%LEWEAPON" != "NULL") && ("%LEWEAPON" != "%WEAPON") && ($Large_Edged.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Large_Edged
  85. if ("%SBWEAPON" != "NULL") && ("%SBWEAPON" != "%WEAPON") && ($Small_Blunt.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Small_Blunt
  86. if ("%LBWEAPON" != "NULL") && ("%LBWEAPON" != "%WEAPON") && ($Large_Blunt.LearningRate <= $%DW_weapon_skill.LearningRate) then var DW_weapon_skill Large_Blunt
  87. 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
  88. 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
  89.  
  90. if (%DW.Barb_final_check < 2) then goto DW.Barb_final_checks
  91.  
  92. if ("%DW_weapon_skill" = "Small_Edged") then var DW_preselect %SEWEAPON
  93. if ("%DW_weapon_skill" = "Large_Edged") then var DW_preselect %LEWEAPON
  94. if ("%DW_weapon_skill" = "Small_Blunt") then var DW_preselect %SBWEAPON
  95. if ("%DW_weapon_skill" = "Large_Blunt") then var DW_preselect %LBWEAPON
  96. if ("%DW_weapon_skill" = "Staves") then var DW_preselect %STAVES
  97. if ("%DW_weapon_skill" = "Polearms") then var DW_preselect %POLEARMS
  98.  
  99.  
  100.      if ("%CurrentDW" != "%DW_preselect") && ("$lefthand" != "Empty") then gosub stow %CurrentDW
  101.      if ("%CurrentDW" != "%DW_preselect") then gosub GET %DW_preselect
  102.      if ("%CurrentDW" != "%DW_preselect") then if matchre(tolower("%DW_preselect") , "$ALLSWAPPABLE") || matchre("$lefthand", "$ALLSWAPPABLE") then gosub DW.SWAPPABLE
  103.      var CurrentDW %DW_preselect
  104.      debug 0
  105.      return
  106.      
  107. DW.SWAPPABLE:
  108.      delay 0.0001
  109. DW.SWAPPABLE_1:
  110.      var LOCATION DW.SWAPPABLE_1
  111.      if (!$standing) then gosub STAND
  112.      matchre WAIT ^\.\.\.wait|^Sorry\,|^Please wait\.|you don't feel like fighting
  113.      matchre STUNNED ^You are still stunned
  114.      matchre WEBBED ^You can't do that while entangled in a web
  115.      matchre IMMOBILE ^You don't seem to be able to move to do that
  116.      matchre RETURN ^You turn your|^You must have two free hands to use
  117.      put swap my $lefthandnoun
  118.      matchwait
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top