-
Posts
19 -
Joined
-
Last visited
-
Feedback
0%
About elyzeumozart

Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
elyzeumozart's Achievements
-
elyzeumozart started following Amun
-
elyzeumozart started following Froslass
-
elyzeumozart started following DemOnJR
-
How do I add a 1-second block on using skills after removing or swapping an item, like a weapon, armor, costume, costume weapon, or costume hair? Thanks in advance. Example code on the client and server for map blocking. Client Server
-
Can someone fix this dragon roar to the old version where it only appears on the shaman and affects an area, without this targeting mechanic? Also, please fix the bug where it doesn't appear when used. I’m willing to pay. I want the old version of the shaman. I have the source game, client, files client and server. Video of the problem. https://www.youtube.com/watch?v=T63FL0I6xzw
-
Implement uitaskbar
elyzeumozart replied to elyzeumozart's topic in Community Support - Questions & Answers
up -
I’m having an issue with the player-vs-player tournament system. When there are several players registered, one or two of the arenas have problems, and players can't deal damage. Does anyone know a solution? Or how to set it to only use the first two arenas? Quest quest pvp_manager begin state start begin when login with game.get_event_flag("budokan_open") > 0 and pc.get_map_index() != 354 begin q.set_icon("scroll_open_blue.tga") send_letter("Junte-se ao Torneio de Players!") end when button or info begin say_title("Torneio de Players") say("") if game.get_event_flag("budokan_open") == 2 then if horse . is_summon ( ) or pc.is_riding() then say("Proibido entrar utilizando Cavalo.") return end if pc.count_item(72726) > 0 or pc.count_item(70020) > 0 or pc.count_item(50200) > 0 or pc.count_item(71049) > 0 then say_title("Proibido entrar portando Poções.") say("") say("Para entrar, você não pode ter consigo") say("Benção de Helong e Poção Regeneradora.") say("") return end if party.is_party() then say("Proibido entrar participando de grupo.") return else say("O Torneio de Players está aberto!") say("") say("Batalhe contra outros jogadores em uma impiedosa") say("competição pela riqueza e glória.") say("") local s = select("Entrar","Fechar") if s == 1 then pc.warp(11844800,0,0) end end else say("O Torneio de Players abrirá em breve!") say("") say("Batalhe contra outros jogadores em uma impiedosa") say("competição pela riqueza e glória.") say("") say("Quando o torneio estiver aberto, você poderá entrar.") say("Enquanto isso prepare suas armas.") say("") end end when login with pc.get_map_index() == 354 and (pvp_attenders == nil or pvp_attenders[pvp_manager.get_my_attender_id()] == nil or (pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 1 and pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 2)) begin if pvp_attenders == nil then pvp_manager.guard_check_position() timer("pvp_guard_1", 20) return end if pvp_attenders[pvp_manager.get_my_attender_id()] == nil then pvp_manager.guard_check_position() timer("pvp_guard_1", 20) return end if pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 1 and pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 2 then pvp_manager.guard_check_position() timer("pvp_guard_1", 20) end end when pvp_guard_1.timer begin if pc.get_map_index() != 354 then return end pvp_manager.guard_check_position() timer("pvp_guard_2", 20) end when pvp_guard_2.timer begin if pc.get_map_index() != 354 then return end pvp_manager.guard_check_position() timer("pvp_guard_1", 20) end function guard_check_position() if pc.get_local_x() >= 84 and pc.get_local_y() >= 84 and pc.get_local_x() <= 116 and pc.get_local_y() <= 116 then --arena 1 pvp_manager.guard_reset() end if pc.get_local_x() >= 84 and pc.get_local_y() >= 136 and pc.get_local_x() <= 116 and pc.get_local_y() <= 168 then --arena 2 pvp_manager.guard_reset() end if pc.get_local_x() >= 136 and pc.get_local_y() >= 84 and pc.get_local_x() <= 168 and pc.get_local_y() <= 116 then --arena 3 pvp_manager.guard_reset() end if pc.get_local_x() >= 136 and pc.get_local_y() >= 136 and pc.get_local_x() <= 168 and pc.get_local_y() <= 168 then --arena 4 pvp_manager.guard_reset() end end function guard_reset() notice_in_map("Guardião: "..pc.getname().." foi expulso da Arena PVP.") pc.warp_local(pc.get_map_index(), 126*100, 24*100) end when 20351.chat."GM: Fechar Entrada" with pc.is_gm() and pc.get_map_index() == 354 begin say_title(mob_name(20351)) say("") say("A entrada pro Torneio de Players foi fechada.") say("") game.set_event_flag("budokan_open", 0) end when 20351.chat."Retornar para Cidade" with pc.get_map_index() == 354 begin say_title(mob_name(20351)) say("") say("Quer voltar para sua cidade?") say("") local s = select("Sim", "Não") if s == 1 then warp_to_village() end end when 20351.chat."GM: Cancelar Torneio" with pc.get_map_index() == 354 and pc.is_gm() and game.get_event_flag("pvp") != 0 begin say_title(mob_name(20351)) say("") say("Deseja realmente cancelar o Torneio?") say("") local s = select("Sim", "Não") if s == 1 then game.set_event_flag("grupo_block", 0) game.set_event_flag("pvp", 0) game.set_event_flag("budokan_open", 0) game.set_event_flag("pvp_classe", 0) pvp_attenders = nil notice_all("O Torneio Players vs Players foi encerrado.") warp_all_to_village(354, 60) -- em 60 segundos manda todos para vila. say_title(mob_name(20351)) say("") say("O Torneio foi cancelado.") end end when 20351.chat."GM: Iniciar Torneio" with pc.get_map_index() == 354 and pc.is_gm() and game.get_event_flag("pvp") == 0 begin say_title(mob_name(20351)) say("") say_reward("Por favor, escolha um nível mínimo:") local str_min_level = input() say_title(mob_name(20351)) local min_level = tonumber(str_min_level) if min_level == nil then say("") say("Precisa digitar um número válido.") say("") return end if tonumber(str_min_level) < 15 then min_level = 15 end say("") say("O nível mínimo é "..tostring(min_level)..".") say("") say_reward("Por favor, escolha um nível máximo:") local str_max_level = input() say_title(mob_name(20351)) local max_level = tonumber(str_max_level) if max_level == nil then say("") say("Precisa digitar um número válido.") say("") return end if tonumber(str_max_level) < min_level then say("") say("O nível máximo deve ser maior que o mínimo.") say("") return end game.set_event_flag("pvp_minlevel", min_level) game.set_event_flag("pvp_maxlevel", max_level) say("") say("O nível mínimo é "..tostring(min_level)..".") say("O nível máximo é "..tostring(max_level)..".") say("") wait() say_title(mob_name(20351)) say("") say("Selecione a classe:") local classe = select("Guerreiro", "Ninja", "Shura", "Shaman", "Lycan", "Geral") if classe == 1 then game.set_event_flag("pvp_classe", 1) elseif classe == 2 then game.set_event_flag("pvp_classe", 2) elseif classe == 3 then game.set_event_flag("pvp_classe", 3) elseif classe == 4 then game.set_event_flag("pvp_classe", 4) elseif classe == 5 then game.set_event_flag("pvp_classe", 5) elseif classe == 6 then game.set_event_flag("pvp_classe", 0) end local s = select("Iniciar", "Cancelar") if s == 2 then return end say_title(mob_name(20351)) say("") say("O Torneio de Players começou.") say("") say_reward("Limite de nível: "..game.get_event_flag("pvp_minlevel").." - "..game.get_event_flag("pvp_maxlevel")) game.set_event_flag("grupo_block", 1) game.set_event_flag("pvp", 1) game.set_event_flag("budokan_open", 2) attender_count = 0 game.set_event_flag("pvp_tournament", get_global_time()) pvp_attenders = nil pvp_attenders = { } arena = { -- arena 1 { { 113, 100 }, { 88, 100 }, 0, "SLEEPING", 0, }, -- arena 2 { { 113, 152 }, { 88, 152 }, 0, "SLEEPING", 0, }, -- arena 3 { { 140, 152 }, { 164, 152 }, 0, "SLEEPING", 0, }, -- arena 4 { { 164, 100 }, { 140, 100 }, 0, "SLEEPING", 0, }, } if game.get_event_flag("pvp_classe") == 0 then notice_all("O Torneio Players vs Players começou!") end if game.get_event_flag("pvp_classe") == 1 then notice_all("O Torneio Guerreiros vs Guerreiros começou!") end if game.get_event_flag("pvp_classe") == 2 then notice_all("O Torneio Ninjas vs Ninjas começou!") end if game.get_event_flag("pvp_classe") == 3 then notice_all("O Torneio Shuras vs Shuras começou!") end if game.get_event_flag("pvp_classe") == 4 then notice_all("O Torneio Shamans vs Shamans começou!") end if game.get_event_flag("pvp_classe") == 5 then notice_all("O Torneio Lycans vs Lycans começou!") end end when 20351.chat."Inscrição para o Torneio" with pc.get_map_index() == 354 and game.get_event_flag("pvp") == 1 begin say_title(mob_name(20351)) say("") if game.get_event_flag("pvp_tournament") == pc.getqf("pvp_tournament") then say("Você já se registrou para o Torneio.") say("") return end if pc.get_level() < 15 then say("Seu nível é muito baixo.") say("") return end if pc.get_level() < game.get_event_flag("pvp_minlevel") or pc.get_level() > game.get_event_flag("pvp_maxlevel") then say("Seu nível tem que está entre "..game.get_event_flag("pvp_minlevel").." e "..game.get_event_flag("pvp_maxlevel")) say("") return end ----"123456789012345678901234567890123456789012345678901234567890"| if game.get_event_flag("pvp_classe") == 1 and pc.job != 0 then -- PVP GUERREIRO say("Apenas Guerreiros podem se inscrever.") say("") return end if game.get_event_flag("pvp_classe") == 2 and pc.job != 1 then -- PVP NINJA say("Apenas Ninjas podem se inscrever.") say("") return end if game.get_event_flag("pvp_classe") == 3 and pc.job != 2 then -- PVP SHURA say("Apenas Shuras podem se inscrever.") say("") return end if game.get_event_flag("pvp_classe") == 4 and pc.job != 3 then -- PVP SHAMAN say("Apenas Shamans podem se inscrever.") say("") return end if game.get_event_flag("pvp_classe") == 5 and pc.job != 4 then -- PVP LYCAN say("Apenas Lycans podem se inscrever.") say("") return end say("Bem-Vindo ao Torneio de Players.") say("") say("Você precisa derrotar todos os oponentes,") say("para ser o vencedor e entrar no mural da fama.") say("") say("Deseja participar?") say("") local s = select("Sim", "Não") say_title(mob_name(20351)) say("") if s == 1 then say("Derrote todos os oponentes e seja um vencedor.") say("Caso contrario será desclassificado.") say("") say("Boa sorte!") say("") pvp_attenders[attender_count+1] = {name = pc.getname(), level = pc.get_level(), partner = nil, winner = true, fight_mode = 0, arena = 0} pc.setqf("attender_id", attender_count+1) pc.setqf("pvp_tournament", game.get_event_flag("pvp_tournament")) attender_count = attender_count + 1 elseif s == 2 then say("Volte quando mudar de idéia.") say("") end end when 20351.chat."GM: Inscrições do Torneio" with pc.get_map_index() == 354 and pc.is_gm() and game.get_event_flag("pvp") == 1 begin say_title(mob_name(20351)) say("") say("Atualmente possui "..tostring(attender_count).." players registrados.") say("") say("Deseja encerrar os registro e iniciar a batalha?") say("") local s = select("Sim", "Não") if s == 1 then say_title(mob_name(20351)) say("") say("As inscrições foram encerradas.") say("") game.set_event_flag("pvp", 2) betting_list = {} betting_state = {} end end when 20351.chat."Iniciar Torneio de Players." with pc.get_map_index() == 354 and pc.is_gm() and game.get_event_flag("pvp") == 2 begin say_title(mob_name(20351)) say("") say("Deseja iniciar o Torneio?") say("") local s = select("Sim", "Não") if s == 1 then say_title(mob_name(20351)) say("") say("As batalhas irão começar agora.") say("") game.set_event_flag("pvp", 3) pvp_manager.make_duel_list() duel_list_index = 0 playerless_mode = false notice_all("1º Round do torneio.") pvp_round_num = 1 pvp_manager.refresh_arenas() end end when 20351.chat."Membros Participantes" with pc.get_map_index() == 354 and game.get_event_flag("pvp") == 2 begin setskin(NOWINDOW) chat("Os seguintes personagens estão participando do Torneio:") for i = 1, attender_count, 4 do local chatline = "" for j = i, 4, 1 do if pvp_attenders[j] != nil then chatline = chatline..pvp_attenders[j].name.." " end end syschat(chatline) end syschat(""..attender_count.." Participantes.") end when 20351.chat."¿Quién luchará conmigo en la próxima batalla?" with pc.get_map_index() == 354 and game.get_event_flag("pvp") == 3 and game.get_event_flag("pvp_tournament") == pc.getqf("pvp_tournament") begin say_title(mob_name(20351)..":") say("") if pvp_manager.get_duel_partner() == nil then say("No hay ningún oponente disponible en este momento.") say("") say("Si no encontramos un oponente apropiado para usted, ") say("pasará al siguiente combate automáticamente.") say("") return end say("De acuerdo con el plan actual se lucha contra:") say("") say_reward(""..pvp_manager.get_duel_partner().."") say("") end function make_duel_list() duel_list = { } local i = 0 for ai = 1, attender_count, 1 do if pvp_attenders[ai] != nil and pvp_attenders[ai].partner == nil and pvp_attenders[ai].winner == true then local partner_id = pvp_manager.findpartner(tostring(pvp_attenders[ai].name), pvp_attenders[ai].level) if partner_id != nil then pvp_attenders[ai].partner = tostring(pvp_attenders[partner_id].name) pvp_attenders[partner_id].partner = tostring(pvp_attenders[ai].name) duel_list[i] = {fighter_id1 = ai, fighter_id2 = partner_id} i = i + 1 end end end for ai = 1, attender_count, 1 do if pvp_attenders[ai] != nil and pvp_attenders[ai].partner == nil and pvp_attenders[ai].winner == true then local partner_id = pvp_manager.findpartner_for_partnerless(tostring(pvp_attenders[ai].name), pvp_attenders[ai].level) if partner_id != nil then pvp_attenders[ai].partner = tostring(pvp_attenders[partner_id].name) pvp_attenders[partner_id].partner = tostring(pvp_attenders[ai].name) duel_list[i] = {fighter_id1 = ai, fighter_id2 = partner_id} i = i + 1 end end end end function findpartner(name, level) local closest_level = nil local partner_id = nil for ai = 1, attender_count, 1 do if pvp_attenders[ai] != nil and pvp_attenders[ai].winner == true and tonumber(pvp_attenders[ai].level) <= level + 30 and tonumber(pvp_attenders[ai].level) >= level - 30 and tostring(pvp_attenders[ai].name) != name and pvp_attenders[ai].partner == nil and pvp_manager.is_player_in_map(tostring(pvp_attenders[ai].name)) == true then if closest_level == nil then closest_level = pvp_attenders[ai].level partner_id = ai elseif tonumber(pvp_attenders[ai].level) == tonumber(level) then closest_level = pvp_attenders[ai].level partner_id = ai elseif tonumber(level) < tonumber(closest_level) and tonumber(pvp_attenders[ai].level) < tonumber(closest_level) then closest_level = pvp_attenders[ai].level partner_id = ai elseif tonumber(level) > tonumber(closest_level) and tonumber(pvp_attenders[ai].level) > tonumber(closest_level) then closest_level = pvp_attenders[ai].level partner_id = ai end end end return tonumber(partner_id) end function findpartner_for_partnerless(name, level) local closest_level = nil local partner_id = nil for ai = 1, attender_count, 1 do if pvp_attenders[ai] != nil and pvp_attenders[ai].winner == true and tostring(pvp_attenders[ai].name) != name and pvp_attenders[ai].partner == nil and pvp_manager.is_player_in_map(tostring(pvp_attenders[ai].name)) == true then if closest_level == nil then closest_level = pvp_attenders[ai].level partner_id = ai elseif pvp_attenders[ai].level == level then closest_level = pvp_attenders[ai].level partner_id = ai elseif tonumber(level) < tonumber(closest_level) and pvp_attenders[ai].level < closest_level then closest_level = pvp_attenders[ai].level partner_id = ai elseif tonumber(level) > tonumber(closest_level) and pvp_attenders[ai].level > closest_level then closest_level = pvp_attenders[ai].level partner_id = ai end end end return partner_id end function is_player_in_map(name) if pc.getname() == name then return true end local myname = pc.getname() local target = find_pc_by_name(name) local t = pc.select(target) if pc.getname() == myname then pc.select(t) return false end pc.select(t) return true end when 20351.chat."GM: Recompensa do Torneio" with pc.is_gm() begin say_title(mob_name(20351)) say("") say("Recompensa Atual: "..game.get_event_flag("pvp_price_count").." "..item_name(game.get_event_flag("pvp_price_vnum")).."") say("") local s = select("Alterar Recompensa", "Cancelar") if s == 2 then return end say_title(mob_name(20351)) say("") say("Digite o código do item.") local vnum = input() say_title(mob_name(20351)) say("") say("Digite a quantiade do item.") local count = input() game.set_event_flag("pvp_price_count", count) game.set_event_flag("pvp_price_vnum", vnum) say_title(mob_name(20351)) say("") say("Nova Recompensa: "..count.." "..item_name(vnum).."") say("") end function refresh_arenas() for aArena = 1, 4, 1 do if duel_list[duel_list_index] == nil then if playerless_mode == true then pvp_manager.init_next_round() else pvp_manager.fight_playerless() end return end if arena[aArena][3] == 0 then arena[aArena][3] = 1 pvp_manager.fight_init(duel_list[duel_list_index].fighter_id1, duel_list[duel_list_index].fighter_id2, aArena) end end end function fight_init(pid1, pid2, arena_id) duel_list_index = duel_list_index + 1 if pvp_manager.is_player_in_map(tostring(pvp_attenders[pid1].name)) == false then notice_in_map(tostring(pvp_attenders[pid1].name).." não está online e foi desclassificado.", pc.get_map_index()) pvp_attenders[pid1].winner = false pvp_attenders[pid2].partner = nil arena[arena_id][3] = 0 pvp_manager.refresh_arenas() return end if pvp_manager.is_player_in_map(tostring(pvp_attenders[pid2].name)) == false then notice_in_map(tostring(pvp_attenders[pid2].name).." não está online e foi desclassificado.", pc.get_map_index()) pvp_attenders[pid2].winner = false pvp_attenders[pid1].partner = nil arena[arena_id][3] = 0 pvp_manager.refresh_arenas() return end --[[ local f1_accept = ask_fight(tostring(pvp_attenders[pid1].name), tostring(pvp_attenders[pid2].name)) if f1_accept != CONFIRM_OK then notice_in_map(tostring(pvp_attenders[pid1].name).." no se tomó en la lucha contra el "..tostring(pvp_attenders[pid2].name)..".", pc.get_map_index()) pvp_attenders[pid1] = nil pvp_attenders[pid2].partner = nil pvp_manager.refresh_arenas() return end local f2_accept = confirm(find_pc_by_name(tostring(pvp_attenders[pid2].name)), "lucha contra "..tostring(pvp_attenders[pid1].name).. " an?", 15) if f2_accept != CONFIRM_OK then notice_in_map(tostring(pvp_attenders[pid2].name).." no se tomó en la lucha contra "..tostring(pvp_attenders[pid1].name)..".", pc.get_map_index()) pvp_attenders[pid2] = nil pvp_attenders[pid1].partner = nil pvp_manager.refresh_arenas() return end ]] pvp_attenders[pid1].fight_mode = 1 pvp_attenders[pid2].fight_mode = 1 pvp_attenders[pid1].arena = arena_id pvp_attenders[pid2].arena = arena_id pvp_manager.local_pc_warp(tostring(pvp_attenders[pid1].name), arena[arena_id][1][1], arena[arena_id][1][2]) pvp_manager.local_pc_warp(tostring(pvp_attenders[pid2].name), arena[arena_id][2][1], arena[arena_id][2][2]) end when login with pc.get_map_index() == 354 and game.get_event_flag("pvp") == 3 and pvp_manager.get_fight_mode() == 1 begin affect.add(apply.MOV_SPEED, -10000, 2) affect.add_collect(apply.HP_REGEN, 5000, 30) affect.add_collect(apply.SP_REGEN, 5000, 30) pvp_manager.set_fight_mode(2) if arena[pvp_manager.get_arena()][3] == 2 then arena[pvp_manager.get_arena()][5] = 30 loop_timer("fight_start_countdown", 1) else timer("partner_timeout", 30) end arena[pvp_manager.get_arena()][3] = 2 end when partner_timeout.timer begin if pvp_manager.is_player_in_map(pvp_manager.get_duel_partner()) == true or game.get_event_flag("pvp") != 2 or pvp_manager.get_fight_mode() != 2 then return end pvp_manager.set_fight_mode(3) if arena[pvp_manager.get_arena()][3] == 3 then return end arena[pvp_manager.get_arena()][3] = 3 notice_in_map(pc.getname().." venceu a batalha contra "..pvp_manager.get_duel_partner().." por W.O", pc.get_map_index()) pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].fight_mode = 3 pvp_attenders[pvp_manager.get_my_attender_id()].winner = true pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].winner = false pc.warp_local(pc.get_map_index(), 12600, 23400) end when fight_start_countdown.timer begin if arena[pvp_manager.get_arena()][5] == -1 then return end local partner_vid = find_pc_by_name(pvp_manager.get_duel_partner()) local my_vid = pc.get_vid() if arena[pvp_manager.get_arena()][5] == 0 then arena[pvp_manager.get_arena()][5] = -1 pc.select(partner_vid) command("pvp "..my_vid) pc.select(my_vid) command("pvp "..partner_vid) timer("fight_start_countdown_shutdown", 1) else pc.select(partner_vid) if math.mod(arena[pvp_manager.get_arena()][5], 5) == 0 then syschat("A batalha vai começar em "..tostring(arena[pvp_manager.get_arena()][5]).." segundos.") end affect.add(apply.MOV_SPEED, -10000, 2) pc.select(my_vid) if math.mod(arena[pvp_manager.get_arena()][5], 5) == 0 then syschat("A batalha vai começar em "..tostring(arena[pvp_manager.get_arena()][5]).." segundos.") end affect.add(apply.MOV_SPEED, -10000, 2) arena[pvp_manager.get_arena()][5] = arena[pvp_manager.get_arena()][5] - 1 end end when fight_start_countdown_shutdown.timer begin cleartimer("fight_start_countdown") end when logout with game.get_event_flag("pvp") == 3 and pc.get_map_index() == 354 and pvp_manager.get_fight_mode() == 2 begin pvp_manager.set_fight_mode(3) arena[pvp_manager.get_arena()][3] = 3 notice_in_map(pvp_manager.get_duel_partner().." venceu a batalha contra "..pc.getname()..".", pc.get_map_index()) pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].fight_mode = 3 pvp_attenders[pvp_manager.get_my_attender_id()].winner = false pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].winner = true local target = find_pc_by_name(pvp_manager.get_duel_partner()) local t = pc.select(target) pc.change_gold(game.get_event_flag("pvp_round_gold")*pvp_round_num) pc.select(t) pvp_manager.local_pc_warp(pvp_manager.get_duel_partner(), 126, 24) end when kill with game.get_event_flag("pvp") == 3 and pc.get_map_index() == 354 and npc.is_pc() and pvp_manager.get_fight_mode() == 2 begin pvp_manager.set_fight_mode(3) if arena[pvp_manager.get_arena()][3] == 3 then return end arena[pvp_manager.get_arena()][3] = 3 notice_in_map(pc.getname().." venceu a batalha contra "..pvp_manager.get_duel_partner()..".", pc.get_map_index()) pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].fight_mode = 3 pvp_attenders[pvp_manager.get_my_attender_id()].winner = true pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].winner = false pc.change_gold(game.get_event_flag("pvp_round_gold")*pvp_round_num) timer("fight_end", 5) end when fight_end.timer begin pc.warp_local(pc.get_map_index(), 12600, 23400) pvp_manager.local_pc_warp(pvp_manager.get_duel_partner(), 126, 24) end when letter with pc.get_map_index() == 354 and game.get_event_flag("pvp") == 3 and pvp_manager.get_fight_mode() == 3 begin pvp_manager.set_fight_mode(0) if pvp_attenders[pvp_manager.get_my_attender_id()].winner == true then arena[pvp_manager.get_arena()][3] = 0 pvp_manager.refresh_arenas() end end function fight_playerless() for aArena = 1, 4, 1 do if arena[aArena][3] != 0 then return end end playerless_mode = true pvp_manager.make_duel_list() pvp_manager.refresh_arenas() end function init_next_round() for aArena = 1, 4, 1 do if arena[aArena][3] != 0 then return end end playerless_mode = false local winner_count = 0 local winner_id = 0 for ai = 1, attender_count, 1 do pvp_attenders[ai].partner = nil pvp_attenders[ai].fight_mode = 0 if pvp_attenders[ai] != nil and pvp_attenders[ai].winner == true then winner_count = winner_count + 1 winner_id = ai end end if winner_count == 1 then notice_all(pvp_attenders[winner_id].name.." foi o vencedor do torneio!") notice_all(pvp_attenders[winner_id].name.." ganhou a recompensa de "..game.get_event_flag("pvp_price_count").." "..item_name(game.get_event_flag("pvp_price_vnum"))..".") pvp_manager.distribute_bets(pvp_attenders[winner_id].name) local target = find_pc_by_name(pvp_attenders[winner_id].name) local t = pc.select(target) pc.give_item2(game.get_event_flag("pvp_price_vnum"), game.get_event_flag("pvp_price_count")) pc.select(t) notice_all("O Torneio Players vs Players foi encerrado.") game.set_event_flag("grupo_block", 0) game.set_event_flag("pvp", 0) game.set_event_flag("budokan_open", 0) warp_all_to_village(354, 60) -- em 60 segundos manda todos para vila. pvp_attenders = nil return end pvp_manager.make_duel_list() duel_list_index = 0 if winner_count == 2 then notice_all("A batalha final começou.") elseif winner_count <= 4 then notice_all("3º Round do torneio.") else notice_all("2º Round do torneio.") end pvp_round_num = pvp_round_num + 1 pvp_manager.refresh_arenas() end function distribute_bets(winner_name) -- table.insert(betting_list, {pc.get_name(), bet_amount, player}) local jackpot = 0 local jackpot_winner_only = 0 local winners = 0 for i = 1, table.getn(betting_list), 1 do if betting_list[i][3] == winner_name then jackpot_winner_only = jackpot_winner_only + betting_list[i][2] end jackpot = jackpot + betting_list[i][2] winners = winners + 1 end for i = 1, table.getn(betting_list), 1 do if betting_list[i][3] == winner_name then pvp_manager.give_jackpot_gold(betting_list[i][1], math.ceil( (betting_list[i][2] / jackpot_winner_only)*jackpot )) end end end function give_jackpot_gold(name, amount) local target = find_pc_by_name(name) if target == 0 then return end local t = pc.select(target) pc.change_money(amount) pc.select(t) end function local_pc_warp(name, x, y) local target = find_pc_by_name(name) local t = pc.select(target) pc.warp_local(pc.get_map_index(), x*100, y*100) pc.select(t) end function setqf_by_name(name, flag, value) local target = find_pc_by_name(name) local t = pc.select(target) pc.setqf(flag, value) pc.select(t) end function getqf_by_name(name, flag) local target = find_pc_by_name(name) local t = pc.select(target) local rflag = pc.getqf(flag) pc.select(t) return rflag end function get_attender_id_by_name(name) for ai = 1, attender_count, 1 do if tostring(pvp_attenders[ai].name) == name then return ai end end return 0 end function get_my_attender_id() return pvp_manager.get_attender_id_by_name(pc.get_name()) end function get_duel_partner() if pvp_attenders[pvp_manager.get_my_attender_id()] != nil and pvp_attenders[pvp_manager.get_my_attender_id()].partner != nil then return pvp_attenders[pvp_manager.get_my_attender_id()].partner else return nil end end function get_fight_mode() if pvp_attenders != nil and pvp_manager.get_my_attender_id() != 0 and pvp_attenders[pvp_manager.get_my_attender_id()] != nil and pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != nil then return pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode else return 0 end end function set_fight_mode(fmode) pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode = fmode end function get_arena() return pvp_attenders[pvp_manager.get_my_attender_id()].arena end function set_arena(id) pvp_attenders[pvp_manager.get_my_attender_id()].arena = id end function ask_fight(asker, target) return confirm(find_pc_by_name(target), "Van a luchar contra "..asker.. "?", 15) end end end
-
Implement uitaskbar
elyzeumozart replied to elyzeumozart's topic in Community Support - Questions & Answers
up -
Could someone help me with where to place these code blocks? My uitaskbar doesn't have OpenMall. uitaskbar of system my uitaskbar Client [Hidden Content]
-
Does anyone have the client/server language system
-
How to add decay time in shoulder bands, example 30 days.
-
Vps Server Metin2
elyzeumozart replied to elyzeumozart's topic in Paid Support / Searching / Recruiting
Solved -
I have an issue where, when I click with the mouse anywhere in the game world, my character always walks backwards, in a single direction. Other players don't have this problem. Additionally, I see people walking in the same direction and, in some cases, teleporting. Video of the issue: [Hidden Content]
-
[PROBLEM] Effect on weapons/costume!
elyzeumozart replied to xSmok3r's topic in Community Support - Questions & Answers
up -
Weapon costume
elyzeumozart replied to elyzeumozart's topic in Community Support - Questions & Answers
Your rock, done. -
9000 Salvador ITEM_COSTUME COSTUME_BODY 2 ANTI_FEMALE | NONE | NONE NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 86400 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 40183 0 0 0 0 0 Body suit is 'Costume_Body.' I would like to know what the parameters are for costume weapon. ty all.
-
elyzeumozart started following TJLol
-
I have a VPS with Metin, when I open the client the channel is normal, but when I try to log in a message appears saying 'incorrect username or password'; can someone help me?
-
Lennox started following elyzeumozart
-
I need help installing metin2 private server on a vps, I'll pay
