Bom tutorial
rep+ por postar e ajudar ( mesmo eu não sabendo oque e issu akskaksakksasa)
- Fórum
- xTibia - Notícias e Suporte
- Tutoriais para Iniciantes
- [WoDBO] Transform
3
1.7k
12 de fevereiro de 2013 às 04:36
10 meses depois...
info
Grupo: Campones
Registrado: 24/11/13
Posts: 2
Reputação: 0

01 de dezembro de 2013 às 19:52
Bem, eu não encontrei aqui no xtibia um tutorial de um script de transform que não buga o outfit, então eu irei postar aqui o meu.Começando, crie um arquivo .lua e renomeie como transformar e coloque em data/spells/scriptsDentro dele, coloque isso:Legenda:Vermelho: Vocation antes de se transformar.Laranja: Nivel para se transformarAzul escuro: Vocation depois de se transformar.Azul claro: Outfit da transformação.Verde claro: Efeito da transformação.No spells.xml, adicione a tag:local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)local condition = createConditionObject(CONDITION_OUTFIT)setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000)addOutfitCondition(condition, 0, 71, 0, 0, 0, 0)setCombatCondition(combat, condition)ext = 1000function onCastSpell(cid, var)-- Transformarif getPlayerVocation(cid) == 400 then if getPlayerLevel(cid) >= 50 then doPlayerSetVocation(cid,401) doSetOutfit(cid,"79") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 8)elsedoPlayerSendCancel(cid, "You need level 50 to the next transform.") doSendMagicEffect(getPlayerPosition(cid), 2)endelseif getPlayerVocation(cid) == 401 then if getPlayerLevel(cid) >= 100 then doPlayerSetVocation(cid,402) doSetOutfit(cid,"97") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 17)elsedoPlayerSendCancel(cid, "You need level 100 to the next transform.") doSendMagicEffect(getPlayerPosition(cid), 2)endelsedoPlayerSendCancel(cid, "Voce nao pode se transformar.") doSendMagicEffect(getPlayerPosition(cid), 2)endendend<instant name="Transformar" words="transformar" aggressive="0" params="1" lvl="1" maglv="0" mana="0" soul="0" exhaustion="1" prem="0" enabled="1" script="transformar.lua"></instant>Agora, criei um arquivo .lua e renomeie para reverter, e então coloque em data/spells/scriptsDentro dele, coloque:
Legenda:Vermelho: Vocation da transformAzul Escuro: Vocation que ele vai virar depois de reverter.Azul claro: Outfit de quando ela dá reverter. Se o personagem vai do outfit 75 para o 80 no transformar desse nível, você coloca o número 75.Verde claro: Efeito de quando o personagem reverte.Agora, no spells.xml adicione a tag:local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)local condition = createConditionObject(CONDITION_OUTFIT)setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000)addOutfitCondition(condition, 0, 71, 0, 0, 0, 0)setCombatCondition(combat, condition)ext = 1000function onCastSpell(cid, var)-- Reverterif getPlayerVocation(cid) == 401 then doPlayerSetVocation(cid,400) doSetOutfit(cid,"14") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 8)elsedoPlayerSendCancel(cid, "You can not revert.") doSendMagicEffect(getPlayerPosition(cid), 2)endelseif getPlayerVocation(cid) == 402 then doPlayerSetVocation(cid,401) doSetOutfit(cid,"79") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 8)elsedoPlayerSendCancel(cid, "You can not revert.") doSendMagicEffect(getPlayerPosition(cid), 2)endelsedoPlayerSendCancel(cid, "Voce nao pode reverter.") doSendMagicEffect(getPlayerPosition(cid), 2)endendend<instant name="Reverter" words="reverter" aggressive="0" params="1" lvl="1" maglv="0" mana="0" soul="0" exhaustion="1" prem="0" enabled="1" script="reverter.lua"></instant>Créditos:A spell "transform" que eu usei como base, de um autor desconhecido, não me lembro onde peguei, me desculpe.Bem, é isso. []'s ^^
Bem, eu não encontrei aqui no xtibia um tutorial de um script de transform que não buga o outfit, então eu irei postar aqui o meu.Começando, crie um arquivo .lua e renomeie como transformar e coloque em data/spells/scriptsDentro dele, coloque isso:
Legenda:Vermelho: Vocation antes de se transformar.Laranja: Nivel para se transformarAzul escuro: Vocation depois de se transformar.Azul claro: Outfit da transformação.Verde claro: Efeito da transformação.No spells.xml, adicione a tag:local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)local condition = createConditionObject(CONDITION_OUTFIT)setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000)addOutfitCondition(condition, 0, 71, 0, 0, 0, 0)setCombatCondition(combat, condition)ext = 1000function onCastSpell(cid, var)-- Transformarif getPlayerVocation(cid) == 400 then if getPlayerLevel(cid) >= 50 then doPlayerSetVocation(cid,401) doSetOutfit(cid,"79") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 8)elsedoPlayerSendCancel(cid, "You need level 50 to the next transform.") doSendMagicEffect(getPlayerPosition(cid), 2)endelseif getPlayerVocation(cid) == 401 then if getPlayerLevel(cid) >= 100 then doPlayerSetVocation(cid,402) doSetOutfit(cid,"97") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 17)elsedoPlayerSendCancel(cid, "You need level 100 to the next transform.") doSendMagicEffect(getPlayerPosition(cid), 2)endelsedoPlayerSendCancel(cid, "Voce nao pode se transformar.") doSendMagicEffect(getPlayerPosition(cid), 2)endendend<instant name="Transformar" words="transformar" aggressive="0" params="1" lvl="1" maglv="0" mana="0" soul="0" exhaustion="1" prem="0" enabled="1" script="transformar.lua"></instant>Agora, criei um arquivo .lua e renomeie para reverter, e então coloque em data/spells/scriptsDentro dele, coloque:
Legenda:Vermelho: Vocation da transformAzul Escuro: Vocation que ele vai virar depois de reverter.Azul claro: Outfit de quando ela dá reverter. Se o personagem vai do outfit 75 para o 80 no transformar desse nível, você coloca o número 75.Verde claro: Efeito de quando o personagem reverte.Agora, no spells.xml adicione a tag:local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)local condition = createConditionObject(CONDITION_OUTFIT)setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000)addOutfitCondition(condition, 0, 71, 0, 0, 0, 0)setCombatCondition(combat, condition)ext = 1000function onCastSpell(cid, var)-- Reverterif getPlayerVocation(cid) == 401 then doPlayerSetVocation(cid,400) doSetOutfit(cid,"14") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 8)elsedoPlayerSendCancel(cid, "You can not revert.") doSendMagicEffect(getPlayerPosition(cid), 2)endelseif getPlayerVocation(cid) == 402 then doPlayerSetVocation(cid,401) doSetOutfit(cid,"79") addEvent(tran,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 8)elsedoPlayerSendCancel(cid, "You can not revert.") doSendMagicEffect(getPlayerPosition(cid), 2)endelsedoPlayerSendCancel(cid, "Voce nao pode reverter.") doSendMagicEffect(getPlayerPosition(cid), 2)endendend<instant name="Reverter" words="reverter" aggressive="0" params="1" lvl="1" maglv="0" mana="0" soul="0" exhaustion="1" prem="0" enabled="1" script="reverter.lua"></instant>Créditos:A spell "transform" que eu usei como base, de um autor desconhecido, não me lembro onde peguei, me desculpe.Bem, é isso. []'s ^^


info
Grupo: Campones
Registrado: 01/02/13
Posts: 9
Reputação: +4
Bem, eu não encontrei aqui no xtibia um tutorial de um script de transform que não buga o outfit, então eu irei postar aqui o meu.
Começando, crie um arquivo .lua e renomeie como transformar e coloque em data/spells/scripts
Dentro dele, coloque isso:
Legenda:
Vermelho: Vocation antes de se transformar.
Laranja: Nivel para se transformar
Azul escuro: Vocation depois de se transformar.
Azul claro: Outfit da transformação.
Verde claro: Efeito da transformação.
No spells.xml, adicione a tag:
Agora, criei um arquivo .lua e renomeie para reverter, e então coloque em data/spells/scripts
Dentro dele, coloque:
Legenda:
Vermelho: Vocation da transform
Azul Escuro: Vocation que ele vai virar depois de reverter.
Azul claro: Outfit de quando ela dá reverter. Se o personagem vai do outfit 75 para o 80 no transformar desse nível, você coloca o número 75.
Verde claro: Efeito de quando o personagem reverte.
Agora, no spells.xml adicione a tag:
Créditos:
A spell "transform" que eu usei como base, de um autor desconhecido, não me lembro onde peguei, me desculpe.
Bem, é isso. []'s ^^
Editado Fevereiro 11 por Grante