C++ Source code: Global Message (/post)

Results 1 to 11 of 11
  1. #1
    Apprentice PauloJamel is offline
    MemberRank
    Dec 2009 Join Date
    19Posts

    C++ Source code: Global Message (/post)

    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.


    PHP Code:
    void C_InfinityCommands::PostCommand(short aIndexchar *Message)
    {
        if(
    _PostActive == NULL)
        {
            
    C_InfinityMessages::SendMessages(aIndex_PostMessage1gObj[aIndex].Name);
            return;
        }
        else if(!
    _strcmpi(Message_PostString))
        {
            
    C_InfinityMessages::SendMessages(aIndex_PostMessage2gObj[aIndex].Name_PostString);
            return;
        }
        else if(
    _PostLevel gObj[aIndex].Level)
        {
            
    C_InfinityMessages::SendMessages(aIndex_PostMessage3gObj[aIndex].NameSubtraction(_PostLevelgObj[aIndex].Level));
            return;
        }
        else if(
    _PostMoney gObj[aIndex].Money)
        {
            
    C_InfinityMessages::SendMessages(aIndex_PostMessage4gObj[aIndex].NameSubtraction(_PostMoneygObj[aIndex].Money));
            return;
        }
        else if(
    _PostReset IsisObj[aIndex].Reset)
        {
            
    C_InfinityMessages::SendMessages(aIndex_PostMessage5gObj[aIndex].NameSubtraction(_PostResetIsisObj[aIndex].Reset));
            return;
        }
        else if(
    _PostRestriction == && _PostRestrictionType IsisObj[aIndex].Vip)
        {
            
    C_InfinityMessages::SendMessages(aIndex_PostMessage6gObj[aIndex].Name);
            return;
        }
        else
        {
            
    gObj[aIndex].Money Subtraction(gObj[aIndex].Money_PostMoney);
            
    GCMoneySend(aIndexgObj[aIndex].Money);

            for(
    short bIndex OBJECT_STARTbIndex OBJECT_ENDbIndex++)
            {
                if(
    gObj[bIndex].Connected >= 3)
                {
                    
    C_InfinityMessages::SendBlueMsg(bIndex_PostFormatgObj[aIndex].NameMessage);
                }
            }
        }
    }

    //Send Blue Msg Function Credits I Don't know
    void C_InfinityMessages::SendBlueMsg(int aIndexchar *Message, ...)
    {
        
    char Buffer[200] = {0};
        
    va_list pArguments;
        
    va_start(pArgumentsMessage);
        
    vsprintf(BufferMessagepArguments);
        
    va_end(pArguments);

        
    BYTE *Packet;
        
    Packet = (BYTE*) malloc(200);
        
    memset(Packet0x0200);
        *
    Packet 0xC1;
        *(
    Packet+2) = 0x00;
        *(
    Packet+13) = '~';
        
    memcpy((Packet+14), Bufferstrlen(Buffer));
        
    int Len = ((int)strlen(Buffer) + 15);
        *(
    Packet+1) = Len;
        
    DataSend(aIndexPacketLen);
        
    free(Packet);
    }

    //Send Messages By Me 
    void C_InfinityMessages::SendMessages(int aIndexchar *Message, ...)
    {
        
    char Buffer[200] = {0};
        
    va_list pArgs;
        
    va_start(pArgsMessage);
        
    vsprintf(Buffer,Message,pArgs);
        
    va_end(pArgs);

        
    GCServerMsgStringSend(BufferaIndex0x01);

    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 by PauloJamel; 26-10-11 at 09:44 AM.


  2. #2

    Re: C++ Source code: Global Message (/post)

    Approved

    Thank you for this !

  3. #3
    Member mx_pro is offline
    MemberRank
    Jun 2010 Join Date
    67Posts

    Re: C++ Source code: Global Message (/post)

    Nice good Job PJamel :P

  4. #4
    SnapsterzMU Founders GoldbertGTR is offline
    MemberRank
    Mar 2009 Join Date
    Kuala Lumpur, MLocation
    417Posts

    Re: C++ Source code: Global Message (/post)

    how to add this souce code lol noob question haha

  5. #5
    Apprentice PauloJamel is offline
    MemberRank
    Dec 2009 Join Date
    19Posts

    Re: C++ Source code: Global Message (/post)

    well this source code is part of my Dinamic Link Library(DLL)

    this command goes in ChatDataSend or pChatProc whatever...

    or you can put in case 0x00 in ProtocolCore.

  6. #6
    Apprentice hermexjohn is offline
    MemberRank
    Jul 2005 Join Date
    23Posts

    Re: C++ Source code: Global Message (/post)

    i see no useful "Global Message" source... LOL

  7. #7
    Apprentice PauloJamel is offline
    MemberRank
    Dec 2009 Join Date
    19Posts

    Re: C++ Source code: Global Message (/post)

    What you want what i do for make this a useful source?
    Post Others Functions?

    its my first release in rzint, come on man, give me a change ^^

  8. #8
    Apprentice hermexjohn is offline
    MemberRank
    Jul 2005 Join Date
    23Posts

    Re: C++ Source code: Global Message (/post)

    Quote Originally Posted by PauloJamel View Post
    What you want what i do for make this a useful source?
    Post Others Functions?

    its my first release in rzint, come on man, give me a change ^^
    dude, u did post only the delay system half explained + some conditions "if", not the message system (SendBlueMsg...)

  9. #9
    Apprentice DraqMaster is offline
    MemberRank
    Nov 2010 Join Date
    MoldovaLocation
    23Posts

    Re: C++ Source code: Global Message (/post)

    error

    Code:
    unsigned long Delay = (GetTickCount() - IsisObj[aIndex].m_PostTime) / 1000;

    corect

    Code:
    unsigned long Delay = (GetTickCount() - IsisObj[aIndex].m_PostTime) / 1;
    Jamel,
    i use so
    or its no problem?


    1= its global and standart time to timepost......

  10. #10
    Apprentice PauloJamel is offline
    MemberRank
    Dec 2009 Join Date
    19Posts

    Re: C++ Source code: Global Message (/post)

    well, later i will post others functions now, i go lunch ^^
    but delay sistema is correct. i use this and never give me a problem!

    Bye Bye Guys.

    hermex i don't understand what you say!
    please be clearer ^^

    i thx :D

  11. #11
    Enthusiast willerson is offline
    MemberRank
    Aug 2008 Join Date
    48Posts

    Re: C++ Source code: Global Message (/post)

    the delay system is bugged, if you use a packer, like themida, cause bugs, please, be carefully with this...



Advertisement