Thread: [503]Working Pickup with Removing Ground Items

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 [503]Working Pickup with Removing Ground Items 
    Registered Member
    Naughty Panda's Avatar
    Join Date
    Dec 2007
    Posts
    631
    Thanks given
    12
    Thanks received
    46
    Rep Power
    347
    Description: To add picking up to RS2E 503 including removing ground items.

    Difficulty: 2/10

    Assumed Knowledge: Copy and pasting, adding a class file.

    Tested Server: RS2E V2.

    Files/Classes Modified: HandlePacket.java

    Files/Classes Created: PickupItem.java

    Procedure
    Step 1: Open HandlePacket.java and add:
    Code:
    case 106:
    int x = p.inStream.readSignedWordBigEndianA();
    int id = p.inStream.readUnsignedWord();
    int y = p.inStream.readSignedWordA();
    PickupItem pi = new PickupItem(p, x, y, id);
    break;
    Step 2: Close HandlePacket.java and save it. Now create a new class file named PickupItem.java and add this in there:
    Code:
    /*
    * Class PickupItem
    *
    * Version 1.0
    *
    * Monday, August 11, 2008
    *
    * Created by Adam (Skiiii)
    */
    
    package RS2E.Packets;
    
    import RS2E.Players.Player;
    import RS2E.Players.PlayerItems;
    
    public class PickupItem {
    	public PickupItem(Player p, int x, int y, int id) {
    		if(p == null || p.inStream == null) {
    			return;
    		}
    		p.outStream.createFrame(218);
    		p.outStream.writeByteA((x - ((p.mapRegionX - 6) * 8)));
    		p.outStream.writeByte((y - ((p.mapRegionY - 6) * 8)));
    		p.outStream.createFrame(55);
    		p.outStream.writeWordBigEndian(id);
    		p.outStream.writeByte(0);
    		PlayerItems pi = new PlayerItems();
    		pi.addItem(p, id, 1);
    	}
    }
    Step 3: Save, Close and Compile, and you're done.


    Credits: Credits to Laxika for the frame (55), Pali for RS2E and Me for the class file and usage.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jun 2007
    Age
    27
    Posts
    333
    Thanks given
    454
    Thanks received
    42
    Rep Power
    0
    wewt! nice
    Reply With Quote  
     

  3. #3  
    Registered Member
    Inspired Dreams's Avatar
    Join Date
    Aug 2007
    Posts
    1,129
    Thanks given
    4
    Thanks received
    5
    Rep Power
    151
    does this work with dannos
    Reply With Quote  
     

  4. #4  
    ( ͡° ͜ʖ ͡°)
    Edgeville's Avatar
    Join Date
    Nov 2007
    Posts
    2,455
    Thanks given
    80
    Thanks received
    428
    Rep Power
    2589
    Wow, Awsome really works, Thanks alot man
    Reply With Quote  
     

  5. #5  
    Registered Member
    Abyssal head's Avatar
    Join Date
    May 2008
    Age
    29
    Posts
    1,255
    Thanks given
    14
    Thanks received
    22
    Rep Power
    238
    verry nice but only thing is it picks up and then it runs to spot where the item was dropped. but fucking nice man u helped me out

    EDIT: if u can fix that plz would be ownage

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #6  
    Registered Member
    Riedell's Avatar
    Join Date
    Feb 2008
    Age
    28
    Posts
    403
    Thanks given
    4
    Thanks received
    2
    Rep Power
    152
    Very nice work with this, Compiled with no errors. Works well. Thank you.

    -Riedell
    ~Riedell
    Reply With Quote  
     

  7. #7  
    Registered Member
    Naughty Panda's Avatar
    Join Date
    Dec 2007
    Posts
    631
    Thanks given
    12
    Thanks received
    46
    Rep Power
    347
    Thanks for the comments, I've improved my pickup now... Supports stackable items, so if you drop your coins it'll drop them all and pick up the right amount. Also added arrow dropping when you fire them, if there is already one on the floor adds one to the amount.

    Might think about releasing soon.
    Reply With Quote  
     

  8. #8  
    ( ͡° ͜ʖ ͡°)
    Edgeville's Avatar
    Join Date
    Nov 2007
    Posts
    2,455
    Thanks given
    80
    Thanks received
    428
    Rep Power
    2589
    Quote Originally Posted by Skiiii View Post
    Thanks for the comments, I've improved my pickup now... Supports stackable items, so if you drop your coins it'll drop them all and pick up the right amount. Also added arrow dropping when you fire them, if there is already one on the floor adds one to the amount.

    Might think about releasing soon.
    Awsome Nice work hope you do release
    Reply With Quote  
     

  9. #9  
    T
    T is offline
    Registered Member
    T's Avatar
    Join Date
    Aug 2007
    Posts
    815
    Thanks given
    1
    Thanks received
    2
    Rep Power
    286
    Awesome. Thanks very much for this.
    Reply With Quote  
     

  10. #10 wtf 
    Registered Member
    Join Date
    Jul 2008
    Age
    27
    Posts
    201
    Thanks given
    0
    Thanks received
    1
    Rep Power
    23
    I got this error

    ------------ Compiling players ------------
    ------------ Compiling packets ------------
    .\RS2E\Packets\HandlePacket.java:72: cannot find symbol
    symbol : class PickupItem
    location: class RS2E.Packets.HandlePacket
    PickupItem pi = new PickupItem(p, x, y, id);
    ^
    .\RS2E\Packets\HandlePacket.java:72: cannot find symbol
    symbol : class PickupItem
    location: class RS2E.Packets.HandlePacket
    PickupItem pi = new PickupItem(p, x, y, id);
    ^
    2 errors
    ------------ Compiling util ------------
    ------------ Compiling world ------------
    ------------ Compiling main ------------
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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
  •