Postado Outubro 31, 2018 6 anos 1 hora atrás, Zazeros disse: @Joaovettor Cara, esta dando esse erro: [31/10/2018 13:19:52] [Error - LuaInterface::loadFile] data/spells/scripts/especial/mode1.lua:6: 'then' expected near 'doPlayerSetVocation' [31/10/2018 13:19:52] [Error - Event::checkScript] Cannot load script (data/spells/scripts/especial/mode1.lua) [31/10/2018 13:19:52] data/spells/scripts/especial/mode1.lua:6: 'then' expected near 'doPlayerSetVocation' [31/10/2018 13:19:52] [Error - LuaInterface::loadFile] data/spells/scripts/especial/mode2.lua:7: '=' expected near 'ï' [31/10/2018 13:19:52] [Error - Event::checkScript] Cannot load script (data/spells/scripts/especial/mode2.lua) [31/10/2018 13:19:52] data/spells/scripts/especial/mode2.lua:7: '=' expected near 'ï' function onCastSpell(cid, var)local male = 350local female = 351local sex = getPlayerSex(cid)if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 thendoPlayerSetVocation(cid, 7)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)doSetCreatureOutfit(cid, male)elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 thendoPlayerSetVocation(cid, 7)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)doSetCreatureOutfit(cid, female)elsedoPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada")endreturn doCombat(cid, combat, var)endMagia que cancelafunction onCastSpell(cid, var)local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}local sex = getPlayerSex(cid)if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 thendoPlayerSetVocation(cid, 3)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)doSetCreatureOutfit(cid, male)elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 thendoPlayerSetVocation(cid, 3)setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)doSetCreatureOutfit(cid, female)elsedoPlayerSendCancel(cid, "Você não pode usar esta magia")endreturn doCombat(cid, combat, var)end
Postado Outubro 31, 2018 6 anos @Joaovettor Cara, quando usa a magia para ir para a outra vocação, da esse erro do outfit: (mas a vocação ta trocando) [31/10/2018 15:46:16] [Error - Spell Interface] [31/10/2018 15:46:16] data/spells/scripts/especial/mode2.lua:onCastSpell [31/10/2018 15:46:16] Description: [31/10/2018 15:46:16] attempt to index a number value [31/10/2018 15:46:16] stack traceback: [31/10/2018 15:46:16] [C]: in function 'doSetCreatureOutfit' [31/10/2018 15:46:16] data/spells/scripts/especial/feral mode.lua:12: in function <data/spells/scripts/especial/mode2.lua:1> E quando vai usar a spell pra voltar. Da esse erro: (E da a mensagem de erro, não deixando o player voltar para a vocação antiga) [31/10/2018 15:47:21] [Error - Spell Interface] [31/10/2018 15:47:21] data/spells/scripts/especial/mode1.lua:onCastSpell [31/10/2018 15:47:21] Description: [31/10/2018 15:47:21] (luaDoCombat) Combat not found
Postado Outubro 31, 2018 6 anos function onCastSpell(cid, var) local male = 350 local female = 351 local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doCreatureChangeOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doCreatureChangeOutfit(cid, female) else doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada") end return true end Magia que cancela function onCastSpell(cid, var) local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local sex = getPlayerSex(cid) if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doCreatureChangeOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doCreatureChangeOutfit(cid, female) else doPlayerSendCancel(cid, "Você não pode usar esta magia") end return true end
Postado Outubro 31, 2018 6 anos @Joaovettor Mano, ta tendo o mesmo problema com o outfit na primeira, e na segunda ta acontecendo quase a mesma coisa de antes, só que ele chega a castar a magia, eu gasto mana e talz, mas aparece a mensagem de cancelamento e o player não volta ao normal
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.