Thread: PI How to force a player to talk to an Npc before allowed to use a portal.

Results 1 to 10 of 10
  1. #1 PI How to force a player to talk to an Npc before allowed to use a portal. 
    Registered Member
    Join Date
    Jun 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hey I'm new to Rune-Server and the title basically says it all. On my server, the spot where a new person first logs in is on a small island and it contains the Npc RuneScape guide and 2 portals. I want it to be like if you click either portal first, it will send the player a message saying "You need to speak to the guide before you can click this portal". After the player completely talks to the Npc, they are allowed to click either portal.

    If anyone can help me with this I would really appreciate it.
    I am using Project Insanity.
    Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    bump
    Reply With Quote  
     

  3. #3  
    Registered Member Inenting's Avatar
    Join Date
    Apr 2010
    Age
    28
    Posts
    470
    Thanks given
    5
    Thanks received
    10
    Rep Power
    1
    Well make a sort of point system that if you speak to the npc u get 1 Guide points or ur guide done = turns from false to true and add soemthing liek this to the portal :

    case XXXX: //object id
    if (Guide done = false ) {
    sendMessage("Talk to the npc first boob");
    else }
    triggertele 3333 3333; //or whatever
    }
    break;

    soemthing like that. I hope it helped
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Jan 2010
    Age
    29
    Posts
    4,122
    Thanks given
    274
    Thanks received
    551
    Rep Power
    738
    Make it like this

    Code:
    case id:
    if(finishedtalk = 0) {
    yourthing
    return;
    } else if(finishedtalk = 1) {
    what you want
    }
    break;
    and make it so like after the last dialogue finishedtalk = 1;

    just a fast example

    Haha dude above me was faster
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jun 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I'm having trouble making the int for this can anyone help me out?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    haven't been on in a week so bump
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Oct 2010
    Posts
    716
    Thanks given
    82
    Thanks received
    131
    Rep Power
    0
    Quote Originally Posted by Nighel15 View Post
    Make it like this

    Code:
    case id:
    if(finishedtalk = 0) {
    yourthing
    return;
    } else if(finishedtalk = 1) {
    what you want
    }
    break;
    and make it so like after the last dialogue finishedtalk = 1;

    just a fast example

    Haha dude above me was faster
    Could also use a boolean
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Oct 2010
    Posts
    716
    Thanks given
    82
    Thanks received
    131
    Rep Power
    0
    Edit: do you got MSN/Skype? I'll do it for you.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jun 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I'd rather not do that. I just need some boolean or int that will help me make this.
    Reply With Quote  
     

  10. #10  
    Registered Member Inenting's Avatar
    Join Date
    Apr 2010
    Age
    28
    Posts
    470
    Thanks given
    5
    Thanks received
    10
    Rep Power
    1
    ok here: figure yourself where it should be

    Code:
    					} else if (token.equals("npc-home")) {
    						p.npcTalked = Integer.parseInt(token2);
    Code:
                      characterfile.write("npc-home = ", 0, 18);
                      characterfile.write(Integer.toString(p.npcTalked), 0, Integer.toString(p.npcTalked).length());
                      characterfile.newLine();
    Code:
    			case OBJECTID:
    			if (c.npcTalked == 0) {
    				c.getPA().startTeleport(xID, yID, 0, "modern");
    			} else 
    				c.sendMessage("You need to talk to the npc before using this portal");	
    			break;
    Code:
    case 2000:
    			sendOption2("I want to go further", "No i want to stay here");
    c.npcTalked += 1
    break;

    something like that if u mess around u can make it better goodluck
    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. Force a website to open for a player
    By The Myth in forum Tutorials
    Replies: 40
    Last Post: 06-20-2016, 09:03 PM
  2. 613 Player Force Movement mask
    By mgi125 in forum Configuration
    Replies: 19
    Last Post: 10-03-2010, 11:48 PM
  3. Replies: 1
    Last Post: 05-25-2010, 09:59 PM
  4. How do I make a portal talk?
    By Vault in forum Help
    Replies: 22
    Last Post: 01-06-2010, 01:59 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
  •