Guest User

Untitled

a guest
Apr 26th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. local combat = createCombatObject()
  2. setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
  3. setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
  4. setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
  5. setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -8.10, -280, -8.40, -280)
  6.  
  7. combat_arr = {
  8. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  9. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  10. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  11. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  12. {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
  13. {0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0},
  14. {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
  15. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  16. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  17. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  18. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
  19. }
  20.  
  21. local combat_area = createCombatArea(combat_arr)
  22. setCombatArea(combat, combat_area)
  23.  
  24. function onTargetTile(cid, pos)
  25.     doSendDistanceShoot(pos, getThingPos(getCreatureTarget(cid)), 18)
  26. end
  27.  
  28. setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
  29.  
  30. function onCastSpell(cid, var)
  31.     return doCombat(cid, combat, var)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment