Na última parte faltou um "end" era pra estar assim:
---Piccolo---
if getPlayerVocation(cid) == 378 then
if getPlayerLevel(cid) >= 450 then
doPlayerSetVocation(cid,407)
doSetCreatureOutfit(cid, piccolo, -1)
addEvent(trans,ext,cid)
doSendMagicEffect(getPlayerPosition(cid), 233)
else
doPlayerSendCancel(cid, "You need 450 level to first transform")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
elseif getPlayerVocation(cid) == 407 then
if getPlayerLevel(cid) >= 600 then
doPlayerSetVocation(cid,408)
addEvent(trans1,ext,cid)
doSendMagicEffect(getPlayerPosition(cid), 33)
doSetCreatureOutfit(cid, piccolo1, -1)
else
doPlayerSendCancel(cid, "You need 600 level to next transform")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
elseif getPlayerVocation(cid) == 408 then
if getPlayerLevel(cid) >= 850 then
doPlayerSetVocation(cid,409)
addEvent(trans2,ext,cid)
doSendMagicEffect(getPlayerPosition(cid), 18)
doSetCreatureOutfit(cid, piccolo2, -1)
else
doPlayerSendCancel(cid, "You need 850 level to next transform")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
end




info
Group: Campones
Joined: 17/08/11
Posts: 35
Reputation: +2
Script funciona, mais toda vez que vou adicionar algo a mais nele.. sem falha nnhuma do msm jeito q to o de baixo ele da esse erro:
http://imageshack.us...semttuloag.png/
http://imageshack.us...semttuloag.png/
ERRO: [ Event
loadScript ] Can not load script. data/spells/scripts/transforms.lua
data/spells/scripts/transforms.lua:351: 'end' expected <to close 'function' at line 177> near '<eof>' [done]
Esse é o que pega \/
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) outfit = {lookType=429} outfit1 = {lookType=430} outfit2 = {lookType=431} vegeta = {lookType=459} vegeta1 = {lookType=461} vegeta2 = {lookType=460} shenrons1 = {lookType=444} shenrons2 = {lookType=446} shenrons3 = {lookType=445} ext = 1000 ---Goku--- function trans(cid) if getPlayerVocation(cid) == 398 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 180) addEvent(trans,ext,cid) end end end function trans1(cid) if getPlayerVocation(cid) == 399 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid) end end end function trans2(cid) if getPlayerVocation(cid) == 400 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid) end end end ---End goku--- --- Vegeta --- function fusion(cid) if getPlayerVocation(cid) == 401 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 14) addEvent(fusion,ext,cid) end end end function fusion1(cid) if getPlayerVocation(cid) == 402 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 234) addEvent(fusion1,ext,cid) end end end function fusionchibi(cid) if getPlayerVocation(cid) == 403 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 14) addEvent(fusionchibi,ext,cid) end end end --- Vegeta End --- --- Pan --- function shenron(cid) if getPlayerVocation(cid) == 404 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(shenron,ext,cid) end end end function shenron2(cid) if getPlayerVocation(cid) == 405 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(shenron2,ext,cid) end end end function shenron3(cid) if getPlayerVocation(cid) == 406 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(shenron3,ext,cid) end end end --- Pan End --- function onCastSpell(cid, var) ---Goku--- if getPlayerVocation(cid) == 364 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,398) doSetCreatureOutfit(cid, outfit, -1) addEvent(trans,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 233) else doPlayerSendCancel(cid, "You need 450 level to first transform") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif getPlayerVocation(cid) == 398 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,399) addEvent(trans1,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 33) doSetCreatureOutfit(cid, outfit1, -1) else doPlayerSendCancel(cid, "You need 600 level to next transform") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif getPlayerVocation(cid) == 399 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,400) addEvent(trans2,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 18) doSetCreatureOutfit(cid, outfit2, -1) else doPlayerSendCancel(cid, "You need 850 level to next transform") doSendMagicEffect(getPlayerPosition(cid), 2) end --- Vegeta --- elseif getPlayerVocation(cid) == 365 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,401) addEvent(fusion,ext,cid) doSetCreatureOutfit(cid, vegeta, -1) setPlayerStorageValue(cid,20235,1) doSendMagicEffect(getPlayerPosition(cid), 63) else doPlayerSendCancel(cid, "You need 450 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif getPlayerVocation(cid) == 401 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,402) addEvent(fusion1,ext,cid) doSetCreatureOutfit(cid, vegeta1, -1) setPlayerStorageValue(cid,20235,2) doSendMagicEffect(getPlayerPosition(cid), 64) else doPlayerSendCancel(cid, "You need 600 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif getPlayerVocation(cid) == 402 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,403) addEvent(fusionchibi,ext,cid) doSetCreatureOutfit(cid, vegeta2, -1) setPlayerStorageValue(cid,20235,1) doSendMagicEffect(getPlayerPosition(cid), 63) else doPlayerSendCancel(cid, "You need 850 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end ---End Goku and Vegeta--- --- Pan --- elseif getPlayerVocation(cid) == 372 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,404) addEvent(shenron,ext,cid) doSetCreatureOutfit(cid, shenrons1, -1) doSendMagicEffect(getPlayerPosition(cid), 75) else doPlayerSendCancel(cid, "You need 450 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif getPlayerVocation(cid) == 404 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,405) addEvent(shenron2,ext,cid) doSetCreatureOutfit(cid, shenrons2, -1) doSendMagicEffect(getPlayerPosition(cid), 233) else doPlayerSendCancel(cid, "You need 600 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end elseif getPlayerVocation(cid) == 405 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,406) addEvent(shenron3,ext,cid) doSetCreatureOutfit(cid, shenrons3, -1) doSendMagicEffect(getPlayerPosition(cid), 75) else doPlayerSendCancel(cid, "You need 850 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end --- Shenron End --- else doPlayerSendCancel(cid, "You cannot transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end endQuando add esses metade da transform no script q é
piccolo = {lookType=440} piccolo1 = {lookType=441} piccolo2 = {lookType=442} ext = 1000 ---Piccolo--- function trans(cid) if getPlayerVocation(cid) == 407 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 180) addEvent(trans,ext,cid) end end end function trans1(cid) if getPlayerVocation(cid) == 408 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid) end end end function trans2(cid) if getPlayerVocation(cid) == 409 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid) end end end ---Piccolo End---ele ainda pega normal..
agr quando add essa parte final da transform...
Ai ele buga e da akele erro la de cima ...
So modifikei o script q ja tava pronto, agr quando vou tentar colokar mais linhas ele buga =/
Alguem sabe arrumar??
Versão do servidor é 8.00
Obg
Script que falha fica assim:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)[/b] [b]local condition = createConditionObject(CONDITION_OUTFIT) setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000) addOutfitCondition(condition, 0, 71, 0, 0, 0, 0) setCombatCondition(combat, condition)[/b] [b]outfit = {lookType=429} outfit1 = {lookType=430} outfit2 = {lookType=431}[/b] [b]vegeta = {lookType=459} vegeta1 = {lookType=461} vegeta2 = {lookType=460}[/b] [b]shenrons1 = {lookType=444} shenrons2 = {lookType=446} shenrons3 = {lookType=445}[/b] [b]piccolo = {lookType=440} piccolo1 = {lookType=441} piccolo2 = {lookType=442}[/b] [b]ext = 1000[/b] [b]---Piccolo--- function trans(cid) if getPlayerVocation(cid) == 407 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 180) addEvent(trans,ext,cid)[/b] [b] end end end[/b] [b]function trans1(cid) if getPlayerVocation(cid) == 408 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid) end end end[/b] [b]function trans2(cid) if getPlayerVocation(cid) == 409 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid)[/b] [b] end end end[/b] [b]---Piccolo End---[/b] [b]---Goku--- function trans(cid) if getPlayerVocation(cid) == 398 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 180) addEvent(trans,ext,cid)[/b] [b] end end end[/b] [b]function trans1(cid) if getPlayerVocation(cid) == 399 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid) end end end[/b] [b]function trans2(cid) if getPlayerVocation(cid) == 400 then if getPlayerMana(cid) >= 0 then addEvent(trans1,ext,cid)[/b] [b] end end end[/b] [b]---End goku---[/b] [b]--- Vegeta --- function fusion(cid) if getPlayerVocation(cid) == 401 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 14) addEvent(fusion,ext,cid) end end end[/b] [b]function fusion1(cid) if getPlayerVocation(cid) == 402 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 234) addEvent(fusion1,ext,cid) end end end[/b] [b]function fusionchibi(cid) if getPlayerVocation(cid) == 403 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 14) addEvent(fusionchibi,ext,cid) end end end[/b] [b]--- Vegeta End ---[/b] [b]--- Pan ---[/b] [b]function shenron(cid) if getPlayerVocation(cid) == 404 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(shenron,ext,cid) end end end[/b] [b]function shenron2(cid) if getPlayerVocation(cid) == 405 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(shenron2,ext,cid)[/b] [b] end end end[/b] [b]function shenron3(cid) if getPlayerVocation(cid) == 406 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(shenron3,ext,cid)[/b] [b] end end end[/b] [b]--- Pan End ---[/b] [b]function onCastSpell(cid, var)[/b] [b]---Piccolo---[/b] [b]if getPlayerVocation(cid) == 378 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,407) doSetCreatureOutfit(cid, piccolo, -1) addEvent(trans,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 233) else doPlayerSendCancel(cid, "You need 450 level to first transform") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 407 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,408) addEvent(trans1,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 33) doSetCreatureOutfit(cid, piccolo1, -1)[/b] [b]else doPlayerSendCancel(cid, "You need 600 level to next transform") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 408 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,409) addEvent(trans2,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 18) doSetCreatureOutfit(cid, piccolo2, -1)[/b] [b]else doPlayerSendCancel(cid, "You need 850 level to next transform") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]---- Piccolo End ----[/b] [b]---Goku---[/b] [b]if getPlayerVocation(cid) == 364 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,398) doSetCreatureOutfit(cid, outfit, -1) addEvent(trans,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 233) else doPlayerSendCancel(cid, "You need 450 level to first transform") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 398 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,399) addEvent(trans1,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 33) doSetCreatureOutfit(cid, outfit1, -1)[/b] [b]else doPlayerSendCancel(cid, "You need 600 level to next transform") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 399 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,400) addEvent(trans2,ext,cid) doSendMagicEffect(getPlayerPosition(cid), 18) doSetCreatureOutfit(cid, outfit2, -1)[/b] [b]else doPlayerSendCancel(cid, "You need 850 level to next transform") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]--- Vegeta --- elseif getPlayerVocation(cid) == 365 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,401) addEvent(fusion,ext,cid) doSetCreatureOutfit(cid, vegeta, -1) setPlayerStorageValue(cid,20235,1) doSendMagicEffect(getPlayerPosition(cid), 63) [/b] [b]else doPlayerSendCancel(cid, "You need 450 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 401 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,402) addEvent(fusion1,ext,cid) doSetCreatureOutfit(cid, vegeta1, -1) setPlayerStorageValue(cid,20235,2) doSendMagicEffect(getPlayerPosition(cid), 64) [/b] [b]else doPlayerSendCancel(cid, "You need 600 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 402 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,403) addEvent(fusionchibi,ext,cid) doSetCreatureOutfit(cid, vegeta2, -1) setPlayerStorageValue(cid,20235,1) doSendMagicEffect(getPlayerPosition(cid), 63) [/b] [b]else doPlayerSendCancel(cid, "You need 850 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]---End Goku and Vegeta---[/b] [b]--- Pan ---[/b] [b]elseif getPlayerVocation(cid) == 372 then if getPlayerLevel(cid) >= 450 then doPlayerSetVocation(cid,404) addEvent(shenron,ext,cid) doSetCreatureOutfit(cid, shenrons1, -1) doSendMagicEffect(getPlayerPosition(cid), 75) [/b] [b]else doPlayerSendCancel(cid, "You need 450 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 404 then if getPlayerLevel(cid) >= 600 then doPlayerSetVocation(cid,405) addEvent(shenron2,ext,cid) doSetCreatureOutfit(cid, shenrons2, -1) doSendMagicEffect(getPlayerPosition(cid), 233) [/b] [b]else doPlayerSendCancel(cid, "You need 600 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]elseif getPlayerVocation(cid) == 405 then if getPlayerLevel(cid) >= 850 then doPlayerSetVocation(cid,406) addEvent(shenron3,ext,cid) doSetCreatureOutfit(cid, shenrons3, -1) doSendMagicEffect(getPlayerPosition(cid), 75) [/b] [b]else doPlayerSendCancel(cid, "You need 850 level to transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end[/b] [b]--- Pan End ---[/b] [b]else doPlayerSendCancel(cid, "You cannot transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end endEdited Março 23 by Dualiity