Thread: Why is this NPC dialogue not working?

Results 1 to 4 of 4
  1. #1 Why is this NPC dialogue not working? 
    Registered Member
    Join Date
    Apr 2015
    Posts
    10
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I am running into the issue of not being able to use the second dialogue screen (sendOptionsDialogue and ComponentId's). When I press the option nothing happens when it should send it to another stage. Can anyone tell me what I'm doing wrong?





    Code:
    	@Override
    	public void start() {
    		npcId = (Integer) parameters[0];
    		sendNPCDialogue(npcId, 9827, "Welcome to the Lottery.");
    		stage = 1;
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == 1) {
    			sendOptionsDialogue("What would you like to say?",
    					"Can you tell me about the lottery?",
    					"I would like to join the 2500k lottery",
    					"I would like to join the 5m lottery",
    					"How many slots are left for each lottery?");
    		} else if (stage == 2) {
    			if (componentId == OPTION_1)
    				sendPlayerDialogue( 9827, "Can you tell me about the lottery?");
    				stage = 2;
    			}
    			else if (componentId == OPTION_2){
    				sendPlayerDialogue( 9827, "I would like to join the 2500k lottery");
    				stage = 3;
    			}
    			else if (componentId == OPTION_3){
    				sendPlayerDialogue( 9827, "I would like to join the 5m lottery");
    				stage = 4;
    			}
    			else if (componentId == OPTION_4){
    				sendPlayerDialogue( 9827, "How many slots are left for the lottery?");
    				stage = 5;
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,556
    Thanks given
    652
    Thanks received
    640
    Rep Power
    358
    Quote Originally Posted by Swiftly View Post
    I am running into the issue of not being able to use the second dialogue screen (sendOptionsDialogue and ComponentId's). When I press the option nothing happens when it should send it to another stage. Can anyone tell me what I'm doing wrong?





    Code:
    	@Override
    	public void start() {
    		npcId = (Integer) parameters[0];
    		sendNPCDialogue(npcId, 9827, "Welcome to the Lottery.");
    		stage = 1;
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == 1) {
    			sendOptionsDialogue("What would you like to say?",
    					"Can you tell me about the lottery?",
    					"I would like to join the 2500k lottery",
    					"I would like to join the 5m lottery",
    					"How many slots are left for each lottery?");
    		} else if (stage == 2) {
    			if (componentId == OPTION_1)
    				sendPlayerDialogue( 9827, "Can you tell me about the lottery?");
    				stage = 2;
    			}
    			else if (componentId == OPTION_2){
    				sendPlayerDialogue( 9827, "I would like to join the 2500k lottery");
    				stage = 3;
    			}
    			else if (componentId == OPTION_3){
    				sendPlayerDialogue( 9827, "I would like to join the 5m lottery");
    				stage = 4;
    			}
    			else if (componentId == OPTION_4){
    				sendPlayerDialogue( 9827, "How many slots are left for the lottery?");
    				stage = 5;
    Code:
    	if (stage == 1) {
    			sendOptionsDialogue("What would you like to say?",
    					"Can you tell me about the lottery?",
    					"I would like to join the 2500k lottery",
    					"I would like to join the 5m lottery",
    					"How many slots are left for each lottery?");
                           stage = 2;
    		}
    Also, delay all the other stages by 1. So CID1(componentId1) is stage 3, CID2 is 4, etc...
    Project thread
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2015
    Posts
    10
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by clem585 View Post
    Code:
    	if (stage == 1) {
    			sendOptionsDialogue("What would you like to say?",
    					"Can you tell me about the lottery?",
    					"I would like to join the 2500k lottery",
    					"I would like to join the 5m lottery",
    					"How many slots are left for each lottery?");
                           stage = 2;
    		}
    Also, delay all the other stages by 1. So CID1(componentId1) is stage 3, CID2 is 4, etc...
    I did that but only the first one works.. Could I send you a message with my full class?
    Reply With Quote  
     

  4. #4  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,556
    Thanks given
    652
    Thanks received
    640
    Rep Power
    358
    Quote Originally Posted by Swiftly View Post
    I did that but only the first one works.. Could I send you a message with my full class?
    Sure
    Project thread
    [Only registered and activated users can see links. ]
    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. Why is this not working?
    By james6231 in forum Help
    Replies: 2
    Last Post: 05-10-2015, 07:25 PM
  2. Why is this not working?
    By Willthethrill in forum Help
    Replies: 2
    Last Post: 03-20-2014, 01:42 AM
  3. Replies: 0
    Last Post: 08-18-2013, 01:34 AM
  4. Replies: 6
    Last Post: 10-22-2009, 07:24 PM
  5. Replies: 12
    Last Post: 07-11-2009, 02:33 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
  •