Postado Outubro 31, 2018 6 anos @Joaovettor Cara, teria como fazer uma spell que quando o player usasse, ele mudaria de vocação e outfit por tempo indeterminado, e quando ele usasse uma outra spell, ele voltasse e também voltasse o outfit?? (se não tiver como voltar o outfit que tava, pode ser male um e female outro)
Postado Outubro 31, 2018 6 anos 2 horas atrás, Zazeros disse: @Joaovettor Cara, teria como fazer uma spell que quando o player usasse, ele mudaria de vocação e outfit por tempo indeterminado, e quando ele usasse uma outra spell, ele voltasse e também voltasse o outfit?? (se não tiver como voltar o outfit que tava, pode ser male um e female function onCastSpell(cid, var) local tempo = 1 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) local voc = doPlayerSetVocation if sex == 0 and getPlayerVocation(cid) == 3 then addEvent(voc, 10*1000, cid, 7) setPlayerStorageValue(cid, store, os.time()+exausted) doSetCreatureOutfit(cid, male, tempo*1000) else if sex == 1 and getPlayerVocation(cid) == 3 then addEvent(voc, 10*1000, cid, 7) setPlayerStorageValue(cid, store, os.time()+exausted) doSetCreatureOutfit(cid, female, tempo*1000) end return true end Editado Outubro 31, 2018 6 anos por Joaovettor (veja o histórico de edições)
Postado Outubro 31, 2018 6 anos @Joaovettor Para que seja por tempo indeterminado, eu tiro essa linha? addEvent(voc, 10*1000, cid, 7)
Postado Outubro 31, 2018 6 anos 13 minutos atrás, Zazeros disse: @Joaovettor Para que seja por tempo indeterminado, eu tiro essa linha? addEvent(voc, 10*1000, cid, 7) 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) doSetCreatureOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then doPlayerSetVocation(cid, 7) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1) doSetCreatureOutfit(cid, female) else doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada") end return doCombat(cid, combat, var) endMagia 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 doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, male) elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then doPlayerSetVocation(cid, 3) setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1) doSetCreatureOutfit(cid, female) else doPlayerSendCancel(cid, "Você não pode usar esta magia") end return doCombat(cid, combat, var) end
Postado Outubro 31, 2018 6 anos @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 'ï'
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.