Hello,
I'd like to add this spell to my project, but i can't handle this part...
Can please someone help me?
This is a 7.X spell and need to make it work on TFS 1.X please
This what i have so far:
I'd like to add this spell to my project, but i can't handle this part...
Can please someone help me?
This is a 7.X spell and need to make it work on TFS 1.X please
Code:
function onTargetCorpse(cid, pos)
local getPos = pos
getPos.stackpos = 255
corpse = getThingfromPos(getPos)
if(corpse.uid > 0 and isCreature(corpse.uid) == false and isInArray(CORPSES, corpse.itemid) == TRUE) then
doRemoveItem(corpse.uid)
doPlayerSummonCreature(cid, Skeleton, pos)
end
end
This what i have so far:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local area = createCombatArea(AREA_CIRCLE3X3)
combat:setArea(area)
function onTargetCorpse(cid, pos)
local getPos = pos
getPos.stackpos = 255
corpse = getThingfromPos(getPos)
if(corpse.uid > 0 and isCreature(corpse.uid) == false and isInArray(CORPSES, corpse.itemid) == TRUE) then
doRemoveItem(corpse.uid)
doPlayerSummonCreature(cid, Skeleton, pos)
end
end
combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCorpse")
function onCastSpell(creature, var)
return combat:execute(creature, var)
end