Advertisement
Skymagnum

Untitled

Jun 8th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.76 KB | None | 0 0
  1. local combat = createCombatObject()
  2. setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
  3. setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
  4. setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -10.20, -300, -11.40, -300)
  5.  
  6. local condition = createConditionObject(CONDITION_PARALYZE)
  7. setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)
  8. setConditionFormula(condition, -0.9, 1, -0.9, 1)
  9.  
  10. local arr = {
  11.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  12.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  13.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  14.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  15.     {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
  16.     {0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
  17.     {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
  18.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  19.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  20.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  21.     {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
  22. }
  23.  
  24. local area = createCombatArea(area)
  25. setCombatArea(combat, area)
  26.  
  27. function onTargetTile(cid, pos)
  28.     doSendDistanceShoot({x = pos.x - 9, y = pos.y - 8, z = pos.z}, pos, CONST_ANI_FIRE)
  29.     return addEvent(doCombat, 100, cid, combat, positionToVariant(pos))
  30. end
  31.  
  32. setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
  33.  
  34. function onCastSpell(cid, var)
  35.    
  36.     local p = getThingPos(cid)
  37.     local ka = {x = p.x, y = p.y, z = p.z}
  38.     local ppp = nil
  39.     local player = nil
  40.     local check = false
  41.    
  42.     if canPlayerWearOutfit(cid, 138, 3) or canPlayerWearOutfit(cid, 130, 3) then
  43.         check = true
  44.     end
  45.    
  46.     for x = ka.x - 1, ka.x + 1 do
  47.         for y = ka.y - 1, ka.y + 1 do
  48.             ppp = {x = x, y = y, z = p.z}
  49.             player = getTopCreature(ppp).uid
  50.             if check then
  51.                 if player > 0 and getCreatureName(player) ~= getCreatureName(cid) then
  52.                     doAddCondition(player, condition)
  53.                 end
  54.             end
  55.         end
  56.     end
  57.     return doCombat(cid, combat, var)
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement