Thread: [pi] 317 adding options to portals (help)

Results 1 to 4 of 4
  1. #1 [pi] 317 adding options to portals (help) 
    Registered Member
    Join Date
    Jun 2012
    Posts
    100
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Hey guys, i added a portal that teles me to where i want and all but i want the portal to have options like when you click in your mage book eg. click monster tele in mage book 5 options come up like rock crabs ect.

    how can i add this for a portal will pop up with options
    Please help! thanks!
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Dec 2010
    Posts
    710
    Thanks given
    41
    Thanks received
    3
    Rep Power
    0
    c.dialogueaction

    Click here to view Project Rebirth Progress
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2012
    Posts
    175
    Thanks given
    32
    Thanks received
    47
    Rep Power
    35
    Go to DialogueHandler.java and make a case in the sendDialogues() method. Make it a number no other case has. Make that case like this:

    Code:
    case 524:
    sendOption4("Option 1", "Option 2", "Option 3", "Option 4");
    c.teleAction = 524; // it doesn't need to be the same number, but its easy to keep track of everything if it is
    break;
    Then go to ClickingButtons.java and go to case 9190. Add another if statement in there and make it something like:

    Code:
    if(c.teleAction == 524) {// OR WHATEVER NUMBER YOU PUT
    c.getPA().movePlayer(x, y, z); //the coordinates you want
    }
    Thats going to be for the first option (Option 1). Copy and paste that into cases 9191, 9192, and 9193. Just change the coordinates, don't change the c.teleAction ==.

    Now once you have that, go to ActionHandler.java where it handles the click on the portal, and change the code inside there to: c.getDH().sendDialogues(524, 0);

    The 524 is the number that you put. The 0 is the NPC id, but you're not using an NPC so theres no point for that.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2012
    Posts
    100
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    thanks
    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. adding options to npcs items [317]
    By mr code in forum Snippets
    Replies: 3
    Last Post: 02-27-2011, 02:03 PM
  2. How do you add options to portals?
    By The Turk in forum Help
    Replies: 1
    Last Post: 11-15-2009, 01:00 PM
  3. portals give options
    By MetalGear in forum Help
    Replies: 1
    Last Post: 10-17-2009, 11:00 PM
  4. Adding Options To Portals and other Objects
    By SocialCrisis in forum Tutorials
    Replies: 26
    Last Post: 05-15-2008, 04:21 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
  •