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

TFS 0.X Transform item on use with

zabuzo

Well-Known Member
Joined
Jun 10, 2016
Messages
238
Reaction score
54
How to do a script to when you use a dragon slayer (7402) for example in a altar like fire shrine (7504,7505,7506,7507) do transform the dragon slayer in a enchanted fire dragon slayer sword with 1000 charges (7748)
 
Solution
How to do a script to when you use a dragon slayer (7402) for example in a altar like fire shrine (7504,7505,7506,7507) do transform the dragon slayer in a enchanted fire dragon slayer sword with 1000 charges (7748)
Is this what you are looking for?
Lua:
local fireShrine = {7504, 7505, 7506, 7507}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 7402 and isInArray(fireShrine, itemEx.itemid)) then
        doTransformItem(item.uid, 7748, 1000) -- 1000 = amount of charges
        doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
        return true
    end
end
How to do a script to when you use a dragon slayer (7402) for example in a altar like fire shrine (7504,7505,7506,7507) do transform the dragon slayer in a enchanted fire dragon slayer sword with 1000 charges (7748)
Is this what you are looking for?
Lua:
local fireShrine = {7504, 7505, 7506, 7507}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 7402 and isInArray(fireShrine, itemEx.itemid)) then
        doTransformItem(item.uid, 7748, 1000) -- 1000 = amount of charges
        doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
        return true
    end
end
 
Last edited:
Solution
Is this what you are looking for?
Lua:
local fireShrine = {7504, 7505, 7506, 7507}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 7402 and isInArray(fireShrine, itemEx.itemid)) then
        doTransformItem(item.uid, 7748, 1000) -- 1000 = amount of charges
        doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
        return true
    end
end

Thank you!
 
Back
Top