- Joined
- Dec 26, 2013
- Messages
- 2,124
- Solutions
- 14
- Reaction score
- 1,518
- Location
- USA
- GitHub
- Codinablack
I have this spell I tried to use on tfs 1.0 and it seems that the problem is with doTeleportThing() but tfs does have that function. Here is the spell...
Does it require pushMovement? and if so what is pushMovement? and how do I use it correctly?
Code:
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
Does it require pushMovement? and if so what is pushMovement? and how do I use it correctly?