Little customs about commands:
1. Make command /move(/warp) to can be used while you are PK.
Open CommandManager.cpp find:
Code:
case Command::Move:
Edit:
Code:
if( lpUser->m_PK_Level > 3 )
{
GCServerMsgStringSend(lMsg.Get(MSGGET(4, 101)), lpUser->m_Index, 1);
return;
}
To:
Code:
if( lpUser->m_PK_Level > 6 )
{
GCServerMsgStringSend(lMsg.Get(MSGGET(4, 101)), lpUser->m_Index, 1);
return;
}
Open: protocol.cpp
Find:
Code:
void CGWindowReqMove(PMSG_MOVE_REQUEST* lpMsg,int aIndex)
Edit:
Code:
if ( lpObj->m_PK_Level > 3)
{
GCServerMsgStringSend(lMsg.Get(MSGGET(4, 101)), lpObj->m_Index, 1);
return;
}
To:
Code:
if ( lpObj->m_PK_Level > 6)
{
GCServerMsgStringSend(lMsg.Get(MSGGET(4, 101)), lpObj->m_Index, 1);
return;
}
2. PKClear to can be used only by your character.
Open CommandManager.cpp
Find function:
Code:
case Command::PKReset:
Then replace the whole function with:
Code:
case Command::PKReset:
if ( lpUser->m_PK_Level <= 3 )
{
MsgOutput(lpUser->m_Index, "You are not PK.");
return;
}
if (lpUser->Money < lpCommand->Price * lpUser->m_PK_Count) {
MsgOutput(lpUser->m_Index, "You are short of money");
return;
}
lpUser->Money -= lpCommand->Price * lpUser->m_PK_Count;
GCMoneySend(lpUser->m_Index, lpUser->Money);
lpUser->m_PK_Count = 0;
lpUser->m_PK_Level = 3;
lpUser->m_PK_Time = 0;
// ----
if( lpUser->PartyNumber >= 0 )
{
gParty.SetPkLevel(lpUser->PartyNumber, lpUser->m_Index, lpUser->DBNumber, lpUser->m_PK_Level);
gParty.SetPkCount(lpUser->PartyNumber);
}
// ----
GCPkLevelSend(lpUser->m_Index, lpUser->m_PK_Level);
}
break;
3. Sometimes zGS crash when success rate is more than 100%.
Open ElementalSystem.cpp:
Find:
Code:
lpObj->ChaosSuccessRate = 80;
and obviously all of ChaosSuccessRate
Replace with:
Code:
if ( lpObj->ChaosSuccessRate >= 100 )
{
lpObj->ChaosSuccessRate = 100;
}
else
{
lpObj->ChaosSuccessRate = 80;
}