tenta assim:
transfs = {
--Naruto
[69] = {stor = 202020, out = 64, skillq = 1, speed = 5, eff = 10, effs = 18},
[64] = {stor = 202021, out = 31, skillq = 2, speed = 5, eff = 24, effs = 12},
[31] = {stor = 202022, out = 90, skillq = 3, speed = 5, eff = 24, effs = 15},
[90] = {stor = 202023, out = 89, skillq = 4, speed = 5, eff = 24, effs = 11},
--Sasuke
[5] = {stor = 1230, out = 6, skillq = 2, speed = 5, eff = 25, effs = 9},
[6] = {stor = 1229, out = 7, skillq = 2, speed = 5, eff = 23, effs = 14},
[7] = {stor = 1228, out = 8, skillq = 2, speed = 5, eff = 14, effs = 14},
[8] = {stor = 1227, out = 8, skillq = 2, speed = 5, eff = 14, effs = 13},
--Sakura
[9] = {stor = 1226, out = 10, skillq = 2, speed = 5, eff = 2, effs = 19},
[10] = {stor = 1225, out = 11, skillq = 2, speed = 5, eff = 50, effs = 19},
[11] = {stor = 1224, out = 12, skillq = 2, speed = 5, eff = 33, effs = 14},
[12] = {stor = 1223, out = 12, skillq = 2, speed = 5, eff = 35, effs = 11},
}
function onSay(cid, words, param)
local fix = transfs[getCreatureOutfit(cid).lookType]
if getPlayerStorageValue(cid, fix.stor) < 1 then
doPlayerSendTextMessage(cid, 20, "Você ainda não completou a quest necessária para sua transformação.")
return true
end
doSendMagicEffect(getThingPos(cid), fix.eff)
attribute(cid, fix.eff, fix.effs)
doSetCreatureOutfit(cid, {lookType = fix.out}, -1)
doChangeSpeed(cid, getCreatureSpeed(cid) + fix.speed)
return true
end
--[[ Função criada por Roksas - Acesse já XTibia.com ]]--
function attribute(cid, skillq, speed, eff, effs)
local fix2 = transfs[getCreatureOutfit(cid).lookType]
if isCreature(cid) then
doSendMagicEffect(getThingPos(cid), fix2.effs)
return addEvent(attribute, 1 * 1000, cid, skillq, speed, eff, effs) and true
end
end










info
Grupo: Campones
Registrado: 08/01/07
Posts: 58
Reputação: +3
Ola tenho 1 script de troca de outfit e adiciona efeito na outfit, ela em si funciona perfeitamente porem quando o player loga/morre da erro no console
creature not found
se possivel poderiam me ajudar a arruma
transfs = { --Naruto [69] = {stor = 202020, out = 64, skillq = 1, speed = 5, eff = 10, effs = 18}, [64] = {stor = 202021, out = 31, skillq = 2, speed = 5, eff = 24, effs = 12}, [31] = {stor = 202022, out = 90, skillq = 3, speed = 5, eff = 24, effs = 15}, [90] = {stor = 202023, out = 89, skillq = 4, speed = 5, eff = 24, effs = 11}, --Sasuke [5] = {stor = 1230, out = 6, skillq = 2, speed = 5, eff = 25, effs = 9}, [6] = {stor = 1229, out = 7, skillq = 2, speed = 5, eff = 23, effs = 14}, [7] = {stor = 1228, out = 8, skillq = 2, speed = 5, eff = 14, effs = 14}, [8] = {stor = 1227, out = 8, skillq = 2, speed = 5, eff = 14, effs = 13}, --Sakura [9] = {stor = 1226, out = 10, skillq = 2, speed = 5, eff = 2, effs = 19}, [10] = {stor = 1225, out = 11, skillq = 2, speed = 5, eff = 50, effs = 19}, [11] = {stor = 1224, out = 12, skillq = 2, speed = 5, eff = 33, effs = 14}, [12] = {stor = 1223, out = 12, skillq = 2, speed = 5, eff = 35, effs = 11}, } function onSay(cid, words, param) local fix = transfs[getCreatureOutfit(cid).lookType] if getPlayerStorageValue(cid, fix.stor) < 1 then doPlayerSendTextMessage(cid, 20, "Você ainda não completou a quest necessária para sua transformação.") return true end doSendMagicEffect(getThingPos(cid), fix.eff) attribute(cid, fix.eff, fix.effs) doSetCreatureOutfit(cid, {lookType = fix.out}, -1) doChangeSpeed(cid, getCreatureSpeed(cid) + fix.speed) return true end --[[ Função criada por Roksas - Acesse já XTibia.com ]]-- function attribute(cid, skillq, speed, eff, effs) local fix2 = transfs[getCreatureOutfit(cid).lookType] if not isCreature(cid) then return true end doSendMagicEffect(getThingPos(cid), fix2.effs) return addEvent(attribute, 1 * 1000, cid, skillq, speed, eff, effs) and true endobg