-
Posts
96 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Matteo
-
-
You can install it through IPMI/KVM. Drop me a message if you need help.
-
19 minutes ago, Lycawn said:
Yeah this was it , thank you.
How do i set it up ? i bought new ip address but virtual box still doesnt return IP
It won't give you by DHCP, you have to set it up manually i guess.
-
So you have a Dedicated Server with Windows at Hetzner and you have set up a VBox if i understand correctly. You need to buy IP addresses, you won't get any public IP for free... Its not your home network where you get some local ip (like 192.168.1.23).
-
Are you sure it's a good idea to host Live Servers in Germany?
Also i've been using OVH for some years now, never had outages (Except when the French datacenter caught on fire ) or anything that needs support.
- 1
-
Think about it realistically guys... there is az unknown program which was compiled like 10 minutes ago and its downloading files from an unknown website with Administrator privileges... every patcher will be detected as a virus at some point until you sign it with a Microsoft certificate. However there are smart ways to "wrap" this behaviour but nothing last forever.
- 1
-
Hi,
I have a core crash, i dont really understand whats the problem.
https://metin2.download/picture/09K0qsj0xP9ZPje3FnmmsRF4533Ccrii/.png
https://metin2.download/picture/fRR4xS3Br06pviwr0vQVIZP3K7S4Ec0E/.pnghttps://metin2.download/picture/w0M4XtvtxK5O3RMxIXNmvV2aLVLxaQCw/.png
https://metin2.download/picture/3CwK6PPz5cxPX857jIsG4MRdxS82Mj0v/.png
Corresponding code lines:
item.cpp#ifdef ENABLE_EXTENDED_ITEMNAME_ON_GROUND const char* CItem::GetName() { # ifdef ENABLE_MULTI_LANGUAGE_SYSTEM BYTE bLocale = (GetOwner() && GetOwner()->GetDesc()) ? GetOwner()->GetDesc()->GetLanguage() : LOCALE_DEFAULT; # endif static char szItemName[128]; memset(szItemName, 0, sizeof(szItemName)); if (GetProto()) { int len = 0; switch (GetType()) { case ITEM_POLYMORPH: { const DWORD dwMobVnum = GetSocket(0); const CMob* pMob = CMobManager::instance().Get(dwMobVnum); if (pMob) { # ifdef ENABLE_MULTI_LANGUAGE_SYSTEM len = snprintf(szItemName, sizeof(szItemName), "%s", LC_LOCALE_MOB_TEXT(dwMobVnum, bLocale)); # else len = snprintf(szItemName, sizeof(szItemName), "%s", pMob->m_table.szLocaleName); # endif } break; } case ITEM_SKILLBOOK:
https://metin2.download/picture/9I16e553nCZNCl5Ha0irx2kP2T5pzWW3/.png
item_manager.cpp
if(!item->GetName()) { sys_err("SaveSingleItem: item->GetName NULL"); return; } if (!item->GetOwner()) { DWORD dwID = item->GetID(); DWORD dwOwnerID = item->GetLastOwnerPID(); //sys_log(0, "item->GetOwner NULL - Name: %s dwID: %d dwOwnerID: %d",item->GetName(), dwID, dwOwnerID); db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_DESTROY, 0, sizeof(DWORD) + sizeof(DWORD)); db_clientdesc->Packet(&dwID, sizeof(DWORD)); db_clientdesc->Packet(&dwOwnerID, sizeof(DWORD)); //sys_log(1, "ITEM_DELETE %s:%u", item->GetName(), dwID); return; } //sys_log(1, "ITEM_SAVE %s:%d in %s window %d", item->GetName(), item->GetID(), item->GetOwner()->GetName(), item->GetWindow()); TPlayerItem t;
Thanks.
Spoiler -
Hi,
Once i've seen somewhere a little modification for /warp command so it can be used through channels. For example the GM is on ch1 map1 and easily can warp into some dungeon on ch99 (which by default cannot be done) or GM is on ch1 and want to warp to a player on ch2 but by default it cannot be done.Thank you
-
Hi,
There is a "pickup all" function in my client but it creates a little freeze when picking up items. As i see it iterates and sends a lot of SendItemClickPacket
if (CPythonSystem::Instance().GetPickupMode() == CPythonSystem::PICKUP_MODE_ALL) { std::vector<uint32_t> vecCloseItems = rkItem.GetCloseMoneys(kPPosMain, __GetPickableDistance()); for (uint32_t dwItemID : vecCloseItems) { SendClickItemPacket(dwItemID); } }
Any ideas to modify it in a way that doesn't create lag?
Thanks.
-
10Gbit/s OVH Server is the only solution you can get. Otherwise you are easily attackable. Even OVH 1Gbit/s has some exploit and they can make your server offline in seconds. 10Gbit/s is really hard to get DDoS, anyone will need a lot of bandwith to make your server unavailable. For web, PAID Cloudflare (MAYBE!!!). Only if our project is very serious, because 10Gbit is $$$$$$$$$. Otherwise any OVH Dedicated Game Server.
-
2 minutes ago, Mefarious said:
Its not working for me or i just put it wrong , no error show up, quest reads function without error, but when i click on npc to reset nothing happens
Add me on Discord.
-
31 minutes ago, Mefarious said:
yea i wanted to get gold, but i have to think about how muchm its like im creating RogueLike server and need for example
2 lvl -50yang
3lvl 75yang
4lvl 150yang etc etc as i want 120 lvl -10kk etc
edit, quest doesnt work, it doesnt reset levelYou should fill in all level gold rewards. What it says? nothing?
ALUA(pc_reset_level) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); int lvlBeforeReset = ch->GetLevel(); ch->ResetPoint(MINMAX(1, DEATH_INITIAL_LEVEL, PLAYER_MAX_LEVEL_CONST)); ch->ClearSkill(); ch->ClearSubSkill(); LPITEM item; for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i) { if ((item = ch->GetInventoryItem(i))) { ITEM_MANAGER::instance().RemoveItem(item, "DEATH_EVENT_BY_QUEST"); ch->SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255); } } int goldByLevel[PLAYER_EXP_TABLE_MAX + 1] = { 0, // PLACEHOLDER 10, // LV 1 20, // LV 2 30, // LV 3 40, // LV 4 50, // LV 5 60, // LV 6 }; ch->PointChange(POINT_GOLD, goldByLevel[lvlBeforeReset]); ch->ChatPacket(CHAT_TYPE_INFO, "<Death Request> Your level was %d, because of that same amount of gold is credited.", lvlBeforeReset); return 0; }
-
3 minutes ago, Mefarious said:
OKey im trying to compile it, and now shiuld i type all possibilities each of 120lvls give different amount of gold after reset?
i dont understand this
ch->PointChange(POINT_GOLD, lvlBeforeReset);It gives gold.
If you reset a lv 120 character you get 120 gold
If you reset a lv10 character you get 10 gold
Is that you wanted?
-
1 hour ago, Mefarious said:
@ msnas Could you help me again?
I want to make quest when talk to NPC for example 20094.chat."balbla" she will reset level to 1 and give me gold equal to level i had.
I dont know how to call dead function in quest, she can even kill me to cause definition you helped me last time.
Thanks in advanceAdd this to your questlua_pc + add quest_functions according. pc.reset_level (code not tested)
{ "reset_level", pc_reset_level}, #ifdef DEATH_EVENT #define DEATH_INITIAL_LEVEL 1 // What's the level the player should start? ALUA(pc_reset_level) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); int lvlBeforeReset = ch->GetLevel(); ch->ResetPoint(MINMAX(1, DEATH_INITIAL_LEVEL, PLAYER_MAX_LEVEL_CONST)); ch->ClearSkill(); ch->ClearSubSkill(); LPITEM item; for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i) { if ((item = ch->GetInventoryItem(i))) { ITEM_MANAGER::instance().RemoveItem(item, "DEATH_EVENT_BY_QUEST"); ch->SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255); } } ch->PointChange(POINT_GOLD, lvlBeforeReset); ch->ChatPacket(CHAT_TYPE_INFO, "<Death Request> Resetted. Your level was %d, because of that same amount of gold is credited.", lvlBeforeReset); } #endif
Then in quest like:
quest resetchar begin state start begin when 20094.chat."balbla" begin if pc.get_level() > 1 then pc.reset_level() end end end end
-
Hi,
After a period of time on the server, some players are disconnected by the server randomly. I guess one of the installed systems "overflowing" the buffer(??). If i restart the server, for a given time there is no random disconnects, after it starts again until restart. I have increased the receiving buffer on the binary but that didn't help a lot... is there a way to debug it what keeps growing and growing?
Some syserrs from the players:
0109 14:07:39244 :: Unknown packet header: 108, last: 124 70
0107 16:53:06382 :: Unknown packet header: 231, last: 238 217
1228 20:00:42501 :: Unknown packet header: 183, last: 163 163
1228 17:17:43336 :: Unknown packet header: 197, last: 236 117
1230 20:55:27097 :: Unknown packet header: 35, last: 3 79
1230 18:31:27797 :: Unknown packet header: 201, last: 3 3
0105 22:17:33005 :: Unknown packet header: 178, last: 17 253
0105 22:18:25466 :: Unknown packet header: 202, last: 3 3
So its not stuck/broken at the same packet, very random. Any ideas to debug it?
-
Thank you guys for helping out. @ Owsap i've tested your solution and its working as i wanted, thank you!
Meanwhile the developer of the given system checked the code and modified it, its under testing. I guess this fixes a lot of exploiting since its not a good thing to interrupt the loading phase (in my opinion) so i implemented it anyways.
-
3 minutes ago, PACI said:
Replied to their question as they didn't want to elaborate further on their issue. At least this, for them, may buy some time until they figure what is wrong and share it with us.
Its really hard to do the bug but there is still 1-2 player who can abuse it. I've contacted the developer of the system (since its not a pirated system) he also sent some fixes but after that it became very hard but there is still a possibility to do it. I dont want to discuss neither the system or the exact steps to reproduce the bug because it can affect a some server that uses the given system. After the fix i'll post it of course.
- 1
-
2 hours ago, TMP4 said:
That's not how you solve such problems. That would be a weak workaround here, not a fix.
You have to fix your glitch's origin.
Have a look at this:Even if your problem is about another system like sash combination, battle pass or anything, the solution is the same: use CHARACTER :: CanWarp so players cannot warp when they are not allowed to.
Hi,
Its already done for days now. I have added obviusly CanWarp to everything that is related, but mainly the warp gates that teleports instantly the main problem. (Yes, i have added the CanWarp to the gates too but then they do a logout->change channel->login->warp gate instantly->crash back into loginscreen (by spamming ESC)->relog to another channel )
-
Hi,
I'd like to disable the keyboard inputs when someone is warping since they bugging out stuff when goes into warp and then spams ESC. Because of that i want to disable every keyboard input instantly at teleport. How can i do that?
-
12 hours ago, I bims 1 WLAN said:
What does that mean?:
const DWORD exp_table_euckr[PLAYER_EXP_TABLE_MAX + 1]
const DWORD exp_table_common[PLAYER_EXP_TABLE_MAX + 1]
const DWORD exp_table_newcibn[PLAYER_EXP_TABLE_MAX + 1 ]
const DWORD party_exp_distribute_table[PLAYER_MAX_LEVEL_CONST + 1]
const int aiExpLossPercents[PLAYER_EXP_TABLE_MAX + 1]
I expand to 500, what should I keep changing the numbers
???
In your source edit the needed array as you want with the desired level. Look for exp_table_common (for example) in your source and you will find the EXP table where you need to add as many exp values as many levels you want. (since you need exp value for every level)After in your MySQL server change the level field in your player table (which you can find in the player database) according to the instructions
-
On 10/5/2021 at 8:59 PM, Owsap said:
Use a static variable instead for szTmpBuf.
static char szTmpBuf[1024 + 1] = {};
Thanks worked!
-
Hi,
Im trying with a function to filter some string from the chat, but it gives a strange error.
Functions:
const char* FilterChat(const char* c_pszBuffer) { std::string strChatBuf = c_pszBuffer; // Other stuff with the string, but its commented out rn. char szTmpBuf[1024 + 1] = {}; const char* c_szpFilterBuf = strChatBuf.c_str(); _snprintf(szTmpBuf, sizeof(szTmpBuf), "%s", c_szpFilterBuf); return szTmpBuf; }
In bool CPythonNetworkStream::RecvChatPacket():
#ifdef CHAT_FILTER CPythonTextTail::Instance().RegisterChatTail(kChat.dwVID, FilterChat(line)); #else CPythonTextTail::Instance().RegisterChatTail(kChat.dwVID, line); #endif
And in-game its junk:
What's the problem? With debugging it seems the array gets created with full of junk already, but i've initialized it with full of zeroes if im not wrong.
-
23 hours ago, VegaS™ said:
I didn't test it, let me know if it works.
There are other solutions as well, with resurrection vnum, but you need a custom function since you want it with a spawn chance.
Srcs/Server/game/src/char_battle.cpp
void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) { [...] // At the end of the function if (pkKiller && pkKiller->IsPC() && IsStone()) { static const auto SPAWN_STONE_LIST = { 8001, 8002, 8003, }; if (std::find(SPAWN_STONE_LIST.begin(), SPAWN_STONE_LIST.end(), GetRaceNum()) != SPAWN_STONE_LIST.end()) { static const auto SPAWN_STONE_PCT = 100; if (number(1, 100) <= SPAWN_STONE_PCT) { static auto& character_manager = CHARACTER_MANAGER::instance(); character_manager.SpawnMob(GetRaceNum(), GetMapIndex(), GetX(), GetY(), GetZ(), true, static_cast<int>(GetRotation()), true); if (test_server) pkKiller->ChatPacket(CHAT_TYPE_INFO, "SpawnMob: name(%s), x(%ld), y(%ld), z(%ld)", GetName(), GetX(), GetY(), GetZ()); } } } }
It works perfectly thank you @VegaS™❤
- 1
-
Hi,
I want to make a feature that spawns another metin stone on killing a metin stone (example: you kill a lv5 stone, and with 5% chance it spawns another instantly). In which functions to start?
Thanks
-
3 hours ago, LordZiege said:
Use static_cast and cast it to long long and your problems should be solved.
What should i cast? everything as i did?
M2Dev Conference
in Metin2
Posted
I hope, at least they can learn how a real server is made