Thread: 317 [PI] Can't eat food

Results 1 to 3 of 3
  1. #1 317 [PI] Can't eat food 
    Registered Member
    Join Date
    Jan 2013
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hello, so i need some help with the eating in this server, Project Perfection. When i Googled this for help i found a result that led me to "ClickItem.JAVA" well i don't have that, i have ClickItem.CLASS. So what I'm asking for is should i create the .JAVA file and if so, how would i go about doing this? Yes, I'm pretty much a complete noob on all this, I said it so you don't have too. Thanks in advance

    Edit: yeah found out where the .JAVA files were, sorry. It's late and i guess i didn't look around hard enough, but still how would i add like the eating command to heal? My ClickItem.JAVA is basically empty, i think.


    Spoiler for ClickItem.Java:
    package server.model.players.packets;

    import server.model.players.Client;
    import server.model.players.PacketType;
    import server.model.players.combat.range.DwarfMultiCannon ;


    /**
    * Clicking an item, bury bone, eat food etc
    **/
    public class ClickItem implements PacketType {

    @Override
    public void processPacket(Client c, int packetType, int packetSize) {
    int junk = c.getInStream().readSignedWordBigEndianA();
    int itemSlot = c.getInStream().readUnsignedWordA();
    int itemId = c.getInStream().readUnsignedWordBigEndian();
    if (itemId != c.playerItems[itemSlot] - 1) {

    return;
    }
    switch (itemId) {
    case 6:
    c.getCannon().setUpCannon();
    break;
    }

    if (itemId >= 5509 && itemId <= 5514) {
    int pouch = -1;
    int a = itemId;
    if (a == 5509)
    pouch = 0;
    if (a == 5510)
    pouch = 1;
    if (a == 5512)
    pouch = 2;
    if (a == 5514)
    pouch = 3;
    c.getPA().fillPouch(pouch);
    return;
    }

    if (itemId > 15085 && itemId < 15102){
    c.useDice(itemId, false);
    }
    if (itemId == 15084)
    {//dice bag
    c.diceID = itemId;
    c.getDH().sendDialogues(106, 0);
    }
    if (c.getHerblore().isUnidHerb(itemId))
    c.getHerblore().handleHerbClick(itemId);
    if (c.getFood().isFood(itemId))
    c.getFood().eat(itemId,itemSlot);
    //ScriptManager.callFunc("itemClick_"+itemId, c, itemId, itemSlot);
    if (c.getPotions().isPotion(itemId))
    c.getPotions().handlePotion(itemId,itemSlot);
    if (c.getPrayer().IsABone(itemId))
    c.getPrayer().buryBone(itemId);
    if (itemId == 952) {
    if(c.inArea(3553, 3301, 3561, 3294)) {
    c.teleTimer = 3;
    c.newLocation = 1;
    } else if(c.inArea(3550, 3287, 3557, 3278)) {
    c.teleTimer = 3;
    c.newLocation = 2;
    } else if(c.inArea(3561, 3292, 3568, 3285)) {
    c.teleTimer = 3;
    c.newLocation = 3;
    } else if(c.inArea(3570, 3302, 3579, 3293)) {
    c.teleTimer = 3;
    c.newLocation = 4;
    } else if(c.inArea(3571, 3285, 3582, 3278)) {
    c.teleTimer = 3;
    c.newLocation = 5;
    } else if(c.inArea(3562, 3279, 3569, 3273)) {
    c.teleTimer = 3;
    c.newLocation = 6;
    }
    }
    }

    }
    Last edited by Malachai; 06-24-2013 at 08:53 AM. Reason: I goofed up a little
    Reply With Quote  
     

  2. #2  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Malachai View Post
    Hello, so i need some help with the eating in this server, Project Perfection. When i Googled this for help i found a result that led me to "ClickItem.JAVA" well i don't have that, i have ClickItem.CLASS. So what I'm asking for is should i create the .JAVA file and if so, how would i go about doing this? Yes, I'm pretty much a complete noob on all this, I said it so you don't have too. Thanks in advance
    Double check to see if you have clickitem.java. Should be found in your packets folder. If you truly think you don't have it. I suggest getting a decompiler and decompile your .class
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2013
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Yeah ^.^' i found it and was editing it while you wrote your response. Thanks for replying and not freaking on me for not know simple things
    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

Similar Threads

  1. can't eat food [pi] ??
    By Mr Joopz in forum Help
    Replies: 6
    Last Post: 01-26-2013, 11:14 PM
  2. [317 PI] Can't attack NPC
    By Stylo HD in forum Help
    Replies: 9
    Last Post: 01-20-2013, 11:39 AM
  3. [PI] Can't Eat any foods, or bury bones
    By Magick07 in forum Help
    Replies: 10
    Last Post: 09-12-2012, 04:33 AM
  4. [317][pi]fishing can't move..
    By Tired in forum Help
    Replies: 0
    Last Post: 06-05-2011, 12:40 PM
  5. [PI] 317 - How can I change the XP for skills?
    By unforgivable in forum Help
    Replies: 6
    Last Post: 10-26-2010, 11:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •