Jump to content

Vanilla

Developer
  • Posts

    471
  • Joined

  • Last visited

  • Days Won

    58
  • Feedback

    0%

Everything posted by Vanilla

  1. am I finally getting cool due to this?
  2. You are missing linking to gcc's libstd, that'd be actually included in your compiler flags. That's the first issue. Either you change to g++49 for toolset (which should include the std) or you add it as compiler flags. Otherwise you cannot utilize c++11. The second isn't that important but you'd check your Depend file. I'm pretty sure that this does not match with more recent gcc versions.
  3. minilzo.h line 24 extern "C" { Now, look for the closing }. Do you see it anywhere in minilzo.h? Nope, neither do I That's the issue you have here. You edited minilzo.h and removed the closing } thus causing the build error.
  4. Nope, mariadb will just run like a mysql server. If you wanna use the libmysqlclient from mariadb for compiling you have to remove the reconnect variabe in libasyncsql on connect function call, you'll get the message once you try to compile it, it's pretty simple. Either way, it's only necessary if you're using the lib from mariadb for compiling. On live server, removing mysql and installing mariadb will just do fine. Of course Mariadb offers some different storage engines and if you wanna use them you'll have to change that on your database. If not, you can just drop it in and run it. No need to change anything.
  5. Mariadb is a drop-in replacement for MySQL. Backup your database, deinstall mysql and install mariadb instead, it'll do the magic automatically.
  6. There are two very important things on how to solve p2p shutdown commands: First: Make sure p2p ports are blocked from external access. This is VERY important and with your firewall you can block those things. Generally I'd recommend NOT posting Ip-Adresses here. But you'd check the one if it's your machine's ip or someone else. If it's someone else then your firewall isn't set up properly and someone just sent you a shutdown command via p2p port. Second: Block external p2p commands via source. You can do that quite easy. Just discard commands sent from external ip addresses. I think there are also tutorials about this, if not, just lemme know and I'll post a solution here. I recommend doing both to add the best layer of defense. Packets can be spoofed though so the best approach would be to add a special key to the packet and check if it's the valid key. If it's not, then the server will discard the p2p packet entirely. This will also render any external attempts useless since those kids won't even know you've changed your packet structure. And even if we assume they do know the new packet structure.. Then they'd have to guess the password AND spoof packets. Additionally, use PF as your firewall with antispoof.
  7. I am changing the quest so it's checking for pc.in_dungeon() first before actually calling d-functions. Tell me if it works, I'll edit it here as soon as I'm done with it. I did not check anything else on the quest but maybe this may even solve the mystery quest deviltower_zone begin state start begin function clear_deviltower_flags() d.setf("katilmetini", 0) d.setf("bug_1", 0) d.setf("IsOn", 0) d.setf("stone_count", 0) d.setf("real_time", 0) d.setf("level", 0) d.setf("Sa_Soe",0) d.setf("Zin_Sa_Gui",0) d.setf("7_stone_kill",0) d.setqf2("deviltower_zone","can_refine", 0) end function GetMissionInfo(Floor,Time) d.command(string.format("RefreshDungeonTimer %d %d",Floor,Time)) 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[i]; positions[i] = positions[j]; positions[j] = t; end end return positions end when 20348.chat."Şeytan Kulesi " begin if pc.get_level() < 40 then say_title("Kule Bekçisi :") say("") say("40 seviye altı kuleye giremez. ") return else say_title("Kule Bekçisi :") say("Şeytan kulesine girmek istiyor musun ? ") local s = select("Gir ", "Vazgeç ") if s == 1 then pc.warp(216500,727000) else return end end end --[[when 20348.chat."2.Kattan Başla (Bireysel-Grup)" begin say_title(mob_name(20348)) say("") local c = select("Grup olarak (75M)","Bireysel olarak (50M)","Vazgeç ") if c == 1 then if party.is_party() then if pc.get_gold() > 75000000 then say_title(mob_name(20348)) say("") say("2.Kata Grupla gitmek istiyorsun demek ki ") say("Lakin 75M gibi bir ücreti bulunmakta ") say("kabul ediyor musun? ") say("") local x = select("Evet", "Hayır") if x == 2 then return else pc.change_gold(-75000000) d.new_jump_party(66, 2174, 7040) d.setf("level",2) d.setf("MeleyBLOCKMAP",1) end else say_title(mob_name(20348)) say("") say("Gerekli paranız bulunmamakta! ") return end else say("Grup olmadan grup seçeneğine basamazsın! ") return end elseif c == 2 then if pc.get_gold() > 50000000 then say_title(mob_name(20348)) say("") say("2.Kata tek gitmek istiyorsun demek ki ") say("Lakin 50M gibi bir ücreti bulunmakta ") say("kabul ediyor musun? ") say("") local x = select("Evet", "Hayır") if x == 2 then return else pc.change_gold(-50000000) d.new_jump(66, 2174 * 100, 7040 * 100) d.setf("MeleyBLOCKMAP",1) d.setf("level",2) end else say_title(mob_name(20348)) say("") say("Gerekli yang karakteriniz de bulunmamakta! ") end else return end end --]] -- Dungeon --------------------------------------------------------------------- when kill with npc.get_race() == 8015 and pc.get_map_index() == 66 begin timer("devil_stone1_1", 6) end -- Floor 2 when devil_stone1_1.timer with pc.get_map_index() == 66 begin d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2]) d.setf("level",2) d.setf("MeleyBLOCKMAP",1) end when login with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() <= 670000 begin cmdchat(string.format("RefreshDungeonTimer %d %d",d.getf("level"),d.getf("real_time")-get_global_time())) if d.getf("bug_1") == 0 then if d.getf("level") == 2 then d.regen_file("data/dungeon/deviltower/deviltower2_regen.txt") d.clear_regen() d.mission_notice(d.get_map_index(),"Bütün canavarları alt edin. ") d.setf("level",2) deviltower_zone.GetMissionInfo(2,15*60) d.setf("real_time",get_global_time()+15*60) server_timer('deviltower_fail', 15*60, d.get_map_index()) d.setf("bug_1",1) d.setf("IsOn",1) d.setf("MeleyBLOCKMAP",1) server_loop_timer("devil_one_two_floor",5,d.get_map_index()) end end if d.getf("MeleyBLOCKMAP") == 0 then pc.warp(590500, 110500) return end local level = d.getf("level") if level == 2 then d.jump_all(special.devil_tower[1][1],special.devil_tower[1][2]) elseif level == 3 then d.jump_all(special.devil_tower[2][1],special.devil_tower[2][2]) elseif level == 4 then d.jump_all(special.devil_tower[3][1],special.devil_tower[3][2]) elseif level == 5 then d.jump_all(special.devil_tower[4][1],special.devil_tower[4][2]) elseif level == 6 then d.jump_all(special.devil_tower[5][1],special.devil_tower[5][2]) elseif level == 7 then d.jump_all(2048+590, 6656+638) elseif level == 8 then d.jump_all(2048+590, 6656+403) elseif level == 9 then d.jump_all(2048+590, 6656+155) end end when devil_one_two_floor.server_timer begin if d.select(get_server_timer_arg()) then if d.count_monster() < 1 then if d.getf("level") == 2 and d.getf("IsOn") == 1 then server_timer('Devil_3', 10, d.get_map_index()) deviltower_zone.GetMissionInfo(2,10) d.mission_notice(d.get_map_index(),"Görev başarılı. Bir sonraki görev veriliyor... ") d.setf("real_time",get_global_time()+10) d.setf("IsOn",0) clear_server_timer('deviltower_fail', get_server_timer_arg()) elseif d.getf("level") == 3 and d.getf("IsOn") == 1 then server_timer('Devil_4', 10, d.get_map_index()) deviltower_zone.GetMissionInfo(3,10) d.mission_notice(d.get_map_index(),"Görev başarılı. Bir sonraki görev veriliyor... ") d.setf("real_time",get_global_time()+10) d.setf("IsOn",0) clear_server_timer('deviltower_fail', get_server_timer_arg()) end end end end when Devil_3.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 2 then d.jump_all(special.devil_tower[2][1], special.devil_tower[2][2]) d.setf("level",3) d.setf("IsOn",1) d.regen_file("data/dungeon/deviltower/deviltower3_regen.txt") d.clear_regen() -- clear d.mission_notice(d.get_map_index(),"Bütün canavarları alt edin. ") deviltower_zone.GetMissionInfo(3,15*60) d.setf("real_time",get_global_time()+15*60) server_timer('deviltower_fail', 15*60, d.get_map_index()) end end end when Devil_4.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 3 then clear_server_timer('Devil_3', get_server_timer_arg()) d.jump_all(special.devil_tower[3][1], special.devil_tower[3][2]) d.setf("level",4) d.setf("IsOn",1) d.regen_file("data/dungeon/deviltower/deviltower4_regen.txt") d.clear_regen() -- clear d.mission_notice(d.get_map_index(),"Metin taşını alt et. ") deviltower_zone.GetMissionInfo(4,15*60) d.setf("real_time",get_global_time()+15*60) server_timer('deviltower_fail', 15*60, d.get_map_index()) end end end when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin deviltower_zone.GetMissionInfo(4,10) d.setf("real_time",get_global_time()+10) d.mission_notice(d.get_map_index(),"Görev başarılı. Bir sonraki görev veriliyor... ") server_timer('Devil_4_1', 10, d.get_map_index()) clear_server_timer('devil_one_two_floor', d.get_map_index()) clear_server_timer('deviltower_fail', d.get_map_index()) end when Devil_4_1.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 4 then clear_server_timer('Devil_4', get_server_timer_arg()) clear_server_timer('deviltower_fail', get_server_timer_arg()) local positions = deviltower_zone.get_4floor_stone_pos() for i = 1, 6 do d.set_unique("fake" .. i , d.spawn_mob(8017, positions[i][1], positions[i][2])) end local vid = d.spawn_mob(8017, positions[7][1], positions[7][2]) d.set_unique("real", vid) server_timer('deviltower_fail', 20*60, d.get_map_index()) d.mission_notice(d.get_map_index(),"Gerçek metin taşını bulun. ") deviltower_zone.GetMissionInfo(4,20*60) d.setf("real_time",get_global_time()+20*60) end end end when deviltower_fail.server_timer begin if d.select(get_server_timer_arg()) then d.global_warp_all_to_base(5905*100, 1105*100,get_server_timer_arg(),60) d.setf("MeleyBLOCKMAP",0) end end when Devil_5.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 4 then clear_server_timer('Devil_4_1', get_server_timer_arg()) clear_server_timer('deviltower_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.set_regen_file("data/dungeon/deviltower/deviltower5_regen.txt") -- Sabit Metin d.mission_notice(d.get_map_index(),"Kilit açma taşlarını mühürlere sürükleyin. Kalan Mühür (5)") server_timer('deviltower_fail', 20*60, get_server_timer_arg()) deviltower_zone.GetMissionInfo(5,20*60) d.setf("real_time",get_global_time()+20*60) 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) end end end when Devil_6.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 5 then clear_server_timer('Devil_5', get_server_timer_arg()) d.setf("level", 6) d.regen_file("data/dungeon/deviltower/deviltower6_regen.txt") d.clear_regen() d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2]) server_timer('deviltower_fail', 15*60, get_server_timer_arg()) deviltower_zone.GetMissionInfo(6,15*60) d.setf("real_time",get_global_time()+15*60) d.mission_notice(d.get_map_index(),"Kibirli Şeytan Kralı'nı alt edin.") end end end when Devil_7.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 6 then clear_server_timer('Devil_7', get_server_timer_arg()) clear_server_timer('deviltower_fail', get_server_timer_arg()) 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.mission_notice(d.get_map_index(),"Bütün metin taşlarını alt edin.(0/4) ") deviltower_zone.GetMissionInfo(7,0) d.setf("real_time",get_global_time()+0) d.jump_all(2048+590, 6656+638) end end end when Devil_8.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 7 then clear_server_timer('Devil_7', get_server_timer_arg()) d.setf("level", 8) d.jump_all(2048+590, 6656+403) d.set_regen_file("data/dungeon/deviltower/deviltower8_regen.txt") d.mission_notice(d.get_map_index(),"Zin Sa Gui anahtarını ele geçirip, anıt üzerine sürükleyin. ") deviltower_zone.GetMissionInfo(8,0) d.setf("real_time",get_global_time()+0) d.spawn_mob(20366, 640, 460) end end end when Devil_9.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 8 then clear_server_timer('Devil_8', get_server_timer_arg()) d.setf("level", 9) d.jump_all(2048+590, 6656+155) d.regen_file("data/dungeon/deviltower/deviltower9_regen.txt") d.clear_regen() deviltower_zone.GetMissionInfo(9,0) d.setf("real_time",get_global_time()+0) d.mission_notice(d.get_map_index(),"Lusifer alt edin. ") end end end when 8017.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 4 then return end if d.is_unique_dead("real") then d.notice("Doğru metin bulundu. ") d.mission_notice(d.get_map_index(),"Görev tamamlandı bir sonraki görev veriliyor.. ") d.new_kill_all() d.clear_regen() -- for stone server_timer('Devil_5', 10, d.get_map_index()) deviltower_zone.GetMissionInfo(4,10) d.setf("real_time",get_global_time()+10) else d.notice("Yanlış metin taşı yok oldu. ") end end when 8040.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 5 then return end game.drop_item(50084, 1) end when devil_stone5.take with pc.in_dungeon() and item.get_vnum() == 50084 and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 5 then return end npc.purge() item.remove() d.setf("stone_count", d.getf("stone_count")-1) d.mission_notice(d.get_map_index(),"Kilit açma taşlarını mühürlere sürükleyin. Kalan mühür ("..d.getf("stone_count")..") ") if d.getf("stone_count") <= 0 then clear_server_timer('deviltower_fail', pc.get_map_index()) d.dungeon_remove_all(50084) deviltower_zone.GetMissionInfo(5,10) d.mission_notice(d.get_map_index(),"Görev tamamlandı bir sonraki görev veriliyor.. ") server_timer("Devil_6", 10,d.get_map_index()) d.setf("real_time",get_global_time()+10) end end -- KIBIRLI SEYTAN KRAL when devil_stone6.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 6 then return end d.kill_all() d.clear_regen() d.mission_notice(d.get_map_index(),"Demirci'den bir üst kata ışınlanın. ") d.check_eliminated() local reward_alchemist = {20074, 20075, 20076} d.spawn_mob(reward_alchemist[number(1,3)], 425, 216); d.setqf2("deviltower_zone","can_refine", 1) -- dungeon all user clear_server_timer('deviltower_fail', pc.get_map_index()) end -- KIBIRLI SEYTAN KRAL -- KULE DEMIRCI when 20074.chat.gameforge.deviltower_zone._170_npcChat or 20076.chat.gameforge.deviltower_zone._170_npcChat or 20075.chat.gameforge.deviltower_zone._170_npcChat with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.lock() begin if d.getf("level") != 6 then clear() return end if pc.level >=60 then say_title(mob_name(20074)) say(gameforge.deviltower_zone._190_say) wait() say_title(mob_name(20074)) say(gameforge.deviltower_zone._200_say) local s= select(gameforge.deviltower_zone._210_select, gameforge.locale.cancel, gameforge.deviltower_zone._220_select) if s==3 then pc.warp(590500, 110900) return elseif s==2 then return else server_timer("Devil_7", 10,d.get_map_index()) npc.unlock() d.new_kill_all() d.clear_regen() -- For Regen files deviltower_zone.GetMissionInfo(5,10) d.setf("real_time",get_global_time()+10) return end else say_title(mob_name(20074)) say(gameforge.deviltower_zone._230_say) return end end -- KULE DEMIRCI -- OLUM METNI when 8018.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 7 then return end local stone = d.getf("7_stone_kill")+1 d.setf("7_stone_kill", stone) d.mission_notice(d.get_map_index(),"Bütün metin taşlarını alt edin.("..d.getf("7_stone_kill").."/4) ") if stone >= 4 then d.setf("7_stone_kill",0) d.set_regen_file("data/dungeon/deviltower/deviltower7_regen.txt") -- just stone d.mission_notice(d.get_map_index(),"Metin taşını kesip tabelayı ele geçirin. Metin hakkı(200) ") d.setf("katilmetini",200) end end -- OLUM METNI -- KATIL METINI when 8019.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 7 then return end d.setf("katilmetini", d.getf("katilmetini")-1) d.mission_notice(d.get_map_index(),"Metin taşını kesip anahtarını ele geçirin. Metin hakkı ("..d.getf("katilmetini")..") ") local pct = number(1,10) if pct == 1 then game.drop_item(30302, 1) end if d.getf("katilmetini") < 1 then d.mission_notice(d.get_map_index(),"Metin hakkınız bitti. Yukarı gönderiliyorsunuz. ") d.setf("katilmetini", 0) d.clear_regen() server_timer("Devil_8", 10,d.get_map_index()) deviltower_zone.GetMissionInfo(7,10) d.setf("real_time",get_global_time()+10) end end -- KATIL METINI -- KATIL METINI ITEMI 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 return end if d.getf("Zin_Sa_Gui") == 0 then d.new_kill_all() d.clear_regen() pc.remove_item(30302, 1) server_timer("Devil_8", 10,d.get_map_index()) d.mission_notice(d.get_map_index(),"Görev başarılı bir sonraki göreve gönderiliyorsunuz. ") d.setf("Zin_Sa_Gui",1) deviltower_zone.GetMissionInfo(7,10) d.setf("real_time",get_global_time()+10) d.dungeon_remove_all(30302) -- Sau Gui Tabelası else d.notice("Bug bildirildi yetkili kişilere! ") return end end -- KATIL METINI ITEMI -- ZING BONG IN when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin if d.getf("level") != 8 then return end local lucky = number(1, 20) if lucky == 1 then game.drop_item(30304, 1) end end -- ZING BONG IN -- 8 KAT ANIT when 20366.take with item.get_vnum() == 30304 and pc.in_dungeon() begin if d.getf("level") != 8 then return end if d.getf("Sa_Soe") == 0 then item.remove() d.new_kill_all() d.clear_regen() d.setf("Sa_Soe",1) server_timer("Devil_9", 10,d.get_map_index()) deviltower_zone.GetMissionInfo(8,10) d.setf("real_time",get_global_time()+10) d.mission_notice(d.get_map_index(),"Görev başarılı bir sonraki göreve gönderiliyorsunuz. ") d.dungeon_remove_all(30304) -- Zin Bong In Anahtar else d.notice("Bug bildirildi yetkili kişilere! ") return end end -- 8 KAT ANIT -- AZRAIL KESME when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() <= 670000 begin if d.getf("level") != 9 then return end local x = pc.get_map_index() clear_server_timer('Devil_9', pc.get_map_index()) d.global_warp_all_to_base(5905*100, 1105*100,pc.get_map_index(),60) deviltower_zone.clear_deviltower_flags() deviltower_zone.GetMissionInfo(9,60) d.setf("real_time",get_global_time()+1*60) d.setf("WeKillAzo",1) d.setf("MeleyBLOCKMAP",0) d.mission_notice(d.get_map_index(),"Görev başarılı. Dışarı gönderiliyorsunuz. ") end -- AZRAIL KESME when 20348.chat."Zindana geri dön... " with pc.getf("deviltower_zone","map") >= 1 begin local c = pc.getf("deviltower_zone","map") local z = pc.getf("deviltower_zone","channel") local dwLevel = d.getf_from_map_index("level",c) if z == pc.get_channel_id() then if d.select(c) then if get_global_time() > pc.getf("deviltower_zone","time") then say("Geri dönme hakkını kaybettin. ") pc.setf("deviltower_zone","map",0) pc.setf("deviltower_zone","time",0) pc.setf("deviltower_zone","channel",0) return end if dwLevel == 2 then pc.warp(special.devil_tower[1][1]*100,special.devil_tower[1][2]*100, c) elseif dwLevel == 2 then pc.warp(special.devil_tower[2][1]*100,special.devil_tower[2][2]*100, c) elseif dwLevel == 3 then pc.warp(special.devil_tower[3][1]*100,special.devil_tower[3][2]*100, c) elseif dwLevel == 4 then pc.warp(special.devil_tower[4][1]*100,special.devil_tower[4][2]*100, c) else pc.warp(special.devil_tower[5][1]*100,special.devil_tower[5][2]*100, c) end else say("Zindan patronu kesildi! ") pc.setf("devilcatacomb_zone","map",0) pc.setf("devilcatacomb_zone","time",0) pc.setf("devilcatacomb_zone","channel",0) end else say("Zindanınız bu kanalda görünmüyor! ") say(string.format("Zindanı açtığınız kanal: %d ",z)) return end end when logout with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() <= 670000 begin if d.select(pc.get_map_index()) then if d.getf("MeleyBLOCKMAP") == 1 then pc.setf("deviltower_zone","map",d.get_map_index()) pc.setf("deviltower_zone","time",get_global_time()+5*60) pc.setf("deviltower_zone","channel",pc.get_channel_id()) else pc.setf("deviltower_zone","map",0) pc.setf("deviltower_zone","time",0) pc.setf("deviltower_zone","channel",0) end end end end end
  8. The whole quest is kinda.. ugh... I mean.. Really. I would not recommend using ANY dungeon functions if you are NOT sure that the player actually IS in a dungeon. Could be the culprit since your kill trigger causes the crash and there are many kill triggers that actually check for dungeon flags even before there's a check if the player is in a dungeon. Dunno if the map_index check overwrites that but I wouldn't count on it. Other than that server timers might still trigger even when the dungeon is already solved and destroyed. That might also be an issue, lemme check the quest a bit in detail, I only looked roughly over it. But I'm 99% sure it's the kill trigger that's causing it, at least the gdb clearly shows this and not a server_timer. It's definitely a quest error and you'd actually ask this person since you paid for it. If he's too fine to fix it, he shouldn't have sold it. But what am I talking about? We're here in metin2 where almost anyone can sell any stuff as long as people are willing to pay for it, no matter the quality..
  9. It looks like the OnKill trigger caused this issue. Did you change something there? Also the debug is incomplete, there are many variables optimized out, can you maybe try to build with higher debug flags so we can see more info? It'd be interesting to see if your quest is triggering the issue and what exactly is happening there. For now all I can say is that the OnKill event for the metinstone triggers HandleEvent (which is obvious) and then ExecuteQuestScript but no values are shown there due to optimization. But this one calls for RunState which which is also optimized out. Can you show me what's in questlua.cpp lien 1020? Or better yet show the whole function?
  10. Can you provide a bit more insight on the crash? A full gdb backtrace would be nice. Otherwise we can't do much except for guesses.
  11. The sound for riding is packed in Sound pack (npc/horse). Obviously, you need sounds for your mounts! They have to be packed too and afaik people did not include mount sounds when they released the models. You shouldn't use the sound from horses for mounts too, since.. Yeah, hooves sound way different than your mount should.
  12. yeah, my bad. You'd correct the value in inputbox. self.inputValue.SetText(str(money)) It'd look like this: def __OnValueUpdate(self): ui.EditLine.OnIMEUpdate(self.inputValue) text = self.inputValue.GetText() money = 0 if text and text.isdigit(): try: money = int(text) except ValueError: money = 199999999 if money >= 199999999: money = 199999999 self.inputValue.SetText(str(money)) self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))
  13. Be careful and check if you have any quests active that may be triggered. Some people came to the not-so-bright idea to add drops with quests via onkill. You'd test and remove all quests. See if the drop continues then. If it's gone - check your quests for the drop line and remove it.
  14. the answer is in __OnValueUpdate function. Just add a check for the money variable. If it's higher than GOLD_MAX then set it to GOLD_MAX. In your case you've hardcoded the limit to 199999999. This should do the trick. But note, it's untested: def __OnValueUpdate(self): ui.EditLine.OnIMEUpdate(self.inputValue) text = self.inputValue.GetText() money = 0 if text and text.isdigit(): try: money = int(text) except ValueError: money = 199999999 if money >= 199999999: money = 199999999 self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))
  15. If you wanna run a query each Saturday at a specific time I'd highly suggest you're using an Event Scheduler depending on what Query you wanna run. [Hidden Content] This allows you to time reoccuring queries and manage them directly via mysql instead of running php.
  16. I highly recommend switching to utf-8 for client encoding. Either way the problem you encounter here is mismatching encoding. The client expects a different encoding and therefore cannot display the character properly. There are also bulk tools that allow you to change the encoding of multiple files. For UTF8 there's for example UTFCast Express which is free.
  17. you can backtrace the function calls in Visual Studio. Do this and you'll see what exactly causes the crash to happen. The reason is: Alloc() should NOT be used with a capacity of 0. Why, you may ask? That can be explained by two reasons: First, Alloc() is there to allocate some memory if there's not enough memory left in m_freeVector (which allocates 64*1024 bytes as stated above in the file). So, naturally you'd think about this: HOW MUCH memory needs to be allocated? And here you got your answer to the question above. Your function gets a call with capacity == 0. This means that 0 memory is needed and 0 bytes of memory should be allocated. Does that make any sense? Nope! We have an abnormal situation here and the program needs to be terminated since something went seriously wrong. Needless to say, removing that alloc line will NOT fix your problem. So, how could this happen? Since we're talking about lzo maybe one of your packs has 0 size or is otherwise corrupt? I'd advise you to backtrace the function calls so you may find out what operation exactly triggers Alloc(0) and therefore causes the crash. This should solve your problem then.
  18. It's guild_war.cpp CGuild::CanStartWar if (test_server || quest::CQuestManager::instance().GetEventFlag("guild_war_test") != 0) return GetLadderPoint() > 0; You can remove it so there's no LadderPoint requirement anymore.
  19. For everyone who used this "well-coded" system and paid for it: Here's the proper fix with explanation. in char.cpp look for: CHARACTER::EncodeInsertPacket The tutorial told you to add the following lines which is kinda uhm... problematic, to say the least: #ifdef ENABLE_HIDE_COSTUME_SYSTEM SetHideCostumeUpdate(); #endif Now if you may have a look at the conditions needed for this to trigger... (just look a few lines above and you'll see it and hopefully start to get what I'm trying to say): if (IsPC() == true || m_bCharType == CHAR_TYPE_NPC) So, even if we're dealing with an NPC... This function will trigger SetHideCostumeUpdate(). And guess what this call does? You guessed right: It calls for CHARACTER::GetQuestFlag And now here we have it: Since we're dealing with an NPC this function is unable to fetch the current quest player (ofcourse it can't because.. It's a npc). What does it to instead? Yep, it returns a nullpointer, thus rendering the call to quest::PC::GetFlag destructive. How to fix it? You can just make sure that this function does not get triggered when dealing with an npc: #ifdef ENABLE_HIDE_COSTUME_SYSTEM if(m_bCharType != CHAR_TYPE_NPC) { SetHideCostumeUpdate(); } #endif That should fix the crash. You can also add the check like mentioned above but as I said, the root cause of this is a misuse of GetQuestFlag which is called by SetHideCostumeUpdate(). You can also make the check inside the SethideCostumeUpdate() to make sure you're not dealing with an NPC there. It doesn't matter where exactly you're doing it as long as you're doing it before you try to fetch the quest character and end up killing your server.
  20. as you can see in your gdb log your core crashes at quest::PC::GetFlag (this=0x0, name=...) at questpc.cpp:94 Without knowing what exactly happens at line 94 it's not possible to determine what exactly crashes the core. I have a theory though. Since this=0x0 indicates it I think your call to GetFlag is invalid and thus creating this error. You'd check char.cpp CHARACTER::GetQuestFlag I think return pPC->GetFlag(flag); causes this issue because pPC seems to be a nullpointer. You'd first check if pPC even exists via if(pPc) before you call GetFlag on it. Try it and tell us if this works. Otherwise we cannot gamble what exact line is triggering your problem. Oh and don't install shitty systems. The above "solution" may only mask your problem.
  21. #2 quest::PC::GetFlag (this=0x0, name=...) at questpc.cpp:94 it = <optimized out> Can you show us what's written there in questpc.cpp?
  22. No need to pay for a simple remove request ? You can just check the interface from original metin2 and compare it to yours. If you need any help just message me and I'll gladly assist you without charging ya
  23. yeah, your issue is the following: You upgraded to c++11 or higher, right? There's a huge difference in deletion via iterator. In old c++ the iterator has to be increased manually after deleting the entry from map. Since c++11 this does not happen anymore. It'll automatically advance the iterator to the next element. But! Your code is still increasing the iter even if it already deleted an entry. You can figure out that his behaviour causes a lot of trouble. You may want to change it to this: void CQuestManager::CancelServerTimers(DWORD arg) { for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/) { if (it->first.second != arg) { ++it; } else { auto event = it->second; event_cancel(&event); it = m_mapServerTimer.erase(it); } } } What does this code do? It changes your loop to not increase the iterator by itself anymore. Instead it advances every time when it->first.second != arg. If it is indeed the timer you want to clear it'll instead just call erase on the map which will automatically advance the iterator for you. In your old loop the iterator would be advanced twice because you're increasing it in your loop too AND with calling erase(). Above code from Sonitex should also fix this issue! To give another way of Sonitex's solution you can also do this: void CQuestManager::CancelServerTimers(DWORD arg) { uint32_t x = 0; for (const auto& kv : m_mapServerTimer) { if (kv.first.second == arg) { LPEVENT event = kv.second; event_cancel(&event); m_mapServerTimer.erase(m_mapServerTimer.begin() + x); } x++; } } It works without storing a vector and instead uses x as an index variable that increases with each "iteration". Note that I also added const to prevent useless copy instructions. All 3 solutions should fix your problem, pick what you think suits best
  24. Which line of this is 1733 on questmanager.cpp? Because it seems like it got a bit cut during copying. Also I've seen some big differences between the clear server timers function.
  25. can you upload dungeon.cpp and questmanager.cpp? Especially the functions that are quoted here so we can see what happens and what triggers the core crash.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.