antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
OceanusMT2

Bug Report Quest

Question

Boas,

 

encontrei esta quest na epvp, mas esta com um pequeno erro. A quest funciona ingame e ate cria o ficheiro .... mas o ficheiro criado vem em branco :

Alguem sabe como resolver?

 

eu acho que o problema é: --io.write("Bug Report: n"..inp.."n"..inp1.."n"..inp2.."n"..inp3.."n"..inp4.."n"..inp5.."");

Já tentei remover os --  : não faço ideia onde esta o problema :(

 

quest bugreport begin
state start begin
when 20354.chat."Bug Report" begin
say_title("Bug Report")
say("Hast du einen Fehler auf dem Server gefunden?")
say("Wenn ja dann beschreibe ihn bitte genau, damit")
say("Wir den Fehler schnellst möglich beseitigen können!")
say("")
say_reward("Achtung: Falsch meldungen werden geahndet!")
say("")
say ("Möchtest du einen Fehler melden?" )
local s = select ( "Ja" , "Nein" )
if s == 2 then
return
end
say_title("Seite 1/6")
say("")
local inp = input()
say_title("Seite 2/6")
say("")
local inp1 = input()
say_title("Seite 3/6")
say("")
local inp2 = input()
say_title("Seite 4/6")
say("")
local inp3 = input()
say_title("Seite 5/6")
say("")
local inp4 = input()
say_title("Seite 6/6")
say("")
local inp5 = input()
pc.setqf("bug_report", pc.getqf("bug_report" ) + 1 )
file = io.output("/usr/game/share/locale/bugs/"..pc.name.."_"..tostring(pc.getqf("bug_report"))..".txt")
--io.write("Bug Report: n"..inp.."n"..inp1.."n"..inp2.."n"..inp3.."n"..inp4.."n"..inp5.."");
file:flush()
file:close()  
say_title("Bug Report - Fehler Melden erfolgreich!")
say("Du hast den Fehler erfolgreich gemeldet!")
say("")
say("")
say_reward("Wir bedanken uns für deine Hilfe")
end
end
end
 
 
 

Share this post


Link to post
Share on other sites

13 answers to this question

  • 0

Tópico em área Incorreta

Movido de Metin2 - Quests para Metin2 - Duvidas

Share this post


Link to post
Share on other sites
antiblock
Rodnia | Alpha & Omega
  • 0

Imagem colocada

 

Try this.

Share this post


Link to post
Share on other sites
  • 0

SE DISSE PARA TESTAR É PORQUE NÃO SEI NÉ, ALÉM DISSO, DEIXA DE ESCREVER EM CAPSLOCK.

Share this post


Link to post
Share on other sites
  • 0

Obrigado pelas dicas PACIFICADOR.

 

Mas estou a ter agora vários erros:

"Calls undeclared function!:

io.open

pairs

pc.get_player.id

white

 

 

Se eu adicionar as funcions ao quest_functions será que fica tudo bem? :

De qualquer das formas +1 para ti, tenho a certeza absoluta que a quest esta a trabalhar, mas eu ainda sou novato! xD

Share this post


Link to post
Share on other sites
  • 0

Sim, essas é só adicionar.

Share this post


Link to post
Share on other sites
  • 0

Pacificador , eu adicionei a quest e talz , mas quando escrevo a mensagem não vai par ao diretorio que está na quest.

Share this post


Link to post
Share on other sites
  • 0

PACIFICADOR, será que não tens algo mal ai? 

 

não consegui e o servidor ja ganhou mais 1Gb.

adicionei as functions, adicionei a quest dei 777. Vou ingame, peço para fazer o report, escrevo a mensagem, carrego em OK... e o servidor morre :

 

Tenho de mandar reset, porque senão ele começar a crescer nos GBytes.

 

edit: r34083

Share this post


Link to post
Share on other sites
  • 0

Imagem colocada

Imagem colocada

 

Tira isso e mete:

file:write("PLAYER_ID: "..pc.get_player_id().."tMSG: "..msg)

Share this post


Link to post
Share on other sites
  • 0

lols.

é uma coisa que me deixa completamente admirado. Tu consegues agarrar numa quest de 50 linhas e que pode ate ser facil de perceber, mas tu agarras nela e fazes igual ou melhor com apenas 3 linhas. é bem!   :like:

 

 

Ficou a funcionar e da forma mais simples. 

 

 

mas continuado xD

Sempre que alguem faz o report aquilo vai sempre para o mesmo TXT. é possivel criar um txt para cada report?

Na quest que eu meti em cima é assim que funciona, achas que da para acrescentar um sistema parecido? 

 

De qualquer das formas Obrigado pela ajuda ;)

Share this post


Link to post
Share on other sites
  • 0

Sempre que alguem faz o report aquilo vai sempre para o mesmo TXT. é possivel criar um txt para cada report?

Na quest que eu meti em cima é assim que funciona, achas que da para acrescentar um sistema parecido? 

 

De qualquer das formas Obrigado pela ajuda ;)

Meti assim porque achei que fosse melhor e mais organizado, já que o report varia pelo ID do jogador. Mas sim, dá para fazer da maneira que tu queres:

 

Substituis isto:

Imagem colocada

 

Por:

game.set_event_flag("reported_bugs", game.get_event_flag("reported_bugs")+1)local file = io.open("/usr/game/share/locale/bugs/bug_"..game.get_event_flag("reported_bugs")..".txt", "w")

Share this post


Link to post
Share on other sites
  • 0

Após 4 horas +/- consegui deixar a quest pronta. Fica ai para quem precisar!

 

Agradeço ao PACIFICADOR pela ajuda enorme que me deu.

a quest apenas tem um bug que é não deixar os espaços entre os vários "inputs"  e eu ao fim de 1 hora não consegui descobrir como faço para deixar sem espaço!

 

Report quest:

quest bugreport begin
state start begin
when 20354.chat."bug report" begin
say_title("Bug Report")
say("Você já encontrou um erro no servidor?")
say("Se sim, então deixa-me saber qual é para que")
say("a equipa o possa resolver o mais rápido. ")
say("possível.")
say("")
say_reward("Aviso: o uso abusivo deste sistema")
say_reward("terá consequências!")
say("")
say ("Quer relatar algum bug?" )
say("")
local s = select ( "Sim" , "Não" )
if s == 2 then
return
end
say_title("Bug Report: 1/6")
say("")
local msg1 = input()
say_title("Bug Report: 2/6")
say("")
local msg2 = input()
say_title("Bug Report: 3/6")
say("")
local msg3 = input()
say_title("Bug Report: 4/6")
say("")
local msg4 = input()
say_title("Bug Report: 5/6")
say("")
local msg5 = input()
say_title("Bug Report: 6/6")
say("")
local msg6 = input()
game.set_event_flag("reported_bugs", game.get_event_flag("reported_bugs")+1)
local file = io.open("/usr/game/share/locale/bugs/bug_"..game.get_event_flag("reported_bugs")..".txt", "w")
file:write("PLAYER_ID: "..pc.get_player_id().."_"..pc.get_name().."tMSG: "..msg1 ..msg2 ..msg3 ..msg4 ..msg5 ..msg6)
file:close()
say_title("Bug Report")
say("")
say("")
say("A sua mensagem foi enviada com sucesso!")
say("")
say("")
say_reward("Obrigado pela ajuda.")
end
end
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
Sign in to follow this