antiblock
https://i.imgur.com/aJ17bf7.gif
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
.4s

Quest Que É Um Verdadeiro Quebra Cabeças

Question

Boas.Tou aqui com um problema nesta quest que eu digo, é um verdadeiro quebra cabeças, pelo menos para mim que sou um nabo em quests...Dá me este erro

syntax error : [string "start"]:7: unexpected symbol near "when"

Já tou farto de ver o que é que ela tem de errado mas não encontro...Se alguem me ajudar, agradecia desde já.Quest aqui :

quest começar begin state start begin when login begin if pc.getqf("basic_weapon") == 0 thenwhen letter begin local v = find_npc_by_vnum(9003) if v != 0 then target.vid("__TARGET__", v, "Loja Geral") end send_letter("Equipamento Inicial") end when button or info begin say_title("Equipamento Inicial") say("") say("Vai ter com a Loja Geral para ela") say("te dar o Teu Equipamento Inicial.") say("") say_reward("Vai Antes que se esgote.") say("") end when __TARGET__.target.click or 9003.chat."Equipamento Inicial" begin target.delete("__TARGET__") say("Loja Geral:") say("") say("Opah, nova Gente por aqui?") say("Bem...") say("Ainda bem que vieste falar comigo,") say("eu é que te dou o Set Inicial a todos os novatos") say("que aparecem por cá.") say("Queres Receber o Teu set então?") local opcao = ("Claro..." , "Deixa Estar") if opcao = 2 then end else say_title("Loja Geral:") say("Como pareces ser boa pessoa, eu dou te o teu Set") say("mas tem antenção, caso faças porcaria") say("nesta ou noutra cidade, falo com os meus") say("superiores, e eles põe te daqui para fora!") say("Tamos Entendidos?") local opcao2 = ("Sim" , "Não voltes a falar assim comigo!") if opcao2 = 2 then pc.setqf("basic_weapon", 1) say_title ("Loja Geral") say ("") say ("Põe te a andar daqui para fora imediatamente!") notice_all (" o Novato " .. pc . name .. " não terá Set Inicial! Castiguem no!") end else pc.setqf("basic_weapon", 1) say("Muito bem, então aqui tens o teu Set Inicial.") nation = { "Vermelho" , "Amarelo" , "Azul" } notice_all ( "O jogador " .. pc . name .. " do reino " .. nation [ pc . getempire ( ) ] .. " acaba de receber o Set Inicial!" ) notice_all ( "Dêem Todos as Boas Vindas ao " .. pc . name .. "!" ) if pc.job == 0 then pc.give_item2(27002,200 ) pc.give_item2(27002,200 ) pc.give_item2(27005,200 ) pc.give_item2(19) pc.give_item2(11209) pc.give_item2(12209) pc.give_item2(13009) pc.give_item2(14009) pc.give_item2(15009) pc.give_item2(16009) pc.give_item2(17009) pc.give_item2(72702) pc.give_item2(71044, 20) pc.give_item2(71045, 20) horse . set_level ( 21 ) horse . ride ( ) pc . give_item2 ( 50053 ) pc.give_item2 ( 53003) pc . set_skill_level ( 131 , 59 ) pc . set_skill_level ( 137 , 59 ) pc . set_skill_level ( 138 , 59 ) pc . set_skill_level ( 139 , 59 ) pc . set_skill_level ( 140 , 59 ) elseif pc.job == 1 then pc.give_item2(27002,200 ) pc.give_item2(27002,200 ) pc.give_item2(27005,200 ) pc.give_item2(1009) pc.give_item2(11409) pc.give_item2(12349) pc.give_item2(13009) pc.give_item2(14009) pc.give_item2(15009) pc.give_item2(16009) pc.give_item2(17009) pc.give_item2(72702) pc.give_item2(71044, 20) pc.give_item2(71045, 20) horse . set_level ( 21 ) horse . ride ( ) pc . give_item2 ( 50053 ) pc.give_item2 ( 53003) pc . set_skill_level ( 131 , 59 ) pc . set_skill_level ( 137 , 59 ) pc . set_skill_level ( 138 , 59 ) pc . set_skill_level ( 139 , 59 ) pc . set_skill_level ( 140 , 59 ) elseif pc.job == 2 then pc.give_item2(27002,200 ) pc.give_item2(27002,200 ) pc.give_item2(27005,200 ) pc.give_item2(19) pc.give_item2(11609) pc.give_item2(12489) pc.give_item2(13009) pc.give_item2(14009) pc.give_item2(15009) pc.give_item2(16009) pc.give_item2(17009) pc.give_item2(72702) pc.give_item2(71044, 20) pc.give_item2(71045, 20) horse . set_level ( 21 ) horse . ride ( ) pc . give_item2 ( 50053 ) pc.give_item2 ( 53003) pc . set_skill_level ( 131 , 59 ) pc . set_skill_level ( 137 , 59 ) pc . set_skill_level ( 138 , 59 ) pc . set_skill_level ( 139 , 59 ) pc . set_skill_level ( 140 , 59 ) elseif pc.job == 3 then pc.give_item2(27002,200 ) pc.give_item2(27002,200 ) pc.give_item2(27005,200 ) pc.give_item2(7009) pc.give_item2(11809) pc.give_item2(12629) pc.give_item2(13009) pc.give_item2(14009) pc.give_item2(15009) pc.give_item2(16009) pc.give_item2(17009) pc.give_item2(72702) pc.give_item2(71044, 20) pc.give_item2(71045, 20) horse . set_level ( 21 ) horse . ride ( ) pc . give_item2 ( 50053 ) pc.give_item2 ( 53003) pc . set_skill_level ( 131 , 59 ) pc . set_skill_level ( 137 , 59 ) pc . set_skill_level ( 138 , 59 ) pc . set_skill_level ( 139 , 59 ) pc . set_skill_level ( 140 , 59 ) end end end endend

Obrigado.

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

O erro está logo no início, tens um if e depois um when ._.

Share this post


Link to post
Share on other sites
antiblock
Elveron
  • 0

O erro está logo no início, tens um if e depois um when ._.

Esta parte?
when login beginif pc.getqf("basic_weapon") == 0 then
Mas isto antes não me dava erro e agora dá?A unica parte que alterei foi isto
when letter beginlocal v = find_npc_by_vnum(9003)if v != 0 then target.vid("__TARGET__", v, "Loja Geral")endsend_letter("Equipamento Inicial")endwhen button or info beginsay_title("Equipamento Inicial")say("")say("Vai ter com a Loja Geral para ela")say("te dar o Teu Equipamento Inicial.")say("")say_reward("Vai Antes que se esgote.")say("")endwhen __TARGET__.target.click or 9003.chat."Equipamento Inicial" begintarget.delete("__TARGET__")say("Loja Geral:")say("")say("Opah, nova Gente por aqui?")say("Bem...")say("Ainda bem que vieste falar comigo,")say("eu é que te dou o Set Inicial a todos os novatos")say("que aparecem por cá.")say("Queres Receber o Teu set então?")local opcao = ("Claro..." , "Deixa Estar")if opcao = 2 thenendelsesay_title("Loja Geral:")say("Como pareces ser boa pessoa, eu dou te o teu Set")say("mas tem antenção, caso faças porcaria")say("nesta ou noutra cidade, falo com os meus")say("superiores, e eles põe te daqui para fora!")say("Tamos Entendidos?")local opcao2 = ("Sim" , "Não voltes a falar assim comigo!")if opcao2 = 2 thenpc.setqf("basic_weapon", 1)say_title ("Loja Geral")say ("")say ("Põe te a andar daqui para fora imediatamente!")notice_all (" o Novato " .. pc . name .. " não terá Set Inicial! Castiguem no!")endelsepc.setqf("basic_weapon", 1)say("Muito bem, então aqui tens o teu Set Inicial.")nation = { "Vermelho" , "Amarelo" , "Azul" }notice_all ( "O jogador " .. pc . name .. " do reino " .. nation [ pc . getempire ( ) ] .. " acaba de receber o Set Inicial!" )notice_all ( "Dêem Todos as Boas Vindas ao " .. pc . name .. "!" )
Se co seguires, manda me só com a parte corrigida.Obrigado

Share this post


Link to post
Share on other sites
  • 0

Já corrigi a parte do if e do when, e continua me a dar erro...Está assim agora :

when letter begin if pc.getqf("basic_weapon") == 0 then local v = find_npc_by_vnum(9003) if v != 0 then target.vid("__TARGET__", v, "Loja Geral") end send_letter("Equipamento Inicial") end

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now