Thread: 667 - Help with dialouge

Results 1 to 3 of 3
  1. #1 667 - Help with dialouge 
    Registered Member
    Join Date
    Feb 2015
    Posts
    15
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    OK so I am making my own custom quest but I am still trying to get my head around dialogues.

    So here is my java code
    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.WorldTile;
    import com.rs.game.minigames.CastleWars;
    import com.rs.game.Animation;
    import com.rs.game.player.content.Magic;
    import com.rs.game.WorldTile;
    
    public class Ladyoflake extends Dialogue {
    
    	private int npcId;
    
    	
    	
    	@Override
    	public void start() {
    		npcId = (Integer) parameters[0];
    		sendEntityDialogue(SEND_3_TEXT_CHAT,
    				new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Hello! Welcome. You must be player.getDisplayName()",
    						"We have been long awaiting for your arrival!",
    						"Are you ready to get started?."}, IS_NPC, npcId, 250);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			sendEntityDialogue(SEND_2_TEXT_CHAT,
    			new String[] { player.getDisplayName(), "Started? .....",
    			"For what???!!!"},
    			IS_PLAYER, player.getIndex(), 250);
    			stage = 1;
    		} else if (stage == 1) {
    			sendEntityDialogue(SEND_4_TEXT_CHAT,
    					new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "To 
    
    help Lividx of course!",
    								"To proove to these lands that you can 
    
    rule, conquer,",
    								"and become the greatest player to 
    
    have lived!.",
    								"However it will not be easy I must 
    
    warn you.."}, IS_NPC, npcId, 250);
    			stage = 2;
    		} else if (stage == 2) {
    			sendEntityDialogue(SEND_4_TEXT_CHAT,
    					new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "I 
    
    suggest you talk to my father, Sigbert.",
    								"He was once a great leader of a 
    
    strong army, Lesarkus",
    								"Before it crumbled....",
    								"He may help you find what you 
    
    need"}, IS_NPC, npcId, 250);
    			
    		stage = 3;
    		} else if (stage == 3) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    			new String[] { player.getDisplayName(), "Well, where can I find him woman!"},
    			IS_PLAYER, player.getIndex(), 250);
    			
    			stage = 4;
    		  } else if (stage == 4) {
    			sendEntityDialogue(SEND_4_TEXT_CHAT,
    					new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "I'm 
    
    not sure, he moves around a lot.",
    								"But he spends a lot of time in the bar 
    
    these days.",
    								"So I suggest you ask the barman 
    
    there...", 
    								""}, IS_NPC, npcId, 250);
    
    		
    			end();
                    }
            }
    
        @Override
        public void finish() {
        }
    }
    Now it all runs fine until I get to the 4th stage where nothing happens. After you click continue on the 'Well where is he woman' it just closes the dialogue and doesn't move onto the next stage. How can I correct this?

    Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2014
    Posts
    130
    Thanks given
    3
    Thanks received
    17
    Rep Power
    18
    After stage 4 you've got end();, remove that and it'll work.

    Or just replace your stage 4 with this:
    Code:
    } else if (stage == 4) {
    			sendEntityDialogue(SEND_4_TEXT_CHAT,
    					new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "I'm not sure, he moves around a lot.",
    								"But he spends a lot of time in the bar these days.",
    								"So I suggest you ask the barman there...", 
    								""}, IS_NPC, npcId, 250);
                            stage = 5;
    } else if (stage == 5) {
    			end();
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Feb 2015
    Posts
    15
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Para Charlie View Post
    After stage 4 you've got end();, remove that and it'll work.

    Or just replace your stage 4 with this:
    Code:
    } else if (stage == 4) {
    			sendEntityDialogue(SEND_4_TEXT_CHAT,
    					new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "I'm not sure, he moves around a lot.",
    								"But he spends a lot of time in the bar these days.",
    								"So I suggest you ask the barman there...", 
    								""}, IS_NPC, npcId, 250);
                            stage = 5;
    } else if (stage == 5) {
    			end();
    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. 667/*** Help with these Errors?
    By ''Brad in forum Help
    Replies: 3
    Last Post: 07-03-2012, 03:49 AM
  2. [667] help with npc spawning
    By owner iwan in forum Help
    Replies: 6
    Last Post: 06-14-2012, 07:22 PM
  3. Replies: 4
    Last Post: 04-29-2012, 11:58 PM
  4. Help with dialouge, [dementhium]
    By international in forum Help
    Replies: 2
    Last Post: 04-28-2011, 04:12 PM
  5. need help with dialouge
    By Pitx in forum Help
    Replies: 3
    Last Post: 08-01-2009, 12:45 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
  •