• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Assassin Spell TFS 1.0

Codinablack

Dreamer
Content Editor
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...


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?
 
Back
Top