local TRANSFORMATIONS = {
-- NARUTO
[69] = {outfit = {lookType = 64}, useEffect = 10, pEffect = 18},
[64] = {outfit = {lookType = 31}, useEffect = 24, pEffect = 12},
[31] = {outfit = {lookType = 90}, useEffect = 24, pEffect = 15},
[90] = {outfit = {lookType = 89}, useEffect = 24, pEffect = 11},
-- SASUKE
[5] = {outfit = {lookType = 6}, useEffect = 25, pEffect = 9},
[6] = {outfit = {lookType = 7}, useEffect = 23, pEffect = 14},
[7] = {outfit = {lookType = 8}, useEffect = 14, pEffect = 14},
-- SAKURA
[9] = {outfit = {lookType = 10}, useEffect = 2, pEffect = 19},
[10] = {outfit = {lookType = 11}, useEffect = 50, pEffect = 19},
[11] = {outfit = {lookType = 12}, useEffect = 33, pEffect = 14},
}
local function delayed_magic_effect(cid)
if not isCreature(cid) then
return true
end
local outfit = getCreatureOutfit(cid)
local tmp = TRANSFORMATIONS[outfit.lookType]
if not tmp then
return true
end
doSendMagicEffect(getCreaturePosition(cid), tmp.pEffect)
return addEvent(function()
delayed_magic_effect(cid)
end, 1000)
end
function onSay(cid, words, param)
local outfit = getCreatureOutfit(cid)
local tmp = TRANSFORMATIONS[outfit.lookType]
if not tmp then
return doPlayerSendCancel(cid, "Você não possui transformações.")
end
local storage = outfit.lookType + 25000
if getCreatureStorage(cid, storage) == 2103 then
return doPlayerSendCancel(cid, "Você ainda não completou a quest necessária para usar essa transformação.")
end
doSendMagicEffect(getCreaturePosition(cid), tmp.useEffect)
doSetCreatureOutfit(cid, tmp.outfit, -1)
delayed_magic_effect(cid)
return true
end
Dessa vez testei.
Tchau, não volto aqui mais.