Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    855
  • Joined

  • Days Won

    402
  • Feedback

    100%

Everything posted by xP3NG3Rx

  1. When I saw it I said LOL! if (CPythonChat::WHISPER_TYPE_CHAT == whisperPacket.bType || CPythonChat::WHISPER_TYPE_GM == whisperPacket.bType) { #ifdef ENABLE_WHISPER_FLASHING FLASHWINFO flashInfo; flashInfo.cbSize = sizeof(flashInfo); flashInfo.hwnd = CPythonApplication::Instance().GetWindowHandle(); flashInfo.dwFlags = FLASHW_ALL | FLASHW_TIMERNOFG; flashInfo.uCount = 0; flashInfo.dwTimeout = 0; FlashWindowEx(&flashInfo); #endif _snprintf(line, sizeof(line), "%s : %s", whisperPacket.szNameFrom, buf); PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnRecvWhisper", Py_BuildValue("(iss)", (int) whisperPacket.bType, whisperPacket.szNameFrom, line)); } 10€ for nothing xD
  2. #rofl really :"D While I wrote I was thinking about blocks item dropping about x sec
  3. The revisions lost their value while the source was published. The last official game is r40250 like the "clean"(I mean full of bugs) source. Higher revisions are selfmade cores nothing else in my opinion.
  4. Hmm... Mouse? MouseButtonLeftUp? Maybe game.py? Ohh! itemDropQuestionDialog -> acceptevent -> __SendDropItemPacket -> m2net.SendItemDropPacketNew -> HEADER_CG_ITEM_DROP2 -> input_main.cpp -> ItemDrop2 -> ch->DropItem -> char_item.cpp -> CHARACTER::DropItem -> Magic -> If (expr) return;
  5. I don't use it, but any syserr or smth?
  6. Also deadlink btw. [Hidden Content]
  7. #define DISABLE_TASKBAR_GROUPING
  8. Hello everyone. If you play or played on gameforge servers you should to know that what is this. When you are opening more than one clients the icon of the applications (on the windows taskbar) are groupped like With this little modification you can do like this(as on gameforge clients work): Open the EterLib\MSWindow.cpp and paste this under the #include <windowsx.h> line: #define DISABLE_TASKBAR_GROUPING #ifdef DISABLE_TASKBAR_GROUPING #include <Shobjidl.h> #endif Then scroll down to the CMSWindow::Create function and search this code: if (!m_hWnd) return false; Paste the following code below of that: #ifdef DISABLE_TASKBAR_GROUPING OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); if (v.dwMajorVersion == 6 && v.dwMinorVersion >= 1 || v.dwMajorVersion > 6) { WCHAR myAppID[128]; swprintf(myAppID, sizeof(myAppID) / sizeof(myAppID[0]), L"MyMetin2AppID%u", GetCurrentProcessId()); HRESULT hr = SetCurrentProcessExplicitAppUserModelID(myAppID); if (!SUCCEEDED(hr)) return false; } #endif The if-statement checks your windows version and if passed, the ungrouping will run. (6.1 is Win7SP1) P3NG3R
  9. Omg. Just add this enum into RaceData.h as public inside the CRaceData class: enum ERaces { RACE_WARRIOR_M, RACE_ASSASSIN_W, RACE_SURA_M, RACE_SHAMAN_W, RACE_WARRIOR_W, RACE_ASSASSIN_M, RACE_SURA_W, RACE_SHAMAN_M, #ifdef ENABLE_WOLFMAN_CHARACTER RACE_WOLFMAN_M, #endif RACE_MAX_NUM, }; w/ or w/o wolfman macro..
  10. Yes but updated now :). They changed the whole TItemPos also, by split the inventories into variables by windowtypes. I mean: Now the Cell of acce is: LOBYTE(v50) = 2;//EQUIPMENT page *(unsigned __int16 *)((char *)&v50 + 1) = 22;//ACCE slotIndex absorbedItemVnum = CPythonPlayer::GetItemMetinSocket(0, (int)&v17, v50, 0); in C++: DWORD absorbedItemVnum = CPythonPlayer::instance().GetItemMetinSocket(TItemPos(EQUIPMENT, c_Costume_Slot_Acce), 0); But in prior version(and in the public src also) looks like this: LOBYTE(v4) = 1;//INVENTORY page *(_WORD *)((char *)&v4 + 1) = 112;//ACCE slotIndex absorbedItemVnum = CPythonPlayer::GetItemMetinSocket(0, v4, 0); in C++: DWORD absorbedItemVnum = CPythonPlayer::instance().GetItemMetinSocket(TItemPos(INVENTORY, c_Costume_Slot_Acce), 0); This is the new version of IsValidCell for every inventory page: char __fastcall TItemPos::IsValidCell(int a1) { char result; // al@2 switch ( *(_BYTE *)a1 )//wndType { case INVENTORY: result = (unsigned int)*(_WORD *)(a1 + sizeof(BYTE)/*1*/) < 180; break; case EQUIPMENT: result = (unsigned int)*(_WORD *)(a1 + sizeof(BYTE)/*1*/) < 44; break; case BELT_INVENTORY: result = (unsigned int)*(_WORD *)(a1 + sizeof(BYTE)/*1*/) < 16; break; case DRAGON_SOUL_INVENTORY: result = (signed int)*(_WORD *)(a1 + sizeof(BYTE)/*1*/) < 960; break; default: result = 0; break; } return result; } So, they were do like this way: typedef struct SPlayerStatus { TItemData aInventoryItem[c_Inventory_Count];//180 = 4*45 TItemData aEquipmentItem[c_Wear_Max + c_DragonSoul_Equip_Slot_Max * DS_DECK_MAX_NUM];//44 = 32 + 2*6 TItemData aDSInventoryItem[c_DragonSoul_Inventory_Count];//960 = 6*5*32 TItemData aBeltInventoryItem[c_Belt_Inventory_Slot_Count];//16 = 4*4 TQuickSlot aQuickSlot[QUICKSLOT_MAX_NUM]; TSkillInstance aSkill[SKILL_MAX_NUM]; long long m_allPoint[POINT_MAX_NUM]; long lQuickPageIndex; void SetPoint(UINT ePoint, long long llPoint); long long GetPoint(UINT ePoint); } TPlayerStatus; TPlayerStatus m_playerStatus; const TItemData * CPythonPlayer::GetItemData(TItemPos Cell) const { if (!Cell.IsValidCell()) return NULL; switch (Cell.window_type) { case INVENTORY: return &m_playerStatus.aInventoryItem[Cell.cell]; case EQUIPMENT: return &m_playerStatus.aEquipmentItem[Cell.cell]; case DRAGON_SOUL_INVENTORY: return &m_playerStatus.aDSInventoryItem[Cell.cell]; case BELT_INVENTORY: return &m_playerStatus.aBeltInventoryItem[Cell.cell]; default: return NULL; } }
  11. Maybe like this? char tmpBuf[64+1]; std::string rTime = LC_TEXT("Your item will be unbinded in "); if (hours > 0) { snprintf(tmpBuf, sizeof(tmpBuf), "%uh", hours); rTime += tmpBuf; } if (minutes > 0 && hours > 0) rTime += " "; if (minutes > 0) { snprintf(tmpBuf, sizeof(tmpBuf), "%um", minutes); rTime += tmpBuf; } if (seconds > 0 && (hours > 0 || minutes > 0)) rTime += " "; if (seconds > 0) { snprintf(tmpBuf, sizeof(tmpBuf), "%us", seconds); rTime += tmpBuf; }
  12. Maybe I explained wrong, the correct is this: if (!strcmp(strMapEventOx, stringName))
  13. ::EquipItem-> if (this->GetCount()>1) return;
  14. if (strMapEventOx == stringName) instead of: if (!strcmp(strMapEventOx, stringName))
  15. v16.3 Update in my MEGA package (inside the .UPDATES folder) Under upload.
  16. 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 };
  17. 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.
  18. Whole official client is unpacked at here: Mega.nz Enjoy and have fun
  19. 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.
  20. With that modification the claws will be rotated also like the rod, and the pick axe. As you can see on the 2nd picture.
  21. 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
  22. mobdropinfo hah? Get custom ideas and jump into grand canyon.
  23. 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)
×
×
  • 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.