Thread: NPC Dialogue won't break after last text chat

Results 1 to 3 of 3
  1. #1 NPC Dialogue won't break after last text chat 
    Registered Member Enyll's Avatar
    Join Date
    Aug 2016
    Posts
    121
    Thanks given
    21
    Thanks received
    1
    Rep Power
    13
    Okay, so basically I was wondering if there was a way to fix it when I reach the last text chat on this NPCs dialogue, it won't exit after clicking on 'Click here to continue' to end the chat.

    Here's an image of it just saying 'Please wait...' :



    And of course, here's my dialogue code :

    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.Settings;
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.utils.ShopsHandler;
    import com.rs.game.tasks.WorldTask;
    import com.rs.game.tasks.WorldTasksManager;
    import com.rs.game.World;
    import com.rs.game.Graphics;
    import com.rs.game.item.Item;
    
    public class SmugglerDialogue extends Dialogue {
    
    	int npcId;
    	
    	@Override
    	public void start() {
    		npcId = (Integer) parameters[0];
    			sendEntityDialogue(SEND_3_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"Hello there traveller, if you wish to continue",
    							"to the other room to get started, all you need to",
    							"do is enter either one of the 2 doors."},
    					IS_NPC, npcId, 11226);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			stage = 0;
    			sendEntityDialogue(SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"Also, you must know that you can use the ladder in",
    							"this very room to exit and get back to the main land." },
    					IS_NPC, npcId, 11226);
    		}
    	}
    	
    	@Override
    	public void finish() {
    
    	}
    
    }
    If you guys know how to fix this it would be more than appreciated !

    (New to Java, don't be too harsh if it's easily solvable)
    Reply With Quote  
     

  2. #2  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Code:
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			stage = 0;
    			sendEntityDialogue(SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"Also, you must know that you can use the ladder in",
    							"this very room to exit and get back to the main land." },
    					IS_NPC, npcId, 11226);
    		}
    else if (stage == 0)
    end();
    	}
    Attached image
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Enyll's Avatar
    Join Date
    Aug 2016
    Posts
    121
    Thanks given
    21
    Thanks received
    1
    Rep Power
    13
    Quote Originally Posted by Kris View Post
    Code:
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			stage = 0;
    			sendEntityDialogue(SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"Also, you must know that you can use the ladder in",
    							"this very room to exit and get back to the main land." },
    					IS_NPC, npcId, 11226);
    		}
    else if (stage == 0)
    end();
    	}
    You are jesus, thank you SO MUCH !
    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. Replies: 2
    Last Post: 01-04-2016, 03:00 PM
  2. Replies: 6
    Last Post: 02-11-2015, 10:55 PM
  3. [PI]NPC Dialogue Text Color?
    By TheScape in forum Help
    Replies: 3
    Last Post: 10-20-2013, 08:29 AM
  4. Npc Dialogue Fixed (Before + After!) (317)
    By dead fury in forum Show-off
    Replies: 9
    Last Post: 07-30-2012, 09:04 AM
  5. NPC Talk-to Dialogue won't open
    By Spencer4678 in forum Help
    Replies: 2
    Last Post: 03-22-2012, 05:08 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
  •