Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/17/15 in all areas

  1. M2 Download Center Download Here ( Internal ) Hello guys, today I wanna release my first map. The point of whole this is to get some feedback on how can I improve my future maps. Some screenshots from World Editor. Size : 3 x 3 Author : Siwy Creating Time : 'bout 2hours. External Links : -[1] Only map : [Hidden Content] -[2] Map with objects,textures, etc. [Hidden Content] -[3] Serverside [Hidden Content] I hope someone founds this useful ! Also I've added external links for download. Sorry for the inconvenience.
    2 points
  2. I wrote this function after being asked to Q.Q bool CExchange::CheckSpace() { std::vector<CGrid> s_grids; for (int pCount = 0; pCount < INVENTORY_PAGE_COUNT; ++pCount) { s_grids.push_back(CGrid(5, 9)); s_grids[pCount].Clear(); } LPCHARACTER victim = GetCompany()->GetOwner(); LPITEM item; int i; for (i = 0; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; BYTE itemSize = item->GetSize(); BYTE bPage = i / (INVENTORY_PAGE_SIZE) - 1; s_grids[bPage].Put(i - (INVENTORY_PAGE_SIZE * bPage), 1, itemSize); } static std::vector <WORD> s_vDSGrid(DRAGON_SOUL_INVENTORY_MAX_NUM); bool bDSInitialized = false; for (i = 0; i < EXCHANGE_ITEM_MAX_NUM; ++i) { if (!(item = m_apItems[i])) continue; BYTE itemSize = item->GetSize(); if (item->IsDragonSoul()) { if (!victim->DragonSoul_IsQualified()) return false; if (!bDSInitialized) { bDSInitialized = true; victim->CopyDragonSoulItemGrid(s_vDSGrid); } bool bExistEmptySpace = false; WORD wBasePos = DSManager::instance().GetBasePosition(item); if (wBasePos >= DRAGON_SOUL_INVENTORY_MAX_NUM) return false; for (int i = 0; i < DRAGON_SOUL_BOX_SIZE; i++) { WORD wPos = wBasePos + i; if (0 == s_vDSGrid[wBasePos]) { bool bEmpty = true; for (int j = 1; j < item->GetSize(); j++) { if (s_vDSGrid[wPos + j * DRAGON_SOUL_BOX_COLUMN_NUM]) { bEmpty = false; break; } } if (bEmpty) { for (int j = 0; j < item->GetSize(); j++) { s_vDSGrid[wPos + j * DRAGON_SOUL_BOX_COLUMN_NUM] = wPos + 1; } bExistEmptySpace = true; break; } } if (bExistEmptySpace) break; } if (!bExistEmptySpace) return false; } else { bool bFound; for (int pCount = 0; pCount < INVENTORY_PAGE_SIZE; ++pCount) { int iPos = s_grids[pCount].FindBlank(1, itemSize); if (iPos >= 0) { s_grids[pCount].Put(iPos, 1, itemSize); bFound = true; break; } } if (bFound) continue; return false; // No space left in inventory } } return true; } Credits to Martin and Think and all the other Persons who worked on the other fix I used as base. This is untested oh and there is a change in common/length.h INVENTORY_PAGE_SIZE = 45, INVENTORY_PAGE_COUNT = 3, INVENTORY_MAX_NUM = INVENTORY_PAGE_SIZE * INVENTORY_PAGE_COUNT, Basically you can replace INVENTORY_MAX_NUM / 2 with INVENTORY_PAGE_SIZE in all files and if you want to add or remove inventory pages just change INVENTORY_PAGE_COUNT And to repeat it this is as for now untested I actually test it in some minutes. Edit: Basically this is the same as o.o static CGrid s_grid1(5 * INVENTORY_PAGE_COUNT, 9);
    2 points
  3. M2 Download Center Download Here ( Internal ) Hello, global chat + color empire with chat is by Denis. thx. 1) Enable global chat Open input_p2p.cpp Search : Replace with it: If you use novaline, search: And replace with it: 2) Add chat functions Open input_main.cpp Search: Replace with it: 3) Add config function Open config.cpp Search: Add after: Next search: Add after: Now open config.h Search: And add before: 4) Game CONFIG Open your CONFIG game and add: = That's all, sorry for my bad english Thx : Denis, Domco
    1 point
  4. M2 Download Center Download Here ( Internal ) Hi everyone, In this thread I will show you how to change the color of the chat messages without any client modification. I will use the 2 new ring slots in this example. First of all, the color codes: RED: |cFFFF0000|H|h GREEN: |cFF00FF00|H|h BLUE: |cFF0080FF|H|h YELLOW: |cFFFFFF00|H|h Open game/unique_item.h and add these: TEXT_COLOR_RED = ID_OF_THE_ITEM, TEXT_COLOR_GREEN = ID_OF_THE_ITEM, TEXT_COLOR_BLUE = ID_OF_THE_ITEM, TEXT_COLOR_YELLOW = ID_OF_THE_ITEM, Open game/input_main.cpp and search for this: const TPacketCGChat* pinfo = reinterpret_cast<const TPacketCGChat*>(data); Replace with this: int len; const TPacketCGChat* pinfo = reinterpret_cast<const TPacketCGChat*>(data); Remove this: int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf); Search for this: if (CHAT_TYPE_SHOUT == pinfo->type) Add this over that: if (ch->IsEquipNewRingItem(TEXT_COLOR_RED)) { // RED len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFFFF0000|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_GREEN)) { // GREEN len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFF00FF00|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_BLUE)) { // BLUE len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFF0080FF|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_YELLOW)) { // YELLOW len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFFFFFF00|H|h", buf); } else { // DEFAULT COLOR len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf); } Open game/char.cpp and add this event: bool CHARACTER::IsEquipNewRingItem(DWORD dwItemVnum) const { { LPITEM u = GetWear(WEAR_RING1); if (u && u->GetVnum() == dwItemVnum) { return true; } } { LPITEM u = GetWear(WEAR_RING2); if (u && u->GetVnum() == dwItemVnum) { return true; } } return false; } Open game/char.h and search for this: bool IsEquipUniqueGroup(DWORD dwGroupVnum) const; Add this under that: bool IsEquipNewRingItem(DWORD dwItemVnum) const; And now how it looks in the game: If you have any question or suggestion, please just reply to this topic. Kind Regards, Sanchez
    1 point
  5. M2 Download Center Download Here ( Internal ) Hello friends. This is my first topic. So lets do this. I tried to find this in some places and forums but not found it so i edit for my self. Its not to mutch but i hope this help some one. Q_Q All you just need to do is open you char_battle.cpp and search and under add Need look like this: Now search again and add under Need look like this: vualla [Hidden Content] See you soon!
    1 point
  6. I am lost can I give you mi item proto and only put 7 on potions? you can send
    1 point
  7. use dump_proto (kraizydevSrcsToolsbin)
    1 point
  8. But what I put in value0? Thanks for your help 7
    1 point
  9. edit value0 item_proto client/server
    1 point
  10. put in config: BIND_IP: 25.3.179.100 and add this diff to your db file for dbcore1866: for dbcore1667 open player database, then look at the right side and change : monarch_candidicy replace that table name to monarch_candid all will works
    1 point
  11. self.TitleName.SetText(localeInfo.EXCHANGE_TITLE % (exchange.GetNameFromTarget(), int(exchange.GetLevelFromTarget())))
    1 point
  12. Re-give the right permissions to the mysql user: chown -R mysql /var/db/mysql/ chgrp -R mysql /var/db/mysql/ Check whether the mysql user is full granted or not. Repair again the tables
    1 point
  13. player.player must be repaired. # mysqlcheck -r player playerNB: It could additionally require "-u root -pPASSWORD".
    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.