Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. local combat1 = createCombatObject()
  2. setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
  3. setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 0, -100, 0, -100)
  4.  
  5. arr1 = {
  6. {0, 0, 0, 1, 0, 0, 0},
  7. {0, 0, 0, 1, 0, 0, 0},
  8. {0, 0, 0, 1, 0, 0, 0},
  9. {0, 0, 0, 3, 0, 0, 0},
  10. {0, 0, 0, 0, 0, 0, 0},
  11. {0, 0, 0, 0, 0, 0, 0},
  12. {0, 0, 0, 0, 0, 0, 0},
  13. }
  14.  
  15. local area1 = createCombatArea(arr1)
  16. setCombatArea(combat1, area1)
  17.  
  18. local function onCastSpell1(parameters)
  19. return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
  20. end
  21.  
  22. function onCastSpell(cid, var)
  23. local p = getCreaturePosition(cid)
  24. local x = {
  25. [0] = {x=p.x+2, y=p.y-1, z=p.z},
  26. [1] = {x=p.x+4, y=p.y+1, z=p.z},
  27. [2] = {x=p.x+2, y=p.y+4, z=p.z},
  28. [3] = {x=p.x-1, y=p.y+1, z=p.z}
  29. }
  30. local y = {
  31. [0] = um, -- /\
  32. [1] = dois, -- >>
  33. [2] = tres, -- \/
  34. [3] = quatro -- <<
  35. }
  36. pos = x[getCreatureLookDirection(cid)]
  37. eff = y[getCreatureLookDirection(cid)]
  38. doSendMagicEffect(pos, eff)
  39. doCombat(cid, combat1, var)
  40. local parameters = { cid = cid, var = var}
  41. addEvent(onCastSpell1, 100, parameters)
  42. return TRUE
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement