Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/14/19 in all areas

  1. Srcs/Server/game/src/party.cpp float k = (float) ch->GetSkillPowerByLevel( MIN(SKILL_MAX_LEVEL, m_iLeadership ) ) / 100.0f; // PARTY_ROLE_ATTACKER int iBonus = (int) (10 + 60 * k); // PARTY_ROLE_TANKER int iBonus = (int) (50 + 1450 * k); // PARTY_ROLE_BUFFER int iBonus = (int) (5 + 45 * k); // PARTY_ROLE_SKILL_MASTER int iBonus = (int) (25 + 600 * k); // PARTY_ROLE_HASTE int iBonus = (int) (1+5*k); // PARTY_ROLE_DEFENDER int iBonus = (int) (5+30*k); float k = (float) ch->GetSkillPowerByLevel( MIN(SKILL_MAX_LEVEL, m_iLeadership ) ) / 100.0f; m_iLeadership = Leader skill ship skill level which is increased by (book vnum: 50301, 50302, 50303) int CHARACTER::GetSkillPowerByLevel(int level, bool bMob) const { return CTableBySkill::instance().GetSkillPowerByLevelFromType(GetJob(), GetSkillGroup(), MINMAX(0, level, SKILL_MAX_LEVEL), bMob); } int CTableBySkill::GetSkillPowerByLevelFromType(int job, int skillgroup, int skilllevel, bool bMob) const { if (bMob) return m_aiSkillPowerByLevelFromType[0][skilllevel]; if (job >= JOB_MAX_NUM || skillgroup == 0) return 0; int idx = (job * 2) + (skillgroup - 1); return m_aiSkillPowerByLevelFromType[idx][skilllevel]; } Let's take a example, a warrior, skill group 1. idx = 0 * 2 + 1 - 1 = 0 skilllevel = m_iLeadership m_iLeadership = 40 (Skill Perfect Master) // 0 5 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 50 52 54 56 58 60 63 66 69 72 82 85 88 91 94 98 102 106 110 115 125 125 125 125 125 m_aiSkillPowerByLevelFromType[0][40] = 125 PARTY_ROLE_DEFENDER: (5+30*k) k = 125 / 100 = 1.25 iBonus = 5 + 30 * 1.25 = 42.5 (converted to integer will be 42) Output from skill P: // PARTY_ROLE_ATTACKER - Set as attacker 10 + 60 * (125 / 100) = 85 // PARTY_ROLE_TANKER - Set as berserker 1 + 5 * (125 / 100) = 7.25 = 7 // PARTY_ROLE_BUFFER - Set as melee 50 + 1450 * (125 / 100) = 1862.5 = 1862 // PARTY_ROLE_SKILL_MASTER - Set as blocker 5 + 45 * (125 / 100) = 61.25 = 61 // PARTY_ROLE_HASTE - Set as defender 5 + 30 * (125 / 100) = 42.5 = 42 // PARTY_ROLE_DEFENDER - Set as wizzard 25 + 600 * (125 / 100) = 775 Is a fast explanation, i hope you understand it.
    2 points
  2. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) Cheque system full ~ like official The tutorial was remade and uploaded to github Monetary unit: Won - Not compatible with long long gold - Max won 999 (like official) - Added support for OfflineShop(great) Best regards.
    1 point
  3. M2 Download Center Download Here ( Internal ) Hi there. While cleaning out "my closet", I found this thing I developed between 2014-2015 - maybe(?) - for my, at that moment, server. Since it's now closed, and I won't use it, I'm sharing it with you guys. Note: Didn't do the scrollbar, wasn't needed for me, so yeah. Now, let's start with opening your locale_game.txt and adding these lines: QUESTCATEGORY_0 Main Quests QUESTCATEGORY_1 Sub Quests QUESTCATEGORY_2 Collect Quests QUESTCATEGORY_3 Levelup Quests QUESTCATEGORY_4 Scroll Quests QUESTCATEGORY_5 System Quests Alright, now find your characterwindow.py (uiscript?) and you can either comment Quest_Page children or simply remove them all. Moving on to your interfaceModule.py find this line self.BINARY_RecvQuest(index, name, "file", localeInfo.GetLetterImageName()) and replace it with self.wndCharacter.questCategory.RecvQuest(self.BINARY_RecvQuest, index, name) Ok, then we are at the most, let's say, difficult part of this. Open your uiCharacter.py and just as you did in your characterwindow.py, remove or simply comment any single line related to quests. You can just search for these vars: self.questShowingStartIndex self.questScrollBar self.questSlot self.questNameList self.questLastTimeList self.questLastCountList Once you did that, you just: # Find these lines self.soloEmotionSlot = self.GetChild("SoloEmotionSlot") self.dualEmotionSlot = self.GetChild("DualEmotionSlot") self.__SetEmotionSlot() # And add the following import uiQuestCategory self.questCategory = uiQuestCategory.QuestCategoryWindow(self.pageDict["QUEST"]) # Find this def OnUpdate(self): self.__UpdateQuestClock() # Replace it with def OnUpdate(self): self.questCategory.OnUpdate() And we're done with the client-side. I attached some extra elements needed (such as the main python file (uiQuestCategory.py) and some image resources). Remember to edit the path linked to these images in that file. For the server-side... Well, screw it, uploaded it too. Too lazy to write. It has only a new quest function (q.getcurrentquestname()) and a few things to add in your questlib.lua. Btw, not sure if you have it, but if not, just add this extra function in ui.Button() (ui.py - class Button). def SetTextAlignLeft(self, text, height = 4): if not self.ButtonText: textLine = TextLine() textLine.SetParent(self) textLine.SetPosition(27, self.GetHeight()/2) textLine.SetVerticalAlignCenter() textLine.SetHorizontalAlignLeft() textLine.Show() self.ButtonText = textLine #Äù½ºÆ® ¸®½ºÆ® UI¿¡ ¸ÂÃç À§Ä¡ ÀâÀ½ self.ButtonText.SetText(text) self.ButtonText.SetPosition(27, self.GetHeight()/2) self.ButtonText.SetVerticalAlignCenter() self.ButtonText.SetHorizontalAlignLeft() Forgot the source part, fml, here it is. Add it to your questlua_quest.cpp. int quest_get_current_quest_name(lua_State* L) { CQuestManager& q = CQuestManager::instance(); PC* pPC = q.GetCurrentPC(); lua_pushstring(L, pPC->GetCurrentQuestName().c_str()); return 1; } void RegisterQuestFunctionTable() { luaL_reg quest_functions[] = { { "getcurrentquestname", quest_get_current_quest_name}, { NULL, NULL } }; CQuestManager::instance().AddLuaFunctionTable("q", quest_functions); } Now, finally, have fun and bye!
    1 point
  4. 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
    1 point
  5. M2 Download Center Download Here ( Internal ) Hello guys, I want to share my next lama mount. Download: [Hidden Content] Video: [Hidden Content] Best Regards meisterViper
    1 point
  6. Yes, I did it. Yes, it is complete and functional. If you want it can also be compatible with offlineshops, read the README of the download.
    1 point
  7. Some people write code just for money, others write code from passion. If you know to make the difference you will never be fooled again.
    1 point
  8. Awesome release Best regards Raylee
    1 point
  9. 1 point
  10. Thanks to @ProfessorEnte for reports. 2019-04-12 02:31:18 Friday - 170 additions and 50 deletions. Fixed unique items based on the real time. Fixed unstackable items. Fixed if item count overflow occured, then set it to maximum. Added support for books. (check skill types, unknown skill), skill vnum need to be saved into socket0, (4=Aura of the Sword < player.skill_proto), if the skill vnum is unknown, there will be a random book based on pc races, excluded skills PASSIVE, GUILD, SUPPORT. Added a to-do for ITEM_BLEND, check if apply_type exists in bonuses, check if apply_value/apply_duration is equal with grades (1/2/3/4/5) from settings, blend.txt Added auto query. # Random book INSERT INTO player.item_award(`login`, `vnum`, `count`, `mall`) VALUES ('account', 50300, 1, 1); # Specific book by skill vnum INSERT INTO player.item_award(`login`, `vnum`, `count`, `socket0`, `mall`) VALUES ('account', 50300, 1, 4, 1);
    1 point
  11. Hello, 100% you saw this shit visual bug from some angle are white (npc) Thing.cpp Find -> CGrannyMotion * CGraphicThing::GetMotionPointer(int iMotion) After this function add this int CGraphicThing::GetTextureCount() const { if (!m_pgrnFileInfo) return 0; if (m_pgrnFileInfo->TextureCount <= 0) return 0; return (m_pgrnFileInfo->TextureCount); } const char * CGraphicThing::GetTexturePath(int iTexture) { if(iTexture >= GetTextureCount()) return ""; return m_pgrnFileInfo->Textures[iTexture]->FromFileName; } Thing.h Find -> int GetMotionCount() const; adD UNDER int GetTextureCount() const; const char * GetTexturePath(int iTexture); Open and find -> ActorInstanceData Replace this CGraphicThing* pLODModelThing = pRaceData->GetLODModelThing(); RegisterLODThing(0, pLODModelThing); with this CGraphicThing* pLODModelThing = pRaceData->GetLODModelThing(); bool canLOD = true; if (pModelThing && pLODModelThing) { if (pModelThing->GetTextureCount() == pLODModelThing->GetTextureCount()) { for (int i = 0; i < pModelThing->GetTextureCount(); i++) { if (strcmp(pModelThing->GetTexturePath(i), pLODModelThing->GetTexturePath(i)) != 0) canLOD = false; } } else { canLOD = false; } } if(canLOD) RegisterLODThing(0, pLODModelThing); Its not my fix, i found it in inception source.
    1 point
  12. You should check the repository, already is before your comment. Update: - removed count method + added support for c++11
    1 point
  13. There's a slight difference between a seller and a coder. You see a bit confused about that. If we keep selling it means the quality of our works is out of question, we're in 2019, there aren't many kids left in the game after 15 years, don't you think?
    1 point
  14. I had a lot of problems with polish guys, so that isn't something new. There's a lot of guys which trying to make shit. The main problem of me, time = bad seller. I don't have enough time since 2018, also as you saw, i wasn't actived in forums In period 2016-2019 too much, disappeared because i have more important things to do than metin2. The metin2 remained just as a hobby and do some shits when i have some free time, I've to study for university and other activities. A good point for people which still trying to contact me, write me on WhatsApp, not Skype, there's small chances to answer in Skype because i've over 4500+ contacts and hundreds of requests (photo) and messages since a lot of time, i don't have time to answer on them, i just answer to people which are friendly and random ones. As you know, i'm not a scammer, so if i didn't answered to you x weeks/months, that doesn't mean i stole your money, as i said, my problem is time, and that make me a bad person in some eyes. But in the end, everything is fine and the customer will get what he paid, even if x time passed. There still exist some guys which i still didn't answered to them because of many factors, but if they'll write me again with a good behaviour, be sure i'll reply to you back. I've no reason to put peoples to wait for my systems, if i do this there exist some factors, depends of: my time, your character and how you talk, spamming, no patience etc. I know is easy to talk, "yo vegas is shit seller, he didn't answer since months, years" but did you think about me? when you've hundreds of messages from all countries and try to talk with them as you can, and there's a lot of bastards guys which are resellers and try to buy your work and try to find them out? Let's don't a off-topic in this subject. Send me a message in Skype and we'll fix it.
    1 point
  15. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) There's just a smart python module which i did for fun, for a friend, no support for implementation. Enjoy. Github repository: [Hidden Content]
    1 point
  16. Not everything should be written in source, but here's a method. (2 years ago - i posted it in another forum) //@Src/Server/game/src/input_login.cpp // Add to the beginning of the file: inline bool AllowedToWarp(const DWORD dwMapIndex, const DWORD dwLevel) { struct set_struct { const unsigned short map_index; const unsigned short minimum_level; } set_fields[] = { { 91, 75 }, // Grotto of Exile 1st Floor { 82, 75 }, // Grotto of Exile 2nd Floor { 216, 75 }, // Devils Catacomb { 218, 90 }, // Cape Dragon Head { 219, 90 }, // Dawn Mist Wood { 220, 90 }, // Mount Thunder { 221, 90 } // Bay Black Sand }; for (unsigned short i = 0; i < _countof(set_fields); ++i) { if (dwMapIndex == set_fields[i].map_index && dwLevel < set_fields[i].minimum_level) return false; } return true; } //1.) Search for: ch->SendGreetMessage(); //2.) Add after: if (!AllowedToWarp(ch->GetMapIndex(), ch->GetLevel())) ch->GoHome();
    1 point
  17. Good, one appointment tho: defining "ITEM_CHEQUE" is useless since no item will ever use that, it doesn't even exist in official servers, the real types after ITEM_BELT are: "ITEM_PET", // 36 <- used for the new growth PetSystem "ITEM_MEDIUM", // 37 <- used for Costume Bonus Transfer and Shoulder-Sash Bonus Transfer "ITEM_GACHA" // 38 <- used for Gaya System Although I understand that type may be used to make the game drop Wons from the monsters, but still.
    0 points
×
×
  • 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.