Thread: Problem with tab dialogue

Results 1 to 3 of 3
  1. #1 Problem with tab dialogue 
    Registered Member
    Join Date
    Jul 2015
    Posts
    85
    Thanks given
    9
    Thanks received
    1
    Rep Power
    24
    So i made the following thing, a bossnpc which works except for the part that if you click on a dialogue button nothing happens, if you know why this happens i'd greatly appriciate it if you could help me!


    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.game.WorldTile;
    import com.rs.game.player.Skills;
    import com.rs.game.player.content.Magic;
    import com.rs.game.player.controlers.FightCaves;
    import com.rs.game.player.controlers.FightKiln;
    
    public class BossesNPC extends Dialogue {
    
    	int npcId;
    
    	@Override
    	public void start() {
    		stage = 1;
    		if(stage == 1) {
    		sendOptionsDialogue("Where would you like to go?", "Nex.",
    				"Bandos.", "Sara.", "Tormented Demons", "More Options");
    		stage = 1;
    		}
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		switch(stage) {
    		
    		
    		case 0:
    		
    			if(stage == 1) {
    				if(componentId == OPTION_1) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2905, 5203, 0));
    					end();
    				} else if(componentId == OPTION_2) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2870, 5363, 2));
    					end();
    				} else if(componentId == OPTION_3) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2901, 5264, 0));
    					end();
    				} else if(componentId == OPTION_4) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2562, 5739, 0));
    					end();
    				} else if(componentId == OPTION_5) {
    					stage = 3;
    					sendOptionsDialogue("Where would you like to go?",
    							"Duel Arena.", "Gnome Agility.", "Dominion Tower.",
    							"Barrows", "More Options");
    					stage = 3;
    				}
    					
    				}  if(stage == 3) {
    					if(componentId == OPTION_1) {
    						Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3365,
    								3275, 0));
    						end();
    					} else if(componentId == OPTION_2) {
    						Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2470,
    								3436, 0));
    						end();
    					} else if(componentId == OPTION_3) {
    						Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3366,
    								3083, 0));
    						end();
    					} else if(componentId == OPTION_4) {
    						Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3565,
    								3289, 0));
    						end();
    					} else if(componentId == OPTION_5) {
    						stage = 4;
    						sendOptionsDialogue("Where would you like to go?",
    								"Magic Bank.", "Multi Area. (PvP)", "Fight Pits.",
    								"Wests(PvP)", "More Options");
    						stage = 4;
    					}
    			}  if(stage == 4) {
    				if(componentId == OPTION_1) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2538,
    							4715, 0));
    					end();
    				} else if(componentId == OPTION_2) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3240,
    							3611, 0));
    					end();
    				} else if(componentId == OPTION_3) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(4608,
    							5061, 0));
    					end();
    				} else if(componentId == OPTION_4) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2984,
    							3596, 0));
    					end();
    				} else if(componentId == OPTION_5) {
    					stage = 5;
    					sendOptionsDialogue("Where would you like to go?",
    							"Easts (PvP)", "BrimHaven", "Corp", "Feldip hills",
    							"More Options");
    					stage = 5;
    		} 
    			}  if(stage == 5) {
    				if(componentId == OPTION_1) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3360,
    							3658, 0));
    					end();
    				} else if(componentId == OPTION_2) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2709,
    							9464, 0));
    					end();
    				} else if(componentId == OPTION_3) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2966,
    							4383, 2));
    					end();
    				} else if(componentId == OPTION_4) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2570,
    							2916, 0));
    					end();
    				} else if(componentId == OPTION_5) {
    					stage = 6;
    					sendOptionsDialogue("Where would you like to go?",
    							"Zamorak", "Armadyl", "Castle Wars", "Trivia",
    							"More Options");
    					stage = 6;
    		} 
    			}  if(stage == 6) {
    				if(componentId == OPTION_1) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2925, 5330, 2));
    					end();
    				} else if(componentId == OPTION_2) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2838, 5297, 2));
    					end();
    				} else if(componentId == OPTION_3) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2647, 9378, 0));
    					end();
    				} else if(componentId == OPTION_4) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2570,
    							2916, 0));
    					end();
    				} else if(componentId == OPTION_5) {
    					stage = 7;
    					sendOptionsDialogue("Where would you like to go?",
    							"Kalphite Queen", "Fight Caves", "Fight Kiln", "Queen Black Dragon",
    							"More Options");
    					stage = 7;
    		} 
    			}  if(stage == 6) {
    				if(componentId == OPTION_1) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3226, 3108, 0));
    					end();
    				} else if(componentId == OPTION_2) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, FightCaves.OUTSIDE);
    					end();
    				} else if(componentId == OPTION_3) {
    					Magic.sendNormalTeleportSpell(player, 0, 0, FightKiln.OUTSIDE);
    					end();
    				} else if(componentId == OPTION_4) {
    					end();
    					if (player.getSkills().getLevelForXp(Skills.SUMMONING) < 60) {
    						player.getPackets().sendGameMessage("You need a summoning level of 60 to go through this portal.");
    						return;
    					}
    					player.getControlerManager().startControler("QueenBlackDragonControler");
    					end();
    				} else if(componentId == OPTION_5) {
    					stage = 1;
    					sendOptionsDialogue("Where would you like to go?",
    							"Nex.", "Bandos.", "Sara.", "Tormented Demons", 
    							"More Options");
    					stage = 1;
    		} 
    		
    		
    		}
    			
    		}
    		
    	}
    
    	@Override
    	public void finish() {
    		// 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
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2015
    Posts
    85
    Thanks given
    9
    Thanks received
    1
    Rep Power
    24
    I'm very stupid for not noticing this, thank you!
    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. Problem with a dialogue.
    By GrumpyThe1st in forum Help
    Replies: 3
    Last Post: 06-11-2013, 09:10 AM
  2. [PI] Skill Problem with Tabs [PI]
    By xCDIx in forum Help
    Replies: 8
    Last Post: 11-16-2012, 12:41 AM
  3. Problem with tab.
    By mohh2haxer in forum Help
    Replies: 4
    Last Post: 02-17-2012, 02:55 PM
  4. Problem with Dialogue
    By Zvp2 in forum Help
    Replies: 1
    Last Post: 08-15-2011, 07:04 AM
  5. [PI]Problems with Dialogue Option select
    By Mr Impact in forum Help
    Replies: 5
    Last Post: 08-03-2010, 03:24 AM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •