Thread: Dialogue doesn't continue [667/***]

Results 1 to 5 of 5
  1. #1 Dialogue doesn't continue [667/***] 
    Registered Member
    Join Date
    Apr 2014
    Posts
    75
    Thanks given
    32
    Thanks received
    4
    Rep Power
    12
    Hi guys, this is my first time making a dialogue. The issue is, it doesn't continue ;c

    Been trying to fix it for a couple hours ;s

    Yes, I added the basic things in Dialoguehandler.java

    SpiritTreeD.java

    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.player.content.SpiritTree;
    
    public class SpiritTreeD extends Dialogue {
    
    	public static int npcId = 3637;
    
    	@Override
    	public void start() {
    		sendEntityDialogue(
    				SEND_3_TEXT_CHAT,
    				new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"If you are a friend of the gnome people, you are a friend",
    						"of mine. Do you wish to travel, or do you wish to ask",
    						"about the evil tree?" }, IS_NPC, npcId, 9827);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			sendDialogue(SEND_3_OPTIONS,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"What would you like to ask about?", "Travel.",
    							"Evil tree.", "Nothing." });
    			stage = 1;
    		} else if (stage == 1) {
    			if (componentId == 1) {
    				sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Gnome-friend, would you like to travel to the home of the"
    								+ "tree gnomes?" }, IS_NPC, npcId, 9827);
    				stage = 2;
    			} else if (componentId == 2) {
    				sendEntityDialogue(
    						SEND_1_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"The taint of the evil tree is currently not on the land." },
    						IS_NPC, npcId, 9827);
    				stage = 3;
    			} else if (componentId == 3) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(),
    								"Nothing, thanks." }, IS_PLAYER,
    						player.getIndex(), 9827);
    				stage = 7;
    			}
    		} else if (stage == 3) {
    			sendEntityDialogue(
    					SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"I can help you to find the where it will spawn, but my"
    									+ "knowledge outside of the anima mundi is limited." },
    					IS_NPC, npcId, 9827);
    			stage = 4;
    		} else if (stage == 4) {
    			sendEntityDialogue(
    					SEND_1_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"It can be found close to a collection of yew trees." },
    					IS_NPC, npcId, 9827);
    			stage = 5;
    		} else if (stage == 5) {
    			sendEntityDialogue(SEND_3_OPTIONS,
    					new String[] { player.getDisplayName(), "Select an option",
    							"What is this 'evil tree'?, Goodbye." }, IS_PLAYER,
    					player.getIndex(), 9827);
    			stage = 9;
    		} else if (stage == 2) {
    			sendEntityDialogue(SEND_3_OPTIONS,
    					new String[] { player.getDisplayName(), "Select an option",
    							"Yes please.", "No, thank you." }, IS_PLAYER,
    					player.getIndex(), 9827);
    			stage = 6;
    		} else if (stage == 6) {
    			if (componentId == 1) {
    				sendEntityDialogue(
    						SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(), "Yes please." },
    						IS_PLAYER, player.getIndex(), 9827);
    				stage = 8;
    			}
    		} else if (componentId == 2) {
    			sendEntityDialogue(SEND_1_TEXT_CHAT,
    					new String[] { player.getDisplayName(), "No, thank you." },
    					IS_PLAYER, player.getIndex(), 9827);
    			stage = 7;
    		} else if (stage == 7) {
    			end();
    		} else if (stage == 8) {
    			SpiritTree.sendSpiritTreeTeleport(player,
    					SpiritTree.MAIN_SPIRIT_TREE);
    			end();
    		} else if (stage == 9) {
    			if (componentId == 1) {
    				sendEntityDialogue(
    						SEND_4_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"It is an abomination of nature that must be destroyed as",
    								"quickly as possible. We do not know where it will appear,",
    								"but, when it does, you should go out to it immediately and help",
    								"out!" }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    			if (componentId == 2) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Goodbye." }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    		}
    	}
    
    	@Override
    	public void finish() {
    
    	}
    }
    MainSpiritTreeD.java

    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.player.content.SpiritTree;
    
    public class MainSpiritTreeD extends Dialogue {
    
    	public static int npcId = 3637;
    
    	@Override
    	public void start() {
    		sendEntityDialogue(
    				SEND_3_TEXT_CHAT,
    				new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"If you are a friend of the gnome people, you are a friend",
    						"of mine. Do you wish to travel, or do you wish to ask",
    						"about the evil tree?" }, IS_NPC, npcId, 9827);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			sendDialogue(SEND_3_OPTIONS,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"What would you like to ask about?", "Travel.",
    							"Evil tree.", "Nothing." });
    			stage = 1;
    		} else if (stage == 1) {
    			if (componentId == 1) {
    				sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"You can travel to trees related to me. Where do you"
    						+ "wish to travel, whisperer?" }, IS_NPC, npcId, 9827);
    				stage = 8;
    			} else if (componentId == 2) {
    				sendEntityDialogue(
    						SEND_1_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"The taint of the evil tree is currently not on the land." },
    						IS_NPC, npcId, 9827);
    				stage = 3;
    			} else if (componentId == 3) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(),
    								"Nothing, thanks." }, IS_PLAYER,
    						player.getIndex(), 9827);
    				stage = 7;
    			}
    		} else if (stage == 3) {
    			sendEntityDialogue(
    					SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"I can help you to find the where it will spawn, but my"
    									+ "knowledge outside of the anima mundi is limited." },
    					IS_NPC, npcId, 9827);
    			stage = 4;
    		} else if (stage == 4) {
    			sendEntityDialogue(
    					SEND_1_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"It can be found close to a collection of yew trees." },
    					IS_NPC, npcId, 9827);
    			stage = 5;
    		} else if (stage == 5) {
    			sendEntityDialogue(SEND_3_OPTIONS,
    					new String[] { player.getDisplayName(), "Select an option",
    							"What is this 'evil tree'?, Goodbye." }, IS_PLAYER,
    					player.getIndex(), 9827);
    			stage = 6;
    		} else if (stage == 6) {
    			if (componentId == 1) {
    				sendEntityDialogue(
    						SEND_4_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"It is an abomination of nature that must be destroyed as",
    								"quickly as possible. We do not know where it will appear,",
    								"but, when it does, you should go out to it immediately and help",
    								"out!" }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    			if (componentId == 2) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Goodbye." }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    		} else if (stage == 7) {
    			end();
    		} else if (stage == 8) {
    			SpiritTree.sendSpiritTreeInterface(player);
    			end();
    		}
    	}
    
    	@Override
    	public void finish() {
    
    	}
    }
    Thanks in advance.
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by Ronan View Post
    Hi guys, this is my first time making a dialogue. The issue is, it doesn't continue ;c

    Been trying to fix it for a couple hours ;s

    Yes, I added the basic things in Dialoguehandler.java

    SpiritTreeD.java

    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.player.content.SpiritTree;
    
    public class SpiritTreeD extends Dialogue {
    
    	public static int npcId = 3637;
    
    	@Override
    	public void start() {
    		sendEntityDialogue(
    				SEND_3_TEXT_CHAT,
    				new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"If you are a friend of the gnome people, you are a friend",
    						"of mine. Do you wish to travel, or do you wish to ask",
    						"about the evil tree?" }, IS_NPC, npcId, 9827);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			sendDialogue(SEND_3_OPTIONS,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"What would you like to ask about?", "Travel.",
    							"Evil tree.", "Nothing." });
    			stage = 1;
    		} else if (stage == 1) {
    			if (componentId == 1) {
    				sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Gnome-friend, would you like to travel to the home of the"
    								+ "tree gnomes?" }, IS_NPC, npcId, 9827);
    				stage = 2;
    			} else if (componentId == 2) {
    				sendEntityDialogue(
    						SEND_1_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"The taint of the evil tree is currently not on the land." },
    						IS_NPC, npcId, 9827);
    				stage = 3;
    			} else if (componentId == 3) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(),
    								"Nothing, thanks." }, IS_PLAYER,
    						player.getIndex(), 9827);
    				stage = 7;
    			}
    		} else if (stage == 3) {
    			sendEntityDialogue(
    					SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"I can help you to find the where it will spawn, but my"
    									+ "knowledge outside of the anima mundi is limited." },
    					IS_NPC, npcId, 9827);
    			stage = 4;
    		} else if (stage == 4) {
    			sendEntityDialogue(
    					SEND_1_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"It can be found close to a collection of yew trees." },
    					IS_NPC, npcId, 9827);
    			stage = 5;
    		} else if (stage == 5) {
    			sendEntityDialogue(SEND_3_OPTIONS,
    					new String[] { player.getDisplayName(), "Select an option",
    							"What is this 'evil tree'?, Goodbye." }, IS_PLAYER,
    					player.getIndex(), 9827);
    			stage = 9;
    		} else if (stage == 2) {
    			sendEntityDialogue(SEND_3_OPTIONS,
    					new String[] { player.getDisplayName(), "Select an option",
    							"Yes please.", "No, thank you." }, IS_PLAYER,
    					player.getIndex(), 9827);
    			stage = 6;
    		} else if (stage == 6) {
    			if (componentId == 1) {
    				sendEntityDialogue(
    						SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(), "Yes please." },
    						IS_PLAYER, player.getIndex(), 9827);
    				stage = 8;
    			}
    		} else if (componentId == 2) {
    			sendEntityDialogue(SEND_1_TEXT_CHAT,
    					new String[] { player.getDisplayName(), "No, thank you." },
    					IS_PLAYER, player.getIndex(), 9827);
    			stage = 7;
    		} else if (stage == 7) {
    			end();
    		} else if (stage == 8) {
    			SpiritTree.sendSpiritTreeTeleport(player,
    					SpiritTree.MAIN_SPIRIT_TREE);
    			end();
    		} else if (stage == 9) {
    			if (componentId == 1) {
    				sendEntityDialogue(
    						SEND_4_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"It is an abomination of nature that must be destroyed as",
    								"quickly as possible. We do not know where it will appear,",
    								"but, when it does, you should go out to it immediately and help",
    								"out!" }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    			if (componentId == 2) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Goodbye." }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    		}
    	}
    
    	@Override
    	public void finish() {
    
    	}
    }
    MainSpiritTree.java

    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.player.content.SpiritTree;
    
    public class MainSpiritTreeD extends Dialogue {
    
    	public static int npcId = 3637;
    
    	@Override
    	public void start() {
    		sendEntityDialogue(
    				SEND_3_TEXT_CHAT,
    				new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"If you are a friend of the gnome people, you are a friend",
    						"of mine. Do you wish to travel, or do you wish to ask",
    						"about the evil tree?" }, IS_NPC, npcId, 9827);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			sendDialogue(SEND_3_OPTIONS,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"What would you like to ask about?", "Travel.",
    							"Evil tree.", "Nothing." });
    			stage = 1;
    		} else if (stage == 1) {
    			if (componentId == 1) {
    				sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"You can travel to trees related to me. Where do you"
    						+ "wish to travel, whisperer?" }, IS_NPC, npcId, 9827);
    				stage = 8;
    			} else if (componentId == 2) {
    				sendEntityDialogue(
    						SEND_1_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"The taint of the evil tree is currently not on the land." },
    						IS_NPC, npcId, 9827);
    				stage = 3;
    			} else if (componentId == 3) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(),
    								"Nothing, thanks." }, IS_PLAYER,
    						player.getIndex(), 9827);
    				stage = 7;
    			}
    		} else if (stage == 3) {
    			sendEntityDialogue(
    					SEND_2_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"I can help you to find the where it will spawn, but my"
    									+ "knowledge outside of the anima mundi is limited." },
    					IS_NPC, npcId, 9827);
    			stage = 4;
    		} else if (stage == 4) {
    			sendEntityDialogue(
    					SEND_1_TEXT_CHAT,
    					new String[] {
    							NPCDefinitions.getNPCDefinitions(npcId).name,
    							"It can be found close to a collection of yew trees." },
    					IS_NPC, npcId, 9827);
    			stage = 5;
    		} else if (stage == 5) {
    			sendEntityDialogue(SEND_3_OPTIONS,
    					new String[] { player.getDisplayName(), "Select an option",
    							"What is this 'evil tree'?, Goodbye." }, IS_PLAYER,
    					player.getIndex(), 9827);
    			stage = 6;
    		} else if (stage == 6) {
    			if (componentId == 1) {
    				sendEntityDialogue(
    						SEND_4_TEXT_CHAT,
    						new String[] {
    								NPCDefinitions.getNPCDefinitions(npcId).name,
    								"It is an abomination of nature that must be destroyed as",
    								"quickly as possible. We do not know where it will appear,",
    								"but, when it does, you should go out to it immediately and help",
    								"out!" }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    			if (componentId == 2) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] {
    						NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Goodbye." }, IS_NPC, npcId, 9827);
    				stage = 7;
    			}
    		} else if (stage == 7) {
    			end();
    		} else if (stage == 8) {
    			SpiritTree.sendSpiritTreeInterface(player);
    			end();
    		}
    	}
    
    	@Override
    	public void finish() {
    
    	}
    }
    Thanks in advance.
    Set the stage to -1:

    Code:
    @Override
    public void start() {
        sendEntityDialogue(SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
            "If you are a friend of the gnome people, you are a friend",
            "of mine. Do you wish to travel, or do you wish to ask",
    	"about the evil tree?" }, IS_NPC, npcId, 9827);
        stage = -1;
    }
    Project thread
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Apr 2014
    Posts
    75
    Thanks given
    32
    Thanks received
    4
    Rep Power
    12
    Quote Originally Posted by clem585 View Post
    Set the stage to -1:

    Code:
    @Override
    public void start() {
        sendEntityDialogue(SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
            "If you are a friend of the gnome people, you are a friend",
            "of mine. Do you wish to travel, or do you wish to ask",
    	"about the evil tree?" }, IS_NPC, npcId, 9827);
        stage = -1;
    }
    Nope , still doesn't continue, but that tip is already damn handy. I will look at it again.
    Reply With Quote  
     

  5. #4  
    Extreme Donator

    TaterMater's Avatar
    Join Date
    Aug 2011
    Posts
    1,511
    Thanks given
    218
    Thanks received
    375
    Rep Power
    121
    What source are you using? I know I had some problems with my source where SEND_3_TEXT_CHAT didn't work correctly. Try changing all your 3 text chats to 4 text chat, and just adding in a blank line. See if that fixes it.

    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Registered Member
    Join Date
    Apr 2014
    Posts
    75
    Thanks given
    32
    Thanks received
    4
    Rep Power
    12
    Quote Originally Posted by TaterMater View Post
    What source are you using? I know I had some problems with my source where SEND_3_TEXT_CHAT didn't work correctly. Try changing all your 3 text chats to 4 text chat, and just adding in a blank line. See if that fixes it.
    Adrastos, but I'm sure it's the SEND_3_OPTIONS, because SEND_3_TEXT_CHAT is working fine.
    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. Dialogue doesn't start with npc [667]
    By grahamzarin in forum Help
    Replies: 3
    Last Post: 11-05-2015, 12:59 PM
  2. My run server doesn't continue..
    By Jas0n in forum Help
    Replies: 8
    Last Post: 01-22-2015, 10:38 PM
  3. Dialogue doesn't work?
    By chandler6661 in forum Help
    Replies: 5
    Last Post: 04-17-2014, 02:53 PM
  4. Dialogue doesn't seem to be working
    By Zentharus in forum Help
    Replies: 1
    Last Post: 01-20-2014, 01:30 AM
  5. Replies: 9
    Last Post: 12-26-2009, 11:38 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
  •