Thread: Someone help me with Dialogue???

Results 1 to 7 of 7
  1. #1 Someone help me with Dialogue??? 
    Registered Member
    Join Date
    Aug 2014
    Posts
    138
    Thanks given
    5
    Thanks received
    1
    Rep Power
    14
    So i have gotten close to this Dialogue working but i just cant seem to get it right? could someone Help me fix this so it runs like it should? i just want how it says ... Change Difficulty, Yes or No, that shows, then when i click yes it goes to easy medium and stuff, but then when i click the difficulty it does nothing? i have it set up. just need help with
    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.game.player.content.custom.StarterItems;
    import com.rs.game.player.dialogues.Dialogue;
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.WorldTile;
    import com.rs.game.npc.NPC;
    import com.rs.game.player.Player;
    import com.rs.game.npc.familiar.Familiar;
    import com.rs.game.npc.slayer.Strykewyrm;
    import com.rs.game.minigames.CastleWars;
    import com.rs.game.player.content.Magic;
    import com.rs.utils.ShopsHandler;
    
    public class Newperson2 extends Dialogue {
    
    	public static final int MAX_STARTER_COUNT = 1; 
    	int starter;
    	int difficulty;
    	private int npcId;
    	
    	@Override
    	public void start() {
    		sendDialogue(SEND_2_OPTIONS, "Change your Difficulty?",
    				"Yes.", "No.");
    		
    }
    	
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		
    		if (interfaceId == SEND_2_OPTIONS && componentId == 1) {
    							  
    			 {
    			 
    			sendDialogue(SEND_5_OPTIONS, "Select an Option", 
    					"Very Easy", 
    					"Easy",
    					"Normal",
    					"Hard",
    					"Extreme");
    			
    			
    			 }
    		
    		
    	
    			 
    	 if (interfaceId == SEND_5_OPTIONS && componentId == 1) {
    			this.difficulty = 1;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 2) {
    			this.difficulty = 2;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 3) {
    			this.difficulty = 3;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 4) {
    			this.difficulty = 4;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 5) {
    			this.difficulty = 5;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;	
    
    	}			
    		
    		}
    	}
    		
    	
    	
    	private void sendOptionsDialogue(String string, String string2,
    			String string3, String string4, String string5, String string6) {
    		// TODO Auto-generated method stub
    		
    	}
    
    	private void sendOptionsDialogue(String string, String string2,
    			String string3, String string4) {
    		// TODO Auto-generated method stub
    		
    	}
    
    	public void sendNext_1() {
    		sendEntityDialogue(IS_NPC, "Guardian Manager", 13768, 9827, 
    				"Very good! Now all you need to do is select",
    				"your difficulty. Please keep in mind that harder", 
    				"difficulties have low exp, but have better drops",
    				"while lower difficulties are the opposite!");
    		stage = 3;
    	}
    	
    	public void sendNext_2() {
    		sendEntityDialogue(IS_NPC, "Guardian Manager", 13768, 9827, 
    				"Very good! You've chosen to play on "+diffs[difficulty - 1]+",",
    				"Now what are you waiting for? Go out and have some fun!", 
    				"Just click the button below and everything will",
    				"be given to you! We hope you enjoy your stay!");
    		stage = 5;
    	}
    	
    	public static String[] diffs = { "Super Easy", "Easy", "Normal", "Hard", "Extreme" };
    
    	@Override
    	public void finish() {
    		// TODO Auto-generated method stub
    		
    	}
    	private void sendEntityDialogue(byte isNpc, String string, int i, int j,
    			String string2, String string3, String string4, String string5) {
    		// TODO Auto-generated method stub
    		
    	}
    
    }
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    That code makes no sense.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2014
    Posts
    138
    Thanks given
    5
    Thanks received
    1
    Rep Power
    14
    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.game.player.content.custom.StarterItems;
    import com.rs.game.player.dialogues.Dialogue;
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.WorldTile;
    import com.rs.game.npc.NPC;
    import com.rs.game.player.Player;
    import com.rs.game.npc.familiar.Familiar;
    import com.rs.game.npc.slayer.Strykewyrm;
    import com.rs.game.minigames.CastleWars;
    import com.rs.game.player.content.Magic;
    import com.rs.utils.ShopsHandler;
    
    public class Newperson2 extends Dialogue {
    
    	public static final int MAX_STARTER_COUNT = 1; 
    	int starter;
    	int difficulty;
    	private int npcId;
    	
    	@Override
    	public void start() {
    		sendDialogue(SEND_2_OPTIONS, "Change your Difficulty?",
    				"Yes.", "No.");
    		
    }  //This shows up, as the Dialogue and i can click yes then it goes to...
    	
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		
    		if (interfaceId == SEND_2_OPTIONS && componentId == 1) {
    							  
    			 {
    			 
    			sendDialogue(SEND_5_OPTIONS, "Select an Option", 
    					"Very Easy", 
    					"Easy",
    					"Normal",
    					"Hard",
    					"Extreme");
    			
    			
    			 }
    		 //This but then once i click one of the Options "Very Easy, Easy Ect." It does not run... these
    		
    	
    			 
    	 if (interfaceId == SEND_5_OPTIONS && componentId == 1) {
    			this.difficulty = 1;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 2) {
    			this.difficulty = 2;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 3) {
    			this.difficulty = 3;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 4) {
    			this.difficulty = 4;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 5) {
    			this.difficulty = 5;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    
    	}			
    		
    		}
    	}
    		
    	
    	
    	private void sendOptionsDialogue(String string, String string2,
    			String string3, String string4, String string5, String string6) {
    		// TODO Auto-generated method stub
    		
    	}
    
    	private void sendOptionsDialogue(String string, String string2,
    			String string3, String string4) {
    		// TODO Auto-generated method stub
    		
    	}
    
    	public void sendNext_1() {
    		sendEntityDialogue(IS_NPC, "Guardian Manager", 13768, 9827, 
    				"Very good! Now all you need to do is select",
    				"your difficulty. Please keep in mind that harder", 
    				"difficulties have low exp, but have better drops",
    				"while lower difficulties are the opposite!");
    		stage = 3;
    	}
    	
    	public void sendNext_2() {
    		sendEntityDialogue(IS_NPC, "Guardian Manager", 13768, 9827, 
    				"Very good! You've chosen to play on "+diffs[difficulty - 1]+",",
    				"Now what are you waiting for? Go out and have some fun!", 
    				"Just click the button below and everything will",
    				"be given to you! We hope you enjoy your stay!");
    		stage = 5;
    	}
    	
    	public static String[] diffs = { "Super Easy", "Easy", "Normal", "Hard", "Extreme" };
    
    	@Override
    	public void finish() {
    		// TODO Auto-generated method stub
    		
    	}
    	private void sendEntityDialogue(byte isNpc, String string, int i, int j,
    			String string2, String string3, String string4, String string5) {
    		// TODO Auto-generated method stub
    		
    	}
    
    }
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Sep 2014
    Age
    26
    Posts
    119
    Thanks given
    16
    Thanks received
    13
    Rep Power
    0
    Quote Originally Posted by Datbeastmayne View Post
    That code makes no sense.
    Perhaps you could help him, he obviously needs help not criticism.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Aug 2014
    Posts
    138
    Thanks given
    5
    Thanks received
    1
    Rep Power
    14
    Quote Originally Posted by R0mero View Post
    Perhaps you could help him, he obviously needs help not criticism.
    Thank you, i am trying just to get this simple thing to work
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    You need to use stages.
    Why are you using SEND_2_OPTIONS and SEND_5_OPTIONS to match the interface.
    You have methods for option dialogues, use them.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Aug 2014
    Posts
    138
    Thanks given
    5
    Thanks received
    1
    Rep Power
    14
    Quote Originally Posted by Datbeastmayne View Post
    You need to use stages.
    Why are you using SEND_2_OPTIONS and SEND_5_OPTIONS to match the interface.
    You have methods for option dialogues, use them.

    Thank you i figured it out. But i have a new problem now, i have what i need for the xp to click, interfaces, so it works. Just the only thing i need now, which i am unsure of why its not working... is why the xp rates are not changing...
    Could you help me with that?

    Code:
    public void addXp(int skill, double exp) {
    		if (player.isXpLocked() || locked[skill]) {
    			return;
    		}
    		
    		if (player.allowChange() == true) {
    			player.setAllowChange(false);
    			player.sendMessage("<col=FF0000>You can now no longer change your Difficulty.");
    		}
    		
    		if (player.getDifficulty() == 1) {
    			exp *= 140; // Super Easy
    		} else if (player.getDifficulty() == 2) {
    			exp *= 110; // Easy
    		} else if (player.getDifficulty() == 3) {
    			exp *= 80; // Normal
    		} else if (player.getDifficulty() == 4) {
    			exp *= 50; // Hard
    		} else if (player.getDifficulty() == 5) {
    			exp *= 20; // Extreme
    		}
    		
    		player.getControlerManager().trackXP(skill, (int) exp);
    		exp *= player.getAuraManager().usingWisdom() == true ? 1.025 : 1;
    		exp *= TimeManager.isWeekend() == true ? 1.7 : 1.0;
    		
    		int oldLevel = getLevelForXp(skill);
    		xp[skill] += exp;
    		for (int i = 0; i < trackSkills.length; i++) {
    			if (trackSkills[i]) {
    				if (trackSkillsIds[i] == 30
    						|| (trackSkillsIds[i] == 29 && (skill == Skills.ATTACK
    								|| skill == Skills.DEFENCE
    								|| skill == Skills.STRENGTH
    								|| skill == Skills.MAGIC
    								|| skill == Skills.RANGE || skill == Skills.HITPOINTS))
    						|| trackSkillsIds[i] == getCounterSkill(skill)) {
    					xpTracks[i] += exp;
    					refreshCounterXp(i);
    				}
    			}
    		}
    Skills.java

    Code:
    	public static final int MAX_STARTER_COUNT = 1; 
    	int starter;
    	int difficulty; 
    
    
    if (interfaceId == SEND_5_OPTIONS && componentId == 1) {
    			this.difficulty = 1;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    			//exp *= 140; // Super Easy
    			player.getPackets().sendGameMessage("You have chose 'Very Easy'");
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 2) {
    			this.difficulty = 2;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    			//exp *= 110; // Easy
    			player.getPackets().sendGameMessage("You have chose 'Easy'");
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 3) {
    			this.difficulty = 3;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    			//exp *= 80; // Normal
    			player.getPackets().sendGameMessage("You have chose 'Normal'");
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 4) {
    			this.difficulty = 4;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;
    			//exp *= 50; // Hard
    			player.getPackets().sendGameMessage("You have chose 'Hard'");
    		} if (interfaceId == SEND_5_OPTIONS && componentId == 5) {
    			this.difficulty = 5;
    			sendNext_2();
    			this.starter = StarterItems.FIGHTER;	
    		//	exp *= 20; // Extreme
    			player.getPackets().sendGameMessage("You have chose 'Extreme'");
    Dialogue - Newperson.java
    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. Someone help me with Dialogue???
    By countrysnp in forum Downloads
    Replies: 0
    Last Post: 09-26-2014, 12:43 AM
  2. Can someone help me with this error
    By tucybro in forum Help
    Replies: 2
    Last Post: 01-07-2009, 03:28 AM
  3. can someone help me with this error?
    By badboy ownz in forum Help
    Replies: 0
    Last Post: 01-01-2009, 04:07 PM
  4. Can someone help me with this error?
    By BloodScape in forum Projects
    Replies: 2
    Last Post: 11-27-2008, 05:27 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
  •