Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Perfect Sd + Spell Combo (with direction and pvpSafe) for ArchLight
- Version 2.5 - PRIV VERSION (Ownership; Mr Trilo)
- by Mr Trala
- Instructions:
- Remember to change the "words" and the "cooldown" for your spell.
- You can get your custom cooldown (if you are in an otserver).
- Just checking the "icon" that pop up when you use any spell.
- Ex;
- "Exana Gran Restora" equals to the exhausted of "Utura Gran" so;
- words = "exana gran restora", cooldown = "utura gran".
- You can keep adding spells just like this:
- Adding the next number, ex;
- the last in this script is "spells[3]" so you just need to add the next one ie: "spells[4]".
- -
- If your attack needs direction "exevo tera hur", "exevo vis hur", etc, put "nDirection" as "true".
- If your attack is an AOE put "pSafe" as "true" (so you would NOT cast it if ppl is around you).
- That's It!
- Have fun!
- Credits;
- Unix -- Idea
- Corn -- Idea
- Mr Trala -- Programmer & Tester
- ]]
- config = {
- Dist = 7, -- Don't change anything here.
- SdID = 3154 -- Change to your respective Sd ID <<
- }
- spells = {}
- spells[1] = {words = "exevo tera hur", cooldown = "exevo tera hur", nDirection = true, pSafe = false}
- spells[2] = {words = "exevo gran mas frigo", cooldown = "exevo gran mas frigo", nDirection = false, pSafe = false}
- spells[3] = {words = "exevo gran mas tera", cooldown = "exevo gran mas tera", nDirection = false, pSafe = false}
- function spellssf()
- for i = 1, #spells do
- local sps = spells[i]
- local trg = Creature.GetByID(Self.TargetID())
- local pos, toPos = getSelfPosition(), trg:Position()
- local dir = pos.x > toPos.x and WEST or pos.x < toPos.x and EAST or pos.y > toPos.y and NORTH or SOUTH
- local am = 0
- for name, c in Creature.iPlayers(config.Dist) do
- if c:isValid() and c:isAlive() and not Self.isInPz() and c:isOnScreen() and sps.pSafe then
- am = am +1
- end
- end
- if Self.CanCastSpell(sps.words) and Self.GetSpellCooldown(sps.cooldown) == 0 and trg:isTarget() then
- if trg:isAlive() and trg:DistanceFromSelf() <= config.Dist and am <= 0 then
- if sps.nDirection then
- Self.Turn(dir)
- wait(500, 1050)
- Self.Say(sps.words)
- Self.UseItemWithTarget(config.SdID)
- wait(1900, 2000)
- else
- wait(500, 1050)
- Self.Say(sps.words)
- Self.UseItemWithTarget(config.SdID)
- wait(1900, 2000)
- end
- end
- end
- end
- end
- registerEventListener(TIMER_TICK, "spellssf")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement