Lucrăm la îmbunătățirea site-ului! Este posibil ca unele module să nu funcționeze corect!
2 mesaje

Autor subiect

  • Mesaje: 3
  • Reacții: 0
  • Mesaje utile: 1
  • Status: Pierd vremea ^.^
  • Regat: Shinsoo
  • Discord: [Vezi ID]
  • Contact:

    Medalii

    Avatar utilizator

    Autor subiect

    *Problemă/Întrebare:Salut , am schimbat questul la Dt , functioneaza perfect , dar cand ajungi la bossul final nu are dorp. Codul e 1093 , daca chem cu comanda are drop. Pe contul de GM ai drop si apare. Dar cu contul de player nu. Am verificat si in regen , e codul pus ok. Las aici questul poate am scris eu ceva gresit in el.

    *Resursă folosită (sistem/funcție/modificare):

    *Syserr:

    *Fișier(e) cu problema (link pastebin / code):
    Code:
    quest demonTower_zone begin
    	state start begin
    		when login with (DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER)) begin
    			local data = DungeonInformationLibrary.ReturnDungeonInformation(DUNGEON_INFO_DEMON_TOWER);
    			local outsideData = data["teleportData"]["outsideDungeon"];
    			
    			d.set_warp_location(outsideData["insideMapIndex"], outsideData["enterPositions"]["x"], outsideData["enterPositions"]["y"]);
    			dungeonFunctions.setWaitTime(DungeonInformationLibrary.ReturnDungeonInformation(DUNGEON_INFO_DEMON_TOWER));
    			
    			if (d.getf("isInitializedTimer") == 0) then
    				timer("demonDungeonInit", 3);
    			end
    		end
    		
    		when demonDungeonInit.timer begin
    			local data = DungeonInformationLibrary.ReturnDungeonInformation(DUNGEON_INFO_DEMON_TOWER);
    			if (party.is_party() and party.is_leader() or not party.is_party() and d.getf("dungeonTime") < 1) then
    				if (d.getf("isInitializedTimer") < 1) then
    					local timeData = data["timeData"]["timeToCompleteData"];
    					if (timeData["isRequire"]) then
    						clear_server_timer("demonTower_time_out", d.get_map_index());
    						server_timer("demonTower_time_out", timeData["timeToComplete"], d.get_map_index());
    					end
    					
    					d.spawn_mob(8010, 122, 455);
    					loop_timer("firstDemonRegen", 5);
    					
    					d.setf("isInitializedTimer", 1);
    					d.setf("dungeonTime", get_time());
    					
    					d.notice("Distruge metinu pentru a continua.")
    				end
    			end
    		end
    		
    		when logout with (DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER)) begin
    			for index = 1, pc.count_item(30304), 1 do
    				pc.remove_item(30304, 1);
    			end
    			
    			for index = 1, pc.count_item(30302), 1 do
    				pc.remove_item(30302, 1);
    			end
    		end
    		
    		when teleportDemonTimer.timer begin
    			local demonStage = d.getf("demonStageCount");
    			if (demonStage == 1) then
    				ClearDungeon(true);
    				d.jump_all(2243, 7037);
    				
    				d.regen_file(string.format("%s/quest/dungeon/devil_tower/deviltower2_regen.txt", get_locale_base_path()));
    				d.spawn_mob(1091, 122, 455);
    				
    				loop_timer("secDemonRegen", 5);
    				d.notice(string.format("[Turnul Demonilor]: Omoara toti monstrii si %s pentru a continua.", mob_name(1091)))
    				return;
    			end
    			
    			if (demonStage == 2) then
    				d.jump_all(2243, 7037);
    				
    				local metinPosition = {{211, 420}, {198, 458}, {163, 466}, {135, 459}, {115, 422}, {125, 389}, {163, 371}, {196, 388}};
    				for index in metinPosition do
    					d.spawn_mob(8017, metinPosition[index][1], metinPosition[index][2]);
    				end
    				
    				loop_timer("thirdDemonRegen", 5);
    				d.notice("[Turnul Demonilor]: Distruge toate metinele pentru a continua.")
    				return;
    			end
    			
    			if (demonStage == 3) then
    				d.jump_all(2243, 7037);
    				
    				local sealPos = {{211, 396}, {207, 451}, {159, 472}, {116, 427}, {161, 369}};
    				for index in sealPos do
    					d.spawn_mob(20073, sealPos[index][1], sealPos[index][2]);
    				end
    				
    				d.set_regen_file(string.format("%s/quest/dungeon/devil_tower/deviltower2_regen.txt", get_locale_base_path()));
    				d.setf("canDropKeys", 1);
    				
    				d.notice("[Turnul Demonilor]: Omoara monstrii iar acestia iti vor dropa chei,")
    				d.notice("[Turnul Demonilor]: foloseste cheia pentru a deschide fiecare sigiliu.")
    				return;
    			end
    			
    			if (demonStage == 4) then
    				ClearDungeon(true);
    				d.jump_all(2243, 7037);
    				
    				d.spawn_mob(1092, 122, 455);
    				loop_timer("forthDemonRegen", 5);
    				
    				d.notice("[Turnul Demonilor]: Omoara seful pentru a continua.")
    				return;
    			end
    			
    			if (demonStage == 5) then
    				local blackSmithVnums = {20074, 20075, 20076};
    				local randomIndex = number(1, table.getn(blackSmithVnums));
    				d.spawn_mob(blackSmithVnums[randomIndex], 122, 455);
    				d.setf("canTalkWithBlack", 1);
    				
    				d.notice("[Turnul Demonilor]: Pentru a continua, trebuie sa vorbesti cu fierarul.")
    				return;
    			end
    			
    			if (demonStage == 6) then
    				ClearDungeon(true);
    				d.jump_all(2243, 7037);
    				
    				local metinPos = {{129, 420}, {166, 394}, {197, 427}, {154, 457}};
    				for index in metinPos do
    					d.spawn_mob(8018, metinPos[index][1], metinPos[index][2]);
    				end
    				
    				loop_timer("fifthDemonRegen", 5);
    				
    				d.notice("[Turnul Demonilor]: Pentru a continua, trebuie sa distrugi metinele.")
    				return;
    			end
    			
    			if (demonStage == 7) then
    				d.set_regen_file(string.format("%s/quest/dungeon/devil_tower/deviltower3_regen.txt", get_locale_base_path()));
    				d.setf("canDropMaps", 1);
    				
    				d.notice("[Turnul Demonilor]: Pentru a continua, trebuie sa gasesti mapa corecta.")
    				return;
    			end
    			
    			if (demonStage == 8) then
    				d.jump_all(2243, 7037);
    				d.spawn_mob(20366, 122, 455);
    				
    				d.set_regen_file(string.format("%s/quest/dungeon/devil_tower/deviltower2_regen.txt", get_locale_base_path()));
    				d.setf("canDropSeals", 1);
    				
    				d.notice("[Turnul Demonilor]: Pentru a continua, trebuie sa gasesti sigiliul corect.")
    				return;
    			end
    			
    			if (demonStage == 9) then
    				d.jump_all(2243, 7037);
    				d.spawn_mob(1093, 122, 455);
    				d.notice("[Turnul Demonilor]: Omoara seful final pentru a continua.")
    				return;
    			end
    		end
    		
    		when firstDemonRegen.timer begin
    			if (d.count_monster() < 1) then
    				cleartimer("firstDemonRegen");
    				
    				d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    				timer("teleportDemonTimer", 5);
    				
    				d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    			else
    				d.notice(string.format("[Turnul Demonilor]: Mai sunt %d metine ramase.", d.count_monster()))
    			end
    		end
    		
    		when secDemonRegen.timer begin
    			if (d.count_monster() < 1) then
    				cleartimer("secDemonRegen");
    				
    				d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    				timer("teleportDemonTimer", 5);
    				
    				d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    			else
    				d.notice(string.format("[Turnul Demonilor]: Mai sunt %d monstrii ramasi.", d.count_monster()))
    			end
    		end
    		
    		when thirdDemonRegen.timer begin
    			if (d.count_monster() < 1) then
    				cleartimer("thirdDemonRegen");
    				
    				d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    				timer("teleportDemonTimer", 5);
    				
    				d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    			else
    				d.notice(string.format("[Turnul Demonilor]: Mai sunt %d metine ramase.", d.count_monster()))
    			end
    		end
    		
    		when forthDemonRegen.timer begin
    			if (d.count_monster() < 1) then
    				cleartimer("forthDemonRegen");
    				
    				d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    				timer("teleportDemonTimer", 5);
    				
    				d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    			else
    				d.notice(string.format("[Turnul Demonilor]: Mai sunt %d monstrii ramasi.", d.count_monster()))
    			end
    		end
    		
    		when 20073.take with (DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER) and item.get_vnum() == 50084 and d.getf("canDropKeys") > 0) begin
    			item.remove();
    			npc.purge();
    			
    			d.setf("sealCount", d.getf("sealCount") + 1);
    			if (d.getf("sealCount") > 4) then
    				ClearDungeon(true);
    				d.setf("canDropKeys", 0);
    				
    				d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    				timer("teleportDemonTimer", 5);
    				
    				d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    			else
    				d.notice(string.format("[Turnul Demonilor]: Mai sunt %d sigilii de deschis.", (5 - d.getf("sealCount"))));
    			end
    		end
    		
    		when 20074.chat."Etajele Superioare" or 20075.chat."Etajele Superioare" or 20076.chat."Etajele Superioare" with (DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER) and d.getf("canTalkWithBlack") > 0) begin
    			local playerLevel = pc.get_level()
    			
    			say_title(string.format("%s:[ENTER]", c_mob_name(npc.get_race())))
    			say("Ai gasit calea de a ajunge la etajul 7.[ENTER]Este nevoie de o multime de abilitati si maiestrie pentru a merge acolo.[ENTER]Hmmmm...[ENTER]Dupa ce v-am examinat statusul pentru a urca la etajul urmator.....")
    			wait();
    			
    			say_title(string.format("%s:[ENTER]", c_mob_name(npc.get_race())))
    			if (pc.get_level() < 40) then
    				say(string.format("Nivelul minim pentru a trece mai departe este %d.", 75))
    				return;
    			end
    			
    			say("Ai ales sa mergi mai departe, noi probleme te vor astepta!")
    			wait();
    			if (d.getf("canTalkWithBlack") < 1) then
    				return;
    			end
    			
    			d.setf("canTalkWithBlack", 0);
    			
    			d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    			timer("teleportDemonTimer", 5);
    			
    			d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    		end
    		
    		when fifthDemonRegen.timer begin
    			if (d.count_monster() < 1) then
    				cleartimer("fifthDemonRegen");
    				
    				d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    				timer("teleportDemonTimer", 5);
    				
    				d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    			else
    				d.notice(string.format("[Turnul Demonilor]: Mai sunt %d metine ramase.", d.count_monster()))
    			end
    		end
    		
    		when 30302.use with (DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER) and d.getf("canDropMaps") > 0) begin
    			item.remove();
    			d.setf("canDropMaps", 0);
    			ClearDungeon(false);
    			
    			d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    			timer("teleportDemonTimer", 5);
    			
    			d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    		end
    		
    		when 20366.take with (item.get_vnum() == 30304 and DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER) and d.getf("canDropSeals") > 0) begin
    			item.remove();
    			d.setf("canDropSeals", 0);
    			ClearDungeon(true);
    			
    			d.setf("demonStageCount", d.getf("demonStageCount") + 1);
    			timer("teleportDemonTimer", 5);
    			
    			d.notice("[Turnul Demonilor]: In cateva secunde vei fi teleportat.")
    		end
    		
    		when kill with (DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER)) begin
    			local dungeonData = DungeonInformationLibrary.ReturnDungeonInformation(DUNGEON_INFO_DEMON_TOWER)["dungeonData"];
    			
    			if (d.getf("canDropKeys") > 0) then
    				if (number(1, 100) > 97) then
    					game.drop_item_with_ownership(50084, 1);
    				end
    			end
    
    			if (npc.get_race() == 8019) then
    				if (number(1, 100) > 90) then
    					game.drop_item(30302, 1);
    				end
    			end
    
    			if (d.getf("canDropSeals") > 0) then
    				if (number(1, 100) > 95) then
    					game.drop_item(30304, 1);
    				end
    			end
    
    			if (npc.get_race() == 1093) then
    				clear_server_timer("demonTower_time_out", d.get_map_index());
    				server_timer("demonTower_time_out", 60, d.get_map_index());
    				ClearDungeon(false);
    				
    				local dungeonTime = get_time() - d.getf("dungeonTime");
    				d.notice("[Turnul Demonilor]: In 60 de secunde veti fi teleportati!")
    				notice_all(string.format("[Turnul Demonilor]: a fost infrant de catre %s in %s.", pc.get_name(), get_time_format(dungeonTime)))
    			end
    		end
    		
    		when demonTower_time_out.server_timer begin
    			if (d.select(get_server_timer_arg())) then
    				d.notice("[Turnul Demonilor]: Timpul a expirat, vei fi teleportat inafara Temnitei.")
    				d.exit_all();
    			end
    		end
    		
    		when 20348.chat."Intra in Turnul Demonilor" with (not DungeonInformationLibrary.IsInDungeon(DUNGEON_INFO_DEMON_TOWER)) begin
    			local data = DungeonInformationLibrary.ReturnDungeonInformation(DUNGEON_INFO_DEMON_TOWER);
    			say_title(string.format("%s:[ENTER]", c_mob_name(npc.get_race())))
    			say("Doresti sa intri in Turnul Demonilor?")
    			if (select("Da", "Nu") == 1) then
    				if (dungeonFunctions.checkRequire(data)) then
    					dungeonFunctions.warpToDungeon(data);
    				end
    			end
    		end
    	end
    end
    [/b]

    *Poze / Video:
    Rezolvat de Lion2kj » 18 Mai 2025, 20:52

    🔥 Hai pe Discord! - Chat activ și support direct

    Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.

    Alătură-te acum!
    1300+ de membri activi!
    Robot Discord
    Roboțelu'
    Anunț

    Autor subiect

  • Mesaje: 3
  • Reacții: 0
  • Mesaje utile: 1
  • Status: Pierd vremea ^.^
  • Regat: Shinsoo
  • Discord: [Vezi ID]
  • Contact:

    Medalii

    Avatar utilizator

    Autor subiect

    Rezolvat , pentru cei ce au aceeas problema. Verificati regen si daca aveti duplicati mobi.
    Moved from Arhivă probleme to Probleme rezolvate on 19 Mai 2025, 19:39 by ZuZuR

    📢 Resurse Metin2 Premium!

    Zeci de resurse Metin2 Premium - exclusive și 100% funcționale începând cu 15.99€!.

    Vezi resursele Cumpără premium
    Premium
    Premium
    Anunț
    Închis
    • Subiecte similare

      • de GRINCH » » în Arhivă probleme
        1
        Răspunsuri
        135
        Vizualizări
        de Reizo
      • de KintaRoyala69 » » în Probleme rezolvate
        1
        Răspunsuri
        146
        Vizualizări
        de ZuZuR
      • de KintaRoyala69 » » în Probleme rezolvate
        2
        Răspunsuri
        124
        Vizualizări
        de Angelic
      • de IonutSava » » în Probleme rezolvate
        2
        Răspunsuri
        77
        Vizualizări
        de IonutSava
      • de szotyizz » » în Arhivă probleme
        1
        Răspunsuri
        109
        Vizualizări
        de Andi

    Înapoi la “Probleme rezolvate”

    Informații

    Utilizatori ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator