Advertisement
BarryAllenwhl

Weapon area

Apr 2nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. local combat = createCombatObject()
  2. setCombatParam(combat, COMBAT_PARAM_EFFECT, 39)
  3. setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
  4. setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 11)
  5. setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -98000000, 0, -99000000)
  6.  
  7. local area = createCombatArea({
  8. {0, 1, 1, 1, 0,},
  9. {0, 1, 3, 1, 0,},
  10. {0, 1, 1, 1, 0,}
  11. })
  12.  
  13. setCombatArea(combat, area)
  14.  
  15. function onUseWeapon(cid, var)
  16. target = getCreatureTarget(cid)
  17. doSendDistanceShoot(getThingPos(cid), {x = getThingPos(cid).x + 5, y = getThingPos(cid).y + 6, z = getThingPos(cid).z}, 11)
  18. doSendDistanceShoot({x = getThingPos(target).x - 4, y = getThingPos(target).y - 5, z = getThingPos(target).z}, getThingPos(target), 11)
  19. doSendDistanceShoot({x = getThingPos(target).x - 4, y = getThingPos(target).y - 5, z = getThingPos(target).z}, getThingPos(target), 11)
  20. doSendMagicEffect(getThingPos(cid), 61)
  21. doSendMagicEffect(getThingPos(target), 61)
  22. doSendDistanceShoot({x = getThingPos(target).x - 8, y = getThingPos(target).y + 6, z = getThingPos(target).z}, getThingPos(target), 11)
  23. doSendDistanceShoot({x = getThingPos(target).x - 7, y = getThingPos(target).y + 5, z = getThingPos(target).z}, getThingPos(target), 11)
  24. doSendDistanceShoot({x = getThingPos(target).x - 6, y = getThingPos(target).y + 4, z = getThingPos(target).z}, getThingPos(target), 11)
  25. doSendDistanceShoot({x = getThingPos(target).x - 5, y = getThingPos(target).y + 3, z = getThingPos(target).z}, getThingPos(target), 11)
  26. if not isCreature(cid) then return true end
  27. return doCombat(cid, combat, var)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement