I will be releasing all of my "mini-scripts" over the course of the next two months.
I have approximately 70 of these scripts that would make your server unique.
You may visit my blog in my signature to view all scripts that have been released so far.
Boomerang Step
Please wait for animated GIF to finish loading
What does it do?
It is a spell for assassin-like vocations.
It teleports you to the targeted enemy and deals a damaging blow.
Then it teleports you back to your initial position, just like what a boomerang would do.
Installing the script:
Remember to change the damage, name, level, manacost, and other values if you wish.
Create a new Lua file in data/spells/scripts named boomerangstep and add the following:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ASSASSIN)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)
local function delayedTeleport(cid, position)
if(not isCreature(cid)) then return true end
doTeleportThing(cid, position)
return true
end
function onCastSpell(cid, var)
addEvent(delayedTeleport, 500, cid, getCreaturePosition(cid))
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doTeleportThing(cid, getThingPos(variantToNumber(var)), true)
return doCombat(cid, combat, var)
end
In spells.xml, add the following lines:
XML:
<instant name="Boomerang Step" words="insinuendi" lvl="50" mana="20" prem="1" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" groups="1,2000" icon="88" needlearn="0" event="script" value="boomerangstep.lua">
<vocation id="3"/>
<vocation id="7"/>
</instant>
BIG Thanks to Xagul for helping me on this and reducing my initial code
Last edited: