.ZeNu 3112 Posted March 25, 2019 Share Posted March 25, 2019 Dungeon.cpp: We are looking for : deadEvent = event_create (dungeon_dead_event, info, PASSES_PER_SEC (10)); PASSES_PER_SEC (10)); // 10 seconds PASSES_PER_SEC (300)); // 5 minutes Will be like: deadEvent = event_create (dungeon_dead_event, info, PASSES_PER_SEC (300)); The session will be destroyed in 5 minutes. Into quest from the respective dungeon you have to save logout and login, you can use questFlag. 8 Link to comment Share on other sites More sharing options...
Syriza 234 Posted March 26, 2019 Share Posted March 26, 2019 Can you show us how to do the quest Part? What you Said is already public Link to comment Share on other sites More sharing options...
Active Member hachiwari 138 Posted March 26, 2019 Active Member Share Posted March 26, 2019 Wtf? And after 300 seconds dungeon_dead_event will be executed even though you are logged in, because this he dont check if dunegon is empty.. Link to comment Share on other sites More sharing options...
flexio 83 Posted March 26, 2019 Share Posted March 26, 2019 (edited) 1 hour ago, hachiwari said: Wtf? And after 300 seconds dungeon_dead_event will be executed even though you are logged in, because this he dont check if dunegon is empty.. ????????????????????????? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted March 26, 2019 Premium Share Posted March 26, 2019 Quest part: function GetPartyMapIndex() return party.getf("dungeon_index"); end -- function function HasDungeon() return d.find(quest.GetPartyMapIndex()); end -- function function GetPartyFloor() return d.getf_from_map_index("floor", quest.GetPartyMapIndex()); end -- function function IsSameLeaderDungeon() return d.getf_from_map_index("party_leader_pid", quest.GetPartyMapIndex()) == party.get_leader_pid(); end -- function when NPC.chat."I want to go back into the dungeon" with party.is_party() and quest.HasDungeon() and quest.IsSameLeaderDungeon() begin local floor = quest.GetPartyFloor(); local spawn_coordinates = Dungeon.GetData()[floor]; pc.warp(spawn_coordinates["x"] * 100, spawn_coordinates["y"] * 100, quest.GetPartyMapIndex()); --[[ my settings use coordinates based on floors and keys. Like this function GetData() local array = { [1] = {["x"] = 19850, ["y"] = 98254}, -- Floor 1 spawn coordinates. [2] = {["x"] = 19850, ["y"] = 98254}, -- Floor 2 spawn coordinates. ..etc. }; return array; end -- function ]] end -- when That's how I do in my quests, please refrain from C/Pasting without minimal Lua knowledge. His code is useless, cpp part is not necessary. Because if a group is still inside the dungeon the instance doesn't get destroyed, thus you can go back. Useful functions: function SetPartyMapIndex(index) party.setf("dungeon_index", index); -- Call quest.SetPartyMapIndex(d.get_map_index()) upon entering the dungeon with the party leader. (Doing it once is enough). end -- function function IncreaseFloor() d.setf("floor", d.getf("floor")+1); -- Call it everytime the group gets to a new floor of the dungeon. end -- function function SetLeaderPid() d.setf("party_leader_pid", party.get_leader_pid()); -- Call it upon entering the dungeon with the party leader. end -- function 6 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Syriza 234 Posted March 26, 2019 Share Posted March 26, 2019 vor 3 Stunden schrieb Syreldar: Quest part: function HasDungeon() return d.find(party.getf("dungeon_index")); end -- function function GetPartyMapIndex() return party.getf("dungeon_index"); end -- function function GetPartyFloor() return d.getf_from_map_index("floor", quest.GetPartyMapIndex()); end -- function function IsSameLeaderDungeon() return d.getf_from_map_index("party_leader_pid", quest.GetPartyMapIndex()) == party.get_leader_pid(); end -- function when NPC.chat."I want to go back into the dungeon" with party.is_party() and quest.HasDungeon() and quest.IsSameLeaderDungeon() begin local floor = quest.GetPartyFloor(); local spawn_coordinates = Dungeon.GetData()[floor]; pc.warp(spawn_coordinates["x"] * 100, spawn_coordinates["y"] * 100, quest.GetPartyMapIndex()); --[[ my settings use coordinates based on floors and keys. Like this function GetData() local array = { [1] = {["x"] = 19850, ["y"] = 98254}, -- Floor 1 spawn coordinates. [2] = {["x"] = 19850, ["y"] = 98254}, -- Floor 2 spawn coordinates. ..etc. }; return array; end -- function ]] end -- when That's how I do in my quests, please refrain from C/Pasting without minimal Lua knowledge. His code is useless, cpp part is not necessary. Because if a group is still inside the dungeon the instance doesn't get destroyed, thus you can go back. Useful functions: function SetPartyMapIndex(index) party.setf("dungeon_index", index); -- Call quest.SetPartyMapIndex(d.get_map_index()) upon entering the dungeon with the party leader. (Doing it once is enough). end -- function function IncreaseFloor() d.setf("floor", d.getf("floor")+1); -- Call it everytime the group gets to a new floor of the dungeon. end -- function function SetLeaderPid() d.setf("party_leader_pid", party.get_leader_pid()); -- Call it upon entering the dungeon with the party leader. end -- function Thanks for the Release Link to comment Share on other sites More sharing options...
avertuss 48 Posted March 26, 2019 Share Posted March 26, 2019 @Syreldar what if we have dungeon for player without party? Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted March 26, 2019 Premium Share Posted March 26, 2019 2 minutes ago, avertuss said: @Syreldar what if we have dungeon for player without party? Then his change is fine. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
boaspessoal 8 Posted March 26, 2019 Share Posted March 26, 2019 14 hours ago, hachiwari said: Wtf? And after 300 seconds dungeon_dead_event will be executed even though you are logged in, because this he dont check if dunegon is empty.. So you would get kicked out every 10 seconds without this change?... 9 minutes ago, avertuss said: @Syreldar what if we have dungeon for player without party? Use questflag instead of partyflag when returning the dungeon index(store it whenever you login into the dungeon itself) 1 Link to comment Share on other sites More sharing options...
Braxy 618 Posted March 26, 2019 Share Posted March 26, 2019 8 minutes ago, Syreldar said: Then his change is fine. Your party functions to go back into the dungeon are completly fine while the dungeon is written properly using server timers and so on. Either way these functions are useless. We both know that and i bet most of all have dungeons based on "timer" and so on As long as I'll be a threat for you , i will always be your target :3 Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted March 26, 2019 Premium Share Posted March 26, 2019 Just now, Braxy said: Your party functions to go back into the dungeon are completly fine while the dungeon is written properly using server timers and so on. Either way these functions are useless. We both know that and i bet most of all have dungeons based on "timer" and so on Uh no it has nothing to do with timers. If the instance is alive you can go back to it. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Braxy 618 Posted March 26, 2019 Share Posted March 26, 2019 16 minutes ago, Syreldar said: Uh no it has nothing to do with timers. If the instance is alive you can go back to it. Im not so sure about it. For example, the dungeon is in a timer phase that checks each 10 seconds whether all mobs are killed or not. Well that timer is not a server_timer, it is a timer that has been set to the leader of the group. If the specified player is discconected, he has the oportunity to get back in the instance but in the mean time the other players are stuck due to the timer that is active just on the Leader. This case scenario can happen also with a group player not just the leader, and he aint comming back for example, well this thing will ruin the run for good As long as I'll be a threat for you , i will always be your target :3 Link to comment Share on other sites More sharing options...
gummyantifi 2 Posted April 3, 2019 Share Posted April 3, 2019 You need edit jump to new jump.. or not "save" actually floor (where new jump -> here is saved floor) If you have server timers + new jump = Shutdown core with dungeon (You need edit all server_timers and edit jump_all to new_jump_all) (Not good to use if you can't use it ) Result: You need to customize full tower quest for good functionality. Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted April 3, 2019 Active Member Share Posted April 3, 2019 (edited) Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
.ZeNu 3112 Posted April 3, 2019 Author Share Posted April 3, 2019 (edited) Acum 20 minute, Exygo a spus: (Other board) Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 3 1 Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted April 3, 2019 Premium Share Posted April 3, 2019 10 hours ago, gummyantifi said: You need edit jump to new jump.. or not "save" actually floor (where new jump -> here is saved floor) If you have server timers + new jump = Shutdown core with dungeon (You need edit all server_timers and edit jump_all to new_jump_all) (Not good to use if you can't use it ) Result: You need to customize full tower quest for good functionality. ..no. What I did is totally fine to make players go back to their places, unless your server is trash. 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
boaspessoal 8 Posted April 3, 2019 Share Posted April 3, 2019 12 hours ago, gummyantifi said: You need edit jump to new jump.. or not "save" actually floor (where new jump -> here is saved floor) If you have server timers + new jump = Shutdown core with dungeon (You need edit all server_timers and edit jump_all to new_jump_all) (Not good to use if you can't use it ) Result: You need to customize full tower quest for good functionality. this is the same method officials use I believe, no reason to think there will be inconsistencies(which in fact there won't) Link to comment Share on other sites More sharing options...
flexio 83 Posted April 4, 2019 Share Posted April 4, 2019 (edited) I use this method in all dungeons(include devil tower) +- 2 months without any problem. only with one more dit. Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Cilindro 14 Posted April 20, 2020 Share Posted April 20, 2020 hello, have sameone one exampel finish dungeon quest for me thet i can take it for exampel because i try and try and still don't work Thanks Link to comment Share on other sites More sharing options...
Recommended Posts