Andréew
Humble mapper.
Hey guys! i have this piece of code i found here on the forum made by @azzkaban, i edited it abit to my likings.
tho to the point, i would like do know how to add so that the summon will get teleported to me if im to far away or change floor.
here is the code, im using TFS 1.2
tho to the point, i would like do know how to add so that the summon will get teleported to me if im to far away or change floor.
here is the code, im using TFS 1.2
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_NONE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, 0, 0, 0)
local maxsumons = 1
function onCastSpell(cid, var)
local summoncount = getCreatureSummons(cid)
if #summoncount < 1 then
for i = 1, maxsumons - #summoncount do
doConvinceCreature(cid, doSummonCreature("Skeleton", getCreaturePosition(cid)))
end
end
return doCombat(cid, combat, var)
end