Pastebin

New pastes are no longer accepted · Stats

Latest Pastes

nasty bot walk

void Character::BotActions()
{

    PacketBuilder b;
    int bot_x = this->x;
    int bot_y = this->y;
    int dist = util::path_length(bot_x, bot_y, this->x, this->y);
        if(this->bot_is_on == false);
        {


           PacketBuilder b1(PACKET_CLOTHES, PACKET_REMOVE);
           b1.AddShort(0);
           this->SB(b1);

       b.SetID(PACKET_PLAYERS, PACKET_AGREE);//was  PLAYERS  ,AGREE
       b.AddByte(255);
       b.AddBreakString("Pandemonium");
       b.AddShort(0);//playerid
       b.AddShort(this->mapid);//map
       b.AddShort(this->x -1);//x
       b.AddShort(this->y);//y
       b.AddChar(this->direction);//direction
       b.AddChar(3); // character class
       b.AddString("HGM");//guildtag
       b.AddChar(200);//lvl
       b.AddChar(1);//gender 0 or 1 = male
       b.AddChar(15);//hairstyle
       b.AddChar(8);//haircolor
       b.AddChar(SKIN_PANDA);//race
       b.AddShort(10);//maxhp
       b.AddShort(1);//hp
       b.AddShort(10);//maxtp
       b.AddShort(1);//tp
    // equipment  below are  gfx not ids
       b.AddShort(49);//boots 488
       b.AddShort(0); // ?? was 0
       b.AddShort(0); // ??
       b.AddShort(0); // ??
       b.AddShort(39);//armor male 406
       b.AddShort(0); // ??
       b.AddShort(33);//hat 313
       b.AddShort(0);//shield 425
       b.AddShort(0);//wep 329
         //b.AddChar((this->bot_sit == 0) ? 1 : 0);//sitting should be 1
       b.AddChar(0);
       b.AddChar(0);//hidden 0 no 1 yes
       b.AddByte(255);
       b.AddChar(1); // 0 = NPC, 1 = player
       this->SB(b);
       this->bot_is_on = true;

    }
    if(this->bot_walk == true)
    {
        this->bot_is_on = false;

    b.Reset();
    b.SetID(PACKET_WALK, PACKET_PLAYER);
    b.AddShort(0);
    b.AddChar(this->direction);
    b.AddChar(this->x - 1);
    b.AddChar(this->y);
    this->SB(b);
   // ch->SB(b);
    b.Reset();
    b.SetID(PACKET_WALK, PACKET_REPLY);
    b.AddByte(255);
    b.AddByte(255);
    this->SB(b);
    this->bot_walk = false;
    }
}