Hello guys ,
I need help Im done setuping my own server . how can i create a mu online client installer file
I need help Im done setuping my own server . how can i create a mu online client installer file
Can't find field server associate with character (MID[5/0], CID[106] name Tungaw)Can't find StartMap ID.
#include "zzzitem.h"
#include "user.h"
class CustomJewel
{
public:
CustomJewel(void);
virtual ~CustomJewel(void);
bool IsCustomJewel(int itemId);
bool ProcessCustomJewel(LPOBJ lpObj, int JewelPos, int TargetPos);
bool InsertJewelOfDarkBless(LPOBJ lpObj, int JewelPos, int TargetPos);
bool InsertJewelOfLuck(LPOBJ lpObj, int JewelPos, int TargetPos);
private:
}
extern CustomJewel gCustomJewelSystem;
#include "StdAfx.h"
#include "CustomJewel.h"
CustomJewel gCustomJewelSystem;
CustomJewel::CustomJewel(void)
{
}
CustomJewel::~CustomJewel(void)
{
}
bool CustomJewel::IsCustomJewel(int itemId)
{
if (itemId >= ITEMGET(14, 500) && itemId <= ITEMGET(14, 508))
{
return true;
}
return false;
}
bool CustomJewel::ProcessCustomJewel(LPOBJ lpObj, int JewelPos, int TargetPos)
{
if (JewelPos < 0 || JewelPos > MAIN_INVENTORY_SIZE - 1)
{
return false;
}
if (TargetPos < 0 || TargetPos > MAIN_INVENTORY_SIZE - 1)
{
return false;
}
if (!lpObj->pInventory[JewelPos].IsItem() || !lpObj->pInventory[TargetPos].IsItem())
{
return false;
}
int JewelCode = lpObj->pInventory[JewelPos].m_Type;
int TargetCode = lpObj->pInventory[TargetPos].m_Type;
switch (JewelCode)
{
case ITEMGET(14, 500):
return this->InsertJewelOfDarkBless(lpObj, JewelPos, TargetPos);
case ITEMGET(14, 504):
return this->InsertJewelOfLuck(lpObj, JewelPos, TargetPos);
default:
return false;
}
}
bool CustomJewel::InsertJewelOfDarkBless(LPOBJ lpObj, int JewelPos, int TargetPos)
{
if (lpObj->pInventory[TargetPos].m_Level < 6)
{
lpObj->pInventory[TargetPos].m_Level = 6;
gObjInventoryItemSet(lpObj->m_Index, JewelPos, -1);
lpObj->pInventory[JewelPos].Clear();
GSProtocol.GCInventoryItemOneSend(lpObj->m_Index, TargetPos);
GSProtocol.GCInventoryItemDeleteSend(lpObj->m_Index, JewelPos, 1);
MsgOutput(lpObj->m_Index, "Use Jewel of Dark Bless successful. Your item was upgraded to Lv6");
return true;
}
else
{
MsgOutput(lpObj->m_Index, "Can not use Jewel of Dark Bless. Your item is higher than Lv6");
return false;
}
}
bool CustomJewel::InsertJewelOfLuck(LPOBJ lpObj, int JewelPos, int TargetPos)
{
if (lpObj->pInventory[TargetPos].m_Option2 == 0)
{
lpObj->pInventory[TargetPos].m_Option2 = 1;
gObjInventoryItemSet(lpObj->m_Index, JewelPos, -1);
lpObj->pInventory[JewelPos].Clear();
GSProtocol.GCInventoryItemOneSend(lpObj->m_Index, TargetPos);
GSProtocol.GCInventoryItemDeleteSend(lpObj->m_Index, JewelPos, 1);
MsgOutput(lpObj->m_Index, "Use Jewel of Luck successful. Your item was added Luck option");
return true; }
else
{
MsgOutput(lpObj->m_Index, "Can not use Jewel of Luck. Your item already has Luck option");
return false;
}
}
#include "CustomJewel.h"
void GameProtocol::CGUseItemRecv(PMSG_USEITEM* lpMsg, int aIndex)
{
....
if (....)
{
....
}
else if (....)
{
....
}
else if (gCustomJewelSystem.IsCustomJewel(citem->m_Type))
{
gCustomJewelSystem.ProcessCustomJewel(&gObj[aIndex], lpMsg->inventoryPos, lpMsg->invenrotyTarget);
}
....
}