Jump to content

Search the Community

Showing results for '2147483647'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Metin2 Dev
    • Announcements
  • Community
    • Member Representations
    • Off Topic
  • Miscellaneous
    • Metin2
    • Showcase
    • File Requests
    • Community Support - Questions & Answers
    • Paid Support / Searching / Recruiting
  • Metin2 Development
  • Metin2 Development
    • Basic Tutorials / Beginners
    • Guides & HowTo
    • Binaries
    • Programming & Development
    • Web Development & Scripts / Systems
    • Tools & Programs
    • Maps
    • Quests
    • 3D Models
    • 2D Graphics
    • Operating Systems
    • Miscellaneous
  • Private Servers
    • Private Servers
  • Uncategorized
    • Drafts
    • Trash
    • Archive
    • Temporary
    • Metin2 Download

Product Groups

  • Small Advertisement
  • Large Advertisement
  • Advertising

Categories

  • Third Party - Providers Directory

Categories

  • Overview
  • Pages
    • Overview
    • File Formats
    • Network
    • Extensions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Pillory


Marketplace


Game Server


Country


Nationality


Github


Gitlab


Discord


Skype


Website

  1. @ Mali How to increase yang limit for withdraw? When I increase limit to 9 (dlgPickMoney.SetMax(9)) and trying withdraw for example -> my inventory 1.999.999.999 Yang -> my Safebox 1.000.000.000 Yang -> My withdraw from safebox -> 10.000 Yang so its works and I got message "You cannot withdraw anymore gold." but when I try to withdraw for example 888.888.888 Yang my inventory stay still same (because 2kkk limit) but from safebox are gold destroyed without this check: if (ch->GetGold() + static_cast<int>(p->lMoney) >= GOLD_MAX) { ch->ChatPacket(CHAT_TYPE_INFO, "You cannot withdraw anymore gold."); return; } EDIT: Can be problem int type for lMoney when my inventory is too int and trying check value more than 2147483647? Because 1.999.999.999 + 888.888.888 withdraw?
  2. M2 Download Center Download Here ( Internal ) Hi there Devs, I have published a tutorial yesterday on a Hungarian forum, and I decided to share it here, too. So... I chose int type for the level variables (originally its unsigned char) because: its more than enough maximum level 2147483647 the damage done by the characters (and much more thing) is calculated via they levels, and the type of this variables is int This is why I recommend to use int type game/src char.cpp Search this: void CHARACTER::SetLevel(BYTE level) Then replace to this: void CHARACTER::SetLevel(int level) char.h Search this: void SetLevel(BYTE level); Then replace to this: void SetLevel(int level); Then search: BYTE level; (its under this: typedef struct character_point) And replace to this: int level; party.cpp Search this one: void CParty::P2PSetMemberLevel(DWORD pid, BYTE level) Then replace to this: void CParty::P2PSetMemberLevel(DWORD pid, int level) Then replace this: BYTE CParty::GetMemberMaxLevel() { BYTE bMax = 0; To this: int CParty::GetMemberMaxLevel() { int bMax = 0; Find this one: BYTE CParty::GetMemberMinLevel() { BYTE bMin = PLAYER_MAX_LEVEL_CONST; And replace to this: int CParty::GetMemberMinLevel() { int bMin = PLAYER_MAX_LEVEL_CONST; And then this: void CParty::RequestSetMemberLevel(DWORD pid, BYTE level) To this: void CParty::RequestSetMemberLevel(DWORD pid, int level) party.h Search this: BYTE bLevel; (its under typedef struct SMember) And replace to this: int bLevel; Then this ones: BYTE GetMemberMaxLevel(); BYTE GetMemberMinLevel(); To this: int GetMemberMaxLevel(); int GetMemberMinLevel(); And these: void RequestSetMemberLevel(DWORD pid, BYTE level); void P2PSetMemberLevel(DWORD pid, BYTE level); To: void RequestSetMemberLevel(DWORD pid, int level); void P2PSetMemberLevel(DWORD pid, int level); char_battle.cpp Find: struct FPartyTotaler { int total; And replace to: struct FPartyTotaler { long total; And this: struct FPartyDistributor { int total; LPCHARACTER c; int x, y; DWORD _iExp; int m_iMode; int m_iMemberCount; FPartyDistributor(LPCHARACTER center, int member_count, int total, DWORD iExp, int iMode) To this: struct FPartyDistributor { long total; LPCHARACTER c; int x, y; DWORD _iExp; int m_iMode; int m_iMemberCount; FPartyDistributor(LPCHARACTER center, int member_count, long total, DWORD iExp, int iMode) config.h Find this: extern BYTE PK_PROTECT_LEVEL; And replace to this: extern int PK_PROTECT_LEVEL; locale_service.cpp Change: BYTE PK_PROTECT_LEVEL To this: int PK_PROTECT_LEVEL constants.cpp Well, here you should decide how much is the maximum level you want. You should fill these tables with as much records, as the maximum level. (e.g if you want to have maximum level 300, you need to put 300 records to these tables) 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] log.h Edit this: void LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, BYTE bLevel, BYTE bJob, DWORD dwPlayTime); To this: void LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, int bLevel, BYTE bJob, DWORD dwPlayTime); log.cpp Replace this: void LogManager::LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, BYTE bLevel, BYTE bJob, DWORD dwPlayTime) To this: void LogManager::LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, int bLevel, BYTE bJob, DWORD dwPlayTime) guild.h Replace this: typedef struct SGuildMemberPacketData { DWORD pid; BYTE grade; BYTE is_general; BYTE job; BYTE level; DWORD offer; BYTE name_flag; char name[CHARACTER_NAME_MAX_LEN+1]; } TGuildMemberPacketData; To this: typedef struct SGuildMemberPacketData { DWORD pid; BYTE byGrade; BYTE byIsGeneral; BYTE byJob; int byLevel; DWORD dwOffer; BYTE byNameFlag; } TGuildMemberPacketData; Then this: void ChangeMemberData(DWORD pid, DWORD offer, BYTE level, BYTE grade); To this: void ChangeMemberData(DWORD pid, DWORD offer, int level, BYTE grade); Then SGuildMember(DWORD pid, BYTE grade, BYTE is_general, BYTE job, BYTE level, DWORD offer_exp, char* name); To this: SGuildMember(DWORD pid, BYTE grade, BYTE is_general, BYTE job, int level, DWORD offer_exp, char* name); And this: DWORD pid; // player Ĺ×ŔĚşíŔÇ id; primary key BYTE grade; // ±ćµĺ»óŔÇ ÇĂ·ąŔĚľîŔÇ °č±Ţ 1 to 15 (1ŔĚ ÂŻ) BYTE is_general; BYTE job; BYTE level; DWORD offer_exp; // °řÇĺÇŃ °ćÇčġ BYTE _dummy; To this: DWORD pid; // player Ĺ×ŔĚşíŔÇ id; primary key BYTE grade; // ±ćµĺ»óŔÇ ÇĂ·ąŔĚľîŔÇ °č±Ţ 1 to 15 (1ŔĚ ÂŻ) BYTE is_general; BYTE job; int level; DWORD offer_exp; // °řÇĺÇŃ °ćÇčġ BYTE _dummy; And then this: void LevelChange(DWORD pid, BYTE level); To this: void LevelChange(DWORD pid, int level); guild.cpp Find this: BYTE level = (BYTE)strtoul(row[4], (char**) NULL, 10); Replace to this: int level = (int)strtoul(row[4], (char**) NULL, 10); Then this: sys_log(0, "GUILD: AddMember PID %u, grade %u, job %u, level %u, offer %u, name %s ptr %p", To this: sys_log(0, "GUILD: AddMember PID %u, grade %u, job %u, level %d, offer %u, name %s ptr %p", Then replace the whole function: void CGuild::ChangeMemberData(DWORD pid, DWORD offer, BYTE level, BYTE grade) To this: void CGuild::ChangeMemberData(DWORD pid, DWORD offer, int level, BYTE grade) { TGuildMemberContainer::iterator cit = m_member.find(pid); if (cit == m_member.end()) return; cit->second.offer_exp = offer; cit->second.level = level; cit->second.grade = grade; cit->second._dummy = 0; TPacketGCGuild pack; TGuildMemberPacketData mbData; pack.header = HEADER_GC_GUILD; pack.subheader = GUILD_SUBHEADER_GC_LIST; pack.size = sizeof(TPacketGCGuild); pack.size += sizeof(TGuildMemberPacketData); for (TGuildMemberOnlineContainer::iterator it = m_memberOnline.begin(); it != m_memberOnline.end(); ++it) { LPDESC d = (*it)->GetDesc(); if (d) { TEMP_BUFFER buf; buf.write(&pack, sizeof(pack)); mbData.byNameFlag = 0; mbData.byGrade = cit->second.grade; mbData.byIsGeneral = cit->second.is_general; mbData.byJob = cit->second.job; mbData.byLevel = cit->second.level; mbData.dwOffer = cit->second.offer_exp; mbData.pid = cit->second.pid; buf.write(&mbData, sizeof(TGuildMemberPacketData)); d->Packet(buf.read_peek(), buf.size()); } } } And replace this function too: void CGuild::LevelChange(DWORD pid, BYTE level) To this: void CGuild::LevelChange(DWORD pid, int level) { TGuildMemberContainer::iterator cit = m_member.find(pid); if (cit == m_member.end()) return; cit->second.level = level; TPacketGuildChangeMemberData gd_guild; gd_guild.guild_id = GetID(); gd_guild.pid = pid; gd_guild.offer = cit->second.offer_exp; gd_guild.grade = cit->second.grade; gd_guild.level = level; db_clientdesc->DBPacket(HEADER_GD_GUILD_CHANGE_MEMBER_DATA, 0, &gd_guild, sizeof(gd_guild)); TPacketGCGuild pack; TGuildMemberPacketData mbData; pack.header = HEADER_GC_GUILD; pack.subheader = GUILD_SUBHEADER_GC_LIST; pack.size = sizeof(TPacketGCGuild); pack.size += sizeof(TGuildMemberPacketData); cit->second._dummy = 0; for (TGuildMemberOnlineContainer::iterator it = m_memberOnline.begin(); it != m_memberOnline.end(); ++it) { LPDESC d = (*it)->GetDesc(); if (d) { TEMP_BUFFER buf; buf.write(&pack, sizeof(pack)); mbData.byNameFlag = 0; mbData.byGrade = cit->second.grade; mbData.byIsGeneral = cit->second.is_general; mbData.byJob = cit->second.job; mbData.byLevel = cit->second.level; mbData.dwOffer = cit->second.offer_exp; mbData.pid = cit->second.pid; buf.write(&mbData, sizeof(TGuildMemberPacketData)); d->Packet(buf.read_peek(), buf.size()); } } } Then this function: bool CGuild::OfferExp(LPCHARACTER ch, int amount) To this: bool CGuild::OfferExp(LPCHARACTER ch, int amount) { TGuildMemberContainer::iterator cit = m_member.find(ch->GetPlayerID()); if (cit == m_member.end()) return false; if (m_data.exp+amount < m_data.exp) return false; if (amount < 0) return false; if (ch->GetExp() < (DWORD) amount) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<±ćµĺ> Á¦°řÇĎ°íŔÚ ÇĎ´Â °ćÇčġ°ˇ ł˛Ŕş °ćÇčġş¸´Ů ¸ą˝Ŕ´Ď´Ů.")); return false; } if (ch->GetExp() - (DWORD) amount > ch->GetExp()) { sys_err("Wrong guild offer amount %d by %s[%u]", amount, ch->GetName(), ch->GetPlayerID()); return false; } ch->PointChange(POINT_EXP, -amount); TPacketGuildExpUpdate guild_exp; guild_exp.guild_id = GetID(); guild_exp.amount = amount / 100; db_clientdesc->DBPacket(HEADER_GD_GUILD_EXP_UPDATE, 0, &guild_exp, sizeof(guild_exp)); GuildPointChange(POINT_EXP, amount / 100, true); cit->second.offer_exp += amount / 100; cit->second._dummy = 0; TPacketGCGuild pack; TGuildMemberPacketData mbData; pack.header = HEADER_GC_GUILD; pack.subheader = GUILD_SUBHEADER_GC_LIST; pack.size = sizeof(TPacketGCGuild); pack.size += sizeof(TGuildMemberPacketData); for (TGuildMemberOnlineContainer::iterator it = m_memberOnline.begin(); it != m_memberOnline.end(); ++it) { LPDESC d = (*it)->GetDesc(); if (d) { TEMP_BUFFER buf; buf.write(&pack, sizeof(pack)); mbData.byNameFlag = 0; mbData.byGrade = cit->second.grade; mbData.byIsGeneral = cit->second.is_general; mbData.byJob = cit->second.job; mbData.byLevel = cit->second.level; mbData.dwOffer = cit->second.offer_exp; mbData.pid = cit->second.pid; buf.write(&mbData, sizeof(TGuildMemberPacketData)); d->Packet(buf.read_peek(), buf.size()); } } SaveMember(ch->GetPlayerID()); TPacketGuildChangeMemberData gd_guild; gd_guild.guild_id = GetID(); gd_guild.pid = ch->GetPlayerID(); gd_guild.offer = cit->second.offer_exp; gd_guild.level = ch->GetLevel(); gd_guild.grade = cit->second.grade; db_clientdesc->DBPacket(HEADER_GD_GUILD_CHANGE_MEMBER_DATA, 0, &gd_guild, sizeof(gd_guild)); return true; } And this function: void CGuild::SendListPacket(LPCHARACTER ch) To this: void CGuild::SendListPacket(LPCHARACTER ch) { /* List Packet Header Count (byte) [ ... name_flag 1 - Ŕ̸§Ŕ» ş¸ł»´ŔłÄ ľČş¸ł»´ŔłÄ name CHARACTER_NAME_MAX_LEN+1 ] * Count */ LPDESC d; if (!(d=ch->GetDesc())) return; TPacketGCGuild pack; pack.header = HEADER_GC_GUILD; pack.size = sizeof(TPacketGCGuild); pack.subheader = GUILD_SUBHEADER_GC_LIST; pack.size += sizeof(TGuildMemberPacketData) * m_member.size(); pack.size += (CHARACTER_NAME_MAX_LEN + 1) * m_member.size(); TEMP_BUFFER buf; TGuildMemberPacketData mbData; buf.write(&pack,sizeof(pack)); char c[CHARACTER_NAME_MAX_LEN+1]; for (TGuildMemberContainer::iterator it = m_member.begin(); it != m_member.end(); ++it) { it->second._dummy = 1; mbData.byNameFlag = 1; mbData.byGrade = it->second.grade; mbData.byIsGeneral = it->second.is_general; mbData.byJob = it->second.job; mbData.byLevel = it->second.level; mbData.dwOffer = it->second.offer_exp; mbData.pid = it->second.pid; buf.write(&mbData, sizeof(TGuildMemberPacketData)); strlcpy(c, it->second.name.c_str(), MIN(sizeof(c), it->second.name.length() + 1)); buf.write(c, CHARACTER_NAME_MAX_LEN+1 ); if ( test_server ) sys_log(0 ,"name %s job %d ", it->second.name.c_str(), it->second.job ); } d->Packet(buf.read_peek(), buf.size()); for (TGuildMemberOnlineContainer::iterator it = m_memberOnline.begin(); it != m_memberOnline.end(); ++it) { SendLoginPacket(ch, *it); } for (TGuildMemberP2POnlineContainer::iterator it = m_memberP2POnline.begin(); it != m_memberP2POnline.end(); ++it) { SendLoginPacket(ch, *it); } } Then this function: void CGuild::SendListOneToAll(DWORD pid) To this: void CGuild::SendListOneToAll(DWORD pid) { TPacketGCGuild pack; pack.header = HEADER_GC_GUILD; pack.size = sizeof(TPacketGCGuild); pack.subheader = GUILD_SUBHEADER_GC_LIST; pack.size += sizeof(TGuildMemberPacketData); TGuildMemberPacketData mbData; char c[CHARACTER_NAME_MAX_LEN+1]; memset(c, 0, sizeof(c)); TGuildMemberContainer::iterator cit = m_member.find(pid); if (cit == m_member.end()) return; for (TGuildMemberOnlineContainer::iterator it = m_memberOnline.begin(); it!= m_memberOnline.end(); ++it) { LPDESC d = (*it)->GetDesc(); if (!d) continue; TEMP_BUFFER buf; buf.write(&pack, sizeof(pack)); cit->second._dummy = 1; mbData.byNameFlag = 1; mbData.byGrade = cit->second.grade; mbData.byIsGeneral = cit->second.is_general; mbData.byJob = cit->second.job; mbData.byLevel = cit->second.level; mbData.dwOffer = cit->second.offer_exp; mbData.pid = cit->second.pid; //buf.write(&(cit->second), sizeof(DWORD) * 3 +1); buf.write(&mbData, sizeof(TGuildMemberPacketData)); buf.write(cit->second.name.c_str(), cit->second.name.length()); buf.write(c, CHARACTER_NAME_MAX_LEN + 1 - cit->second.name.length()); d->Packet(buf.read_peek(), buf.size()); } } Then find this: SGuildMember::SGuildMember(DWORD pid, BYTE grade, BYTE is_general, BYTE job, BYTE level, DWORD offer_exp, char* name) And replace to this: SGuildMember::SGuildMember(DWORD pid, BYTE grade, BYTE is_general, BYTE job, int level, DWORD offer_exp, char* name) common tables.h Find this: BYTE byLevel; Replace to this: int byLevel; Then this: BYTE level; To this: int level; And this: BYTE level; To this: int level; Then this: BYTE bLevel; (under typedef struct SPacketPartySetMemberLevel) To this: int bLevel; And then this: BYTE bLevel; (under typedef struct SPacketDGGuildMember) To this: int bLevel; lenght.h Then here set the maximum level: PLAYER_EXP_TABLE_MAX = 120, PLAYER_MAX_LEVEL_CONST = 120, db/src ClientManager.h Find this: struct TPartyInfo { BYTE bRole; BYTE bLevel; Replace to this: struct TPartyInfo { BYTE bRole; int bLevel; ClientManager.cpp Search this: pkPeer->Encode(&it_member->second.bLevel, sizeof(BYTE)); (its in the void CClientManager::SendPartyOnSetup(CPeer* pkPeer) function) and replace with this: pkPeer->Encode(&it_member->second.bLevel, sizeof(int)); ClientManagerPlayer.cpp Find this: "PLAYER_DELETE FAILED LEVEL %u >= DELETE LIMIT %d" Then replace to this: "PLAYER_DELETE FAILED LEVEL %d >= DELETE LIMIT %d" And find this: "PLAYER_DELETE FAILED LEVEL %u >= DELETE LIMIT %d" You will find it 2 times, replace both to this: "PLAYER_DELETE FAILED LEVEL %d >= DELETE LIMIT %d" client packet.h Find this: BYTE byLevel; Then replace to this: int byLevel; And this: BYTE byLevel; To this: int byLevel; PythonGuild.h Find this: BYTE byLevel; And replace to this: int byLevel; And finally, edit the level colum in the player table in the player database. Set its type from tinyint to smallint (or int, it depends how high is the maximum level) and expand its size to 3 (or higher). And then, here you are I also made a video while I made this, if you have free 42 minute, maybe worth to watch it (if you do, you are my guest for a beer (or something liquid :D)) [Hidden Content] If you have question(s)/problem(s)/remark(s), feel free to post it here, or send me a PM. Have a nice day, ~masodikbela
  3. Again no xd. It is still not uniform at all. Using the same test (1 milion numbers) you will see that only 65k of numbers are possible to be picked... And 0 will never be picked xd The possible numbers are the ones that comes out using this formula : n = 1 + x * 32K where x can be one random number from 0 to RAND_MAX (65k~) in short, theres a number every 32k of numbers which can be picked, in the range from 1 to 2147483647, which is very far from being a uniform distribution in a range. I guess u know that it cant be tested on onlinegdb since this issue comes out only on Windows (onlinegdb uses linux)
  4. constexpr auto DiscordClientID = "934963434833997875"; maximum int = +2147483647
  5. I don't know how this 'petsystem' works, but i think the condition what he had is to check if the skill slot value isn't -1 or 0 like. You replace the condition for no reason, i think you didn't understand the boolean conditions. -1 to -2147483647 - True 1 to 2147483647 - True 0 - False 1 - True So, with your condition the loop will count the -1 skill slot value too.
  6. You can use: localeInfo.NumberToMoneyString def NumberToMoneyString(n) : if n <= 0 : return "0 %s" % (MONETARY_UNIT0) return "%s %s" % ('.'.join([ i-3<0 and str(n)[:i] or str(n)[i-3:i] for i in range(len(str(n))%3, len(str(n))+1, 3) if i ]), MONETARY_UNIT0) The current function return a value + MONETARY_UNIT0, you can split it and don't need any new function. print localeInfo.NumberToMoneyString(2147483647) #Result: 2.147.483.647 Yang print localeInfo.NumberToMoneyString(2147483647).split(' ')[0] #Result: 2.147.483.647 I don't know what structure you have in hpMobsList, but here's a example. maxHP = self.hpMobsList[chr.GetRace()] minHP = int(float(hpPercentage) / 100.00 * float(maxHP)) self.textHP.SetText("TP: {:s}/{:s}".format(localeInfo.NumberToMoneyString(minHP).split(' ')[0], localeInfo.NumberToMoneyString(int(maxHP)).split(' ')[0]))
  7. Hello, where i can edit exp_table 2147483647 to MORE ? Could you help me ?
  8. he cant read pet-exp table std::string temp_exp_line; std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt"); /*if (!exp_table_open.is_open()) return 0;*/ int exppet_table_counter = 0; int tmppet_exp = 0; while (!exppet_table_open.eof()) { exppet_table_open >> temp_exp_line; str_to_number(exppet_table_common[exppet_table_counter], temp_exp_line.c_str()); if (exppet_table_common[exppet_table_counter] < 2147483647) { sys_log(0, "Livelli Pet caricati da exppettable.txt: %d !", exppet_table_common[exppet_table_counter]); exppet_table_counter++; } else { fprintf(stderr, "[main] Impossibile caricare la tabella exp valore non valido\n"); break; } }
  9. You have an error with the data types which don't support a value higher than the one marked. Example: int -> 2 ^ 32 = -2147483648, 2147483647, if you want your game not to be crashed, you must handle intermediate values to those that I have just given you if that is the case :), on the other hand I would advise you to check if not You have more objects in the database that can cause such conflict or check that all assignments are correct. Example: GetSocket in item.h and you check your source code because in the functions you just placed you have no errors, more than the fact that in some cases it is necessary to check if there is a problem of "NULL", on the contrary everything is fine and there would be no point in rectifying that the candidates are superior. That is to say that everything returns a correct value, because if not all the variables are assigned, the system will simply save the memory address or NULL.
  10. Hello, I saw lot of people having This bug so I decided to create a simple fix in order to help them ! Let's go ! Open uiinventory.py and search : def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos): Then replace the whole function by : def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos): ## Resetting Sash Stats Fix - Galet - 11/11/2015 - 17h45 - Tribute to the victims of the war scrollIndex = player.GetItemIndex(scrollSlotPos) targetIndex = player.GetItemIndex(targetSlotPos) for i in xrange(player.INVENTORY_PAGE_SIZE*2): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i) getItemVNum=player.GetItemIndex itemVnum = getItemVNum(slotNumber) if 85009 == itemVnum: item.SelectItem(targetIndex) if item.GetItemSubType() == item.COSTUME_TYPE_ACCE: if self.GetAcceAttribute(targetSlotPos) == 0: return self.questionDialog = uiCommon.QuestionDialog() self.questionDialog.SetText("Would you like to reset your sash shoulder stats?") self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem)) self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog)) self.questionDialog.Open() self.questionDialog.sourcePos = scrollSlotPos self.questionDialog.targetPos = targetSlotPos else: return else: if not player.CanDetach(scrollIndex, targetSlotPos): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_METIN_INSEPARABLE_ITEM) return self.questionDialog = uiCommon.QuestionDialog() self.questionDialog.SetText(localeInfo.REFINE_DO_YOU_SEPARATE_METIN) self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem)) self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog)) self.questionDialog.Open() self.questionDialog.sourcePos = scrollSlotPos self.questionDialog.targetPos = targetSlotPos If you want it on pastebin, here you go : [Hidden Content] WARNING : This fix is only for people who have 2 inventory pages, maybe it's working with more but as it is untested I prefer to precise this, even if I'm pretty sure that the fix are completely working with the actual code, regardless on how many pages you got : If you got more than 2 pages, you must replace (player.INVENTORY_PAGE_SIZE*2) With (player.INVENTORY_PAGE_SIZE*NUMBEROFPAGES) "NUMBEROFPAGES" is simply the number of the inventory pages you got, so 4 for 4, 9 for 9, 2147483647 for 2147483647 It is probably not the best way to fix it but should works like a charm ! If you got any problems I can provide you the help needed on Metin2Dev in English and on Skype in English, German, French and Spanish Have a nice day all
  11. It worked! I can't believe I didn't think about that. It's over half now, hitting at char_battle.cpp. It had a problem with random_shuffle (removed at 17) so I made some research and changed it to std::shuffle and included algorithm and random. I passed a third parameter and it looks like this now: std::shuffle(vec_bSlots.begin(), vec_bSlots.end(), std::default_random_engine(send)); but it seems to have a problem with that third parameter: /usr/include/c++/v1/random:1959:8: error: member reference base type 'int (int, const void *, unsigned int, int)' is not a structure or union __q.generate(__ar, __ar + __k + 3); ~~~^~~~~~~~~ ... char_battle.cpp:1074:55: note: in instantiation of function template specialization 'std::__1::linear_congruential_engine<unsigned int, 48271, 0, 2147483647>::linear_congruential_engine<int (int, const void *, unsigned int, int)>' requested here ...std::shuffle(vec_bSlots.begin(), vec_bSlots.end(), std::default_random_e... ^ EDIT: Easily fixed! For future reference: // Instead of std::shuffle(vec_bSlots.begin(), vec_bSlots.end(), std::default_random_engine(send)); // Type this std::random_device rd; std::mt19937 g(rd()); std::shuffle(vec_bSlots.begin(), vec_bSlots.end(), g);
  12. How to increase the maximum amount of exp in a table? The current maximum is 2147483647, even if they 'll set it 2500000000 After rebooting the server will change the ownership exp 2147483647.
  13. after crossing int (2147483647) long (2147483647) and see experience unsigned long long after level 99 but i have work experience (2050000000) now need level 103 to level experience (2280000000) and see unsigned long long when i set experience anyone know how to fix?
  14. item.SetSocket(1, -1) or item.SetSocket(1, 2147483647)
  15. Hi, I'm looking for something so that my XP increases above the value of '2147483647'. This is so we can continue a steady rise in XP throughout the levels, rather than the total xp needed stop increasing above level 100. Obviously there's this method that i thought of, but it's not overly efficent as it'd have it's limits - Divide the XP table by a set value, divide the XP given by mobs by the same value Divide all existing players current XP by the same value. Divide all exsisting quests that give XP by the same value etc etc etc. you get the point. This would "solve" the problem but it'd just come back after we've hit the maximum limit '2147483647' again. So this is why I'm searching for a more efficient method in which to do this. I'm running on 34083r, untouched game core. Any help is greatly appreciated, Regards Invictus
  16. Hello. He wants to add a new alignments, in a sense, add new and change the value of acquiring them. I did like this topic then edytowałego it under him. [Hidden Content] It edited the: A problem I have one that reads the value of short rather than long or int as I change here ss what I mean: /set [T]Kronzu align 327670 /set [T]Kronzu align 327680 /set [T]Kronzu align 3000000 i got: -27680 /set [T]Kronzu align -3000000 i got: 27680 Anyone know how to fix it? How to change this short more? int in 16bit -215÷ 215 - 1, czyli przedział [-32768, 32767] int in 32bit -231÷ 231 - 1, czyli przedział [-2147483648, 2147483647] on packet.h short sAlignment; to int sAlignment; In: packet_char_additional_info and packet_update_char client <=> server and no work. Instancebase.h short m_sAlignment; to int m_sAlignment; NetworkActorManager.h short m_sAlignment; to int m_sAlignment;
  17. Hi Id like to set up in the Src Player exp and Pet exp over txt // START_OF_Player_EXP_TABLE_LOADING string temp_exp_line; char szExpTable[256]; snprintf(szExpTable, sizeof(szExpTable), "%s/exp.txt", LocaleService_GetBasePath().c_str()); ifstream exp_table_open(szExpTable); if (!exp_table_open.is_open()) { fprintf(stderr, "Failed to Load ExpTable from %s/exp.txt\n", LocaleService_GetBasePath().c_str()); sys_err("Failed to Load ExpTable from %s/exp.txt", LocaleService_GetBasePath().c_str()); return 0; } int exp_table_counter = 0; while (!exp_table_open.eof()) { exp_table_open >> temp_exp_line; str_to_number(exp_table_common[exp_table_counter], temp_exp_line.c_str()); exp_table_counter++; } fprintf(stderr, "EXP erfolgreich geladen von: %s\n", LocaleService_GetBasePath().c_str()); //sys_log(0, "EXP Table Loaded succsefully from %s", LocaleService_GetBasePath().c_str()); // END_OF_Player_EXP_TABLE_LOADING #ifdef NEW_PET_SYSTEM temp_exp_line = ""; //clearing std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt"); /*if (!exp_table_open.is_open()) return 0;*/ int exppet_table_counter = 0; int tmppet_exp = 0; while (!exppet_table_open.eof()) { exppet_table_open >> temp_exp_line; str_to_number(exppet_table_common[exppet_table_counter], temp_exp_line.c_str()); if (exppet_table_common[exppet_table_counter] < 2147483647) { sys_log(0, "Livelli Pet caricati da exppettable.txt: %d !", exppet_table_common[exppet_table_counter]); exppet_table_counter++; } else { fprintf(stderr, "[main] Impossibile caricare la tabella exp valore non valido\n"); break; } } #endif but it doesnt work the output: main.cpp: In function 'int main(int, char**)': main.cpp:550: error: 'string' was not declared in this scope main.cpp:550: error: expected `;' before 'temp_exp_line' main.cpp:553: error: 'ifstream' was not declared in this scope main.cpp:553: error: expected `;' before 'exp_table_open' main.cpp:554: error: 'exp_table_open' was not declared in this scope main.cpp:560: error: 'exp_table_open' was not declared in this scope main.cpp:562: error: 'temp_exp_line' was not declared in this scope main.cpp:571: error: 'temp_exp_line' was not declared in this scope gmake: *** [OBJDIR/main.o] Error 1
  18. Better do it this way: // START_OF_Player_EXP_TABLE_LOADING string temp_exp_line; char szExpTable[256]; snprintf(szExpTable, sizeof(szExpTable), "%s/exp.txt", LocaleService_GetBasePath().c_str()); ifstream exp_table_open(szExpTable); if (!exp_table_open.is_open()) { fprintf(stderr, "Failed to Load ExpTable from %s/exp.txt\n", LocaleService_GetBasePath().c_str()); sys_err("Failed to Load ExpTable from %s/exp.txt", LocaleService_GetBasePath().c_str()); return 0; } int exp_table_counter = 0; while (!exp_table_open.eof()) { exp_table_open >> temp_exp_line; str_to_number(exp_table_common[exp_table_counter], temp_exp_line.c_str()); exp_table_counter++; } fprintf(stderr, "EXP erfolgreich geladen von: %s\n", LocaleService_GetBasePath().c_str()); //sys_log(0, "EXP Table Loaded succsefully from %s", LocaleService_GetBasePath().c_str()); // END_OF_Player_EXP_TABLE_LOADING #ifdef NEW_PET_SYSTEM temp_exp_line = ""; //clearing std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt"); /*if (!exp_table_open.is_open()) return 0;*/ int exppet_table_counter = 0; int tmppet_exp = 0; while (!exppet_table_open.eof()) { exppet_table_open >> temp_exp_line; str_to_number(exppet_table_common[exppet_table_counter], temp_exp_line.c_str()); if (exppet_table_common[exppet_table_counter] < 2147483647) { sys_log(0, "Livelli Pet caricati da exppettable.txt: %d !", exppet_table_common[exppet_table_counter]); exppet_table_counter++; } else { fprintf(stderr, "[main] Impossibile caricare la tabella exp valore non valido\n"); break; } } #endif You didn't notice you've added something with the same name of variable before. Next time remember to check.
  19. Before: std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt"); Add: std::string temp_exp_line; #ifdef NEW_PET_SYSTEM std::string temp_exp_line; std::ifstream exppet_table_open("/usr/home/game/share/exppettable.txt"); /*if (!exp_table_open.is_open()) return 0;*/ int exppet_table_counter = 0; int tmppet_exp = 0; while (!exppet_table_open.eof()) { exppet_table_open >> temp_exp_line; str_to_number(exppet_table_common[exppet_table_counter], temp_exp_line.c_str()); if (exppet_table_common[exppet_table_counter] < 2147483647) { sys_log(0, "Livelli Pet caricati da exppettable.txt: %d !", exppet_table_common[exppet_table_counter]); exppet_table_counter++; } else { fprintf(stderr, "[main] Impossibile caricare la tabella exp valore non valido\n"); break; } } #endif Learn some basics of C++ - it doesn't hurt.
  20. Hello guys I've got a problem on my files, whenever the speed movement is negative, it show up like the int size 2147483647%... A video of the problem: I use a converter to convert from database to txt, and I think the problem is on the converter... Converter: [Hidden Content] (python file) If the problem is not the converter, it must be the NeXus tool, since my database was translated converting the Metin2 Client from the Portugal server... What can I do? Thanks
  21. 2,147,483,647 is the max int value. Change type int to bigint in your tablestructure. edit: This is a database solution. Dont know about the impacts in game (I do not know the source) edit2: look at this: [Hidden Content]
  22. Just a small question... Why is gold type signed int and not unsigned int?? Why would gold get negative values? Ranges: signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295
  23. I need connect execute a quest from phyton. I am using: import event event.QuestButtonClick(1) But I have a problem that is.. I don't have index of the quest I have a name. test.quest the content of the quest is: quest test begin state start begin when login begin set_state(open ) end end state open begin when button begin chat("I am here!!") end end end when I used the index of the quest (1 because is in first row of locale_list) everything work fine. But... I think all the time index of the quest will not be 1. If for some reason the change of position on the list would not work. I tried to find the index of the quest with the name of it but I could not. I tried using this: import event import quest event.QuestButtonClick(quest.GetQuestIndex("test.quest")) but does not work and get this error.... SYSERR: Jan 25 23:53:02 :: OnInfo: QUEST no quest by (quest 2147483647) any ideas or help?
  24. you need to go to your mysql server and to player > player design table and change gold from int (or something like so) and change it to bigint this will allow you to have more than 2147483647 young after buying something or re login to the game :> All the modifications that you did to game were fine. try this BIGINT 8 -9223372036854775808 9223372036854775807 0 18446744073709551615 [Hidden Content]
  25. UL =unsingned long ( UL = uLong) ULL = unsigned long long IL = int long Resut iti dai seama singur. Maximum value for a variable of type long. 2147483647 Minimum value for a variable of type long. –2147483648 Maximum value for a variable of type unsigned long. 4294967295 (uLong ) Try to user this in binary: PyObject * playerGetElk(PyObject* poSelf, PyObject* poArgs) { return PyLong_FromUnsignedLongLong(CPythonPlayer::Instance().GetStatus(POINT_GOLD)); } And in PythonPlayerModule.cpp Use ULL . Now I think they are all made for ULL, [Hidden Content] The maximum value of yang want? The rest of you realize and lonely, I suppose?
×
×
  • 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.