Advertisement
MrTrala

Untitled

Sep 18th, 2016
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.41 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 = 3154 -- Change to your respective Sd ID <<
  37. }
  38.  
  39.  
  40. spells = {}
  41. spells[1] = {words = "Living Energy Bomb", cooldown = "exevo dis flam hur", nDirection = false}
  42. spells[2] = {words = "Living TimeBomb", cooldown = "exura dis", nDirection = false}
  43. spells[3] = {words = "Pyroblast", cooldown = "exevo vis hur", nDirection = false}
  44. spells[4] = {words = "Dragon Breath", cooldown = "exori min flam", nDirection = true}
  45.  
  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.                     else
  61.                         Self.UseItemWithTarget(config.SdID)
  62.                         Self.Say(sps.words)
  63.                     end
  64.                 end
  65.             end
  66.     end
  67. end
  68.  
  69. registerEventListener(TIMER_TICK, "spellssf")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement