Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    839
  • Joined

  • Days Won

    393
  • Feedback

    100%

Everything posted by xP3NG3Rx

  1. if (strMapEventOx == stringName) instead of: if (!strcmp(strMapEventOx, stringName))
  2. v16.3 Update in my MEGA package (inside the .UPDATES folder) Under upload.
  3. Khm.. enum EWindows { RESERVED_WINDOW, INVENTORY, // ±âş» ŔÎşĄĹ丮. (45Ä­ ÂĄ¸®°ˇ 2ĆäŔĚÁö Á¸Ŕç = 90Ä­) EQUIPMENT, SAFEBOX, MALL, DRAGON_SOUL_INVENTORY, BELT_INVENTORY, // NOTE: W2.1 ąöŔüżˇ »ő·Î Ăß°ˇµÇ´Â ş§Ć® ˝˝·Ô ľĆŔĚĹŰŔĚ Á¦°řÇĎ´Â ş§Ć® ŔÎşĄĹ丮 #ifdef ENABLE_GUILDRENEWAL_SYSTEM GUILDBANK, #endif #ifdef ENABLE_ACCE_COSTUME_SYSTEM ACCEREFINE, #endif GROUND, // NOTE: 2013łâ 2żů5ŔĎ ÇöŔç±îÁö unused.. żÖ Ŕִ°ĹÁö??? #ifdef ENABLE_GROWTH_PET_SYSTEM PET_FEED, #endif #ifdef ENABLE_CHANGE_LOOK_SYSTEM CHANGELOOK, #endif WINDOW_TYPE_MAX, }; BYTE c_aSlotTypeToInvenType[SLOT_TYPE_MAX] = { RESERVED_WINDOW, // SLOT_TYPE_NONE INVENTORY, // SLOT_TYPE_INVENTORY RESERVED_WINDOW, // SLOT_TYPE_SKILL RESERVED_WINDOW, // SLOT_TYPE_EMOTION RESERVED_WINDOW, // SLOT_TYPE_SHOP RESERVED_WINDOW, // SLOT_TYPE_EXCHANGE_OWNER RESERVED_WINDOW, // SLOT_TYPE_EXCHANGE_TARGET RESERVED_WINDOW, // SLOT_TYPE_QUICK_SLOT RESERVED_WINDOW, // SLOT_TYPE_SAFEBOX <- SAFEBOX, MALLŔÇ °ćżě Çϵĺ ÄÚµůµÇľîŔÖ´Â LEGACY Äڵ带 ŔŻÁöÇÔ. #ifdef ENABLE_GUILDRENEWAL_SYSTEM GUILDBANK, // SLOT_TYPE_GUILDBANK #endif #ifdef ENABLE_ACCE_COSTUME_SYSTEM SLOT_TYPE_ACCE, // ACCEREFINE #endif RESERVED_WINDOW, // SLOT_TYPE_PRIVATE_SHOP RESERVED_WINDOW, // SLOT_TYPE_MALL <- SAFEBOX, MALLŔÇ °ćżě Çϵĺ ÄÚµůµÇľîŔÖ´Â LEGACY Äڵ带 ŔŻÁöÇÔ. DRAGON_SOUL_INVENTORY, // SLOT_TYPE_DRAGON_SOUL_INVENTORY #ifdef ENABLE_GROWTH_PET_SYSTEM PET_FEED, // SLOT_TYPE_PET_FEED_WINDOW #endif EQUIPMENT, // SLOT_TYPE_EQUIPMENT BELT_INVENTORY, // SLOT_TYPE_BELT_INVENTORY #ifdef ENABLE_AUTO_SYSTEM RESERVED_WINDOW, // SLOT_TYPE_AUTO #endif #ifdef ENABLE_CHANGE_LOOK_SYSTEM CHANGELOOK, // SLOT_TYPE_CHANGE_LOOK #endif }; BYTE c_aWndTypeToSlotType[WINDOW_TYPE_MAX] = { SLOT_TYPE_NONE, SLOT_TYPE_INVENTORY, // INVENTORY SLOT_TYPE_EQUIPMENT, // EQUIPMENT SLOT_TYPE_SAFEBOX, // SAFEBOX SLOT_TYPE_MALL, // MALL SLOT_TYPE_DRAGON_SOUL_INVENTORY, // DRAGON_SOUL_INVENTORY SLOT_TYPE_BELT_INVENTORY, // BELT_INVENTORY #ifdef ENABLE_GUILDRENEWAL_SYSTEM SLOT_TYPE_GUILDBANK, // GUILDBANK #endif #ifdef ENABLE_ACCE_COSTUME_SYSTEM SLOT_TYPE_ACCE, // ACCEREFINE #endif #ifdef ENABLE_GROWTH_PET_SYSTEM SLOT_TYPE_PET_FEED_WINDOW, // PET_FEED #endif #ifdef ENABLE_CHANGE_LOOK_SYSTEM SLOT_TYPE_CHANGE_LOOK, // CHANGELOOK #endif };
  4. So, you are saying that: 1. If we are wolfman. &&(aaand) 2. The attaching weapon type is sword!wtf! &&(and) 3. The attaching part is weapon. &&(aaaaand!) 4. Item type is rod or pickaxe. Am I right? I reversed my code from official binary, so do not tell me how should be working, you! who selling @martysama0134's source. If anyone feel that to come and share their fix about this bug, why didn't come so far...? Shame.
  5. Whole official client is unpacked at here: Mega.nz Enjoy and have fun
  6. Hey, As I promised that I make a fix for the wolfmans pickaxe, and fishing rod holding, I'm here with it. 1.) Open GameLib\RaceData.h and find this: void RegisterAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName); Paste this below: void ChangeAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName); 2. Open GameLib\RaceData.cpp and find this function: void CRaceData::RegisterAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName) { m_AttachingBoneNameMap.insert(TAttachingBoneNameMap::value_type(dwPartIndex, c_szBoneName)); } Than paste this function below: void CRaceData::ChangeAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName) { TAttachingBoneNameMap::iterator it = m_AttachingBoneNameMap.find(dwPartIndex); if (it == m_AttachingBoneNameMap.end()) return; //m_AttachingBoneNameMap[dwPartIndex] = c_szBoneName; //bad behavior possiblity it->second = c_szBoneName; } The following modification is may different by systems like costume weapon and so on, so I give a solution for clean version, you have to make it yourself. 3.) Open GameLib\ActorInstanceAttach.cpp and find this code(or something like that with other systems): void CActorInstance::AttachWeapon(DWORD dwItemIndex,DWORD dwParentPartIndex, DWORD dwPartIndex) { //[...] __DestroyWeaponTrace(); //ľçĽŐą«±â(ŔÚ°´ Ŕ̵µ·ů) żŢĽŐ,żŔ¸ĄĽŐ ¸đµÎżˇ ŔĺÂř. if (__IsRightHandWeapon(pItemData->GetWeaponType())) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON, pItemData); if (__IsLeftHandWeapon(pItemData->GetWeaponType())) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON_LEFT, pItemData); and replace it with this: void CActorInstance::AttachWeapon(DWORD dwItemIndex,DWORD dwParentPartIndex, DWORD dwPartIndex) { //[...] DWORD dwWeaponType = pItemData->GetWeaponType(); #ifdef ENABLE_WOLFMAN_CHARACTER if (m_eRace == CRaceData::RACE_WOLFMAN_M) { char* szAttachingBoneName = "equip_right_weapon"; if (dwWeaponType != CItemData::WEAPON_CLAW) szAttachingBoneName = "equip_right"; m_pkCurRaceData->ChangeAttachingBoneName(CRaceData::PART_WEAPON, szAttachingBoneName); } #endif __DestroyWeaponTrace(); if (__IsRightHandWeapon(dwWeaponType)) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON, pItemData); if (__IsLeftHandWeapon(dwWeaponType)) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON_LEFT, pItemData); Done, build and enjoy. P3NG3R.
  7. With that modification the claws will be rotated also like the rod, and the pick axe. As you can see on the 2nd picture.
  8. Oh damn I understood already, I'm an idiot. if ( *(_DWORD *)(v7 + 1244) == 8 ) // Dog { if ( CItemData::GetType(v26) == 28 ) v16 = CItemData::GetValue(v26, v15, 3u); else v16 = CItemData::GetWeaponType(v26); v18 = v16 == 8; v19 = (int)"equip_right_weapon"; if ( !v18 ) v19 = (int)"equip_right"; sub_59C530(*(_DWORD *)(v7 + 1280), v17, 0, edi0, 1, v19);// wtf is this (v7 + 1280 : ActorInstance::m_pkCurRaceData) UPDATE: change the attaching bonename } I will fix this shit tommorow, thank you so much. Now I'm uploading the whole actual decrypted GayForge client
  9. This and this, oh and brain.exe: #[...] import item #[...] class SafeboxWindow(ui.ScriptWindow): #[...] def GetEmptyItemPos(self, itemHeight): #DaRealFreak is freak :o ;) inventory_size = player.INVENTORY_PAGE_SIZE * player.INVENTORY_PAGE_COUNT # function to return the blocked slots based on the item size GetBlockedSlots = lambda slot, size: [slot+(round*5) for round in xrange(size)] # check if an item in on the slot and get the blocked slots, in the end chain all of our lists together blocked_slots = [element for sublist in [GetBlockedSlots(slot, item.GetItemSize(item.SelectItem(player.GetItemIndex(slot)))[1]) for slot in xrange(inventory_size) if player.isItem(slot)] for element in sublist] # check is only necessary if our item size is > 1, else bigger performance loss in list comprehension if itemHeight > 1: # add the slots where f.e. size 2 items won't fit because of the 2-page-separated inventory [[blocked_slots.append(slot) for slot in range(inventory_size/round-(itemHeight-1)*5, inventory_size/round) if not slot in blocked_slots] for round in xrange(1,3)] # check for every slot if it's not in the blocked_slots list and check also for the size the lower slots free_slots = [slot for slot in xrange(inventory_size) if not slot in blocked_slots and not True in [e in blocked_slots for e in [slot+(round*5) for round in xrange(itemHeight)]]] # if our free_slot list is empty return -1 as error code, else return the first possible slot return [free_slots, -1][len(free_slots) == 0] def UseItemSlot(self, slotIndex): if mouseModule.mouseController.isAttached(): mouseModule.mouseController.DeattachObject() item.SelectItem(safebox.GetItemID(self.__LocalPosToGlobalPos(slotIndex))) (w, h) = item.GetItemSize() emptyInvenSlots = self.GetEmptyItemPos(h) if emptyInvenSlots == -1: return net.SendSafeboxCheckoutPacket(slotIndex, emptyInvenSlots[0]) #[...] Edit: Tested, and works. There is a little mistake, when you log into your account, and open safebox than "checkout" some items, those items will new items, I mean the slots will be activated, because of this: void CInputMain::SafeboxCheckout(LPCHARACTER ch, const char * c_pData, bool bMall) { //[...] pkSafebox->Remove(p->bSafePos); pkItem->SetLastOwnerPID(ch->GetPlayerID()); #fixme slothighlight pkItem->AddToCharacter(ch, p->ItemPos); ITEM_MANAGER::instance().FlushDelayedSave(pkItem); //[...] } [Hidden Content] For that you can put items into safebox by clicks you have to check that safebox is opened or not, and rewrite/modify the useslot function in uiInventory.py(InventoryWindow class)
  10. Because it store the option what you set and keep it the last option in every client start. So if you disable it, and close the client itt will be disabled unti you don't enable it again an so on, better and sexier
  11. Do you know what are you talking about or I do not understand you? The chenking of the flag of the block in python now, but if you put the checking into c++ is similar and faster a little bit(s) I mean this: if systemSetting.IsShowMoneyText() == True: Same with this c++ code before the binary calls the python method: CPythonSystem::Instance().IsShowMoneyText()
  12. Thanks. I think better way if the flag is active do not call the python method in game.py PythonNetworkStreamPhaseGame.cpp Replace this: if (POINT_GOLD == PointChange.Type) { if (PointChange.amount > 0) { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", Py_BuildValue("(i)", (int)PointChange.amount)); } } With this: if (POINT_GOLD == PointChange.Type) { if (PointChange.amount > 0 && CPythonSystem::Instance().IsShowMoneyText()) { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", Py_BuildValue("(i)", (int)PointChange.amount)); } }
  13. Watafak are you talking about, txt-sql? xD Anyway this system is a part of the full system.
  14. void CHARACTER::DetermineDropMetinStone() { if (g_bDisabledStoneDrop) { m_dwDropMetinStone = 0; return; } //.... } The g_bDisabledStoneDrop is a configurable variable via CONFIG in config.h/.cpp
  15. In the first version of this system had an ugly (+) mark(from v15.2, and deleted by v15.3) icon(/item/trade.tga) on every items which are not tradeable. The actual version(I mean this grayscale) came with v15.4. Btw I planned to release it, but I don't know yet.
  16. 1.-2. Complicate to explain it, but with one word: Affect 3. char_item.cpp > UseItemEx > ITEM_BLEND case 4. Google > "metin2 restart time c++"
  17. That isn't image, c++ code. if (IS_SET(rSlot.dwState, SLOT_STATE_UNUSABLE)) { CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.3f); CPythonGraphic::Instance().RenderBar2d(m_rect.left + rSlot.ixPosition, m_rect.top + rSlot.iyPosition, m_rect.left + rSlot.ixPosition + rSlot.byxPlacedItemSize * ITEM_WIDTH, m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize * ITEM_HEIGHT); }
  18. I do not know what is this and why need this, but the code is ugly a little. And what those commented lines are? If you release smthg do not put inside unnecessary codes. Here is a little code which is much sexier: import app, chat szText = "banword" fHandle = app.OpenTextFile("locale/en/block_words_python.txt") if not fHandle: return False if szText in [app.GetTextFileLine(fHandle, i).strip() for i in xrange(app.GetTextFileLineCount(fHandle))] chat.AppendChat(chat.CHAT_TYPE_INFO, "[SYSTEM] Blocked words were introduced!") return
  19. Wow, it's so cool idea, thank you!
  20. Seems syntax error. But what's the problem? If you unequip the new weapon, the effect will not removed?
×
×
  • 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.