Thread: [PI] Items Will Not Pickup - Rep++

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 [PI] Items Will Not Pickup - Rep++ 
    Registered Member Thani's Avatar
    Join Date
    May 2008
    Posts
    192
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Well I was just trying something and I made up a command that drops an item on the floor. When I type the command in, the item appears on the coordinations I want it to be on. But the problem is, I CANT PICK THE ITEM UP.. Does anyone know how to fix this? Heres a video..


    http://img441.imageshack.us/img441/9306/6iz.mp4
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2010
    Age
    34
    Posts
    20
    Thanks given
    0
    Thanks received
    3
    Rep Power
    0
    Can you usually pick up off the floor whilst dropping manually (I'm not going to load up the video as I got limited bandwith).
    Reply With Quote  
     

  3. #3  
    Registered Member Thani's Avatar
    Join Date
    May 2008
    Posts
    192
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Yes I am able to pickup drops by NPC's or if I kill a player in the wilderness. But if I drop a item, it will dissappear because I do not want duping happening. BUT if I INTENIONALLY use the command and item drops, I can see it on the floor but I can't pick it up.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2010
    Age
    34
    Posts
    20
    Thanks given
    0
    Thanks received
    3
    Rep Power
    0
    I watched the video btw.

    Firstly, does it do it with more than 1 item?

    Secondly, can you quote the code on your command and your ground item packet (or anything else on ground items).

    If you want, I'll add this into a PI server on my hard drive and test it out. See if I can come up with anything for you.
    Reply With Quote  
     

  5. #5  
    Registered Member Thani's Avatar
    Join Date
    May 2008
    Posts
    192
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    if (playerCommand.startsWith("dpl") && c.playerRights >= 3) {
    c.getItems().createGroundItem(14484, 3087, 3489, 1);

    }

    Won't pick up...?
    Reply With Quote  
     

  6. #6  
    Registered Member Santi Cazorla's Avatar
    Join Date
    Aug 2009
    Posts
    1,137
    Thanks given
    258
    Thanks received
    55
    Rep Power
    7
    why do you even need that command? can you not drop items on your server?
    Reply With Quote  
     

  7. #7  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    31
    Posts
    2,779
    Thanks given
    974
    Thanks received
    411
    Rep Power
    0
    Quote Originally Posted by techrosh View Post
    why do you even need that command? can you not drop items on your server?
    Im thinking drop partys?

    public void removeGroundItem(int itemID, int itemX, int itemY, int Amount) {
    synchronized(c) {
    c.getOutStream().createFrame(85);
    c.getOutStream().writeByteC((itemY - 8 * c.mapRegionY));
    c.getOutStream().writeByteC((itemX - 8 * c.mapRegionX));
    c.getOutStream().createFrame(156);
    c.getOutStream().writeByteS(0);
    c.getOutStream().writeWord(itemID);
    c.flushOutStream();
    }
    }
    This removes the item

    public boolean addItem(int item, int amount) {
    synchronized(c) {
    if (amount < 1) {
    amount = 1;
    }
    if(item <= 0) {
    return false;
    }
    if ((((freeSlots() >= 1) || playerHasItem(item, 1)) && Item.itemStackable[item]) || ((freeSlots() > 0) && !Item.itemStackable[item])) {
    for (int i = 0; i < c.playerItems.length; i++) {
    if ((c.playerItems[i] == (item + 1)) && Item.itemStackable[item]
    && (c.playerItems[i] > 0)) {
    c.playerItems[i] = (item + 1);
    if (((c.playerItemsN[i] + amount) < Config.MAXITEM_AMOUNT)
    && ((c.playerItemsN[i] + amount) > -1)) {
    c.playerItemsN[i] += amount;
    } else {
    c.playerItemsN[i] = Config.MAXITEM_AMOUNT;
    }
    if(c.getOutStream() != null && c != null ) {
    c.getOutStream().createFrameVarSizeWord(34);
    c.getOutStream().writeWord(3214);
    c.getOutStream().writeByte(i);
    c.getOutStream().writeWord(c.playerItems[i]);
    if (c.playerItemsN[i] > 254) {
    c.getOutStream().writeByte(255);
    c.getOutStream().writeDWord(c.playerItemsN[i]);
    } else {
    c.getOutStream().writeByte(c.playerItemsN[i]);
    }
    c.getOutStream().endFrameVarSizeWord();
    c.flushOutStream();
    }
    i = 30;
    return true;
    }
    }
    for (int i = 0; i < c.playerItems.length; i++) {
    if (c.playerItems[i] <= 0) {
    c.playerItems[i] = item + 1;
    if ((amount < Config.MAXITEM_AMOUNT) && (amount > -1)) {
    c.playerItemsN[i] = 1;
    if (amount > 1) {
    c.getItems().addItem(item, amount - 1);
    return true;
    }
    } else {
    c.playerItemsN[i] = Config.MAXITEM_AMOUNT;
    }
    /*if(c.getOutStream() != null && c != null ) {
    c.getOutStream().createFrameVarSizeWord(34);
    c.getOutStream().writeWord(3214);
    c.getOutStream().writeByte(i);
    c.getOutStream().writeWord(c.playerItems[i]);
    if (c.playerItemsN[i] > 254) {
    c.getOutStream().writeByte(255);
    c.getOutStream().writeDWord(c.playerItemsN[i]);
    } else {
    c.getOutStream().writeByte(c.playerItemsN[i]);
    }
    c.getOutStream().endFrameVarSizeWord();
    c.flushOutStream();
    }*/
    resetItems(3214);
    i = 30;
    return true;
    }
    }
    return false;
    } else {
    resetItems(3214);
    c.sendMessage("Not enough space in your inventory.");
    return false;
    }
    }
    }

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣



    Reply With Quote  
     

  8. #8  
    Registered Member Thani's Avatar
    Join Date
    May 2008
    Posts
    192
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by Linus View Post
    Im thinking drop partys?
    Anyways let me find my pickupItem code..

    edit
    Yes, drop parties ... To get the server started.. Thanks tho.
    Reply With Quote  
     

  9. #9  
    Registered Member Thani's Avatar
    Join Date
    May 2008
    Posts
    192
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    I'll try your's Linus
    Reply With Quote  
     

  10. #10  
    Registered Member Thani's Avatar
    Join Date
    May 2008
    Posts
    192
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Linus, it doesn't work and I already had it defined.
    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

Similar Threads

  1. Cant pickup ground items
    By Division in forum Help
    Replies: 1
    Last Post: 12-27-2009, 12:33 PM
  2. Replies: 6
    Last Post: 12-03-2009, 11:50 PM
  3. Replies: 2
    Last Post: 02-04-2009, 07:46 PM
  4. Can't Pickup Items - Not Pickup Command
    By tucybro in forum Help
    Replies: 10
    Last Post: 01-23-2009, 03:30 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •