Thread: [REP++] Adding deleteobject?

Results 1 to 4 of 4
  1. #1 [REP++] Adding deleteobject? 
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    I need a void that will delete objects... I know some servers have it I just downloaded 2 of them that didn't and so I figured it would be more efficient to just ask here.


    So yeah

    Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member
    Hunter's Avatar
    Join Date
    Jun 2009
    Age
    33
    Posts
    857
    Thanks given
    3
    Thanks received
    23
    Rep Power
    216
    Code:
     public void ReplaceObject2(int objectX, int objectY, int NewObjectID,
       int Face, int ObjectType) {
      outStream.createFrame(85);
      outStream.writeByteC(objectY - (mapRegionY * 8));
      outStream.writeByteC(objectX - (mapRegionX * 8));
      outStream.createFrame(101);
      outStream.writeByteC((ObjectType << 2) + (Face & 3));
      outStream.writeByte(0);
      if (NewObjectID != -1) {
       outStream.createFrame(151);
       outStream.writeByteS(0);
       outStream.writeWordBigEndian(NewObjectID);
       outStream.writeByteS((ObjectType << 2) + (Face & 3));
       // FACE: 0= WEST | -1 = NORTH | -2 = EAST | -3 = SOUTH
       // ObjectType: 0-3 wall objects, 4-8 wall decoration, 9: diag.
       // walls, 10-11 world objects, 12-21: roofs, 22: floor decoration
      }
     }
    public void deletethatobject(int objectX, int objectY) { 
      ReplaceObject2(objectX, objectY, 6951, -1, 10);
     }
    I think that's what you want.
    Reply With Quote  
     

  3. #3  
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Quote Originally Posted by Hunter View Post
    Code:
     public void ReplaceObject2(int objectX, int objectY, int NewObjectID,
       int Face, int ObjectType) {
      outStream.createFrame(85);
      outStream.writeByteC(objectY - (mapRegionY * 8));
      outStream.writeByteC(objectX - (mapRegionX * 8));
      outStream.createFrame(101);
      outStream.writeByteC((ObjectType << 2) + (Face & 3));
      outStream.writeByte(0);
      if (NewObjectID != -1) {
       outStream.createFrame(151);
       outStream.writeByteS(0);
       outStream.writeWordBigEndian(NewObjectID);
       outStream.writeByteS((ObjectType << 2) + (Face & 3));
       // FACE: 0= WEST | -1 = NORTH | -2 = EAST | -3 = SOUTH
       // ObjectType: 0-3 wall objects, 4-8 wall decoration, 9: diag.
       // walls, 10-11 world objects, 12-21: roofs, 22: floor decoration
      }
     }
    public void deletethatobject(int objectX, int objectY) { 
      ReplaceObject2(objectX, objectY, 6951, -1, 10);
     }
    I think that's what you want.
    If I'm not mistaken, that requires you to add another object.. Maybe I can set the object ID at -1 and it will just delete it....
    Reply With Quote  
     

  4. #4  
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Ahhhh yes that'll work.

    Thanks much (:
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •