Jump to content

NazoX

Miembro
  • Contador contenido

    823
  • Ingreso

  • Última visita

  • Días ganados

    20

Mensajes publicados por NazoX

  1. hace 23 horas, Jeremy 9 dijo:

    Una pregunta, como hago para poner una ventana y abrir el swichbot, o asignarle alguna tecla (como F5 por ejemplo)

    Desde ya, Gracias 

    PD: Uso la version sin packets y los files del .es del 2007-2008

     

    tienes que añadir la función que lo abre en game.py añade por ejemplo:

    Quote

            onPressKeyDict[app.DIK_F5]    = lambda : self.__Dopador()

    y después al final añades la función

    Quote

    def __Dopador(self):
        abrir_dopador
        return

    no recuerdo este switchbot, pero creo que la función ya viene en el archivo .py

  2. hace 5 horas, Doblajes TecnoAsus Manzanita dijo:

    espero sea muy bueno xD se ve intereante

     

    Ha colaborado SzC, será un buen servidor, sabe como llevar las cosas y lleva muchos años aquí, aparte de que ha tenido otros proyectos muy buenos en el pasado, mucha suerte a ti SzC, lo probaré, y a ti, espero que te guste el servidor y lo pases bien, tiene muy buena pinta. 

  3. Fix1: desinstalar window, vender el pc y retirarse de este mundillo de metin2. 

    Fix2: hacer el favor de dejar de ser tan perros y usar toda las mierdas públicas sin conocimientos y de meter más mierda a unos files sin saber si son contraproducentes, si algo se publica, filtra, está por la Red, está incompleto, no funcional, con problemas, o no preparado para vuestro código o versión de archivos, y usar una puta base virgen y aprender, que existen todas las guías ya creadas de los que no la tuvimos en su día, y aprender, porque el 95% ya se ha retirado o tiene otra cosa en su vida, y no ayudan como antes, así que aprender por vuestra cuenta utilizando cosas vírgenes y ya posteadas en 40k de foros de todos los idiomas!!!! 

  4. Buenas, si vas hacer copy paste hazlo bien, un saludo.

    1.Vamos a nuestro FTP / WINSCP y vamos a la ruta /usr/.../quest y editamos el archivo "Questlib.lua"

    1.1 Ahora buscamos en el archivo lo siguiente:

    Quote

    -- minimap 동그라미들 모두 클리어
    function clearmapsignal() raw_script("[CLEARMAPSIGNAL]") end

    1.2 Ahora debajo añadimos lo siguiente:

    Quote

    -- Añadir Fondo a las misiones
    function setbgimage(src) raw_script("[BGIMAGE src;") raw_script(src) raw_script("]") end
    function addimage(x,y,src) raw_script("[IMAGE x;"..x.."|y;"..y) raw_script("|src;") raw_script(src) raw_script("]") end

    2.Guardamos y vamos al archivo "Quest_Functions" y donde queramos añadimos lo siguiente:

    Quote

    addimage
    setbgimage

    3.Guardamos y ahora lo añadimos a las misiones que queramos, como ejemplo usaré la quest de bienvenida:

    Quote

    quest anuncio_1 begin
        state start begin
            when login with pc.getqf("anunciowelcome") == 0 begin
                setbgimage('Aqui ponemos la imagen que queramos.tga') --Esto pondrá la imagen de fondo.
                notice_all(pc.get_name().." Se ha unido a Nazox2 como ejemplo de fondo")
                pc.setqf("anunciowelcome",1)
            end
        end
    end

    4.Para poder usar las  fotos que queramos tiene que ser en .tga y para añadir más o nuevas vamos a descomprimir etc.eix & .epk, vamos a ->etc->ymir work/ui/game/questboard
    4.1 Aquí colocamos nuestro fondo en .tga, recomendado usar el tamaño estándar que es de 300x300 pero eso
    podéis hacerlo a vuestro gusto, compilamos y a jugar.

    Nota 1: Sirve en todas las quest, solo tienes que añadir

    Quote

    setbgimage('foto.tga') <--la foto.tga está en ymir work/ui/game/questboard allí podéis añadir más. 

    Nota 2: Esto es super antiguo por norma general ya viene implementada la función, antes de añadir nada mirar que no lo tengáis, no pongo foto porque no lo uso, pero tenéis referencia de la del post.

  5. En 20/2/2022 a las 19:02, argeus99 dijo:

    Buen dia chicos

     

    Alguien podria compartir la mision de torre con la opcion de volver si a uno de los miembros de la party se crashea? ya que actualmente si uno de ellos se desconecta al reloguearse queda por fuera de la dungeon sin la posibilidad de regresar al piso donde estan los demás miembros de la party

    Encontré en dev unas funciones q un user creo pero desconozco como implementarle en torre demonios

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.

     

    Mil gracias

    No se si usarás la versión que yo estoy testeando, pero eso da muchos problemas ese sistema, pero bueno, ya los descubrirás, por aquí te dejo un ejemplo que uso yo como base (no se si es igual al tuyo.)

    Quote
    quest deviltower_zone begin
      state start begin
      when login begin
      if pc.get_map_index() == 66 then
      if pc.get_x() < 2048+88 or pc.get_y() < 6656+577 or pc.get_x() > 2048+236 or pc.get_y() > 6656+737 then
      pc.warp(590500, 110500)
      end
      pc.set_warp_location(65, 5905, 1105)
      elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
      pc.set_dungeonindex(d.get_map_index())
      pc.setqf("dungeonorgindex",66)
      pc.setqf("dungeon_ch",pc.get_channel_id())
      pc.set_warp_location(65, 5905, 1105)
      deviltower_zone.register_player(pc.get_vid())
      end
      end
       
       
      when 20348.chat."Kaldýðýn Yerden Devam Et" with d.find(pc.get_dungeonindex()) begin
      if pc.getqf("dungeonorgindex") != 66 then
      say("Son girdiðin zindan burasý deðil!")
      return
      end
      if pc.getqf("dungeon_ch") != pc.get_channel_id() then
      say("Zindana girdiðin ch burasý deðil!")
      return
      end
      local n = pc.get_dungeonindex()
      local oldumu = d.getf_from_map_index("azrail_dead", n)
      local level = d.getf_from_map_index("level", n)
      if level < 4 then
      say("4. Kata ulaþamadýðýnýz için devam edemezsin.")
      return
      end
      if oldumu == 1 then
      say_npc()
      say("Azraili zaten yok etmiþsin.")
      return
      end
      if n == 0 then
      setskin(NOWINDOW)
      return
      end
      if level == 4 then
      say_npc()
      say("Görünüþe göre 4. katta kuleden ayrýldýn, sana yardýmcý olmak istiyorum.")
      say_sari("Kuleye devam etmek istiyor musun?")
      if select(locale.yes,locale.no) == 1 then
      pc.warp(special.devil_tower[level-1][1]*100, special.devil_tower[level-1][2]*100,n)
      end
      end
      if level == 5 then
      say_npc()
      say("Görünüþe göre 5. katta kuleden ayrýldýn, sana yardýmcý olmak istiyorum.")
      say_sari("Kuleye devam etmek istiyor musun?")
      if select(locale.yes,locale.no) == 1 then
      pc.warp(special.devil_tower[level-1][1]*100, special.devil_tower[level-1][2]*100,n)
      end
      end
      if level == 6 then
      say_npc()
      say("Görünüþe göre 6. katta kuleden ayrýldýn, sana yardýmcý olmak istiyorum.")
      say_sari("Kuleye devam etmek istiyor musun?")
      if select(locale.yes,locale.no) == 1 then
      pc.warp(special.devil_tower[level-1][1]*100, special.devil_tower[level-1][2]*100,n)
      end
      end
      if level == 7 then
      say_npc()
      say("Görünüþe göre 7. katta kuleden ayrýldýn, sana yardýmcý olmak istiyorum.")
      say_sari("Kuleye devam etmek istiyor musun?")
      if select(locale.yes,locale.no) == 1 then
      pc.warp(special.devil_tower[level-1][1]*100, special.devil_tower[level-1][2]*100,n)
      end
      end
      if level == 8 then
      say_npc()
      say("Görünüþe göre 8. katta kuleden ayrýldýn, sana yardýmcý olmak istiyorum.")
      say_sari("Kuleye devam etmek istiyor musun?")
      if select(locale.yes,locale.no) == 1 then
      pc.warp(special.devil_tower[level-1][1]*100, special.devil_tower[level-1][2]*100,n)
      end
      end
      if level == 9 then
      say_npc()
      say("Görünüþe göre 9. katta kuleden ayrýldýn, sana yardýmcý olmak istiyorum.")
      say_sari("Kuleye devam etmek istiyor musun?")
      if select(locale.yes,locale.no) == 1 then
      pc.warp(special.devil_tower[level-1][1]*100, special.devil_tower[level-1][2]*100,n)
      end
      end
      end
       
      when logout begin
      if pc.count_item(30300) >= 1 then
      pc.remove_item(30300, pc.count_item(30300))
      end
      if pc.count_item(30302) >= 1 then
      pc.remove_item(30302, pc.count_item(30302))
      end
      if pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
      deviltower_zone.unregister_player(pc.get_vid())
      pc.setf("deviltower","dungeon_time",get_global_time() + 10*60*1)
      end
      end
      when 20348.chat."Þeytan Kulesi " begin
      if pc.get_level() < 40 then
      say_title("Þeytan Kulesi Bekçisi:")
      say("Seviyen giriþ için yeterli deðil.")
      return
      else
      say_title("Þeytan Kulesi Bekçisi:")
      say("Þeytan kulesine girmek istiyor musun?")
      say("2. Kattan devam etmek isterseniz 25M yang gerekmektedir.")
      say_reward("Oyundan istemediðiniz halde çýkarsanýz")
      say_reward("Kaldýðýnýz yerden devam edebilirsiniz!")
      local s = select("Gir.", "2.Kat'a Giriþ Yap.", "Ýstemiyorum.")
      if s == 1 then
      pc.warp(216500,727000)
      elseif s == 2 then
      if pc.get_money() < 25000000 then
      say("Hay Aksi!")
      say("Envanterine 25M yang olmadan seni içeri alamam.")
      say("25M yang yaptýðýnda tekrar uðra.")
      else
      pc.change_money(-25000000)
      d.new_jump(66, special.devil_tower[1][1] * 100, special.devil_tower[1][2] * 100)
      d.regen_file("data/dungeon/deviltower2_regen.txt")
      d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt")
      end
      elseif s == 3 then
      return
      end
      end
      end
       
      function GrupKontrol()
      local pids = {party.get_member_pids()}
      for i = 1, table.getn(pids), 1 do
      q.begin_other_pc_block(pids)
      if party.is_party() then
      if party.is_leader() then
      timer("devil_stone1_2", 2)
      end
      end
      q.end_other_pc_block()
      end
      end
       
       
      when 8015.kill with pc.get_map_index() == 66 begin
      if party.is_party() then
      deviltower_zone.GrupKontrol()
      else
      timer("devil_stone1_1", 2)
      end
      end
      when devil_stone1_1.timer begin
      d.new_jump_all(66,special.devil_tower[1][1],special.devil_tower[1][2])
      d.regen_file("data/dungeon/deviltower2_regen.txt")
      d.setf("party_leader_pid",pc.get_player_id())
      d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt")
      end
      when devil_stone1_2.timer begin
      d.new_jump_all(66,special.devil_tower[1][1],special.devil_tower[1][2])
      d.regen_file("data/dungeon/deviltower2_regen.txt")
      d.setf("party_leader_pid",party.get_leader_pid())
      party.setf("deviltower_mapindex",d.get_map_index())
      d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt")
      end
      when kill with npc.get_race() == 1091 begin
      d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[3][1], special.devil_tower[3][2], "data/dungeon/deviltower4_regen.txt")
      d.check_eliminated()
      end
      function get_4floor_stone_pos()
      local positions =
      {
      {368, 629}, {419, 630}, {428, 653}, {422, 679},
      {395, 689}, {369, 679}, {361, 658},
      }
      for i = 1, 6 do
      local j = number(i, 7)
      if i != j then
      local t = positions;
      positions = positions[j];
      positions[j] = t;
      end
      end
      return positions
      end
      when kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.get_race() == 8016 begin
      d.setf("level", 4)
      local positions = deviltower_zone.get_4floor_stone_pos()
      for i = 1, 6 do
      d.set_unique("fake" .. i , d.spawn_mob(8017, positions[1], positions[2]))
      end
      local vid = d.spawn_mob(8017, positions[7][1], positions[7][2])
      d.set_unique("real", vid)
      server_loop_timer('devil_stone4_update', 10, pc.get_map_index())
      server_timer('devil_stone4_fail1', 5*60, pc.get_map_index())
       
      d.notice("4. Kat Seçenek Kapýsýndasýn.");
      d.notice("Gözlerini ve kulaklarýný aldatacak bir çok sahte");
      d.notice("Metin Taþý mevcut. 15 dakika içerisinde");
      d.notice("gerçek Metin Taþý'ný bul ve yok et!");
      d.notice("Kapýdan geçmenin tek yolu budur.");
      end
       
      when devil_stone4_fail1.server_timer begin
      if d.select(get_server_timer_arg()) then
      d.notice("10 dakika kaldý ")
      server_timer('devil_stone4_fail2', 5*60, get_server_timer_arg())
      end
      end
       
      when devil_stone4_fail2.server_timer begin
      if d.select(get_server_timer_arg()) then
      d.notice("5 dakika kaldý ")
      server_timer('devil_stone4_fail', 5*60, get_server_timer_arg())
      end
      end
       
      when devil_stone4_fail.server_timer begin
      if d.select(get_server_timer_arg()) and d.getf("level") == 4 then
      d.notice("Zaman doldu! ")
      d.exit_all()
      end
      end
       
      when devil_stone4_update.server_timer begin
      if d.select(get_server_timer_arg()) then
      if not d.is_unique_dead("real") then
      for i = 1, 6 do
      if d.getf("fakedead" .. i) == 0 then
      if d.unique_get_hp_perc("fake" .. i) < 50 then
      d.purge_unique("fake" .. i)
      d.setf("fakedead" .. i, 1)
      d.notice("Sahte Metin taþlarý yok oldu...");
      end
      end
      end
      else
      server_timer("devil_stone4_end", 5, get_server_timer_arg())
       
      d.notice("Mükemmel bir duyma yeteneðine ve iyi bir");
      d.notice("içgüdüye sahip olduðunu kanýtlayarak");
      d.notice("gerçek Metin Taþý'ný yok ettin!");
      d.notice("Þimdi 5.kata gireceksin.")
      d.purge()
      end
      else
      server_timer('devil_stone4_stop_timer', 1, get_server_timer_arg())
      end
      end
       
      when devil_stone4_stop_timer.server_timer begin
      clear_server_timer('devil_stone4_update', get_server_timer_arg())
      end
       
      when devil_stone4_end.server_timer begin
      if d.select(get_server_timer_arg()) then
      clear_server_timer('devil_stone4_update', get_server_timer_arg())
      clear_server_timer('devil_stone4_fail1', get_server_timer_arg())
      clear_server_timer('devil_stone4_fail2', get_server_timer_arg())
      clear_server_timer('devil_stone4_fail', get_server_timer_arg())
       
      d.setf("level", 5)
      d.setf("stone_count", 5)
       
      d.jump_all(special.devil_tower[4][1], special.devil_tower[4][2])
      d.notice("5.Kattaki Mühürlü Kapý'dasýn. Bir sonraki kata ")
      d.notice("çýkmak için beþ Eski Mühür'ü açman gerek. Bu alan ")
      d.notice("sana saldýrmak için bekleyen canavarlarla dolu.")
      d.notice("Bazýlarýnýn üzerinde anahtar var. Yeteri kadar ")
      d.notice("Kilit Açma Taþý elde eder ve tüm mühürleri ")
      d.notice("açarsan 6. kata çýkabilirsin. Ama bil ki sadece ")
      d.notice("20 dakikan var!")
       
       
      server_timer('devil_stone5_fail1', 5*60, get_server_timer_arg())
      clear_server_timer('devil_stone4_update', get_server_timer_arg())
       
      d.set_regen_file("data/dungeon/deviltower5_regen.txt")
       
      d.spawn_mob(20073, 421, 452)
      d.spawn_mob(20073, 380, 460)
      d.spawn_mob(20073, 428, 414)
      d.spawn_mob(20073, 398, 392)
      d.spawn_mob(20073, 359, 426)
      d.spawn_mob(8023, 428, 427)
      d.spawn_mob(8023, 370, 401)
      d.spawn_mob(8023, 418, 404)
      d.spawn_mob(8023, 395, 463)
      d.spawn_mob(8023, 370, 451)
      end
      end
      when 8023.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      game.drop_item(50084, 1)
      end
      when devil_stone5_fail1.server_timer begin
      if d.select(get_server_timer_arg()) then
      d.notice("15 dakika kaldý ")
      server_timer('devil_stone5_fail2', 5*60, get_server_timer_arg())
      end
      end
       
      when devil_stone5_fail2.server_timer begin
      if d.select(get_server_timer_arg()) then
      d.notice("10 dakika kaldý ")
      server_timer('devil_stone5_fail3', 5*60, get_server_timer_arg())
      end
      end
       
      when devil_stone5_fail3.server_timer begin
      if d.select(get_server_timer_arg()) then
      d.notice("5 dakika kaldý ")
      server_timer('devil_stone5_fail', 5*60, get_server_timer_arg())
      end
      end
       
      when devil_stone5_fail.server_timer begin
      if d.select(get_server_timer_arg()) and d.getf("level") == 5 then
      d.notice("Zaman doldu!")
      d.exit_all()
      end
      end
       
      when kill with pc.in_dungeon() and d.getf("level") == 5 and npc.get_race() == 1062 begin
      local KILL_COUNT_FOR_DROP_KEY = 7
      local n =d.getf("count") + 1
      d.setf("count", n)
      if n == KILL_COUNT_FOR_DROP_KEY then
      game.drop_item(50084, 1)
      d.setf("count", 0)
      end
      end
       
      when kill with npc.get_race() == 8013 and d.getf("level") == 5 begin
      game.drop_item(50084, 1)
      end
       
      when devil_stone5.take with item.vnum == 50084 begin
      npc.purge()
      pc.remove_item(50084,1)
      d.setf("stone_count", d.getf("stone_count") - 1)
      if d.getf("stone_count") <= 0 then
      d.clear_regen()
      d.kill_all()
      d.notice("Mührü açtýn. 6. Kata çýkýyorsunuz!")
       
      clear_server_timer('devil_stone5_fail1', get_server_timer_arg())
      clear_server_timer('devil_stone5_fail2', get_server_timer_arg())
      clear_server_timer('devil_stone5_fail3', get_server_timer_arg())
      clear_server_timer('devil_stone5_fail', get_server_timer_arg())
       
      d.setf("level", 6)
      d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2])
      d.regen_file("data/dungeon/deviltower6_regen.txt")
       
      d.notice("Þeytan Krala ulaþmak için tüm ")
      d.notice("þeytanlarý öldür!")
       
      else
      d.notice("Mührü açtýn! "..d.getf("stone_count").." kaldý.")
      end
      end
       
      when kill with npc.get_race() == 1092 begin
      d.kill_all()
      d.check_eliminated()
      local reward_alchemist = {20074, 20075, 20076}
      d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
      d.setqf("can_refine", 1)
      end
       
       
      when 20074.chat."Üst katlar" or 20075.chat."Üst katlar" or 20076.chat."Üst katlar" with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      if d.getf("check1") == 1 then
      say("")
      say("Cok kisa bir sure once buradaydin?")
      return
      end
      if not npc.lock() then
      say("")
      say("Þu anda baþka biriyle konuþuyorum!")
      say("Biraz bekle ya da sonra tekrar gel!")
      return
      end
      say_title(mob_name(npc.get_race()))
      say("Kulenin 7. katýna girmek mi istiyorsun?")
      say("Bu katla mücadele etmek muhteþem beceriler ve")
      say("büyük bir yazgý gerektirir.")
      say("Sadece 75. seviyeye ulaþtýysan")
      say("seni oraya ýþýnlayabilirim.")
      wait()
      if pc.level >=75 then
      say_title(mob_name(npc.get_race()))
      say("Üst kata çýkmak için")
      say("yeterli deneyime ve güce sahipsin.")
      say("Girebilirsin!")
      say("")
      local gec = select("Git!","Vazgeç ","Kuleyi terket!")
      if gec == 1 then
      --local plusone = d.getf("check1") +1
      d.setf("check1", 1)
      timer("devil_jump_7",6)
      npc.unlock()
      npc.purge()
      return
      elseif gec == 2 then
      npc.unlock()
      return
      elseif gec == 3 then
      npc.unlock()
      pc.warp(590500, 110500)
      end
      else
      say_title(mob_name(npc.get_race()))
      say("Üzgünüm sadece")
      say("75. seviyeye ulaþanlarý bir")
      say("üst kata alabilirim.")
      say("")
      npc.unlock()
      wait()
      pc.warp(590500, 110500)
      return
      end
      end
       
      when devil_jump_7.timer begin
      d.clear_regen()
       
      d.spawn_mob(8018, 639, 658)
      d.spawn_mob(8018, 611, 637)
      d.spawn_mob(8018, 596, 674)
      d.spawn_mob(8018, 629, 670)
       
      d.setf("level", 7)
       
      d.jump_all(2048+590, 6656+638)
      end
       
      when kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.get_race() == 8018 begin
      local cont = d.getf("7_stone_kill") + 1
      d.setf("7_stone_kill", cont)
       
      if cont >= 4 then
      d.setf("7_stone_kill", 0)
      d.set_regen_file("data/dungeon/deviltower7_regen.txt")
      end
      end
       
      when 8019.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      local qf = d.getf("7_stone2_kill")+1
      if qf <= 150 then
      d.setf("7_stone2_kill", qf)
      game.drop_item(30300, 1)
      d.notice("Katil metnini "..(150-qf.." kere daha kesebilirsiniz;"))
      d.notice("Eðer daha fazla keserseniz, kattan dýþarý atýlacaksýnýz!")
      else
      d.exit_all()
      end
      end
       
      when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      pc.remove_item("30300", 1)
       
      local pct = number(1,8)
       
      if pct == 1 then
      game.drop_item(30302, 1)
      d.clear_regen()
      else
      game.drop_item(30301, 1)
       
      end
      end
       
      when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
       
      if d.getf( "level" ) != 7 then
      pc.remove_item( "30302", 1)
      return
      end
      if d.getf( "harita" ) != 0 then
      pc.remove_item( "30302", 1)
      return
      end
       
      say("Bu haritayla bir sonraki kata çýkabilirim!")
      pc.remove_item("30302", 1)
      d.setf("harita",1)
      timer("devil_jump_8", 6)
      d.clear_regen()
      end
       
       
      when devil_jump_8.timer begin
      d.setf("level", 8)
      local plusone = d.getf("check") +1
      d.setf("check", plusone)
      d.jump_all(2048+590, 6656+403)
      d.set_regen_file("data/dungeon/deviltower8_regen.txt")
      d.spawn_mob(20366, 640, 460)
      local _count = pc.count_item(30302)
      pc.remove_item(30302,_count)
      if d.getf("check") != 1 then
      d.notice("Bug kullanimi tespit edildi, disari gönderiliyorsun!")
      d.clear_regen()
      d.exit_all()
      end
      end
       
      when kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.get_race() == 1040 begin
      if d.getf("level") < 9 then
      local pct1 = number(1, 10)
      if pct1 == 1 then
      local pct2 = number(1, 4)
      if pct2 == 1 then
      -- ÁøÂ¥ ¿­¼è µå·Ó
      game.drop_item(30304, 1)
      else
      -- °¡Â¥ ¿­¼è µå·Ó
      game.drop_item(30303, 1)
      end
      else
      return
      end
      end
      end
       
      when 20366.take with item.vnum == 30304 begin
      if d.getf("anahtar") == 1 then return end
      npc.purge()
      pc.remove_item(30304,1)
      d.setf("anahtar",1)
      timer("devil_jump_9", 8)
      end
       
      ---------------------------------------------
      -- 9Ãþ ÁøÀÔºÎÅÍ ¿Ï·á±îÁö
      ---------------------------------------------
      when devil_jump_9.timer begin
      d.setf("level", 9)
      d.jump_all(2048+590, 6656+155)
      d.regen_file("data/dungeon/deviltower9_regen.txt")
      end
       
      when kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.get_race() == 1093 begin
      d.kill_all()
      pc.setf("deviltower_zone","9_done",1)
      notice_all("|cff00ff00"..pc.get_name().." grubu, Lusifer'ý öldürdü!")
      d.setf("azrail_dead", 1)
      timer("devil_end_jump", 30)
      d.kill_all()
      d.clear_regen()
      end
       
      when devil_end_jump.timer begin
      d.clear_regen()
      d.exit_all()
      end
       
      function register_player(vid)
      local player_count = d.getf("player_count")
      player_count = player_count + 1
      d.setf("player_count", tonumber(player_count))
      d.setf(string.format("player%d", player_count), tonumber(vid))
      end
      function unregister_player(vid)
      local player_count = d.getf("player_count")
      local found = false
      for i = 1, player_count, 1 do
      if found == true then
      d.setf(string.format("player%d", tonumber(i)), d.getf(string.format("player%d", i+1)))
      end
      p = d.getf("player"..tostring(i))
      if p == vid then
      i = i -1
      found = true
      end
      end
      if found == true then
      d.setf("player_count", tonumber(player_count - 1))
      end
      end
      function get_players()
      local players = {}
      local player_count = d.getf("player_count")
      for i = 1, player_count, 1 do
      players = d.getf("player"..tostring(i))
      end
      return players
      end
      function give_dc_access(pindex)
      local self_checked = false
      local self = pc.select(d.getf("player"..tostring(pindex)))
      --pc.setqf("dcenter", 1)
      pc.setf("deviltower_zone", "dcenter", 1)
      pc.select(self)
      end
      end
      end

    traducela y pruebala si furula bien y sino pues lo siento no se mucho de quest, yo uso esa como base porque uso el código de ese tío, pero como he dicho, tienes que testearlo y probar bien, porque como tu guía de metin2dev, pueden haber problemas con miembros que no son del grupo, que si es el líder quien lleva el timer, etc, saludos.

  6. Eso ya no se lleva, eso se hacía antaño, los files hoy en día son por txt o por sql, eso lo configuras en tu archivo CONFIG de la carpeta db de tu servefile, si usas los .txt solo tienes que traducir el item_names.txt y mob_names.txt luego haces un dump_proto para crear ambos archivos del locale cliente y tendrás lo mismo y traducido. Si usas los sql, tendrás que traducirlo a mano, porque te arriesgas a que haya items que no tengas o usen otros ID y crees conflictos, resumido es mucho trabajo, para algo que puedes hacer en 5 min vía txt.

  7. Buenas, como sabréis llevo un tiempo sin actividad, dado por varios motivos familiares, personales, etc, y bueno me he animado después de un tiempo a volver a Metin, se que la guía esta existe por todas partes, pero está mal, o faltan cosas, o explicado a medias etc, yo lo tengo adaptado con 4 Piedras, pero he hecho la guía para que podáis usar 6 piedras, con esta guía orientativa podéis usar 6 piedras, 4, 12 o las que queráis, e imagino que sirve para poner solo 1 o 2 piedras si lo hacemos a la inversa, en fin, empecemos.

    1.Vamos a nuestro source y nos dirigimos a editar el archivo "item_length.h", una vez abierto buscamos:

    Quote

    ITEM_SOCKET_MAX_NUM = 3,

    1.1 Ahora remplazamos por la cantidad de piedras que queráis (guía para 6 piedras)

    Quote

    ITEM_SOCKET_MAX_NUM = 6,

    2.Ahora Editamos el archivo "Constants.cpp", y buscamos lo siguiente:

    Quote

        3, // WEAPON_SWORD,
        3, // WEAPON_DAGGER,
        3, // WEAPON_BOW,
        3, // WEAPON_TWO_HANDED,
        3, // WEAPON_BELL,
        3, // WEAPON_FAN,
        3, // WEAPON_CLAW
        0, // WEAPON_ARROW,
        0, // WEAPON_MOUNT_SPEAR
    #ifdef ENABLE_WOLFMAN_CHARACTER
        3, // WEAPON_CLAW
    #endif

    2.1 Ahora lo remplazamos por lo siguiente:

    Quote

        6, // WEAPON_SWORD,
        6, // WEAPON_DAGGER,
        6, // WEAPON_BOW,
        6, // WEAPON_TWO_HANDED,
        6, // WEAPON_BELL,
        6, // WEAPON_FAN,
        6, // WEAPON_CLAW
        0, // WEAPON_ARROW,
        0, // WEAPON_MOUNT_SPEAR
    #ifdef ENABLE_WOLFMAN_CHARACTER
        6, // WEAPON_CLAW
    #endif

    2.2 Ahora buscamos:

    Quote

    3, // ARMOR_BODY,

    2.3 Y remplazamos por:

    Quote

    6, // ARMOR_BODY,

    #Nota: Si no tienes wolfman solo borra la línea o coméntala con //

    3.Ahora nos vamos al source DB, mas concretamente al archivo "Cache.cpp" y buscamos:

    Quote

    if (isSocket)
            {
                iLen += snprintf(szColumns + iLen, sizeof(szColumns) - iLen, ", socket0, socket1, socket2");
                iValueLen += snprintf(szValues + iValueLen, sizeof(szValues) - iValueLen,
                        ", %lu, %lu, %lu", p->alSockets[0], p->alSockets[1], p->alSockets[2]);
                iUpdateLen += snprintf(szUpdate + iUpdateLen, sizeof(szUpdate) - iUpdateLen,
                        ", socket0=%lu, socket1=%lu, socket2=%lu", p->alSockets[0], p->alSockets[1], p->alSockets[2]);
            }

    #Nota: Puede ser un poco diferente al vuestro, si no encontráis nada buscar "socket0, socket1" o "socket0 , socket1"

    3.1 Remplazamos por:

    Quote

    if (isSocket)
            {
                iLen += snprintf(szColumns + iLen, sizeof(szColumns) - iLen, ", socket0, socket1, socket2, socket3, socket4, socket5");
                iValueLen += snprintf(szValues + iValueLen, sizeof(szValues) - iValueLen,
                        ", %lu, %lu, %lu, %lu, %lu, %lu", p->alSockets[0], p->alSockets[1], p->alSockets[2], p->alSockets[3], p->alSockets[4], p->alSockets[5]);
                iUpdateLen += snprintf(szUpdate + iUpdateLen, sizeof(szUpdate) - iUpdateLen,
                        ", socket0=%lu, socket1=%lu, socket2=%lu, socket3=%lu, socket4=%lu, socket5=%lu", p->alSockets[0], p->alSockets[1], p->alSockets[2], p->alSockets[3], p->alSockets[4], p->alSockets[5]);
            }

    #Nota2: Si no queremos remplazar nada porque tenemos otro sistema, simplemente podéis añadir a continuación de "socket2" los demás, es decir socket2, socket3, socket4, socket5"); (tranquil@s no esta mal ni falta un socket6)

    4.Ahora vamos al archivo "ClientManagerPlayer.cpp" y buscamos:

    Quote

    str_to_number(item.alSockets[2], row[cur++]);

    4.1 A continuación de este, añadiremos lo siguiente:

    Quote

            str_to_number(item.alSockets[3], row[cur++]);
            str_to_number(item.alSockets[4], row[cur++]);
            str_to_number(item.alSockets[5], row[cur++]);

    4.2 Ahora buscamos x2:

    Quote

    "SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "

    #Nota: esto se realiza 2 veces, si no encontramos nada, probar a buscar "Select id" y lo veréis enseguida.

    4.3 Ahora remplazamos por:

    Quote

    "SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,socket3,socket4,socket5,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 "

    #Nota2: Como antes, si tenéis algún sistema y no queréis remplazar solo añadir "socket3,socket4,socket5" después del "socket2,"

    4.4 Buscamos el siguiente y repetimos el proceso.


    5.Ahora nos vamos al Source Cliente ->GameLib->ItemData.h y buscamos:

    Quote

    ITEM_SOCKET_MAX_NUM = 3,

    5.1 Remplazamos por:

    Quote

    Item_SOCKET_MAX_NUM = 6,


    6.Ahora vamos a UserInterface->PythonPlayerModule.cpp y buscamos la función:

    Quote

    PyObject * chatGetLinkFromHyperlink(PyObject * poSelf, PyObject * poArgs)


    6.1 Remplazamos por:

    Quote

     

    PyObject * chatGetLinkFromHyperlink(PyObject * poSelf, PyObject * poArgs)
    {
        char * szHyperlink;
        
        if (!PyTuple_GetString(poArgs, 0, &szHyperlink))
            return Py_BuildException();

        std::string stHyperlink(szHyperlink);
        std::vector<std::string> results;

        split_string(stHyperlink, ":", results, false);

        // item:vnum:flag:socket0:socket1:socket2:socket3:socket4:socket5
        if (0 == results[0].compare("item"))
        {
            if (results.size() < 9)
                return Py_BuildValue("s", "");

            CItemData * pItemData = NULL;

            if (CItemManager::Instance().GetItemDataPointer(htoi(results[1].c_str()), &pItemData))
            {
                char buf[1024] = { 0 };
                char itemlink[256];
                int len;
                bool isAttr = false;

                len = snprintf(itemlink, sizeof(itemlink), "item:%x:%x:%x:%x:%x:%x:%x:%x", 
                        htoi(results[1].c_str()),
                        htoi(results[2].c_str()),
                        htoi(results[3].c_str()),
                        htoi(results[4].c_str()),
                        htoi(results[5].c_str()),
                        htoi(results[6].c_str()),
                        htoi(results[7].c_str()),
                        htoi(results[8].c_str()));

                if (results.size() >= 11)
                {
                    for (int i = 9; i < results.size(); i += 2)
                    {
                        len += snprintf(itemlink + len, sizeof(itemlink) - len, ":%x:%d", 
                                htoi(results.c_str()),
                                atoi(results[i+1].c_str()));
                        isAttr = true;
                    }
                }

                if (isAttr)
                    //"item:¹øÈ£:Ç÷¡±×:¼ÒÄÏ0:¼ÒÄÏ1:¼ÒÄÏ2"
                    snprintf(buf, sizeof(buf), "|cffffc700|H%s|h[%s]|h|r", itemlink, pItemData->GetName());
                else
                    snprintf(buf, sizeof(buf), "|cfff1e6c0|H%s|h[%s]|h|r", itemlink, pItemData->GetName());

                return Py_BuildValue("s", buf);
            }
        }

        return Py_BuildValue("s", "");
    }

     

    7.Ahora abrimos el archivo "PythonChatModule.cpp" y buscamos:

    Quote

    PyObject * playerGetItemLink(PyObject * poSelf, PyObject * poArgs)

    7.1 Remplazamos la función por:

    Quote

     

    PyObject * playerGetItemLink(PyObject * poSelf, PyObject * poArgs)
    {
        TItemPos Cell;

        switch (PyTuple_Size(poArgs))
        {
        case 1:    
            if (!PyTuple_GetInteger(poArgs, 0, &Cell.cell))
                return Py_BuildException();
            break;
        case 2:
            if (!PyTuple_GetByte(poArgs, 0, &Cell.window_type))
                return Py_BuildException();
            if (!PyTuple_GetInteger(poArgs, 1, &Cell.cell))
                return Py_BuildException();
            break;
        default:
            return Py_BuildException();
        }
        const TItemData * pPlayerItem = CPythonPlayer::Instance().GetItemData(Cell);
        CItemData * pItemData = NULL;
        char buf[1024];

        if (pPlayerItem && CItemManager::Instance().GetItemDataPointer(pPlayerItem->vnum, &pItemData))
        {
            char itemlink[256];
            int len;
            bool isAttr = false;

            len = snprintf(itemlink, sizeof(itemlink), "item:%x:%x:%x:%x:%x:%x:%x:%x", //6 Piedras
                    pPlayerItem->vnum, pPlayerItem->flags,
                    pPlayerItem->alSockets[0], //1 Piedras
                    pPlayerItem->alSockets[1], //2 Piedras
                    pPlayerItem->alSockets[2], //3 Piedras
                    pPlayerItem->alSockets[3], //4 Piedras
                    pPlayerItem->alSockets[4], //5 Piedras
                    pPlayerItem->alSockets[5]); //6 Piedras

            for (int i = 0; i < ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++i)
                if (pPlayerItem->aAttr.bType != 0)
                {
                    len += snprintf(itemlink + len, sizeof(itemlink) - len, ":%x:%d", 
                            pPlayerItem->aAttr.bType, pPlayerItem->aAttr.sValue);
                    isAttr = true;
                }


            if( GetDefaultCodePage() == CP_ARABIC ) {
                if (isAttr)
                    //"item:¹øÈ£:Ç÷¡±×:¼ÒÄÏ0:¼ÒÄÏ1:¼ÒÄÏ2"
                    snprintf(buf, sizeof(buf), " |h|r[%s]|cffffc700|H%s|h", pItemData->GetName(), itemlink);
                else
                    snprintf(buf, sizeof(buf), " |h|r[%s]|cfff1e6c0|H%s|h", pItemData->GetName(), itemlink);
            } else {
                if (isAttr)
                    //"item:¹øÈ£:Ç÷¡±×:¼ÒÄÏ0:¼ÒÄÏ1:¼ÒÄÏ2"
                    snprintf(buf, sizeof(buf), "|cffffc700|H%s|h[%s]|h|r", itemlink, pItemData->GetName());
                else
                    snprintf(buf, sizeof(buf), "|cfff1e6c0|H%s|h[%s]|h|r", itemlink, pItemData->GetName());
            }
        }
        else
            buf[0] = '0';

        return Py_BuildValue("s", buf);
    }

     

    8.Compilamos binario/source game & db


    9.Ahora tenemos que editar nuestro dump_proto, asi que lo abrimos y editamos el archivo "dump_proto.cpp" y buscamos:

    Quote

    enum EItemMisc
    {
        ITEM_NAME_MAX_LEN            = 24,
        ITEM_VALUES_MAX_NUM            = 6,
        ITEM_SMALL_DESCR_MAX_LEN    = 256,
        ITEM_LIMIT_MAX_NUM            = 2,
        ITEM_APPLY_MAX_NUM            = 3,
        ITEM_SOCKET_MAX_NUM            = 3,
        ITEM_MAX_COUNT                = 200,
        ITEM_ATTRIBUTE_MAX_NUM        = 7,
        ITEM_ATTRIBUTE_MAX_LEVEL    = 5,
        ITEM_AWARD_WHY_MAX_LEN        = 50,

    9.1 Remplazamos por :

    Quote

    enum EItemMisc
    {
        ITEM_NAME_MAX_LEN            = 24,
        ITEM_VALUES_MAX_NUM            = 6,
        ITEM_SMALL_DESCR_MAX_LEN    = 256,
        ITEM_LIMIT_MAX_NUM            = 2,
        ITEM_APPLY_MAX_NUM            = 3,
        ITEM_SOCKET_MAX_NUM            = 6,    //6 Piedras
        ITEM_MAX_COUNT                = 200,
        ITEM_ATTRIBUTE_MAX_NUM        = 7,
        ITEM_ATTRIBUTE_MAX_LEVEL    = 5,
        ITEM_AWARD_WHY_MAX_LEN        = 50,

    10.Nos vamos a nuestro cliente, descompilamos el root y editamos el archivo "uiToolTip.py" y buscamos:

    Quote

    def SetHyperlinkItem(self, tokens):

    10.1 Remplazamos la función por:

    Quote

     

    def SetHyperlinkItem(self, tokens):
            minTokenCount = 3 + player.METIN_SOCKET_MAX_NUM
            maxTokenCount = minTokenCount + 2 * player.ATTRIBUTE_SLOT_MAX_NUM
            if tokens and len(tokens) >= minTokenCount and len(tokens) <= maxTokenCount:
                head, vnum, flag = tokens[:3]
                itemVnum = int(vnum, 16)
                metinSlot = [int(metin, 16) for metin in tokens[3:9]]

                rests = tokens[9:]
                if rests:
                    attrSlot = []

                    rests.reverse()
                    while rests:
                        key = int(rests.pop(), 16)
                        if rests:
                            val = int(rests.pop())
                            attrSlot.append((key, val))

                    attrSlot += [(0, 0)] * (player.ATTRIBUTE_SLOT_MAX_NUM - len(attrSlot))
                else:
                    attrSlot = [(0, 0)] * player.ATTRIBUTE_SLOT_MAX_NUM

                self.ClearToolTip()
                self.AddItemData(itemVnum, metinSlot, attrSlot)

                ItemToolTip.OnUpdate(self)

     

    #Nota: en caso que no podamos modificarlo por otro sistema o el motivo que sea, debemos editar esta 2 partes:

    Quote

     

                metinSlot = [int(metin, 16) for metin in tokens[3:5]]

                rests = tokens[6:]

     

    por:

    Quote

     

                metinSlot = [int(metin, 16) for metin in tokens[3:9]]

                rests = tokens[9:]

     

    #Update 1.1

    11.Vamos a nuestro Source DB y abrimos el archivo ClientManager.cpp y buscamos:

    Quote

    void CClientManager::RESULT_SAFEBOX_LOAD(CPeer * pkPeer, SQLMsg * msg)

    en esta función un poco más abajo añadimos lo siguiente (junto a las demás):

    Quote

    "socket3, socket4, socket5, socket6,"

    11.2.Ahora buscamos otra vez:

    Quote

    void CClientManager::QUERY_ITEM_SAVE(CPeer * pkPeer, const char * c_pData)

    Y un poco más abajo añadimos junto a las demás lo siguiente:

    Quote

    "socket3, socket4, socket5, socket6,"

    11.3.Un poco más abajo veremos lo siguiente:

    Quote

    "VALUES(%u, %u, %d, %d, %u, %u, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)",

    Pues lo remplazamos por lo siguiente (si no quieres remplazar solo añade %ld, %ld, %ld, %ld):

    Quote

    "VALUES(%u, %u, %d, %d, %u, %u, %ld, %ld, %ld, %ld, %ld, %ld, %ld, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)",

    11.4.Y un poco más abajo veremos:

    Quote

                p->alSockets[0],
                p->alSockets[1],
                p->alSockets[2],

    Para terminar añadimos:

    Quote

                p->alSockets[3],
                p->alSockets[4],
                p->alSockets[5],
                p->alSockets[6],

    12.Vamos a nuestro source Binario y abrimos el archivo GameType.h y buscamos:

    Quote

    ITEM_SOCKET_SLOT_MAX_NUM = 3,

    Remplazamos por:

    Quote

    ITEM_SOCKET_SLOT_MAX_NUM = 7,

    13.Una vez hayamos remplazado el nuevo Game, DB, .exe, compilado el root y compilado dump_proto, dumpeamos los locales, es decir, ponemos nuestros item_proto.txt e item_names.txt en el nuevo dump_proto y generamos los archivos para el locale, compilamos locale, hacemos reboot y a jugar.

    Imagen propia:

    03a16bcd9e22f1feab165478dffedf92.png

    Varios puntos a destacar:

    1.Tienes que adaptarlo a tu Offline Shop ya que tendrás los sockets básicos Socket0 1 y 2, tendrás que añadir más en función de los que tengas.

    2.No se cuantas piedras son el máximo que puedes añadir, 6 es seguro, pero 7,8,9,10 o + quizás te ocasionen bugs.

    3.Si tienes otros sistemas que utilizen casillas con sockets, como Offline Shop, almacén especial, etc tendrás que adaptarlo o tendrás problemas,

    4.A disfrutar y un saludo.

  8. hace 9 minutos, ReuS dijo:

    Si no estoy mal, eso no soluciona el problema del man, en los config solo editas el nivel maximo, no el nivel inicial, seguramente debe tener alguna quest activa, que hace que el pj aparezca lv 30.

    Si y no, bien como tu dices puede ser una quest, pero si una vez se han removido todas las quest y borrado sus objects, sigue presentando el problema, esa es la solución, dado que es una función añadida para poder establecer tu el nivel de inicio del servidor, esto suele estar desactivado o por defecto, nivel 1, si el usuario está usando precisamente una de las tantas versiones de MartySama modificadas, en especifico por ejemplo la v4, es porque el que edito la versión lo configuró con ese nivel de inicio, respecto a lo del nivel máximo que tu mencionas, es el : MAX_LEVEL: XX , pero tiene otro XX_LEVEL : 1, en mi caso es INICIO_LEVEL: 1 pero hay otros diferentes, aquí un ejemplo:

    DB_LOG_LEVEL : X             <--MartySama V5

    BASLANGIC_LEVEL:  X       <--MartySama V4 Modificada

    PLAYER_LEVEL_SHOUT: X  <--Arrival / Rage old / How etc

    Lo mas normal es DB_LOG_LEVEL y PLAYER_LEVEL_SHOUT , la única excepción de no tener lo que comento yo, sería utilizar unos files 34k (no se hasta que última actualización), pero los files del "SG" , no tienen dicha función, algunos datos extras, basándonos en el original son los siguientes:

    Quote

    DB_LOG_LEVEL o BASLANGIC_LEVEL o PLAYER_LEVEL_SHOUT u OTRO_NOSEQUE_LEVEL:  50   <---Significa que empezará el jugador a nivel 50
    PK_PROTECT_LEVEL: 15  <--------Nivel Mínimo para poder hacer duelo y que te empiece a afectar el align  etc.
    MAX_LEVEL: 105 <--Nivel máximo que tendrá tu servidor.

     

  9. En 5/2/2022 a las 3:53, Rodrigo Bosco dijo:

    buenas noches. alguno tiene idea de como solucionar esto. 
    al crear personaje no lo crea en lv 1 sino que en lv 30. quiero que sea lv 1 alguno tiene idea de como ayudarme con este problemita. muchas gracias

     

    Tienes que editar los configs de cada ch, CH1, CH2, CH3, CH4 y GAME99 , en los configs verás algo como: XXXX_LEVEL: 30

    las XXXX represnetan otro texto en tu config, ya que cada config es diferente, remplaza el 30 por 1 en todos los configs, y reboot.

  10. hace 11 horas, Xiaomi dijo:

    Gracias por responder. Es que es estraño le doy limpiar ala ruta source game pero siempre al copilar sale ese aviso como si uvieran dos archivos con el mismo Hombre lo estraño q limpio todo y sale de nuevo

    Quizás por como tu dices lo tienes duplicado, de todas formas, da igual simplemente ignoralo, es un warning, o bien, puedes verificar tu makefile para ocultar los warnings y otros elementos, eliminando por ejempl los -WALLS etc.

×
×
  • Crear nuevo...