[Admin] tierrilopes Posted December 11, 2015 Share Posted December 11, 2015 ---------------------------------------------------- -- Dragonroom Quest ---------------------------------------------------- quest dragontemple begin state start begin when 30121.chat."Quero matar o dragão" with pc.get_map_index() == 73 and game.get_event_flag("dragontemple_open") == 1 begin if get_time() > game.get_event_flag("blockentry") and game.get_event_flag("blockentry") > 1 then game.set_event_flag("dragontemple_block",1) game.set_event_flag("blockentry", 0) end if get_time() >= game.get_event_flag("reopen") and game.get_event_flag("reopen") > 1 then game.set_event_flag("dragontemple_used",0) game.set_event_flag("dragontemple_block",0) game.set_event_flag("reopen", 0) end if game.get_event_flag("dragontemple_used") == 1 and game.get_event_flag("dragontemple_block") == 1 then local dragontime = game.get_event_flag("reopen")-get_time() say_title(mob_name(30121)) say("") say("Não podes entrar no dragão ainda.") say("Por favor volta mais tarde.") say("") say("Tempo restante: "..dragontime.." segundos.") say("") return end if game.get_event_flag("dragontemple_used") == 1 and game.get_event_flag("empire") == pc.get_empire() then say_title(mob_name(30121)) say("") say("A sala de cristal de momento está reservada.") say("") say("Se tiveres o código de acesso,") say("por favor introduz abaixo...") say("") local password = input() if game.get_event_flag("dragontemple_password") == tonumber(password) then say_title(""..mob_name(30121)..":") say("") say("A password está correcta.") wait() say_title(""..mob_name(30121)..":") say("") say("Se quiseres posso levar agora à sala do dragão.") say("Apenas preciso de 3 Chaves Torcidas por cada jogador.") say("") say_item_vnum(30179) local s = select("Deixa-me entrar!!", "Cancelar") if s == 1 then if pc.count_item(30179) >= 3 then pc.remove_item(30179,3) pc.warp(844000, 1066900,(207*10000)) pc.setqf("payment", 3) else say("Tens de ter 3 chaves torcidas!") say("") say_item_vnum(30179) end else return end else say_title(""..mob_name(30121).."") say("") say("A password está incorrecta!") return end elseif pc.has_guild() and game.get_event_flag("dragontemple_used") == 0 then say_title(""..mob_name(30121)..":") say("") ----"123456789012345678901234567890123456789012345678901234567890"| say("Queres lutar contra o dragão?") say("") say("Diz-me uma password de acesso para eu reservar a sala.") say("Apenas pode conter números.") say("") say("Podes passar esta password aos membros do teu grupo") say("para entrarem todos no dragão. Por favor introduz a password.") local password = tonumber(input("")) game.set_event_flag("dragontemple_password",password) say_title(""..mob_name(30121)..":") say("") say("Se quiseres posso levar agora à sala do dragão.") say("Apenas preciso deste item como pagamento:") say_item_vnum(30179) say("") say_reward("Lembra-te, quem quiser entrar na sala apenas") say_reward("tem 5 minutos antes de a entrada fechar!") say("") local s = select("Deixa-me entrar!!", "Cancelar") if s == 1 then if pc.count_item(30179) >= 3 then empire = pc.get_empire() pc.remove_item(30179,3) DragonLair.startRaid(207) game.set_event_flag("dragontemple_used",3) game.set_event_flag("empire",empire) game.set_event_flag("metinkills", 0) game.set_event_flag("reopen", get_time()+60*60) game.set_event_flag("blockentry", get_time()+5*60) pc.setqf("payment", 3) else say("Precisas de chave torcida para entrar!") say("") say_item_vnum(30179) say("") return end elseif s==2 then return end elseif not pc.has_guild() then say_title(""..mob_name(30121).."") say("") say("Tens de ser membro de uma guild") say("para lutar contra o dragão.") say("") elseif game.get_event_flag("empire") > pc.get_empire() or game.get_event_flag("empire") < pc.get_empire() then say_title(""..mob_name(30121).."") say("") say("Desculpa, o dragão está a ser morto por") say("outro reino, por isso não podes entrar.") say("") end end -- Kick players out --when login with pc.get_map_index() == 207 and pc.is_gm() == false begin -- clear_letter() -- warp_to_village() --end when login with pc.get_map_index() >= (207*10000) and pc.get_map_index() <= (208*10000) begin if pc.getqf("payment") < 3 then if pc.count_item(30179) >= 3 then pc.remove_item(30179,3) else pc.warp(181800,1220863) send_letter("Foste expulso da sala de cristal") end else pc.setqf("payment", 0) end end when button or info begin say_title("Sala de cristal") say("") ----"123456789012345678901234567890123456789012345678901234567890"| say("Não tinhas uma chave torcida quando entraste") say("na sala, por isso foste expulso.") say("") say("Precisas de chave torcida para entrar.") say_item_vnum(30179) say("") clear_letter() end when 8031.kill or 8032.kill or 8033.kill or 8034.kill begin game.set_event_flag("metinkills", game.get_event_flag("metinkills")+1) if game.get_event_flag("metinkills") == 3 then game.set_event_flag("metinkills", 3) metin = { {8031, 8032, 8033, 8034}, } n = number(1,4) x = number(155,185) y = number(155,185) mob.spawn(tonumber(metin[1][n]), x, y, 1, 0, 1) end end when 2493.kill with pc.get_map_index() >= (207*10000) and pc.get_map_index() <= (208*10000) begin local drop = number(1,10) if drop <= 3 then game.drop_item_with_ownership(71123) elseif drop >= 4 and drop <= 6 then game.drop_item_with_ownership(71129) elseif drop >= 7 then game.drop_item_with_ownership(71123) game.drop_item_with_ownership(71129) end game.set_event_flag("reopen", get_time()+30*60) notice_all("O grupo de "..pc.get_name().." matou com sucesso o dragão!") game.set_event_flag("metinkills", 0) game.set_event_flag("dragontemple_block",1) end end end dragonlair.quest Link to comment Share on other sites More sharing options...
xabugas123 Posted February 20, 2018 Share Posted February 20, 2018 quest bugada implementei e não faz nada carrego no npc não aparece nada. Link to comment Share on other sites More sharing options...
Marco Posted February 20, 2018 Share Posted February 20, 2018 16 minutos atrás, xabugas123 disse: quest bugada implementei e não faz nada carrego no npc não aparece nada. Dá algum erro? Link to comment Share on other sites More sharing options...
xabugas123 Posted February 20, 2018 Share Posted February 20, 2018 4 minutos atrás, L2P disse: Dá algum erro? Não simplesmente não faz nada eu faço o implemento direito /.qc nome.quest dou /reload q vou a carregar no npc e não faz nada... Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted February 20, 2018 Author Share Posted February 20, 2018 Npc 30121 e mapa de index 73? Link to comment Share on other sites More sharing options...
xabugas123 Posted February 21, 2018 Share Posted February 21, 2018 Tierri tens de remover with pc.get_map_index() == 73 and game.get_event_flag("dragontemple_open") == 1 isso dá quest senão ela não arranca não tem nada haver com npc ou mapa basta remover isso Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted February 21, 2018 Author Share Posted February 21, 2018 A quest apenas abre nesse mapa, para prevenir GMs de fazerem summon do npc noutro mapa para os seus amigos entrarem lá. game.get_event_flag("dragontemple_open") == 1 Define se o dungeon está ou não ativo. Caso não o metas 1, está sempre desativado. Isso controlas com a conta gm. Caso queiras sempre ativo sim, é só removeres esse check Link to comment Share on other sites More sharing options...
xabugas123 Posted June 11, 2018 Share Posted June 11, 2018 (edited) Tierri Lopes tem como meter um tempo de limite EX: depois de 1 hora dentro do dragão eles serem teleportados para as cidades depois tenho este problema if game.get_event_flag("dragontemple_used") == 1 and game.get_event_flag("dragontemple_block") == 1 then local dragontime = game.get_event_flag("reopen")-get_time() say_title(mob_name(30121)) say("") say("Não podes entrar no dragão ainda.") say("Por favor volta mais tarde.") say("") say("Tempo restante: "..dragontime.." segundos.") say("") return end essa parte da quest não abre ou seja eu entro no dragão mato ele sou teleportado para a cidade vou novamente tentar entrar carrego em "Quero matar o dragão" e a quest fica bloqueada só consigo desbloquear se carregar novamente no npc e meter cancelar ... tens a questão que não me deixa meter a password com outro char fica bloqueado na quest. Edited June 12, 2018 by xabugas123 Novo problema Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now