Advertisement
MrTrala

Perfect Spell + SD + Direction(Updated)

Sep 14th, 2016
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.61 KB | None | 0 0
  1. --[[
  2.     Perfect Sd + Spell Combo (with direction and pvpSafe) for ArchLight
  3.     Version 2.5.2 - PRIV VERSION (Ownership; Mr Trilo)
  4.     by Mr Trala
  5.  
  6. Instructions:
  7. Remember to change the "words" and the "cooldown" for your spell.
  8. You can get your custom cooldown (if you are in an otserver).
  9. Just checking the "icon" that pop up when you use any spell.
  10. Ex;
  11.  
  12. "Exana Gran Restora" equals to the exhausted of "Utura Gran" so;
  13. words = "exana gran restora", cooldown = "utura gran".
  14.  
  15. You can keep adding spells just like this:
  16. Adding the next number, ex;
  17. the last in this script is "spells[3]" so you just need to add the next one ie: "spells[4]".
  18. -
  19. If your attack needs direction "exevo tera hur", "exevo vis hur", etc, put "nDirection" as "true".
  20.  
  21. That's It!
  22. Have fun!
  23.    
  24. Credits;
  25. Unix -- Idea
  26. Corn -- Idea
  27. Mr Trala -- Programmer & Tester
  28.  
  29. Change Log:
  30. 2.5.1 -- Fixed an error in the direction.
  31. 2.5.2 -- Removed useless functions and do, that became outdated with the pvp update.
  32. ]]
  33.  
  34. config = {
  35.     Dist = 7, -- Don't change anything here.
  36.     SdID = 3186 -- Change to your respective Sd ID <<
  37. }
  38.  
  39.  
  40. spells = {}
  41. spells[1] = {words = "Chilling blast", cooldown = "exori frigo", nDirection = false}
  42. spells[2] = {words = "chilling waves", cooldown = "exori gran frigo", nDirection = false}
  43. spells[3] = {words = "vine beam", cooldown = "exevo gran vis lux", nDirection = true}
  44. spells[4] = {words = "frozen tundra", cooldown = "exevo vis hur", nDirection = false}
  45. spells[5] = {words = "subzero", cooldown = "exori gran con", nDirection = false}
  46.  
  47. function spellssf()
  48. for i = 1, #spells do
  49.         local sps = spells[i]
  50.         local trg = Creature.GetByID(Self.TargetID())
  51.         local pos, toPos = getSelfPosition(), trg:Position()
  52.         local dir = pos.x > toPos.x and WEST or pos.x < toPos.x and EAST or pos.y > toPos.y and NORTH or SOUTH
  53.             if Self.GetSpellCooldown(sps.cooldown) == 0 and trg:isTarget() then
  54.                 if trg:isAlive() and trg:DistanceFromSelf() <= config.Dist then
  55.                     if sps.nDirection then
  56.                         Self.Turn(dir)
  57.                         wait(500, 1050)
  58.                         Self.UseItemWithTarget(config.SdID)
  59.                         Self.Say(sps.words)
  60.                         wait(1900, 2000)
  61.                     else
  62.                         wait(500, 1050)
  63.                         Self.UseItemWithTarget(config.SdID)
  64.                         Self.Say(sps.words)
  65.                         wait(1900, 2000)
  66.                     end
  67.                 end
  68.             end
  69.     end
  70. end
  71.  
  72. registerEventListener(TIMER_TICK, "spellssf")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement