juniorsilva Posted August 18, 2017 at 11:46 PM Share Posted August 18, 2017 at 11:46 PM (edited) Olá pessoal. Bem como eu não tenho nada pra postar no fórum resolvi fazer uma quest bem simples de invasão de monstros no vale dos Orcs Negro. Quest: quest invision_monster begin state start begin function mapindex() return pc.get_map_index() != 64 end function mob_summon() notice_all("[Atenção] Os monstros invadiram o vale dos Orcs Negro.") regen_in_map(64, "data/mob_spawn/map_n_threeway.txt") end when letter with pc.is_gm() begin send_letter("GM: Invasão de monstros") end -- letter when button or info begin say_title("Olá "..pc.get_name()) say("Gostaria de iníciar o evento de invasão de monstros") say("no vale dos Orcs Negro? ") say("") say("Status: " ..game.get_event_flag("mob_running")) say("Legenda: 1 - ativado | 0 - desativado") say("") local s = select("Iníciar invasão de monstros", "Finalizar invasão de monstros", "Fechar") if s == 2 then say("Evento finalizado com sucesso!") say("") game.set_event_flag("mob_running", 0) clear_server_timer("spawn_mob") return end if s == 3 then return end if invision_monster.mapindex() then say(" É necessário está no vale dos Orcs Negro para iníciar o") say(" evento de invasão de monstros.") say("") wait() pc.warp(333600,751700) return -- block end if game.get_event_flag("mob_running") == 1 then say("O evento já está ativado!") say("Seu burro...") say("") return -- block end invision_monster.mob_summon() -- start -- event_start_loop game.set_event_flag("mob_running", 1) -- define active clear_server_timer("spawn_mob") -- clear temp load if exist. server_loop_timer("spawn_mob", 60*60*5) -- start summon loop temp 5hrs end -- button or info when spawn_mob.server_timer begin if game.get_event_flag("mob_running") == 1 then invision_monster.mob_summon() end end -- server_timer when login or enter with pc.is_gm() begin if game.get_event_flag("mob_running") == 1 then notice("O evento invasão de monstros está ativado") end end -- login or enter end -- state end -- quest By Júnior Silva. Qualquer dúvida deixe um comentário. map_n_threeway.txt Edited August 18, 2017 at 11:50 PM by juniorsilva 1 Link to comment Share on other sites More sharing options...
Marco Posted August 23, 2017 at 01:08 AM Share Posted August 23, 2017 at 01:08 AM Em 19/08/2017 em 00:46, juniorsilva disse: Olá pessoal. Bem como eu não tenho nada pra postar no fórum resolvi fazer uma quest bem simples de invasão de monstros no vale dos Orcs Negro. Quest: Mostrar conteúdo oculto quest invision_monster begin state start begin function mapindex() return pc.get_map_index() != 64 end function mob_summon() notice_all("[Atenção] Os monstros invadiram o vale dos Orcs Negro.") regen_in_map(64, "data/mob_spawn/map_n_threeway.txt") end when letter with pc.is_gm() begin send_letter("GM: Invasão de monstros") end -- letter when button or info begin say_title("Olá "..pc.get_name()) say("Gostaria de iníciar o evento de invasão de monstros") say("no vale dos Orcs Negro? ") say("") say("Status: " ..game.get_event_flag("mob_running")) say("Legenda: 1 - ativado | 0 - desativado") say("") local s = select("Iníciar invasão de monstros", "Finalizar invasão de monstros", "Fechar") if s == 2 then say("Evento finalizado com sucesso!") say("") game.set_event_flag("mob_running", 0) clear_server_timer("spawn_mob") return end if s == 3 then return end if invision_monster.mapindex() then say(" É necessário está no vale dos Orcs Negro para iníciar o") say(" evento de invasão de monstros.") say("") wait() pc.warp(333600,751700) return -- block end if game.get_event_flag("mob_running") == 1 then say("O evento já está ativado!") say("Seu burro...") say("") return -- block end invision_monster.mob_summon() -- start -- event_start_loop game.set_event_flag("mob_running", 1) -- define active clear_server_timer("spawn_mob") -- clear temp load if exist. server_loop_timer("spawn_mob", 60*60*5) -- start summon loop temp 5hrs end -- button or info when spawn_mob.server_timer begin if game.get_event_flag("mob_running") == 1 then invision_monster.mob_summon() end end -- server_timer when login or enter with pc.is_gm() begin if game.get_event_flag("mob_running") == 1 then notice("O evento invasão de monstros está ativado") end end -- login or enter end -- state end -- quest By Júnior Silva. Qualquer dúvida deixe um comentário. map_n_threeway.txt Gostei, adaptei a meu gosteo e usei Muito obrigado @juniorsilva 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