- Joined
- Dec 30, 2009
- Messages
- 18
- Reaction score
- 6
Hi Ragezoners this is my sample source of post command for mu online!
Its Very Samble but is very good organized.
I hope all like this.
The delay system is similar with X-Team Season IV Released but
my form of make are different i hook gObjCharZeroSet function with my struct.
well, its all
I hope all like.
Edited: Removed Delay and post others Functions
Credits Infinity Mu Team - Jamel.
Its Very Samble but is very good organized.
I hope all like this.
PHP:
void C_InfinityCommands::PostCommand(short aIndex, char *Message)
{
if(_PostActive == NULL)
{
C_InfinityMessages::SendMessages(aIndex, _PostMessage1, gObj[aIndex].Name);
return;
}
else if(!_strcmpi(Message, _PostString))
{
C_InfinityMessages::SendMessages(aIndex, _PostMessage2, gObj[aIndex].Name, _PostString);
return;
}
else if(_PostLevel > gObj[aIndex].Level)
{
C_InfinityMessages::SendMessages(aIndex, _PostMessage3, gObj[aIndex].Name, Subtraction(_PostLevel, gObj[aIndex].Level));
return;
}
else if(_PostMoney > gObj[aIndex].Money)
{
C_InfinityMessages::SendMessages(aIndex, _PostMessage4, gObj[aIndex].Name, Subtraction(_PostMoney, gObj[aIndex].Money));
return;
}
else if(_PostReset > IsisObj[aIndex].Reset)
{
C_InfinityMessages::SendMessages(aIndex, _PostMessage5, gObj[aIndex].Name, Subtraction(_PostReset, IsisObj[aIndex].Reset));
return;
}
else if(_PostRestriction == 1 && _PostRestrictionType > IsisObj[aIndex].Vip)
{
C_InfinityMessages::SendMessages(aIndex, _PostMessage6, gObj[aIndex].Name);
return;
}
else
{
gObj[aIndex].Money = Subtraction(gObj[aIndex].Money, _PostMoney);
GCMoneySend(aIndex, gObj[aIndex].Money);
for(short bIndex = OBJECT_START; bIndex < OBJECT_END; bIndex++)
{
if(gObj[bIndex].Connected >= 3)
{
C_InfinityMessages::SendBlueMsg(bIndex, _PostFormat, gObj[aIndex].Name, Message);
}
}
}
}
//Send Blue Msg Function Credits I Don't know
void C_InfinityMessages::SendBlueMsg(int aIndex, char *Message, ...)
{
char Buffer[200] = {0};
va_list pArguments;
va_start(pArguments, Message);
vsprintf(Buffer, Message, pArguments);
va_end(pArguments);
BYTE *Packet;
Packet = (BYTE*) malloc(200);
memset(Packet, 0x0, 200);
*Packet = 0xC1;
*(Packet+2) = 0x00;
*(Packet+13) = '~';
memcpy((Packet+14), Buffer, strlen(Buffer));
int Len = ((int)strlen(Buffer) + 15);
*(Packet+1) = Len;
DataSend(aIndex, Packet, Len);
free(Packet);
}
//Send Messages By Me
void C_InfinityMessages::SendMessages(int aIndex, char *Message, ...)
{
char Buffer[200] = {0};
va_list pArgs;
va_start(pArgs, Message);
vsprintf(Buffer,Message,pArgs);
va_end(pArgs);
GCServerMsgStringSend(Buffer, aIndex, 0x01);
}
The delay system is similar with X-Team Season IV Released but
my form of make are different i hook gObjCharZeroSet function with my struct.
well, its all
I hope all like.
Edited: Removed Delay and post others Functions
Credits Infinity Mu Team - Jamel.
Last edited:

