Advertisement
poxipox

Untitled

Jan 4th, 2023
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 KB | None | 0 0
  1. -- Made by Mindrage --
  2. -- Base by Lukky --
  3. -- Requested off LordJanemba --
  4.  
  5. local acombat1 = createCombatObject()
  6. local acombat2 = createCombatObject()
  7. local acombat3 = createCombatObject()
  8. local acombat4 = createCombatObject()
  9. local acombat5 = createCombatObject()
  10. local acombat6 = createCombatObject()
  11. local acombat7 = createCombatObject()
  12. local acombat8 = createCombatObject()
  13.  
  14.  
  15. local combat1 = createCombatObject()
  16. setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  17. setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 23)
  18. setCombatParam(combat1, COMBAT_PARAM_EFFECT, 175)
  19. setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  20.  
  21. local combat2 = createCombatObject()
  22. setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  23. setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 23)
  24. setCombatParam(combat2, COMBAT_PARAM_EFFECT, 175)
  25. setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  26.  
  27. local combat3 = createCombatObject()
  28. setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  29. setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 23)
  30. setCombatParam(combat3, COMBAT_PARAM_EFFECT, 175)
  31. setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  32.  
  33. local combat4 = createCombatObject()
  34. setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  35. setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 23)
  36. setCombatParam(combat4, COMBAT_PARAM_EFFECT, 175)
  37. setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  38.  
  39. local combat5 = createCombatObject()
  40. setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  41. setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 23)
  42. setCombatParam(combat5, COMBAT_PARAM_EFFECT, 175)
  43. setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  44.  
  45. local combat6 = createCombatObject()
  46. setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  47. setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, 23)
  48. setCombatParam(combat6, COMBAT_PARAM_EFFECT, 175)
  49. setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  50.  
  51. local combat7 = createCombatObject()
  52. setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  53. setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, 23)
  54. setCombatParam(combat7, COMBAT_PARAM_EFFECT, 175)
  55. setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  56.  
  57. local combat8 = createCombatObject()
  58. setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  59. setCombatParam(combat8, COMBAT_PARAM_DISTANCEEFFECT, 23)
  60. setCombatParam(combat8, COMBAT_PARAM_EFFECT, 175)
  61. setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -2.8, -150, -2.8, -200)
  62.  
  63.  
  64. arr1 = {
  65. {0, 0, 0},
  66. {1, 2, 0},
  67. {0, 0, 0}
  68. }
  69.  
  70. arr2 = {
  71. {1, 0, 0},
  72. {0, 2, 0},
  73. {0, 0, 0}
  74. }
  75.  
  76. arr3 = {
  77. {0, 1, 0},
  78. {0, 2, 0},
  79. {0, 0, 0}
  80. }
  81.  
  82. arr4 = {
  83. {0, 0, 1},
  84. {0, 2, 0},
  85. {0, 0, 0}
  86. }
  87.  
  88. arr5 = {
  89. {0, 0, 0},
  90. {0, 2, 1},
  91. {0, 0, 0}
  92. }
  93.  
  94. arr6 = {
  95. {0, 0, 0},
  96. {0, 2, 0},
  97. {0, 0, 1}
  98. }
  99.  
  100. arr7 = {
  101. {0, 0, 0},
  102. {0, 2, 0},
  103. {0, 1, 0}
  104. }
  105.  
  106. arr8 = {
  107. {0, 0, 0},
  108. {0, 2, 0},
  109. {1, 0, 0}
  110. }
  111.  
  112.  
  113. local area1 = createCombatArea(arr1)
  114. local area2 = createCombatArea(arr2)
  115. local area3 = createCombatArea(arr3)
  116. local area4 = createCombatArea(arr4)
  117. local area5 = createCombatArea(arr5)
  118. local area6 = createCombatArea(arr6)
  119. local area7 = createCombatArea(arr7)
  120. local area8 = createCombatArea(arr8)
  121. setCombatArea(acombat1, area1)
  122. setCombatArea(acombat2, area2)
  123. setCombatArea(acombat3, area3)
  124. setCombatArea(acombat4, area4)
  125. setCombatArea(acombat5, area5)
  126. setCombatArea(acombat6, area6)
  127. setCombatArea(acombat7, area7)
  128. setCombatArea(acombat8, area8)
  129.  
  130.  
  131. function onTargetTile(cid, pos)
  132. doCombat(cid,combat1,positionToVariant(pos), 3)
  133. end
  134.  
  135. function onTargetTile2(cid, pos)
  136. doCombat(cid,combat2,positionToVariant(pos), 3)
  137. end
  138.  
  139. function onTargetTile3(cid, pos)
  140. doCombat(cid,combat3,positionToVariant(pos), 3)
  141. end
  142.  
  143. function onTargetTile4(cid, pos)
  144. doCombat(cid,combat4,positionToVariant(pos), 3)
  145. end
  146.  
  147. function onTargetTile5(cid, pos)
  148. doCombat(cid,combat5,positionToVariant(pos), 3)
  149. end
  150.  
  151. function onTargetTile6(cid, pos)
  152. doCombat(cid,combat6,positionToVariant(pos), 3)
  153. end
  154.  
  155. function onTargetTile7(cid, pos)
  156. doCombat(cid,combat7,positionToVariant(pos), 3)
  157. end
  158.  
  159. function onTargetTile8(cid, pos)
  160. doCombat(cid,combat8,positionToVariant(pos), 3)
  161. end
  162.  
  163.  
  164.  
  165. setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
  166.  
  167. setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
  168.  
  169. setCombatCallback(acombat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
  170.  
  171. setCombatCallback(acombat4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")
  172.  
  173. setCombatCallback(acombat5, CALLBACK_PARAM_TARGETTILE, "onTargetTile5")
  174.  
  175. setCombatCallback(acombat6, CALLBACK_PARAM_TARGETTILE, "onTargetTile6")
  176.  
  177. setCombatCallback(acombat7, CALLBACK_PARAM_TARGETTILE, "onTargetTile7")
  178.  
  179. setCombatCallback(acombat8, CALLBACK_PARAM_TARGETTILE, "onTargetTile8")
  180.  
  181.  
  182.  
  183.  
  184. local function onCastSpell1(parameters)
  185. doCombat(parameters.cid, acombat1, parameters.var, 3)
  186. end
  187.  
  188. local function onCastSpell2(parameters)
  189. doCombat(parameters.cid, acombat2, parameters.var, 3)
  190. end
  191.  
  192. local function onCastSpell3(parameters)
  193. doCombat(parameters.cid, acombat3, parameters.var, 3)
  194. end
  195.  
  196. local function onCastSpell4(parameters)
  197. doCombat(parameters.cid, acombat4, parameters.var, 3)
  198. end
  199.  
  200. local function onCastSpell5(parameters)
  201. doCombat(parameters.cid, acombat5, parameters.var, 3)
  202. end
  203.  
  204. local function onCastSpell6(parameters)
  205. doCombat(parameters.cid, acombat6, parameters.var, 3)
  206. end
  207.  
  208. local function onCastSpell7(parameters)
  209. doCombat(parameters.cid, acombat7, parameters.var, 3)
  210. end
  211.  
  212. local function onCastSpell8(parameters)
  213. doCombat(parameters.cid, acombat8, parameters.var, 0, true)
  214. end
  215.  
  216.  
  217.  
  218.  
  219. function onCastSpell(cid, var)
  220. local parameters = { cid = cid, var = var}
  221. addEvent(onCastSpell1, 0, parameters)
  222. addEvent(onCastSpell2, 100, parameters)
  223. addEvent(onCastSpell3, 150, parameters)
  224. addEvent(onCastSpell4, 200, parameters)
  225. addEvent(onCastSpell5, 250, parameters)
  226. addEvent(onCastSpell6, 300, parameters)
  227. addEvent(onCastSpell7, 350, parameters)
  228. addEvent(onCastSpell8, 400, parameters)
  229. return LUA_NO_ERROR
  230.  
  231. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement