Eae pessoal, to aqui denovo dessa vez é um script de uma spell de transformação, feita pelo LuckOake.
Ele transforma na boa todas as vocations mais quando acaba as vocation o certo era aparecer "You can not Transform" aparece isso mais tambem da um erro global.
[19/12/2012 17:42:24] [Error - Spell Interface]
[19/12/2012 17:42:25] data/spells/scripts/transform.lua:onCastSpell
[19/12/2012 17:42:25] Description:
[19/12/2012 17:42:25] data/spells/scripts/transform.lua:11: attempt to index global 'b' (a nil value)
[19/12/2012 17:42:25] stack traceback:
[19/12/2012 17:42:25] data/spells/scripts/transform.lua:11: in function <data/spells/scripts/transform.lua:1>
Esse é o script:
function onCastSpell(cid, var)
a = {
[1] = {level = 50, newvoc = 2, outfit = 37, eff = 56},
[2] = {level = 100, newvoc = 3, outfit = 18, eff = 57},
[3] = {level = 150, newvoc = 4, outfit = 71, eff = 58},
[4] = {level = 200, newvoc = 5, outfit = 70, eff = 59},
}
b = a[getPlayerVocation(cid)]if getPlayerLevel(cid) < b.level then
doPlayerSendCancel(cid, "You must be at level to transform.") return false
end
doSetCreatureOutfit(cid, {lookType = b.outfit}, -1)
doPlayerSetVocation(cid, b.newvoc)
doSendMagicEffect(getCreaturePosition(cid), b.eff)
doPlayerSendCancel(cid, "You Transformed!")
return true
end