Crie um arquivo em Talkactions com o nome de Transform.lua e cole isso dentro:
local config = {
--[ID] = { lvl, novo id, looktype, Efeito}
[1] = { 50, 2,37, 56},
[2] = { 70, 3, 71, 57},
[3] = { 100, 4, 70, 59},
[4] = { 150, 5, 367, 32},
[5] = { 200, 6, 366, 26},
}
function onSay(cid, words, param, channel)
doPlayerSay(cid, "transform")
local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You Transform!")
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[4])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You need level " .. voc[1] .. " to transform.")
end
else
doPlayerSendCancel(cid, "You not use to transform!")
end
return true
end
Agora adicione essa tag em Talkactions.xml:
<talkaction words="transform;Transform" event="script" value="transform.lua"/>







info
Grupo: Campones
Registrado: 12/06/12
Posts: 6
Reputação: 0
Bom Pessoal estou aqui pedindo Um script de Transform que funcione em 8.0 Estava tentando usar esse script aqui
function onCastSpell(cid, var)
local config = {
[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}
}
trans = config[getPlayerVocation(cid)]
if not trans then
doPlayerSendCancel(cid, "You can not transform.") return false
elseif getPlayerLevel(cid) >= trans.level then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.")
end
doSetCreatureOutfit(cid, {lookType = trans.outfit}, -1)
doPlayerSetVocation(cid, trans.newvoc)
doSendMagicEffect(getCreaturePosition(cid), trans.eff)
doPlayerSendCancel(cid, "You Transformed!")
return true
end
<instant name="Transformar" words="transformar" lvl="1" mana="0" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="transform.lua">
</instant>
Porém quando falo transformar não acontece nada,Sei que essa duvida ja e cliche Mais preciso muito dessa script ate achei outras scripts mais eram muito bagunçadas (Desorganizadas) e preciso de organização pois vou fazer muuitas transforms,Obrigado pela atenção