Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/02/19 in all areas

  1. M2 Download Center Download Here ( Internal ) Description: [Hidden Content] // 1. PythonPlayerInput.cpp // 1.0. Search: void CPythonPlayer::PickCloseItem() { ... } // 1.0. Add after: void CPythonPlayer::PickCloseItemVector() { CInstanceBase * pkInstMain = NEW_GetMainActorPtr(); if (!pkInstMain) return; TPixelPosition kPPosMain; pkInstMain->NEW_GetPixelPosition(&kPPosMain); std::vector<DWORD> itemVidList; CPythonItem& rkItem=CPythonItem::Instance(); if (!rkItem.GetCloseItemVector(pkInstMain->GetNameString(), kPPosMain, itemVidList)) return; if(itemVidList.empty()) return; for(int i = 0; i < itemVidList.size(); i++) SendClickItemPacket(itemVidList[i]); } // 2. PythonItem.cpp // 2.0. Search: bool CPythonItem::GetCloseItem (const std::string& myName, const TPixelPosition& c_rPixelPosition, DWORD* pdwItemID, DWORD dwDistance) { .... } // 2.0. Add after: bool CPythonItem::GetCloseItemVector(const std::string& myName, const TPixelPosition& c_rPixelPosition, std::vector<DWORD>& itemVidList) { DWORD dwCloseItemDistance = 1000 * 1000; TGroundItemInstanceMap::iterator i; for (i = m_GroundItemInstanceMap.begin(); i != m_GroundItemInstanceMap.end(); ++i) { TGroundItemInstance * pInstance = i->second; DWORD dwxDistance = DWORD(c_rPixelPosition.x - pInstance->v3EndPosition.x); DWORD dwyDistance = DWORD(c_rPixelPosition.y - (-pInstance->v3EndPosition.y)); DWORD dwDistance = DWORD(dwxDistance * dwxDistance + dwyDistance * dwyDistance); if (dwDistance < dwCloseItemDistance && (pInstance->stOwnership == "" || pInstance->stOwnership == myName)) { itemVidList.push_back(i->first); } } return true; } // 3. PythonItem.h // 3.0. Search: bool GetCloseMoney(const TPixelPosition & c_rPixelPosition, DWORD* dwItemID, DWORD dwDistance=300); // 3.0. Adauga sub: bool GetCloseItemVector(const std::string& myName, const TPixelPosition& c_rPixelPosition, std::vector<DWORD>& itemVidList); // 4. PythonPlayer.cpp // 4.0. Search and replace: void CPythonPlayer::SendClickItemPacket(DWORD dwIID) { if (IsObserverMode()) return; const char * c_szOwnerName; if (!CPythonItem::Instance().GetOwnership(dwIID, &c_szOwnerName)) return; if (strlen(c_szOwnerName) > 0) if (0 != strcmp(c_szOwnerName, GetName())) { CItemData * pItemData; if (!CItemManager::Instance().GetItemDataPointer(CPythonItem::Instance().GetVirtualNumberOfGroundItem(dwIID), &pItemData)) { Tracenf("CPythonPlayer::SendClickItemPacket(dwIID=%d) : Non-exist item.", dwIID); return; } if (!IsPartyMemberByName(c_szOwnerName) || pItemData->IsAntiFlag(CItemData::ITEM_ANTIFLAG_DROP | CItemData::ITEM_ANTIFLAG_GIVE)) { PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotPickItem", Py_BuildValue("()")); return; } } CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance(); rkNetStream.SendItemPickUpPacket(dwIID); } // 5. PythonPlayerModule.cpp // 5.0. Search: PyObject * playerPickCloseItem(PyObject* poSelf, PyObject* poArgs) { CPythonPlayer::Instance().PickCloseItem(); return Py_BuildNone(); } // 5.0. Add after: PyObject * playerPickCloseItemVector(PyObject* poSelf, PyObject* poArgs) { CPythonPlayer::Instance().PickCloseItemVector(); return Py_BuildNone(); } // 5.1. Search: { "PickCloseItem", playerPickCloseItem, METH_VARARGS }, // 5.1.Add after:: { "PickCloseItemVector", playerPickCloseItemVector, METH_VARARGS }, // 6. PythonPlayer,h // 6.0. Search: void PickCloseItem(); // 6.0. Add after: void PickCloseItemVector(); // 7. game.py // 7. Search: player.PickCloseItem() // 7. Replace with: player.PickCloseItemVector() // You can make option for fast pickup or not.
    1 point
  2. I'm having the bug showing on the video (watch left window). The shaman targets an NPC, therefore, if she performs a buff skill, she will get the buff. But only her client will see the skill's effect on her body, everybody else will see the effect on the NPC's body. Can someone post or link a fix please?
    1 point
  3. PeaceMaker is customer of Ch3HP, he have to write good about him or kiddo will ddos his server.
    1 point
  4. thanks to @Matuszka for profe$$ional help
    1 point
  5. The format has not affected the function or something else. The system will kill him in the game If the system can't find the sectree. It's only happening when you ride your horse (For the characters). It's from my line. LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (!GetDesc()) { sys_err("No tree %s %ld %ld %ld", GetName(), x, y, GetMapIndex()); Dead(); return false; } x = GetX(); y = GetY(); new_tree = GetSectree(); return false; } Kind Regards ~ Ken
    1 point
  6. Open char.cpp Search: LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (GetDesc()) { sys_err("cannot find tree at %d %d (name: %s)", x, y, GetName()); GetDesc()->SetPhase(PHASE_CLOSE); } else { sys_err("no tree: %s %d %d %d", GetName(), x, y, GetMapIndex()); Dead(); } return false; } Replace it with: LPSECTREE new_tree = SECTREE_MANAGER::instance().Get(GetMapIndex(), x, y); if (!new_tree) { if (GetDesc()) { sys_err("cannot find tree at %d %d (name: %s)", x, y, GetName()); //GetDesc()->SetPhase(PHASE_CLOSE); new_tree = GetSectree(); x = GetX(); y = GetY(); } else { sys_err("no tree: %s %d %d %d", GetName(), x, y, GetMapIndex()); Dead(); } return false; } And that's it.
    1 point
  7. hi can u give me link to this set?
    1 point
×
×
  • 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.