Jump to content

wezt

Inactive Member
  • Posts

    97
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Everything posted by wezt

  1. Hi devs! I'd like to ask if someone has experience in using IDE's for server source development (freebsd source, development on windows machine)? Would be nice if you'll share some info about this question, which software you're using, cons/pros of some IDE's, examples of your development enviroment and all other related info. At the moment I'm going to try CLion on virtualbox with freebsd. Probably you have better solutions. Thanks in advance
  2. Probably it's too late for an answer, but still it could be helpful for someone This problem appears because in original files from Mijago exists some small mistakes (look at marked rows): Next changes fixed errors for me: Regards.
  3. A little bug detected here. Replace 'bool Blend_Item_find (DWORD item_vnum)' with next one: bool Blend_Item_find (DWORD item_vnum) { for (const auto& blend_info : s_blend_info) { if (blend_info->item_vnum == item_vnum) { return true; } } return false; } Best regards
  4. Thanks for release I was too lazy for 'if (IsGM() && ch->GetGMLevel() < IMPLEMENTOR)' Here is a replacement: BOOL CHARACTER::IsLowGM() const { return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level < GM_IMPLEMENTOR; } Regards
  5. @DeYaN. you need to create 'locale' folder in your game client directory. Then, move all dds/png/tga files from your locale pack in this folder. File paths should be the same as in your locale pack (e.g. you have 'locale\en\ui\loading\gauge_empty.dds' file, move it in 'GAME_CLIENT_FOLDER\locale\en\ui\loading\' directory). Regards.
  6. @DeYaN., check out your item_list.txt (lines specified in syserr.txt) also try to move all images from locale pack to locale folder (described above).
  7. @xGoogle, in ch1 config change PLAYER_SQL to: PLAYER_SQL: localhost user thor player Regards
  8. @xGoogle you've made mistakes in config files, check them
  9. Just comment this part: SetShopValidPos(true); CheckShopPos f(this); sectree->ForEachAround(f); if(!GetShopValidPos()) { ChatPacket(CHAT_TYPE_INFO, "You cannot open a shop here (too close to other shop)."); return; } You need to add this numbers in 'struct CheckShopPos', something like this: if (ch->GetRaceNum()!=30000 || !ch->GetRaceNum()!=30001) //shop mob vnum return; or in case if you have some range of vnums (for example between 30000 and 30010): if (ch->GetRaceNum() < 30000 && ch->GetRaceNum() > 30010) //shop mob vnum return;
  10. M2 Download Center Download Here ( Internal ) Hello! I'd like to show you how you can check position for shops (probably offline shops too). I don't like when the map is full of shops or when shops are too close for each other. So I've made few functions for checking if the shop is in safezone or if it too close to other shops. Let's start char.h Find there: void CloseMyShop(); protected: LPSHOP m_pkShop; LPSHOP m_pkMyShop; std::string m_stShopSign; LPCHARACTER m_pkChrShopOwner; Add few new lines: void CloseMyShop(); void SetShopValidPos(bool value) { m_bShopValidPos = value; } bool GetShopValidPos() { return m_bShopValidPos; } protected: LPSHOP m_pkShop; LPSHOP m_pkMyShop; std::string m_stShopSign; LPCHARACTER m_pkChrShopOwner; bool m_bShopValidPos; char.cpp In 'void CHARACTER::Initialize()' find: m_pkMyShop = NULL; Add below: m_bShopValidPos = true; Then search for 'void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount)' Add above new function: struct CheckShopPos { LPCHARACTER m_ch; CheckShopPos(LPCHARACTER ch) { m_ch = ch; } void operator()(LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->GetRaceNum()!=30000) //shop mob vnum return; if (DISTANCE_APPROX(ch->GetX() - m_ch->GetX(), ch->GetY() - m_ch->GetY()) < 200) //distance between shops { m_ch->SetShopValidPos(false); } } } }; Then in 'void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount)' search for: if (bItemCount == 0) return; Add below: //shops pos check LPSECTREE sectree = GetSectree(); if (sectree) { SetShopValidPos(true); CheckShopPos f(this); sectree->ForEachAround(f); if(!GetShopValidPos()) { ChatPacket(CHAT_TYPE_INFO, "You cannot open a shop here (too close to other shop)."); return; } if (!sectree->IsAttr(GetX(), GetY(), ATTR_BANPK)) { ChatPacket(CHAT_TYPE_INFO, "You cannot open a shop here (use safezone)."); return; } } //shops pos check P.s: That's all, have fun Regards.
  11. Just comment these rows, in case if you don't want use yang fee for shops opening: if (g_bNeededMoney) PointChange(POINT_GOLD, -g_dwNeedMoney, false); Otherwise make sure that 'offlineshop_config' works like it should. Regards.
  12. Hey @random, check out your item_proto,txt/item_names.txt on the server Make sure that 1st line doesn't contains any info about items. As far i remember the game skips 1st line in these files, and if there you have a row about gold (vnum 1) then it will be skipped => "Your problem". P.S.: Also you need to check item_proto on client side, in case if you use for it item_names.txt/item_proto.txt
  13. In game/src/cmd_gm.cpp find "ACMD(do_notice)" and replace it with next one: ACMD(do_notice) { char chatbuf[CHAT_MAX_LEN + 1]; snprintf(chatbuf, sizeof(chatbuf), "%s :%s", ch->GetName(), argument); BroadcastNotice(chatbuf); } Regards
  14. @Sonitex, take a look into input_main.cpp Regards.
  15. @Sonitex, check out "void CInputMain::Refine(LPCHARACTER ch, const char* c_pData)", "bool CHARACTER::DoRefine(LPITEM item, bool bMoneyOnly)" and "bool CHARACTER::DoRefineWithScroll(LPITEM item)". There you'll find answers Regards.
  16. As was advised above, you need to edit skill_proto (on this forum I've saw few topics about how to). If you want to see which values are in use for skill's calculations add next line in "void CSkillProto::SetPointVar" (skill.cpp file): sys_log(0,"CSkillProto::SetPointVar %d %s %f", dwVnum, strName.c_str(), dVar); Regards.
  17. @ds_aim thanks for tip with size Already added changes to 1st post.
  18. Hello community. Below you'll find fix for this error "Process: SEQUENCE 33075400 mismatch 0xa7 != 0xcf header 10" Usually this error happening when _IMPROVED_PACKET_ENCRYPTION_ disabled. In desc.cpp find 'int DESC::ProcessInput()' there you'll find next rows: TEMP_BUFFER tempbuf; LPBUFFER lpBufferDecrypt = tempbuf.getptr(); buffer_adjust_size(lpBufferDecrypt, iSizeBuffer); Comment these lines and add below next line : LPBUFFER lpBufferDecrypt = buffer_new(iSizeBuffer); Then below you need to find 'buffer_read_proceed(m_lpInputBuffer, iBytesProceed);' add next line above: buffer_delete(lpBufferDecrypt); P.S.: With current changes I don't have any troubles with header 10 anymore. And looks like the problem was in TEMP_BUFFER Feel free to like and comment if necessary Regards.
  19. wezt

    BugFix

    so , if i want et pickup item without name and with name remove this !item->IsOwnership(player) ? bool CItem::IsOwnership(LPCHARACTER ch) { if (!m_pkOwnershipEvent) return true; //return true if item doesn't has ownership at all (item without name) return m_dwOwnershipPID == ch->GetPlayerID() ? true : false; //return true if item has ownership and it's belong to current player. } So you don't have to remove "!item->IsOwnership(player)" in order to "teach" your pet to pick up items "without names" @Micha aka xCPx, I've found one more little bug in "pet pickup system" >> When two or more pets want to bring same item one of them disappears. Fix in the spoiler: Regards
  20. Take a look in char_item.cpp -> bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) -> rows like this "item->SetCount(item->GetCount() - 1);" Also you may want to look in item.cpp -> "bool CItem::SetCount(DWORD count)"
  21. wezt

    BugFix

    Hey, very useful and nice things. Thanks Few notes, regarding to pet pickup system:
  22. Another solution easier: #ifdef __ENABLE_EFFECT_COSTUME_FUNCTION_PROTO_ case CItemData::ITEM_TYPE_COSTUME: if (pItem->GetSubType() == CItemData::COSTUME_BODY) { DWORD vnum = pItem->GetIndex(); long value_proto = pItem->GetValue(3); if (value_proto == 1000) __AttachEffect(EFFECT_REFINED+EFFECT_COSTUME_TITAN_1); else if (value_proto == 1500) __AttachEffect(EFFECT_REFINED+EFFECT_COSTUME_TITAN_2); else if (value_proto == 2000) __AttachEffect(EFFECT_REFINED+EFFECT_COSTUME_TITAN_3); else if (value_proto == 2500) __AttachEffect(EFFECT_REFINED+EFFECT_COSTUME_TITAN_4); else if (value_proto == 3000) __AttachEffect(EFFECT_REFINED+EFFECT_COSTUME_TITAN_5); } } #endif Pls do not take it as some kind of competition But in my client I don't use anymore 'DWORD refine = max(pItem->GetRefine() + pItem->GetSocketCount(), CItemData::ITEM_SOCKET_MAX_NUM) - CItemData::ITEM_SOCKET_MAX_NUM;' I've made something like this: m_armorRefineEffect = EFFECT_REFINED+pItem->GetSocketCount(); __AttachEffect(m_armorRefineEffect); This way more easier (IMHO) PS: Ofc for this way you'll need to edit values of socket_pct in whole item_proto. Regards.
  23. Here is an other way with using socket_pct from item_proto (you'll be able to set different effects for costumes): In UserInterface\InstanceBase.cpp -> UINT CInstanceBase::__GetRefinedEffect(CItemData* pItem) add after 'case CItemData::ITEM_TYPE_ARMOR:': case CItemData::ITEM_TYPE_COSTUME: if (refine < 7) return 0; if (pItem->GetSubType() == CItemData::COSTUME_BODY) { __ClearArmorRefineEffect(); m_armorRefineEffect = EFFECT_REFINED+EFFECT_BODYARMOR_REFINED7+refine-7; __AttachEffect(m_armorRefineEffect); } break; Regards.
×
×
  • 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.