daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jan 11th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local atk1 = createCombatObject()
  2. local combat1 = createCombatObject()
  3. setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
  4. setCombatParam(combat1, COMBAT_PARAM_EFFECT, 202)
  5. setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 93)
  6. function kiaiho(cid, level, maglevel)
  7.    local min = -(level * 4.5+ maglevel * 12 +50)
  8.    local max = -(level * 4.5+ maglevel * 13 +50)
  9.    return min, max
  10. end
  11. setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho")
  12.  
  13. arr1 = {
  14. {0, 0, 0, 0, 0, 0, 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, 1, 1, 1, 0, 0, 0, 0},
  19. {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
  20. {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
  21. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  22. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  23. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  24. {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
  25. }
  26.  
  27. local area1 = createCombatArea(arr1)
  28.  
  29.  
  30. setCombatArea(atk1, area1)
  31.  
  32. function onTargetTile(cid, pos)
  33.     local n, i = getTileInfo(pos).creatures, 1
  34.     if n ~= 0 then
  35.     local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid
  36.     while v ~= 0 do
  37.         i = i + 1
  38.         v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid
  39.         doCreatureSetNoMove(v, true)
  40.         addEvent(doCreatureSetNoMove, 5000, v, false)
  41.     end
  42. end
  43.     doCombat(cid,combat1,positionToVariant(pos))
  44. end
  45.  
  46. setCombatCallback(atk1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
  47. local function onCastSpell1(parameters)
  48. doCombat(parameters.cid, atk1, parameters.var)
  49. end
  50.  
  51.  
  52. local storage = 80147
  53. local spellname = "shooting around"
  54. local time = 1
  55.  
  56. function onCastSpell(cid, var)
  57. if exhaustion.check(cid, storage) == false then
  58. exhaustion.set(cid, storage, time)
  59. local parameters = { cid = cid, var = var}
  60. return doCombat(parameters.cid, atk1, parameters.var)
  61. else
  62. doPlayerSendCancel(cid, "You have to wait " ..exhaustion.get(cid, storage).. " seconds before using "..spellname.." again.")
  63. end
  64. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top