Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. local combat = createCombatObject()
  2. setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
  3. setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
  4. setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
  5. setCombatParam(combat, COMBAT_PARAM_TARGETPLAYERSORSUMMONS, true)
  6. setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
  7. setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 7, 7, 14, 17)
  8. local area = createCombatArea(AREA_CIRCLE3X3)
  9. setCombatArea(combat, area)
  10.  
  11. if hasCondition(cid, CONDITION_EXHAUST) then
  12. doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
  13. return TRUE
  14. end
  15.  
  16. function onCastSpell(cid, var)
  17. local mags = {}
  18. local pos = getCreaturePosition(cid)
  19. local pos5 = getSpectators(pos, 1, 1)
  20. pos.x = pos.x - 2
  21. local pos1 = getSpectators(pos, 1, 1)
  22. pos.x = pos.x + 4
  23. local pos2 = getSpectators(pos, 1, 1)
  24. pos.x = pos.x - 2
  25. pos.y = pos.y - 2
  26. local pos3 = getSpectators(pos, 1, 1)
  27. pos.y = pos.y + 4
  28. local pos4 = getSpectators(pos, 1, 1)
  29. pos.y = pos.y - 3
  30. pos.x = pos.x - 1
  31. local pos6 = getSpectators(pos, 1, 1)
  32. pos.x = pos.x + 2
  33. local pos7 = getSpectators(pos, 1, 1)
  34. pos.y = pos.y + 2
  35. local pos8 = getSpectators(pos, 1, 1)
  36. pos.x = pos.x - 2
  37. local pos9 = getSpectators(pos, 1, 1)
  38. if pos1 ~= nil then
  39. for r=1, #pos1 do
  40. table.insert(mags, pos1[r])
  41. end
  42. end
  43. if pos2 ~= nil then
  44. for r=1, #pos2 do
  45. table.insert(mags, pos2[r])
  46. end
  47. end
  48. if pos3 ~= nil then
  49. for r=1, #pos3 do
  50. table.insert(mags, pos3[r])
  51. end
  52. end
  53. if pos4 ~= nil then
  54. for r=1, #pos4 do
  55. table.insert(mags, pos4[r])
  56. end
  57. end
  58. if pos5 ~= nil then
  59. for r=1, #pos5 do
  60. table.insert(mags, pos5[r])
  61. end
  62. end
  63. if pos6 ~= nil then
  64. for r=1, #pos6 do
  65. table.insert(mags, pos6[r])
  66. end
  67. end
  68. if pos7 ~= nil then
  69. for r=1, #pos7 do
  70. table.insert(mags, pos7[r])
  71. end
  72. end
  73. if pos8 ~= nil then
  74. for r=1, #pos8 do
  75. table.insert(mags, pos8[r])
  76. end
  77. end
  78. if pos9 ~= nil then
  79. for r=1, #pos9 do
  80. table.insert(mags, pos9[r])
  81. end
  82. end
  83. for t=1, #mags do
  84. if mags[t] ~= cid then
  85. doSendAnimatedText((getCreaturePosition(mags[t])), "Healing!", TEXTCOLOR_LIGHTBLUE)
  86. end
  87. end
  88. return doCombat(cid, combat, var)
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement