Thread: [PI]Protecting Firecape

Results 1 to 9 of 9
  1. #1 [PI]Protecting Firecape 
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    So im not sure as to how i would go about this. I'm pretty sure its the giveLife method in playerassistant.java. and this is what i came up with so far which i know is wrong.

    i did wat lil str kid posted but when u die, the firecape stays on the ground and it adds another to your inv. so it needs to check if you have a firecape. then it needs to delete it so i change it to this but it cant find the method for deleting.

    boolean hasFireCape = false;
    if(c.playerEquipment[c.playerCape] == 6570 || c.getItems().playerHasItem(6570)) {
    c.getItems().deleteItem(6570);
    hasFireCape = true;
    }

    how would i change this?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2009
    Posts
    27
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    just add 6570 after you delete 6570 ..if that makes sense
    Reply With Quote  
     

  3. #3  
    Registered Member Mayday Parade's Avatar
    Join Date
    Apr 2009
    Age
    27
    Posts
    495
    Thanks given
    20
    Thanks received
    17
    Rep Power
    8
    Um... You could try actually adding it so it isn't droppable. In your config.java. Or try this code:
    Code:
    boolean hasFireCape = false;
    if(c.playerEquipment[c.playerCape] == 6570 || c.getItems().playerHasItem(6570)) {
    c.getItems().deleteItem(6570);
    c.getItems().addItem(6570, 1);
    hasFireCape = true;
    }

    Spoiler for LoL:
    Quote Originally Posted by Imbued View Post
    Quote Originally Posted by pasta186 View Post
    That tutorial doesnt walk.
    That's because it got no legs..
    Best report I've sent? "Mass spam? Also in wrong sexual"
    LOL
    Reply With Quote  
     

  4. #4  
    Ready for Battle


    Join Date
    Aug 2009
    Age
    28
    Posts
    368
    Thanks given
    87
    Thanks received
    34
    Rep Power
    99
    Code:
    private boolean hasFCape() {
              if (c.playerEquipment[c.playerCape] == 6570 || c.getItems().playHasItem(6570))
                 return true;
    return false;
    }
    Thats the correct way to do it, then on death make a if statement saying
    Code:
    if (c.hasFCape) {
              c.getItems().deleteItem(6570));
              c.getItems().addItem(6570, 1));
    }
    Reply With Quote  
     

  5. #5  
    Registered Member
    Core's Avatar
    Join Date
    Sep 2007
    Posts
    4,194
    Thanks given
    11
    Thanks received
    393
    Rep Power
    1985
    why the fuck would you delete an item and then re add on the next line.
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Ready for Battle


    Join Date
    Aug 2009
    Age
    28
    Posts
    368
    Thanks given
    87
    Thanks received
    34
    Rep Power
    99
    Idk lol, its justhow the code above it was. I modified it a bit.
    Reply With Quote  
     

  8. #7  
    Endeavor

    Mikey`'s Avatar
    Join Date
    Dec 2007
    Posts
    4,434
    Thanks given
    715
    Thanks received
    1,435
    Rep Power
    1202
    Quote Originally Posted by Core View Post
    why the fuck would you delete an item and then re add on the next line.
    Because he doesn't understand that's doing nothing. Make it undroppable or untradable (whichever it is) and then make it add it to the players inventory after he respawns.
    Reply With Quote  
     

  9. #8  
    Banned

    Join Date
    Oct 2009
    Posts
    1,621
    Thanks given
    15
    Thanks received
    67
    Rep Power
    0
    Why would you even do this? Just make it untradeable and it will drop on the ground.. Why would you want your server to be like Delta?
    Reply With Quote  
     

  10. #9  
    Registered Member

    Join Date
    Apr 2009
    Posts
    1,727
    Thanks given
    403
    Thanks received
    210
    Rep Power
    390
    Omg I have this in my server its so simple...
    Find the method that drops all your items when you die then add an if statement that bypasses the firecape...
    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
  •