Jump to content
Metin2 Network
Create New...

xpro

Administrator
  • Posts

    253
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by xpro

  1. Search in Userinterface bool CPythonNetworkStream::RecvDamageInfoPacket() Available in bTarget = (pInstTarget == m_pInstTarget); Add below if (!bTarget) bTarget = pInstTarget->IsPC(); who like to add multipledmg to mosters/stone/pc char_battle.cpp if (IsPC() == true || (pAttacker->IsPC() == true && pAttacker->GetTarget() == this)) Replace with if (IsPC() || pAttacker->IsPC()) // Allow damage info for both PCs and mobs InstanceBaseEffect.cpp else if (bTarget == false) { strDamageType = "nontarget_"; rdwCRCEft = EFFECT_DAMAGE_NOT_TARGET; return false; } Replace with else if (bTarget == true) { strDamageType = "nontarget_"; rdwCRCEft = EFFECT_DAMAGE_NOT_TARGET; return true; } PythonNetworkStreamPhaseGame.cpp add under bool bTarget = (pInstTarget == m_pInstTarget); in bool CPythonNetworkStream::RecvDamageInfoPacket() This if (!bTarget) bTarget = pInstTarget->IsPC();
  2. Mysql8 vs2022 Bsd: User: root Password : dev Navicat/Mysql User: root Password: password For client to open: change the letter "ı" at the end of the Directx9 Infrastructure folder Download: [Hidden Content]
  3. ///@@@ UserInterface/Locale_inc.h: ///Add #define __BL_HIT__ ///@@@ GameLib/ActorInstanceCollisionDetection.cpp: ///Add #include "../UserInterface/Locale_inc.h" //Find in void CActorInstance::UpdateAdvancingPointInstance() matCenter = *(D3DXMATRIX *)pModelInstance->GetBoneMatrixPointer(rInstance.dwBoneIndex); ///Change #if defined(__BL_HIT__) D3DXMATRIX* pMatBone = (D3DXMATRIX*)pModelInstance->GetBoneMatrixPointer(rInstance.dwBoneIndex); matCenter = *(D3DXMATRIX*)pModelInstance->GetCompositeBoneMatrixPointer(rInstance.dwBoneIndex); matCenter._41 = pMatBone->_41; matCenter._42 = pMatBone->_42; matCenter._43 = pMatBone->_43; #else matCenter = *(D3DXMATRIX *)pModelInstance->GetBoneMatrixPointer(rInstance.dwBoneIndex); #endif
  4. root/uichat.py: Search: def __SendChatPacket(self, text, type): Add: if len(text) >= 5 and text[0:4] == "/msg": args = text[5:].split(" ") if len(args) != 3: chat.AppendChat(1, "usage: /msg <player> <message>") return target = args[0].strip() message = " ".join(args[1:]).strip() if target != "" and message != "": net.SendWhisperPacket(target, message) else: chat.AppendChat(1, "usage: /msg <player> <message>") return
  5. Download: [Hidden Content]
  6. I would like to share with you one of my latest work what is Item Trash. You can remove items directly from your inventory without dropping it. System preview: Metin2 - Trash System.rar
  7. Open uiToolTip.py and do these steps: # Add at the top (under imports): ENABLE_HIGHLIGHT_ATTR_VALUE = True # Search for: ENABLE_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0) DISABLE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0) # Add under: if ENABLE_HIGHLIGHT_ATTR_VALUE: NORMAL_COLOR_HEX = 0xffC2C2C2 NORMAL_COLOR_STR = "C2C2C2" NEGATIVE_COLOR_HEX = 0xffE67976 NEGATIVE_COLOR_HIGHLIGHT_STR = "E15753" SPECIAL_POSITIVE_COLOR_HEX = 0xffB0DFB4 SPECIAL_POSITIVE_COLOR_HIGHLIGHT_STR = "7CDB84" SPECIAL_POSITIVE_COLOR2_HEX = 0xffE1FAE1 SPECIAL_POSITIVE_COLOR2_HIGHLIGHT_STR = "A0FBA0" SPECIAL_POSITIVE_COLOR5_HEX = 0xffC8E6CD SPECIAL_POSITIVE_COLOR5_HIGHLIGHT_STR = "91E29F" # Search for: affectColor = self.__GetAttributeColor(i, value) # Add under: if ENABLE_HIGHLIGHT_ATTR_VALUE and self.CanEquip(): hightlightColor = self.__GetAttributeHighlightColor(affectColor) value_pos = affectString.find(str(value)) if value_pos > 1: value_text = affectString[value_pos - 1:] affectString = "{}|cff{}{}|r".format(affectString[:value_pos - 1], hightlightColor, value_text) elif value_pos == 0: value_text = affectString[:value_pos + len(str(value)) + 1] affectString = "|cff{}{}|r{}".format(hightlightColor, value_text, affectString[len(value_text):]) # Search for: def __GetAttributeColor(self, index, value): if value > 0: if index >= player.ATTRIBUTE_SLOT_RARE_START and index < player.ATTRIBUTE_SLOT_RARE_END: return self.SPECIAL_POSITIVE_COLOR2 else: if index == player.ATTRIBUTE_SLOT_NORM_END: return self.SPECIAL_POSITIVE_COLOR5 else: return self.SPECIAL_POSITIVE_COLOR elif value == 0: return self.NORMAL_COLOR else: return self.NEGATIVE_COLOR # Replace with: if ENABLE_HIGHLIGHT_ATTR_VALUE: def __GetAttributeHighlightColor(self, color): if color == self.NORMAL_COLOR_HEX: return self.NORMAL_COLOR_STR elif color == self.SPECIAL_POSITIVE_COLOR_HEX: return self.SPECIAL_POSITIVE_COLOR_HIGHLIGHT_STR elif color == self.SPECIAL_POSITIVE_COLOR2_HEX: return self.SPECIAL_POSITIVE_COLOR2_HIGHLIGHT_STR elif color == self.NEGATIVE_COLOR_HEX: return self.NEGATIVE_COLOR_HIGHLIGHT_STR else: return self.SPECIAL_POSITIVE_COLOR5_HIGHLIGHT_STR def __GetAttributeColor(self, index, value): if value > 0: if index >= player.ATTRIBUTE_SLOT_RARE_START and index < player.ATTRIBUTE_SLOT_RARE_END: return self.SPECIAL_POSITIVE_COLOR2_HEX else: if index == player.ATTRIBUTE_SLOT_NORM_END: return self.SPECIAL_POSITIVE_COLOR5_HEX else: return self.SPECIAL_POSITIVE_COLOR_HEX elif value == 0: return self.NORMAL_COLOR_HEX else: return self.NEGATIVE_COLOR_HEX else: def __GetAttributeColor(self, index, value): if value > 0: if index >= player.ATTRIBUTE_SLOT_RARE_START and index < player.ATTRIBUTE_SLOT_RARE_END: return self.SPECIAL_POSITIVE_COLOR2 else: if index == player.ATTRIBUTE_SLOT_NORM_END: return self.SPECIAL_POSITIVE_COLOR5 else: return self.SPECIAL_POSITIVE_COLOR elif value == 0: return self.NORMAL_COLOR else: return self.NEGATIVE_COLOR
  8. Download: [Hidden Content]
  9. ACMD(do_item_new) // Nowa funkcja by: Muchomor { char arg1[256], arg2[256], arg3[256]; three_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2), arg3, sizeof(arg3)); if (!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "Usage: item <item vnum> <item count> <times to spawn>"); return; } int iCount = 1; int iTimes = 1; if (*arg2) { str_to_number(iCount, arg2); iCount = MINMAX(1, iCount, g_bItemCountLimit); } if (*arg3) { str_to_number(iTimes, arg3); iTimes = MAX(1, iTimes); } DWORD dwVnum; std::pair<DWORD, DWORD> vnumRange; std::vector<std::string> v_range; std::string sRange(arg1); boost::split(v_range, sRange, boost::is_any_of("-")); if (v_range.size() < 2) { if (isnhdigit(*arg1)) { str_to_number(dwVnum, arg1); if (!ITEM_MANAGER::instance().GetTable_NEW(dwVnum)) { ch->ChatPacket(CHAT_TYPE_INFO, "#%u item does not exist by that vnum.", dwVnum); return; } else { vnumRange = std::make_pair(dwVnum, dwVnum); } } else { if (!ITEM_MANAGER::instance().GetVnum(arg1, dwVnum)) { ch->ChatPacket(CHAT_TYPE_INFO, "#%u item does not exist by that vnum(%s).", dwVnum, arg1); return; } else { vnumRange = std::make_pair(dwVnum, dwVnum); } } } else { try { vnumRange = std::make_pair(std::stoul(v_range[0], NULL, 10), std::stoul(v_range[1], NULL, 10)); if (vnumRange.first > vnumRange.second) { std::swap(vnumRange.first, vnumRange.second); } } catch (...) { ch->ChatPacket(CHAT_TYPE_INFO, "Invalid range! To use range feature type following syntax: ID-ID."); return; } } for (unsigned int i = vnumRange.first; i <= vnumRange.second; i++) { for (int j = 0; j < iTimes; j++) { LPITEM item = ITEM_MANAGER::instance().CreateItem(i, iCount, 0, true); if (item) { if (item->IsDragonSoul()) { int iEmptyPos = ch->GetEmptyDragonSoulInventory(item); if (iEmptyPos != -1) { item->AddToCharacter(ch, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyPos)); LogManager::instance().ItemLog(ch, item, "GM", item->GetName()); } else { M2_DESTROY_ITEM(item); if (!ch->DragonSoul_IsQualified()) { ch->ChatPacket(CHAT_TYPE_INFO, "ŔÎşĄŔĚ Č°ĽşČ­ µÇÁö ľĘŔ˝."); } else { ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space."); } } } else { int iEmptyPos = ch->GetEmptyInventory(item->GetSize()); if (iEmptyPos != -1) { item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos)); LogManager::instance().ItemLog(ch, item, "GM", item->GetName()); } else { M2_DESTROY_ITEM(item); ch->ChatPacket(CHAT_TYPE_INFO, "Not enough inventory space."); } } } else { ch->ChatPacket(CHAT_TYPE_INFO, "#%u item does not exist by that vnum.", dwVnum); } } } }
  10. Others people want 2k pln for it packer, funny. Just find #define ENABLE_LZ4_PACK_COMPRESSION Download: [Hidden Content]
  11. uitooltip.py Find: def AddItemData(self Add before def ObrazPrzedmiotu(self, file): iconFile = str(file) itemImage = ui.ImageBox() itemImage.SetParent(self) itemImage.Show() itemImage.LoadImage(iconFile) itemImage.SetPosition(itemImage.GetWidth()/ 2 - 5+82, self.toolTipHeight) self.toolTipHeight += itemImage.GetHeight() self.childrenList.append(itemImage) self.ResizeToolTip() in this line we edit the X position of the image itemImage.SetPosition(itemImage.GetWidth()/ 2 - 5+82, self.toolTipHeight) Exemple: if 43101 == itemVnum: if 0 != metinSlot: self.ObrazPrzedmiotu("icon/item/43001.tga")
  12. Download: [Hidden Content]
  13. pc.get_account() : Returns String value. Returns the account name. pc.get_account_id() : Returns an int value. Returns the account id. pc.get_alignment() : Returns an int value. Returns the rank of the character. pc.get_dx() : Returns an int value. Gives the character's dex score. pc.get_empire() : Returns an int value. Returns the character's kingdom. (1: Red, 2: Yellow, 3: Blue) pc.get_empty_inventory_count() : Returns an int value. Returns the number of empty slots in the character's inventory. pc.get_equip_refine_level( LuaNumber cell ) : Takes 1 argument. It is int value. When you send the slot id in the inventory, it gives the refinement level of the item in that slot, that is, the + value. pc.get_exp() : Returns an int value. Returns the character's EXP information. pc.get_exp_level() : Returns an int value. Returns the character's EXP box information. It returns as many numbers as how many boxes are full. pc.get_gm_level() : Returns an int value. Grants the character's GM authority. (1: Player, 2: LOW_WIZARD, 3: GOD, 4: HIGH_WIZARD, 5: IMPLEMENTOR) pc.get_gold() : Returns an int value. Returns the character's Yang amount. pc.get_guild() : Returns an int value. Returns the id of the character's guild. Returns false if there is no guild. pc.get_horse_level() : Returns an int value. Gives the character horse level. Returns false if there is no horse. pc.get_hp() : Returns an int value. Gives the character's current life points. pc.get_ht() : Returns an int value. Gives the character's VIT score. pc.get_informer_item() pc.get_informer_type() pc.get_ip0() : Returns String value. Returns the character's ip information. pc.get_iq() : Returns an int value. Returns the character's INT score. pc.get_job() : Returns an int value. Returns the gender of the character. pc.get_killee_drop_pct() pc.get_language() pc.get_leadership() pc.get_language2() pc.get_level() : Returns an int value. Returns the character's level. pc.get_local_x() : Returns an int value. Returns the x value of the client-based character's position. pc.get_local_y() : Returns an int value. Returns the y value of the client-based character's position. pc.get_logoff_interval() pc.get_map_index() : Returns an int value. Returns the id of the map where the character is located. pc.get_max_hp() : Returns an int value. It gives the maximum hp the character can get. pc.get_max_sp() : Returns an int value. It gives the maximum sp points that the character can get. pc.get_money() : Returns an int value. Returns the character's Yang amount. pc.get_name() : Returns String value. Gives the name of the character. pc.get_next_exp() : Returns an int value. Gives the amount of EXP required for the next level. pc.get_part() pc.get_player_id() : Returns an int value. Returns the id of the character. pc.get_playtime() : Returns an int value. Returns the total time spent in the game. pc.get_premium_remain_sec() : Returns an int value. Grants the premium time. pc.get_race() : Returns an int value. Returns the class of the character. pc.get_real_alignment() : Returns an int value. Returns the character's ranking score. pc.get_sex() : Returns an int value. Returns the gender of the character. pc.get_sig_items(LuaNumber group_vnum) : Takes an Int argument. Returns an array. Returns the item list of the item group sent with the argument. pc.get_skill_group() : Returns an int value. Gives the character's chosen ability group. Ex: Bodily, Mental pc.get_skill_level(LuaNumber vnum) : Takes 1 argument. Returns an int. Returns the level of the skill id sent with the argument. Ex: pc.get_skill_level(31) => Returns the level of the Assassination skill. pc.get_skill_point() : Returns an int value. It gives the amount of skill points that the character has not used. pc.get_sockets_item() : Returns an array. It lists the socket information of the items in the character's inventory. pc.get_sp() : Returns an int value. Returns the character's HP. pc.get_special_ride_vnum() : Returns an int value. Returns special item information. pc.get_st() : Returns an int value. Gives the character's STR score. pc.get_start_location() pc.get_vid() : Returns an int value. Returns the auth id of the character. pc.get_war_map() pc.get_weapon() : Returns an int value. Returns the vnum value of the weapon the character is wearing in their hand. Returns false if empty-handed. pc.get_wear( LuaNumber cell ) : Takes 1 int argument. Returns an int value. It gives the wear flag of the item in the box in the inventory determined by the data sent with the argument. pc.get_x() : Returns an int value. Returns the x-coordinate of the server-based character. pc.get_y() : Returns an int value. Returns the y-coordinate of the server-based character. pc.getarmor() : Returns an int value. Gives the vnum of the armor that the character wears on it. If not, it returns false. pc.getcheque() : Returns an int value. Returns the character's Won information. pc.getcurrentmapindex() : Returns an int value. Returns the id of the map where the character is located. pc.getempire() : Returns an int value. Returns the character's kingdom. (1: Red, 2: Yellow, 3: Blue) pc.getf( LuaString questname, LuaString flagname ) : It takes 2 string arguments. 1st quest name, 2nd flag name. Returns an int value. quest returns the value added to the database. pc.getgold() : Returns an int value. Returns the character's Yang amount. pc.getguild() : Returns an int value. Returns the id of the character's guild. Returns false if there is no guild. pc.gethp() : Returns an int value. Gives the character's current life points. pc.getleadership() pc.getmaxhp() : Returns an int value. It gives the maximum hp the character can get. pc.getmaxsp() : Returns an int value. It gives the maximum sp points the character can get. pc.money() : Returns an int value. Returns the character's Yang amount. pc.getplaytime() : Returns an int value. Returns the total time spent in the game. pc.getqf( LuaString flag ) : Takes 1 string argument. Returns an int. It searches the flag value of the running quest in the quest database and returns its value. pc.getsp() : Returns an int value. Gives the character's current mana points. pc.getweapon() : Returns an int value. Returns the vnum value of the weapon the character is wearing in their hand. Returns false if empty-handed. pc.getx() : Returns an int value. Returns the x-coordinate of the server-based character. pc.gety() : Returns an int value. Returns the y-coordinate of the server-based character. Item Functions item.can_over9refine() : Checks if the item has a transformation after +9. Returns Boolean. (If: 1, Otherwise: 0) item.change_to_over9() : Changes the transformation of the item. item.copy_and_give_before_remove( LuaNumber vnum ) : Gives you an item with the vnum we gave in the argument and deletes the item. item.get_addon_type() : Returns the addon_type value if the item can take average and skill damage. item.get_attribute_set_index() item.get_cell( LuaNumber cell ) : Gets the information of the item in your inventory. item.get_count() : Returns the number of items. as int. item.get_id() : The id of the item. as int. item.get_level() : Returns the + value of the item. as int. item.get_level_limit() : Gets the level limit of the item. item.get_name() : Returns the locale name of the item. item.get_over9_material_vnum( LuaNumber vnum ) : Returns the transformation materials of the item transformed after +9. item.get_refine_vnum( LuaNumber vnum ) : Gets the refinement (development) vnum of the item. item.get_shop_price() : The selling price of the item in the NPC. item.get_size() : It gives information about how many slots the item occupies in the inventory. item.get_socket( LuaNumber index ) : Returns the stones engraved on the item or the duration of the item. item.get_sub_type() : Returns the subtype of the item. item.get_type() : Returns the main type of the item. item.get_value( LuaNumber index ) : Returns the value of the item. item.get_vnum() : Returns the item's item_proto id. item.has_flag( LuaNumber value ) : Checks whether the value given in the argument is in the item. item.next_refine_vnum() : Returns the refine vnum at the next + enhancement. item.over9refine() : Checks if the item has a transformation after +9. Returns Boolean. (If: 1, Otherwise: 0) item.remove() : Deletes the item. item.select( LuaNumber item_id ) : Selects the item with the item's id. (For use in quests.) item.select_cell( LuaNumber cell ) : Selects the item with its cell number in the inventory. (For use in quests.) item.set_shop_price() : To change the npc sold value of the item. item.set_socket( LuaNumber index, LuaNumber value ) : Changes the socket value of the item. item.set_value( LuaNumber index, LuaNumber value ) : Changes the value of the item. item.start_realtime_expire() : If the item has an expiration date, it starts its duration. item.get_wearflag0() : Returns the type of item. item.has_wearflag0( luaNumber index ) : It checks whether the data sent with the argument matches the wearflag of the item. item.get_antiflag0( luaNumber index ) : It checks whether the data sent with the argument matches the antiflag of the item. item.has_antiflag0() : Returns the item's antiflag (shaman cannot wear etc.) information. item.get_immuneflag0() : Returns the item's immuneflag value. item.has_immuneflag0( luaNumber index ) : The data sent with the argument checks whether the item matches the immuneflag. item.add_attr0( LuaNumber mode ) : It is used to add enchantment to the item. item.change_attr0( LuaNumber mod e) : Changes the item's enchantments. item.clear_attr0( LuaNumber mode ) : Clears the item's enchantments item.count_attr0( LuaNumber mode ) : Changes the value of the item's enchantments. item.get_attr0() : Returns the item's enchantments. item.set_attr0( LuaNumber id1, LuaNumber value1, LuaNumber id2, LuaNumber value2, LuaNumber id3, LuaNumber value3, LuaNumber id4, LuaNumber value4, LuaNumber id5, LuaNumber id2, LuaNumber value7 of LuaNumber value7, LuaNumber value6 of LuaNumber id5, LuaNumber value7, LuaNumber value6 It's good to enter alone. item.set_count0( LuaNumber count ) : Changes the quantity of the item. item.is_available0() : The item used.
  14. locale_game.txt Add TOOLTIP_BUYPRICE_FREE Item is free. uitooltip.py Find: def AppendPrice(self, price): Change def AppendPrice(self, price): self.AppendSpace(5) if price == 0: self.AppendTextLine(localeInfo.TOOLTIP_BUYPRICE_FREE, self.POSITIVE_COLOR) else: self.AppendTextLine(localeInfo.TOOLTIP_BUYPRICE % (localeInfo.NumberToMoneyString(price)), self.GetPriceColor(price))
  15. I shared this because as a player it is difficult to call it up, and I found when I was playing around with copying items. Find Item_manager.cpp void ITEM_MANAGER::RemoveItem(LPITEM item, const char * c_pszReason) { if (!item) // Fix game.core return; and #ifndef DEBUG_ALLOC void ITEM_MANAGER::DestroyItem(LPITEM item) #else void ITEM_MANAGER::DestroyItem(LPITEM item, const char* file, size_t line) #endif { if (!item) // Fix game.core { sys_err("co jest kurwa."); return; } and void ITEM_MANAGER::GetPlayerItem(LPITEM item, TPlayerItem* result) { if (!item) return;
×
×
  • Create New...

Important Information

Terms of Service

Write what you are looking for and press enter or click the search icon to begin your search