Advertisement
Guest User

Untitled

a guest
Mar 19th, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. function karmAttacks()
  2.  
  3. kbashingAttack = (fire and firewhip and "whip") or (divinus and divinuswhip and "whip") or (excorable and excorablewhip and "whip") or blunt and "swing" or "jab"
  4.  
  5.  
  6. if kbashingAttack == "whip" then
  7. for _,dtype in ipairs(damageTypes) do
  8. if _G[dtype] and _G[dtype.."whip"] and not mm.me.wielded[_G[dtype.."whipnumber"]] then
  9. if gripping and not whipfailsafe then
  10. send("relax grip", false)
  11. send("sheathe weapon", false)
  12. send("draw "..razingnumber, false)
  13. unwieldAll()
  14. send("wield ".._G[dtype.."whipnumber"], false)
  15. send("grip", false)
  16. whipfailsafe = true
  17. tempTimer(3, [[whipfailsafe = false]])
  18. end
  19. end
  20. end
  21. elseif kbashingAttack ~= "whip" then
  22. for _,dtype in ipairs(damageTypes) do
  23. if mm.me.wielded[_G[dtype.."whipnumber"]] then
  24. send("relax grip", false)
  25. send("sheathe weapon", false)
  26. send("sheathe weapon", false)
  27. send("unwield weapon", false)
  28. send("unwield whip", false)
  29. send("unwield "..shieldnumber, false)
  30. send("draw "..bashingweapon, false)
  31. end
  32. end
  33. end
  34.  
  35. if bscurios and not curiochangeattempted then
  36. if kbashingAttack == "manifest destruction at" and firecurio and curiodamagetype ~= "fire" then
  37. send("curio activate "..firecurionumber, false)
  38. curiochangeattempted = true
  39. elseif kbashingAttack == "whip" and divinuscurio and mm.me.wielded[tostring(divinuswhipnumber)] and curiodamagetype ~= "divinus" then
  40. send("curio activate "..divinuscurionumber, false)
  41. curiochangeattempted = true
  42. elseif kbashingAttack == "whip" and excorablecurio and mm.me.wielded[tostring(excorablewhipnumber)] and curiodamagetype ~= "excorable" then
  43. send("curio activate "..excorablecurionumber, false)
  44. curiochangeattempted = true
  45. elseif kbashingAttack == "whip" and firecurio and mm.me.wielded[tostring(firewhipnumber)] and curiodamagetype ~= "fire" then
  46. send("curio activate "..firecurionumber, false)
  47. curiochangeattempted = true
  48. elseif kbashingAttack == "swing" and bluntcurio and curiodamagetype ~= "blunt" then
  49. send("curio activate "..bluntcurionumber, false)
  50. curiochangeattempted = true
  51. elseif kbashingAttack == "jab" and cuttingcurio and curiodamagetype ~= "cutting" then
  52. send("curio activate "..cuttingcurionumber, false)
  53. curiochangeattempted = true
  54. end
  55. tempTimer(1, [[curiochangeattempted = false]])
  56. end
  57.  
  58. if mtarget_shielded and (kbashingAttack == "swing" or kbashingAttack == "jab") then
  59. send("raze " .. mtarget, false)
  60. send("swing " .. mtarget, false)
  61. tempTimer(1, [[checkForLostAttack()]])
  62. mtarget_shielded = false
  63. return
  64. elseif mtarget_shielded and useshieldbreakskill and kbashingAttack == "whip" then
  65. send(shieldbreakskill.." "..mtarget, false)
  66. tempTimer(1, [[checkForLostAttack()]])
  67. mtarget_shielded = false
  68. return
  69. end
  70.  
  71. if (kbashingAttack == "swing" or kbashingAttack == "jab") then
  72. send(kbashingAttack .. " " .. mtarget, false)
  73. send(kbashingAttack .. " " .. mtarget, false)
  74. tempTimer(1, [[checkForLostAttack()]])
  75. else
  76. send(kbashingAttack .. " " .. mtarget, false)
  77. tempTimer(1, [[checkForLostAttack()]])
  78. end
  79. end
  80.  
  81. function kbashingattack()
  82. if canBash() then
  83. blunt = bluntweak[mtarget] or false
  84. fire = fireweak[mtarget] or false
  85. divinus = divinusweak[mtarget] or false
  86. excorable = excorableweak[mtarget] or false
  87. psychic = psychicweak[mtarget] or false
  88. cold = coldweak[mtarget] or false
  89. electric = electricweak[mtarget] or false
  90. cutting = cuttingweak[mtarget] or false
  91. poison = poisonweak[mtarget] or false
  92. asphyxiation = asphyxiationweak[mtarget] or false
  93. magic = magicweak[mtarget] or false
  94. if gmcp.Char.Vitals.beastbal == "1" then
  95. beastAction()
  96. end
  97. if not bashingfailsafe then
  98. karmAttacks()
  99. bashingfailsafe = true
  100. tempTimer(0.5, [[bashingfailsafe = false]])
  101. end
  102. end
  103. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement