• 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!

Lua TFS 1.X Fix Undead Legion Spell

Athenuz

Owlz!
Joined
Oct 1, 2015
Messages
234
Reaction score
27
Location
México
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

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