Thread: [PI] Portal that needs key

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 [PI] Portal that needs key 
    Member [PI] Portal that needs key Market Banned

    Impervious's Avatar
    Join Date
    Apr 2011
    Posts
    550
    Thanks given
    97
    Thanks received
    38
    Rep Power
    129
    Hey everyone, I am working on a dungeon minigame (not dungeoneering ) that you have to kill npcs and when they drop a key, you use portal and it will take you to next room.

    How can I make it so you need the key to use portal?

    Thanks I will rep + whoever helps
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2011
    Posts
    2,760
    Thanks given
    297
    Thanks received
    534
    Rep Power
    1596
    let it check for an item and delete that item
    Quote Originally Posted by Aj View Post
    This is not even a tutorial. It's fail for rep. It's fail for life.
    Reply With Quote  
     

  3. #3  
    I built Grand Exchange :)
    dark-natural's Avatar
    Join Date
    Mar 2011
    Posts
    178
    Thanks given
    30
    Thanks received
    6
    Rep Power
    9
    Pretty Simple :/

    Example:

    if ((c.getItems().playerHasItem(KEYCODE, 1)) && (c.key == 0)) {
    c.redkey = 1;
    c.sendMessage("You insert the key and release a magical spirit from the chest.");
    c.startAnimation(9099);
    c.gfx100(293);
    c.getItems().deleteItem(KEYCODE, 1);
    } else if (c.key == 1) {
    c.sendMessage("You've already released this spirit.");
    } else
    c.sendMessage("You need key to release this spirit.");
    }
    Reply With Quote  
     

  4. #4  
    Member [PI] Portal that needs key Market Banned

    Impervious's Avatar
    Join Date
    Apr 2011
    Posts
    550
    Thanks given
    97
    Thanks received
    38
    Rep Power
    129
    well i am new coder, could some explain more and also, spikeyyy i dont want it to delete key.
    Reply With Quote  
     

  5. #5  
    I built Grand Exchange :)
    dark-natural's Avatar
    Join Date
    Mar 2011
    Posts
    178
    Thanks given
    30
    Thanks received
    6
    Rep Power
    9
    Put it in the ActionHandler.Java Witch will make the portal non useable if you dont have the key in your bag
    Reply With Quote  
     

  6. #6  
    I built Grand Exchange :)
    dark-natural's Avatar
    Join Date
    Mar 2011
    Posts
    178
    Thanks given
    30
    Thanks received
    6
    Rep Power
    9
    Sec Making the code easier.
    Reply With Quote  
     

  7. #7  
    I built Grand Exchange :)
    dark-natural's Avatar
    Join Date
    Mar 2011
    Posts
    178
    Thanks given
    30
    Thanks received
    6
    Rep Power
    9
    Case PORTALID:

    if ((c.getItems().playerHasItem(KEYCODE, 1)) {
    c.sendMessage("You Opened The Portal And Proceed To The Next Cave.");
    c.getPA().spellTeleport(CoordX, CoordY, 0);
    } else
    c.sendMessage("You Need A Key To Go Trough This Portal.");
    }
    Reply With Quote  
     

  8. #8  
    Member [PI] Portal that needs key Market Banned

    Impervious's Avatar
    Join Date
    Apr 2011
    Posts
    550
    Thanks given
    97
    Thanks received
    38
    Rep Power
    129
    perfect! thank you imma add now
    Reply With Quote  
     

  9. #9  
    I built Grand Exchange :)
    dark-natural's Avatar
    Join Date
    Mar 2011
    Posts
    178
    Thanks given
    30
    Thanks received
    6
    Rep Power
    9
    glad to help, Rep ?
    Reply With Quote  
     

  10. Thankful user:


  11. #10  
    Member [PI] Portal that needs key Market Banned

    Impervious's Avatar
    Join Date
    Apr 2011
    Posts
    550
    Thanks given
    97
    Thanks received
    38
    Rep Power
    129
    i repped but it not showing up on ur rep
    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. Portal help
    By Rancid in forum Help
    Replies: 2
    Last Post: 05-19-2009, 03:39 AM
  2. Portal Help
    By luke zwekii in forum Help
    Replies: 0
    Last Post: 01-10-2009, 04:59 AM
  3. Portal Help
    By Ryan™ in forum Help
    Replies: 4
    Last Post: 10-28-2008, 11:47 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
  •