Reset and Addstats

Results 1 to 5 of 5
  1. #1
    Valued Member the_surfer is offline
    MemberRank
    May 2009 Join Date
    133Posts

    happy Reset and Addstats

    hello mu master, please teach me how to do /resets, /addstr,/adagi etc. without reloging?? in some servers when they resets and att stat points they do not need to relog please help me,, thanks! BTW my server is from here http://forum.ragezone.com/f197/serve...-100-a-792584/


  2. #2
    OH Yes! Proud to be Me astig01998 is offline
    MemberRank
    Aug 2011 Join Date
    (Philippines)Location
    662Posts

    Re: Reset and Addstats

    I Dont know where will this put i just found it
    i dont know if this is it :)
    //Adiciona pontos para o personagem
    #define CMD_FORCA "/addstr "
    #define CMD_AGILIDADE "/addagi "
    #define CMD_VITALIDADE "/addvit "
    #define CMD_ENERGIA "/addene "
    #define CMD_CARISMA "/addcmd "

    bool IsPonto(DWORD PlayerID, LPCSTR Comando)
    {
    int CmdLen, Pontos;
    char* Atributo = "";
    char Mensagem[100] = "";

    PMSG_USE_STAT_FRUIT pResult;
    PHeadSetB((LPBYTE)&pResult,0x2C,sizeof(pResult));

    if(memicmp(CMD_FORCA, Comando, sizeof(CMD_FORCA)-1) == 0)
    {
    if( CheckIfLevelUpPoint(PlayerID) == TRUE)
    return false;

    CmdLen = sizeof(CMD_FORCA)-1;
    sscanf(Comando+CmdLen,"%d", &Pontos);
    Pontos = abs(Pontos);
    Atributo = msg[14].Message;

    if((CheckLevelUpPoint(PlayerID,Pontos,3)) == FALSE)
    {
    wsprintf(Mensagem, msg[19].Message, Atributo); // "Essa quantidade de pontos excede o maximo de pontos em %s para sua classe"
    C1TipPlayer(PlayerID,Mensagem,1);
    return false;
    }

    pResult.result = 0;
    pResult.btStatValue = Pontos;
    pResult.btFruitType = 3;
    DataSend(PlayerID,(unsigned char *)&pResult,pResult.h.size);
    Obj[PlayerID].Strength += Pontos;
    wsprintf(Mensagem, msg[20].Message, Pontos, Atributo); // "Foram adicionados %d pontos em %s"
    C1TipPlayer(PlayerID,Mensagem,1);

    }
    else if(memicmp(CMD_AGILIDADE, Comando, sizeof(CMD_AGILIDADE)-1) == 0)
    {
    if( CheckIfLevelUpPoint(PlayerID) == TRUE)
    return false;

    CmdLen = sizeof(CMD_AGILIDADE)-1;
    sscanf(Comando+CmdLen,"%d", &Pontos);
    Pontos = abs(Pontos);
    Atributo = msg[15].Message;

    if((CheckLevelUpPoint(PlayerID,Pontos,2)) == FALSE)
    {
    wsprintf(Mensagem, msg[19].Message, Atributo); // "Essa quantidade de pontos excede o maximo de pontos em %s para sua classe"
    C1TipPlayer(PlayerID,Mensagem,1);
    return false;
    }

    pResult.result = 0;
    pResult.btStatValue = Pontos;
    pResult.btFruitType = 2;
    DataSend(PlayerID,(unsigned char *)&pResult,pResult.h.size);
    Obj[PlayerID].Dexterity += Pontos;
    wsprintf(Mensagem, msg[20].Message, Pontos, Atributo); // "Foram adicionados %d pontos em %s"
    C1TipPlayer(PlayerID,Mensagem,1);
    }
    else if(memicmp(CMD_VITALIDADE, Comando, sizeof(CMD_VITALIDADE)-1) == 0)
    {
    if( CheckIfLevelUpPoint(PlayerID) == TRUE)
    return false;

    CmdLen = sizeof(CMD_VITALIDADE)-1;
    sscanf(Comando+CmdLen,"%d", &Pontos);
    Pontos = abs(Pontos);
    Atributo = msg[16].Message;

    if((CheckLevelUpPoint(PlayerID,Pontos,1)) == FALSE)
    {
    wsprintf(Mensagem, msg[19].Message, Atributo); // "Essa quantidade de pontos excede o maximo de pontos em %s para sua classe"
    C1TipPlayer(PlayerID,Mensagem,1);
    return false;
    }

    pResult.result = 0;
    pResult.btStatValue = Pontos;
    pResult.btFruitType = 1;
    DataSend(PlayerID,(unsigned char *)&pResult,pResult.h.size);
    Obj[PlayerID].Vitality += Pontos;
    Obj[PlayerID].MaxLife += Obj[PlayerID].VitalityToLife * Pontos;
    wsprintf(Mensagem, msg[20].Message, Pontos, Atributo); // "Foram adicionados %d pontos em %s"
    C1TipPlayer(PlayerID,Mensagem,1);
    }
    else if(memicmp(CMD_ENERGIA, Comando, sizeof(CMD_ENERGIA)-1) == 0)
    {
    if( CheckIfLevelUpPoint(PlayerID) == TRUE)
    return false;

    CmdLen = sizeof(CMD_ENERGIA)-1;
    sscanf(Comando+CmdLen,"%d", &Pontos);
    Pontos = abs(Pontos);
    Atributo = msg[17].Message;

    if((CheckLevelUpPoint(PlayerID,Pontos,0)) == FALSE)
    {
    wsprintf(Mensagem, msg[19].Message, Atributo); // "Essa quantidade de pontos excede o maximo de pontos em %s para sua classe"
    C1TipPlayer(PlayerID,Mensagem,1);
    return false;
    }

    pResult.result = 0;
    pResult.btStatValue = Pontos;
    pResult.btFruitType = 0;
    DataSend(PlayerID,(unsigned char *)&pResult,pResult.h.size);
    Obj[PlayerID].Energy += Pontos;
    Obj[PlayerID].MaxMana += Obj[PlayerID].EnergyToMana * Pontos;
    gObjSetBP(PlayerID);
    wsprintf(Mensagem, msg[20].Message, Pontos, Atributo); // "Foram adicionados %d pontos em %s"
    C1TipPlayer(PlayerID,Mensagem,1);

    }
    else if(memicmp(CMD_CARISMA, Comando, sizeof(CMD_CARISMA)-1) == 0)
    {
    if( CheckIfLevelUpPoint(PlayerID) == TRUE)
    return false;

    if(Obj[PlayerID].DbClass == DarkLord || Obj[PlayerID].DbClass == LordEmperor){
    CmdLen = sizeof(CMD_CARISMA)-1;
    sscanf(Comando+CmdLen,"%d", &Pontos);
    Pontos = abs(Pontos);
    Atributo = msg[18].Message;

    if((CheckLevelUpPoint(PlayerID,Pontos,4)) == FALSE)
    {
    wsprintf(Mensagem, msg[19].Message, Atributo); // "Essa quantidade de pontos excede o maximo de pontos em %s para sua classe"
    C1TipPlayer(PlayerID,Mensagem,1);
    return false;
    }

    pResult.result = 0;
    pResult.btStatValue = Pontos;
    pResult.btFruitType = 4;
    DataSend(PlayerID,(unsigned char *)&pResult,pResult.h.size);
    Obj[PlayerID].Leadership += Pontos;
    wsprintf(Mensagem, msg[20].Message, Pontos, Atributo); // "Foram adicionados %d pontos em %s"
    C1TipPlayer(PlayerID,Mensagem,1);
    }
    else
    {
    MenssagemAlerta(4,PlayerID);
    return false;
    }
    }
    else {
    return false;
    }

    Obj[PlayerID].LevelUpPoint -= Pontos;
    gObjCalCharacter(PlayerID);
    GCReFillSend(Obj[PlayerID].m_Index,(WORD)Obj[PlayerID].MaxLife + Obj[PlayerID].AddLife,0xFE,0,Obj[PlayerID].iMaxShield + Obj[PlayerID].iAddShield);
    gObjSetBP(PlayerID);
    GCManaSend(Obj[PlayerID].m_Index,(short)Obj[PlayerID].MaxMana + Obj[PlayerID].AddMana,0xFE,0,Obj[PlayerID].MaxBP + Obj[PlayerID].AddBP);
    GCLevelUpMsgSend( Obj[PlayerID].m_Index , FALSE );

    return true;
    }

    bool CheckIfLevelUpPoint(DWORD PlayerID)
    {
    if( Obj[PlayerID].Level < Load.AddLevel )
    {
    MenssagemAlerta(1,PlayerID);
    return true;
    }
    if( (TiraZen(PlayerID, Load.AddCost)) == FALSE )
    {
    MenssagemAlerta(0,PlayerID);
    return true;
    }

    return false;
    }
    struct PMSG_USE_STAT_FRUIT {

    struct PBMSG_HEAD h;
    unsigned char result;
    unsigned short btStatValue;
    unsigned char btFruitType;
    };

  3. #3
    Valued Member the_surfer is offline
    MemberRank
    May 2009 Join Date
    133Posts

    Re: Reset and Addstats

    lol? with the smiley face i know that you know where to put that thing ^_^ please tell me :)

  4. #4

    Re: Reset and Addstats

    nah u cant put it anywhere , unless u know to make that code a .dll file and then hook the dll in ur gs. . .

    just read the first post of that thread u downloaded how to enable those cmds .
    Posted via Mobile Device

  5. #5
    INPHINITY IcheBeShino is offline
    MemberRank
    Nov 2011 Join Date
    PhilippinesLocation
    301Posts

    Re: Reset and Addstats

    Quote Originally Posted by astig01998 View Post
    I Dont know where will this put i just found it
    i dont know if this is it :)
    use Visual C++ To Repack as Hook.dll :) im not sure..

    but i seen Source Code From C++ :D



Advertisement