Advertisement
MrTrala

PV - Spells + SD

Feb 16th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.51 KB | None | 0 0
  1. --[[
  2.     Manual Spell equals SD for ArchLight
  3.     Version 1.1 - PRIV VERSION (Ownership; Unix)
  4.     by Mr Trala
  5.  
  6. Instructions:
  7. Remember to change the "words" and the "cooldown" for your spell.
  8. You can get your 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 "40" seconds and "rl" name of Utura grana so;
  13. You need to remove .500 seconds from there (to compensate the exaus), so something like this;
  14. words = "Utura gran", cooldown = 3500.
  15.  
  16. You can keep adding spells just like this:
  17. Adding the next number, ex;
  18. the last in this script is "spells[3]" so you just need to add the next one ie: "spells[4]".
  19.  
  20. That's It!
  21. Have fun!
  22.    
  23. Credits;
  24. Unix -- Idea
  25. Mr Trala -- Programmer & Tester
  26. ]]
  27.  
  28. config = {
  29.     Dist = 7, -- Don't change anything here.
  30.     SdID = 3154 -- Change to your respective Sd ID <<
  31. }
  32.  
  33.  
  34. spells = {}
  35. spells[1] = {words = "exori hur", cooldown = 1500}
  36. spells[2] = {words = "utori mort", cooldown = 1500}
  37. spells[3] = {words = "exori mas", cooldown = 7500}
  38. spells[4] = {words = "exori min", cooldown = 5500}
  39.  
  40. function spellsd()
  41.     for i = 1, #spells do
  42.         local sps = spells[i]
  43.         local trg = Creature.GetByID(Self.TargetID())
  44.             if Self.GetSpellCooldown(sps.words) >= sps.cooldown and trg:isTarget() then
  45.                 if trg:isAlive() and trg:DistanceFromSelf() <= config.Dist then
  46.                     Self.UseItemWithTarget(config.SdID)
  47.                     wait(1900, 2000)
  48.                 end
  49.             end
  50.     end
  51. end
  52.  
  53. registerEventListener(TIMER_TICK, "spellsd")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement