-
Posts
913 -
Joined
-
Days Won
848 -
Feedback
100%
Community Answers
-
Mali's post in Window Transparency was marked as the answer
ui.Board class example:
This is the hidden content, please Sign In or Sign Up
CWindow object example:
This is the hidden content, please Sign In or Sign Up
You can extend these logics
-
Mali's post in Compile Server Source With VS22 was marked as the answer
Old:
This is the hidden content, please Sign In or Sign Up New:
This is the hidden content, please Sign In or Sign Up Generated from clean(kraizy) mainline source. (Even the strings are fine)
(Use new version if you have a brain)
Just Better
-
Mali's post in Question about the source was marked as the answer
if( GetDefaultCodePage() == CP_ARABIC )
-
Mali's post in True, False or 0, 1, -1? was marked as the answer
return value: number of results (https://www.lua.org/pil/26.1.html)
static int l_sin (lua_State *L) { double d = luaL_checknumber(L, 1); lua_pushnumber(L, sin(d)); return 1; /* number of results */ } Example from m2:
Other examples:
-
Mali's post in Im looking for a mt2mester, nw2online client was marked as the answer
@ASIKOO is experienced in these unpack things. I'm sure he has it.
Send some messages to him.
-
Mali's post in [I NEED] Metin2 World Editor source was marked as the answer
ask @martysama0134. I'm sure, he will give you the source codes of the v40 without any hesitation.
-
Mali's post in Help condition in Item level text/icon was marked as the answer
item.GetItemType() != item.ITEM_TYPE_METIN
more exception:
if not item.GetItemType() in (item.ITEM_TYPE_METIN, item.ITEM_TYPE_ARMOR)
-
Mali's post in Give Random Item by item Type was marked as the answer
like this?
void CHARACTER::GiveRandomItemByType(BYTE bType) { if (!(bType > ITEM_NONE && bType <= ITEM_BELT)) // my last item type is belt return; if (bType == ITEM_SKILLBOOK) { GiveRandomSkillBook(); return; } const std::vector<TItemTable>& vItemTable = ITEM_MANAGER::instance().GetTable(); if (vItemTable.empty()) return; while (true) { const int iRandIdx = number(0, vItemTable.size() - 1); const TItemTable& table = vItemTable.at(iRandIdx); if (table.bType == bType) { AutoGiveItem(table.dwVnum); break; } } } char.h
void GiveRandomItemByType(BYTE bType); USAGE:
character->GiveRandomItemByType(ITEM_ARMOR); character->GiveRandomItemByType(ITEM_BELT); -
Mali's post in SHOPEX RENEWAL was marked as the answer
Don't bother other people.
First of all, we know that the system is working properly. I've seen many people are using it.
You guys are using martysama source. I don't have that src so I can't help you for that kind of things.
Probably problem is with packets.
-
Mali's post in Begginers problem was marked as the answer
Server:
Client:
And:
This is the hidden content, please Sign In or Sign Up -
Mali's post in Metin Stone stackable ? was marked as the answer
1.Make item stackable from proto
2.uiinventory.py:
Find in def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos):
elif item.IsMetin(srcItemVID): self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos) Change:
elif item.IsMetin(srcItemVID) and not item.IsMetin(player.GetItemIndex(dstItemSlotPos)): self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos) 3.char_item.cpp
Find in case ITEM_METIN:
ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (METIN)"); Change:
item->SetCount(item->GetCount() - 1);
-
Mali's post in Reset countdown skills was marked as the answer
This is the hidden content, please Sign In or Sign Up use this and change onupdate like this:
-
Mali's post in Change Race [Arrows slot BUG] was marked as the answer
polymorph isn't changing race??
------------------------
here is an example for real change race:
int pc_change_race(lua_State* L) { const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (!lua_isnumber(L, 1) || !ch) return 0; const BYTE race = static_cast<BYTE>(lua_tonumber(L, 1)); if (race < 0 || race >= MAIN_RACE_MAX_NUM) return 0; ch->SetRace(race); ch->SetSkillGroup(0); ch->ClearSkill(); ch->ClearSubSkill(); if (ch->GetDesc()) ch->GetDesc()->SetPhase(PHASE_SELECT); return 0; } -
Mali's post in IsBoss function server was marked as the answer
enum EMobRank { MOB_RANK_PAWN, MOB_RANK_S_PAWN, MOB_RANK_KNIGHT, MOB_RANK_S_KNIGHT, MOB_RANK_BOSS, MOB_RANK_KING, MOB_RANK_MAX_NUM }; if (GetMobRank() == MOB_RANK_BOSS)
-
Mali's post in notice guild.get_name was marked as the answer
You need an argument like: guild.get_name(pc.get_guild())
if pc.hasguild() then notice_multiline(string.format("%s has killed Beran!", guild.get_name(pc.get_guild())), notice_all) end If you want to do with src,
Find in char_battle.cpp:
if (true == IsMonster() && 2493 == GetMobTable().dwVnum) { if (NULL != pkKiller && NULL != pkKiller->GetGuild()) { CDragonLairManager::instance().OnDragonDead( this, pkKiller->GetGuild()->GetID() ); } else { sys_err("DragonLair: Dragon killed by nobody"); } } Change:
if (true == IsMonster() && 2493 == GetMobTable().dwVnum) { if (NULL != pkKiller && NULL != pkKiller->GetGuild()) { CDragonLairManager::instance().OnDragonDead( this, pkKiller->GetGuild()->GetID() ); ///msg char buffer[25+13+25]; snprintf(buffer,sizeof(buffer), "[GUILD]%s has killed %s.", pkKiller->GetGuild()->GetName(), GetName()); SendNotice(buffer); //end msg } else { sys_err("DragonLair: Dragon killed by nobody"); } }
-
Mali's post in Auto Announcements .core was marked as the answer
You need initialize
main.cpp find:
LogManager log_manager; add:
CEventsManager EventsManager; CAutoNotice AutoNoticeManager; find:
MessengerManager::instance().Initialize(); add:
EventsManager.Initialize(); find:
OXEvent_manager.Destroy(); add:
EventsManager.Destroy(); service.h:
#define ENABLE_AUTO_NOTICE #define ENABLE_AUTO_EVENTS
-
Mali's post in Error5 inventory was marked as the answer
add INVENTORY_PAGE_BUTTON_TOOLTIP_1 to locale_interface.txt