Private Servers
Forums
-
Private Servers
Introduce us to your Metin2 p-server!
You can also register your Metin2 private server on our top list → Top Metin2!- 302
- posts
-
Activity
-
-
2
wait() function bug
state kon0037 begin when login or levelup or enter begin target.pos("__TARGET1__", 614, 118, 21, "los", 0) end when __TARGET1__.target.arrive begin target.delete("__TARGET1__") say_title("Głos zza portalu:") say("") say_reward(pc.get_name() .. " słyszysz mnie?") say_reward("Halo, " .. pc.get_name() .. "!") say_reward("Jeśli mnie słyszysz, uważaj na strażnika!") say_reward("Nie jest tym za kogo się podaje!") wait() -- Ensure the player reads the messages before warping say_reward("Ale...") pc.warp_local(21, 55200, 61400) -- set_state(kon0038) -- Uncomment this line if you want to transition to another state end end -
0
Remove Party Role Bonuses
I recently came across this issue when updating some things on the party (group) system and I realized that this problem was present on all the branches of the source. Although I've seen certain topics with some solutions, they don't provide much information and, in my opinion, a good solution. So, I'll share mine with you and you can use it if you're happy with the results. The Bug When you set a role to a member as a leader, it will give the member a certain bonus according to the role, this bonus is given if the leadership skill is high. Now, if you decide to remove the members role, in theory the bonus should be removed. However, when this happens, it will only compute the battle points of the player which will make some bonuses of certain roles the same until the character computes all his points again. For example, if you set a member with the tanker role, which grants a bonus of additional health points and then remove the role from the member, the bonus will not be removed until the character computes his points again. It doesn't remove the bonus because the function by default only computes the battle points, this relates to roles like, attacker and defender. Realization So far, we realized a possible solution, which is replacing the ComputeBattlePoints with ComputePoints, well sure, and I've seen this solution on this forum in some help request topics but this comes to a major cost in performance since the role computation function CParty::ComputeRolePoint is frequently called. The Solution What we really want to do is check if the member has any bonus assigned to a role, remove the bonus and finally compute the character's points appropriately, avoiding constant updates to the ComputePoints function. If the member doesn't have any bonus given from a role, there will be no need to calculate the points. -
1
[Quest Scheduler Request] Is there a way to make a quest run independet of player events? Lets say start quest automatically at server startup?
You can set a timer when login to run a state. -
1
-
1
set_quest_state not working
quest select_skill begin state start begin when login or levelup with pc.level >= 5 and pc.skillgroup == 0 begin set_state(run) end end state run begin when login or levelup with pc.get_level() >= 5 and pc.get_skill_group() == 0 begin send_letter("Choose your path"); end when button or info with pc.get_level() >= 5 and pc.get_skill_group() == 0 begin command("selectskill_open"); end when login with pc.get_skill_group() != 0 begin restart_quest() end end end quest skill_reset2 begin state start begin when 9006.chat.gameforge.skill_reset2._10_npcChat begin if pc.get_level() < 5 then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._20_say) return end if pc.get_level() > 30 then say_title(gameforge.couple_ring._20_sayTitle) say(string.format(gameforge.skill_reset2._30_say, pc.get_level())) return end if pc.get_skill_group() == 0 then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._40_say) return end local cost = 10000 + pc.get_level() * 2000 local s = 0 if not pc.has_master_skill() then say_title(gameforge.couple_ring._20_sayTitle) say(string.format(gameforge.skill_reset2._50_say, cost)) s = select(gameforge.skill_reset2._10_npcChat, gameforge.skill_reset2._60_select) else say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._70_say) wait() say(string.format(gameforge.skill_reset2._80_say, cost)) s = select(gameforge.skill_reset2._90_select, gameforge.locale.cancel) end if 2 == s then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._110_say) return end if pc.get_money() < cost then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._120_say) return end pc.change_money(-cost) pc.clear_skill() pc.set_skill_group(0) set_quest_state("select_skill", "run") end end end try these -
1
Fix CBar3D
This will fix the use of if (window->IsType(UI::CBar3D::Type())) Example SetColor of Bar3D is not working because of this bug This bug is still available on official [Hidden Content]- 36
-
1
Game Source Code - where to call void methods to spawn mobs, move mobs and others - in game source side -?
Can confirm that adding any instruction prior to while idle, seems to not give enough time for the maps & mobs to load try { // Hardcoded values const DWORD dwVnum = 101; const int count = 10; const bool isAggressive = false; const int iMapIndex = 352; const int iMapX = 360; const int iMapY = 360; // Assume SECTREE_MANAGER and CHARACTER_MANAGER are properly initialized and available PIXEL_POSITION pos; if (!SECTREE_MANAGER::instance().GetMapBasePositionByMapIndex(iMapIndex, pos)) { sys_log(0, "PPPPPPQQQ Error: Cannot find base position in this map %d", iMapIndex); } const CMob *pMonster = CMobManager::instance().Get(dwVnum); if (pMonster == NULL) { sys_log(0, "PPPPPPQQQ Error: No mob data for VNUM %d", dwVnum); } size_t SpawnCount = 0; for (size_t i = 0; i < count; ++i) { LPCHARACTER pSpawnMonster = CHARACTER_MANAGER::instance().SpawnMobRange( dwVnum, iMapIndex, pos.x - number(5, 5) + (iMapX * 100), pos.y - number(5, 5) + (iMapY * 100), pos.x + number(5, 5) + (iMapX * 100), pos.y + number(5, 5) + (iMapY * 100), false, pMonster->m_table.bType == CHAR_TYPE_MONSTER, isAggressive); if (pSpawnMonster != NULL) { SpawnCount++; } } sys_log(0, "Spawned %u monsters successfully.", SpawnCount); } catch (const std::exception &e) { sys_log(0, "An exception occurred: %s", e.what()); } while (idle()) ; What it logs is: ./srv1/chan/ch1/core1/syslog:Apr 17 19:23:11 :: PPPPPPQQQ Error: Cannot find base position in this map 352 ./srv1/chan/ch1/core1/syslog:Apr 17 19:23:11 :: PPPPPPQQQ Error: No mob data for VNUM 101 Trial and error continues -
112
Ulthar SF V2 (TMP4 Base)
does anyone know why exactly show's this error? 0417 19:12:41342 :: Unable to open file.: 0417 19:12:41448 :: CSoundManager2D::GetInstance (filename: ) 0417 19:12:50152 :: Unable to open file.: 0417 19:12:50152 :: CSoundManager2D::GetInstance (filename: ) 0417 19:12:52710 :: Unable to open file.: 0417 19:12:52710 :: CSoundManager2D::GetInstance (filename: ) every sound effect is working but that one when equip or unequip isn't and this error show's... i didn't change anything. -
31
-
1
set_quest_state not working
Hi, I'm implementing a system for choosing skills instantly. I've created a quest so that when the player clicks on it, it opens a GUI for the player to choose skills. Quest: quest select_skill begin state start begin when login or levelup with pc.level>=5 and pc.skillgroup == 0 begin set_state(run) end end state run begin when login with pc.get_skill_group()!=0 begin restart_quest() end when login or levelup with pc.get_level() >= 5 and pc.get_skill_group() == 0 begin send_letter("Choose your path"); end when button or info with pc.get_level() >= 5 and pc.get_skill_group() == 0 begin command ("selectskill_open"); end end end The quest works perfectly under these conditions, but when I try to set_state_quest in the skill_reset2 quest to call it as soon as the skills are reset, it is not called. Quest 2: quest skill_reset2 begin state start begin when 9006.chat.gameforge.skill_reset2._10_npcChat begin if pc.level < 5 then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._20_say) return end if pc.level >30 then say_title(gameforge.couple_ring._20_sayTitle) say(string.format(gameforge.skill_reset2._30_say, pc.level)) return end if pc.get_skill_group()==0 then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._40_say) return end local cost = 10000 + pc.level * 2000 local s = 0 if not pc.has_master_skill() then say_title(gameforge.couple_ring._20_sayTitle) say(string.format(gameforge.skill_reset2._50_say, cost)) s = select(gameforge.skill_reset2._10_npcChat, gameforge.skill_reset2._60_select) else say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._70_say) wait() say(string.format(gameforge.skill_reset2._80_say, cost)) s = select(gameforge.skill_reset2._90_select, gameforge.locale.cancel) end if 2==s then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._110_say) return end if pc.money < cost then say_title(gameforge.couple_ring._20_sayTitle) say(gameforge.skill_reset2._120_say) return end pc.changegold(-cost) pc.clear_skill() pc.set_skill_group(0) set_quest_state("select_skill","run") end end end This quest was already created in the severfiles when I started using it, I just changed the set_quest_state to the quest I wanted to call. If someone could help me explain why this is happening, I'd be very grateful. -
0
Atalia 2. An odyssey is about to begin!
Discord: https://discord.gg/Qfu3z7B9 Global Community Lv. Máx: 120. Atalia 2 promises and excites various players from the lands of Metin2 to dive into a journey full of experiences totally different from the usual. Improving thanks to the community, come and contribute new ideas! It all begins in the remote mountains of the ancestral town known as: "The Last Cry of Glory". - Now forgotten and considered a lost city - only despair can be seen in the distance... Since that time no one has dared to explore the forgotten lands, no one has ever set foot in that place again! After a few thousand years, the legacy still remains? And this time it has rested on the birth of a legend in a village not far from those bleak and flat lands. That elemental son who possesses in his veins the blood of the gods that once inhabited those places, carries with him all that overload of energy and unique power within himself. Will this be the moment when these lands will once again be ruled by warriors capable of surviving in the middle of nowhere, a place inhabited only by monsters and full of mysteries? In the midst of this chaos and uncertainty, the fate of Atalia 2 is uncertain: will the elemental son be the catalyst for a new order, or will his arrival bring destruction and chaos? Only time will tell if this legend and his ability to forge the best swords of each of the warriors of his guild will unleash the powerful inner fury to gain total control of the territory inhabited by more beings who are preparing to be the best in each realm. PRESENTATION OF THE SERVER Chapters will be updated. SOME FEATURES Offline Store Store Finder Enchanting Outfits PvP Set Event Viewing Skill Book Reading Itemshop Enhancers More stable and active trading New mounts New costumes World boss Classic autodopator Dungeon information PvP events Drop viewer Decreased attack range of ranged enemies Horse abilities Load optimizations Special inventory Mining veins Special crafting New NPC'S Visual effects Multilanguage New bonuses Weekly store Direct and individual dungeons New biomes Alchemy removal Lycan elimination Talisman removal Biologist New enchantment items Multifarm Metines in the different maps Removal of earrings, bracelets, necklaces, helmets, boots that are not used for a more appropriate simplification. No hero level will be implemented New evolutions Want to learn more? JOIN the fun, let's create community. UPDATE NOTE We are working hard and analyzing various factors that influence the playability of the server, affecting as little as possible the performance and aspects of how the character develops and the global environment that falls upon him/her. Release date: Still to be defined. But, we are getting closer and closer! -
1
Game Source Code - where to call void methods to spawn mobs, move mobs and others - in game source side -?
Hello! Lets say I have the follow scenario: At server startup: I want to spawn two mobs, as an example function(correctness does not matter) void SpawnMobs(DWORD mob_vnum, int count, int map_index, int x, int y) { for (int i = 0; i < count; ++i) { LPCHARACTER mob = CHARACTER_MANAGER::instance().SpawnMob(mob_vnum, map_index, x, y, 0, false, -1); if (!mob) sys_err("Failed to spawn mob VNUM %d on map %d at (%d, %d)", mob_vnum, map_index, x, y); } } And at a given date-time, to make the mobs move to a specific location(Again function correctness is probably wrong, but this is just a POCE) void MoveMobTo(DWORD mob_vid, int target_x, int target_y) { using namespace std::chrono; //April 18, 2024, at 18:00 std::tm scheduled_time = {}; scheduled_time.tm_year = 2024 scheduled_time.tm_mon = 4 - 1; scheduled_time.tm_mday = 18; scheduled_time.tm_hour = 18; scheduled_time.tm_min = 0; scheduled_time.tm_sec = 0; auto scheduled_time_t = std::mktime(&scheduled_time); system_clock::time_point scheduled_tp = system_clock::from_time_t(scheduled_time_t); // Get current time system_clock::time_point now = system_clock::now(); // Check if the current time matches the scheduled time if (now == scheduled_tp) { LPCHARACTER mob = CHARACTER_MANAGER::instance().Find(mob_vid); if (mob) { mob->Goto(target_x, target_y); sys_log(0, "Mob with VID %d moved to (%d, %d) as scheduled", mob_vid, target_x, target_y); } else { sys_err("Failed to find mob with VID %d to move", mob_vid); } } else { sys_log(0, "MoveMobTo called, but it is not the scheduled time yet."); } } I have two main questions 1. !Where should i be calling these functions within the source game, in main seems like it might not be a good idea 2. Checking time constantly until desired time is true, seems quite tricky, a while true surely is not good, if u have any basic suggestions it would be more then welcomed Basically my goal is to have mobs spawn, if not already spawned, move them at a specific hour to a exact spot on the map, make em fight each other, while fighting pc can't attack, after pc can attack the surviver, but not instantly, spawn another boss, keep it there for a specific time, if not dead, despawn it Realistically, if i'd know where to call my functions with the instructions and how to not use while loops to check for specific states, it would be enough Thank you in advance! -
-
10
VIVY-WORLD2 - FARM TO THE TOP
--- UPDATE V0.8 --- --- REMOVED ACCESSORIES, WEAPONS AND ARMOURS DROP FROM MOBS (YOU CAN DROP THEM FROM METIN STONES) --- - YOU WILL STILL DROP SOME UNTIL I CLEAN THE "COMMON DROP ITEM - --- ADDED A VERY LOW CHANCE TO DROP CHESTS FROM MOBS WHICH GIVE ITEMS DIRECTLY +9 --- --- PLEASE DOWNLOAD THE V0.8 CLIENT ---
-