Jump to content

.ZeNu

Banned
  • Posts

    100
  • Joined

  • Last visited

  • Days Won

    16
  • Feedback

    0%

Everything posted by .ZeNu

  1. Yeah, in trailer look so great and amazing and then ... Ingame look so crap and ugly. (interface and others) Just my opinion.
  2. Dude, i saw this ideea on Rubinum and Aeldra, and of course, this idea was appreciated by the players.The most important. And what you say can't be applied as in the case presented by me in the gif,.You can make all items directly in the inventory with server source, but is not ok from other points of view.
  3. 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.
  4. M2 Download Center Download Here ( Internal ) Auto refine option when you upgrade the item with SCROLL or on NPC. I did all checks like example : When you have just one scroll in inventory, refine window will be close. When the item is already maximum upgrade. (+8 to +9 just in case will be succes) and more .. Preview: [Hidden Content] Download : [Hidden Content]
  5. Already free in Rubinum source, binary part.
  6. M2 Download Center Download Here ( Internal ) // If you use my special storage, and ofc if you want add "ACMD(do_sort_special_storage);" too. ^ //////////// CMD.CPP //////////// Search : ACMD(do_stun); Add after : #ifdef ENABLE_SORT_INVENTORY ACMD(do_sort_items); ACMD(do_sort_special_storage); #endif Search: { "notice", do_notice, 0, POS_DEAD, GM_LOW_WIZARD }, Add after : #ifdef ENABLE_SORT_INVENTORY { "click_sort_items", do_sort_items, 0, POS_DEAD, GM_PLAYER }, { "click_sort_special_storage", do_sort_special_storage, 0, POS_DEAD, GM_PLAYER }, #endif //////////// CMD_GNERAL.CPP //////////// ADD THIS : #ifdef ENABLE_SORT_INVENTORY ACMD (do_sort_items) { if (ch->IsDead() || ch->GetExchange() || ch->IsShop() || ch->IsOpenSafebox() || ch->IsCubeOpen()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't sort your inventory with those windows open.")); return; } int lastSortInventoryPulse = ch->GetSortInventoryPulse(); int currentPulse = thecore_pulse(); if (lastSortInventoryPulse > currentPulse) { int deltaInSeconds = ((lastSortInventoryPulse / PASSES_PER_SEC(1)) - (currentPulse / PASSES_PER_SEC(1))); int minutes = deltaInSeconds / 60; int seconds = (deltaInSeconds - (minutes * 60)); return; } for (int i = 0; i < INVENTORY_MAX_NUM; ++i) { LPITEM item = ch->GetInventoryItem(i); if(!item) continue; if(item->isLocked()) continue; if(item->GetCount() == g_bItemCountLimit) continue; if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK)) { for (int j = i; j < INVENTORY_MAX_NUM; ++j) { LPITEM item2 = ch->GetInventoryItem(j); if(!item2) continue; if(item2->isLocked()) continue; if (item2->GetVnum() == item->GetVnum()) { bool bStopSockets = false; for (int k = 0; k < ITEM_SOCKET_MAX_NUM; ++k) { if (item2->GetSocket(k) != item->GetSocket(k)) { bStopSockets = true; break; } } if(bStopSockets) continue; BYTE bAddCount = MIN(g_bItemCountLimit - item->GetCount(), item2->GetCount()); item->SetCount(item->GetCount() + bAddCount); item2->SetCount(item2->GetCount() - bAddCount); continue; } } } } ch->SetNextSortInventoryPulse(thecore_pulse() + PASSES_PER_SEC(60)); } ACMD (do_sort_special_storage) { if (ch->IsDead() || ch->GetExchange() || ch->IsShop() || ch->IsOpenSafebox() || ch->IsCubeOpen()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't sort your inventory with those windows open.")); return; } int lastSortSpecialStoragePulse = ch->GetSortSpecialStoragePulse(); int currentPulse = thecore_pulse(); if (lastSortSpecialStoragePulse > currentPulse) { int deltaInSeconds = ((lastSortSpecialStoragePulse / PASSES_PER_SEC(1)) - (currentPulse / PASSES_PER_SEC(1))); int minutes = deltaInSeconds / 60; int seconds = (deltaInSeconds - (minutes * 60)); ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can sort your inventory again in %02d seconds."), seconds); return; } for (int m = 0; m < 3; m++) { for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i) { LPITEM item; switch(m) { case 0: item = ch->GetUpgradeInventoryItem(i); break; case 1: item = ch->GetBookInventoryItem(i); break; case 2: item = ch->GetStoneInventoryItem(i); break; default: item = ch->GetUpgradeInventoryItem(i); break; } if(!item) continue; if(item->isLocked()) continue; if(item->GetCount() == g_bItemCountLimit) continue; if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK)) { for (int j = i; j < SPECIAL_INVENTORY_MAX_NUM; ++j) { LPITEM item2; switch(m) { case 0: item2 = ch->GetUpgradeInventoryItem(j); break; case 1: item2 = ch->GetBookInventoryItem(j); break; case 2: item2 = ch->GetStoneInventoryItem(j); break; default: item2 = ch->GetUpgradeInventoryItem(j); break; } if(!item2) continue; if(item2->isLocked()) continue; if (item2->GetVnum() == item->GetVnum()) { bool bStopSockets = false; for (int k = 0; k < ITEM_SOCKET_MAX_NUM; ++k) { if (item2->GetSocket(k) != item->GetSocket(k)) { bStopSockets = true; break; } } if(bStopSockets) continue; BYTE bAddCount = MIN(g_bItemCountLimit - item->GetCount(), item2->GetCount()); item->SetCount(item->GetCount() + bAddCount); item2->SetCount(item2->GetCount() - bAddCount); continue; } } } } } ch->SetNextSortSpecialStoragePulse(thecore_pulse() + PASSES_PER_SEC(60)); } #endif //////////// char.cpp //////////// Search : m_iSyncHackCount = 0; Add after: #ifdef ENABLE_SORT_INVENTORY m_sortInventoryPulse = 0; m_sortSpecialStoragePulse = 0; #endif //////////// char.h //////////// Search : void GiveGold(INT iAmount); Add after : #ifdef ENABLE_SORT_INVENTORY void SetNextSortInventoryPulse(int pulse) { m_sortInventoryPulse = pulse; } int GetSortInventoryPulse() { return m_sortInventoryPulse; } void SetNextSortSpecialStoragePulse(int pulse) { m_sortSpecialStoragePulse = pulse; } int GetSortSpecialStoragePulse() { return m_sortSpecialStoragePulse; } #endif Search : LPSHOP m_pkShop; LPSHOP m_pkMyShop; std::string m_stShopSign; LPCHARACTER m_pkChrShopOwner; Add after : #ifdef ENABLE_SORT_INVENTORY int m_sortInventoryPulse; int m_sortSpecialStoragePulse; #endif /////// Service.h //////// Add this : #define ENABLE_SORT_INVENTORY Description : [Hidden Content]
  7. [Hidden Content] 01. Search : #include "priv_manager.h" 01. Add after : #ifdef ENABLE_MOUNT_COSTUME_SYSTEM #include "MountSystem.h" #endif 02. Search : if (g_noticeBattleZone) { ... } 02. Add after : #ifdef ENABLE_MOUNT_COSTUME_SYSTEM if (ch->GetMapIndex() != 113 && CArenaManager::instance().IsArenaMap(ch->GetMapIndex()) == false) { ch->CheckMount(); } #endif c
  8. M2 Download Center Download Here ( Internal ) Description: When you craft a item the bonuses from the old item will be transferred(saved). ### Cube.cpp //Search : this->gold = 0; //Add after : #ifdef ENABLE_CUBE_RENEWAL this->allowCopyAttr = false; #endif //Search: else TOKEN("gold") { cube_data->gold = value1; } //Add after : #ifdef ENABLE_CUBE_RENEWAL else TOKEN("allow_copy") { cube_data->allowCopyAttr = (value1 == 1 ? true : false); } #endif //Search in : bool Cube_make (LPCHARACTER ch) LPITEM new_item; Add after : #ifdef ENABLE_CUBE_RENEWAL DWORD copyAttr[ITEM_ATTRIBUTE_MAX_NUM][2]; #endif //Search : CUBE_VALUE *reward_value = cube_proto->reward_value(); //Add after: #ifdef ENABLE_CUBE_RENEWAL for (int i=0; i<CUBE_MAX_NUM; ++i) { if (NULL==items[i]) continue; if (items[i]->GetType() == ITEM_WEAPON || items[i]->GetType() == ITEM_ARMOR) { bool hasElement = false; for (int j = 0; j < cube_proto->item.size(); ++j) { if(cube_proto->item[j].vnum == items[i]->GetVnum()) { hasElement = true; break; } } if(hasElement == false) continue; for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { copyAttr[a][0] = items[i]->GetAttributeType(a); copyAttr[a][1] = items[i]->GetAttributeValue(a); } break; } continue; } #endif //Search: new_item = ch->AutoGiveItem(reward_value->vnum, reward_value->count); //Add after: #ifdef ENABLE_CUBE_RENEWAL if (cube_proto->allowCopyAttr == true && copyAttr != NULL) { new_item->ClearAttribute(); for (int a = 0; a < ITEM_ATTRIBUTE_MAX_NUM; a++) { new_item->SetForceAttribute(a, copyAttr[a][0], copyAttr[a][1]); } } #endif ###cube.h //Search in : struct CUBE_DATA int percent; unsigned int gold; //Add after : #ifdef ENABLE_CUBE_RENEWAL bool allowCopyAttr; #endif ###service.h /Add: #define ENABLE_CUBE_RENEWAL Example in cube.txt section npc 20378 item 11299 1 item 30509 10 item 30516 10 item 30514 10 allow_copy 1 reward 20000 1 gold 100000 percent 60 end
  9. M2 Download Center Download Here ( Internal ) Description : The mount will follow you. The bonuses is set from item_proto. [Hidden Content] [Hidden Content] [Hidden Content] Code is based on default pet code from Ymir, i don't offer support for extra features, details, anyway easy for use. (Sorry for tutorial, not so perfect.) Download (Reupload): [Hidden Content]
  10. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) If you send the duel command with argument 1, penetration, critical and poison, in duel will be no longer valid.
  11. I search translators for International Server : Spanish German Turkish Italian You can send me a private message. Thanks in advance.
  12. Add in your project "UserInterface" this : BankManager.cpp/h
  13. Maybe i am perfect like that , how about that ?
  14. I actually have a 512MB ram VPS and everything is working good. The code can be improved. Now is working just fine. If you don't want to use it just don't use it.
×
×
  • 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.