Thread: 718 Dialogue

Results 1 to 3 of 3
  1. #1 718 Dialogue 
    Registered Member
    Join Date
    Jun 2013
    Posts
    10
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    hi i want to make a dialogues for con but i get this error
    starting...
    src\com\rs\game\player\dialogues\EstateAgent.java: 32: error: method sendDialo
    in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_3_LARGE_OPTIONS, "What would you li
    to do?", "Purchase a house.", "Change the looks.", "Hire a servant.");
    ^
    required: String[]
    found: short,String,String,String,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 61: error: method sendDialo
    in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_4_OPTIONS, "Where do you want your
    se?", "Rimmington", "Tavelry", "Yanille", "Never mind.");
    ^
    required: String[]
    found: short,String,String,String,String,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 76: error: method sendDialo
    in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_1_TEXT_INFO, "You n
    a construction level of 50 or higher to buy this house!");
    ^
    required: String[]
    found: short,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 80: error: method sendDialo
    in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_2_TEXT_INFO, "You d
    t have " + HouseLocation.TAVELRY.getHouseCost() + " coins to buy this house."
    You need " + remainder + " more coins to buy it.");
    ^
    required: String[]
    found: short,String,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 90: error: method sendDialo
    in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_1_TEXT_INFO, "You n
    a construction level of 99 to buy this house!");
    ^
    required: String[]
    found: short,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 94: error: method sendDialo
    in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_2_TEXT_INFO, "You d
    t have " + HouseLocation.YANILLE.getHouseCost() + " coins to buy this house."
    You need " + remainder + " more coins to buy it.");
    ^
    required: String[]
    found: short,String,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 103: error: method sendDial
    e in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_5_OPTIONS, "What style would you li
    ", "Basic wood", "Basic Stone", "White Washed Stone", "Fremennik Wood", "More

    ^
    required: String[]
    found: short,String,String,String,String,String,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 115: error: method sendDial
    e in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_1_TEXT_INFO, "You n
    to have a level of 10 or more to buy this.");
    ^
    required: String[]
    found: short,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 133: error: method sendDial
    e in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_1_TEXT_INFO, "You need at l
    t 2 bedrooms to hire a servant.");
    ^
    required: String[]
    found: short,String
    reason: argument type short does not conform to vararg element type String
    src\com\rs\game\player\dialogues\EstateAgent.java: 137: error: method sendDial
    e in class Dialogue cannot be applied to given types;
    sendDialogue(SEND_5_OPTIONS, "Which servant would you
    ke to hire?", "Rick (level 20)", "Maid (level 25)",
    ^
    required: String[]
    found: short,String,String,String,String,String,String
    reason: argument type short does not conform to vararg element type String
    10 errors
    and this is my dialogues
    package com.rs.game.player.dialogues;

    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.npc.NPC;
    import com.rs.game.player.content.construction.HouseLocat ion;
    import com.rs.game.player.content.construction.RoomRefere nce;
    import com.rs.game.player.content.construction.ServantTyp e;

    public class EstateAgent extends Dialogue {

    int npcId;
    int i;

    @Override
    public void start() {
    npcId = (Integer) parameters[0];
    i = player.getSkills().getLevel(22);
    sendEntityDialogue(SEND_2_TEXT_CHAT,
    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
    "Hello, I am Free-Run's estate agent. I can sell you a house ",
    " and home upgrades, so how may I help you?" }, IS_NPC, npcId, 9827);
    }

    @Override
    public void run(int interfaceId, int componentId) {
    if (stage == -1) {
    sendEntityDialogue(SEND_1_TEXT_CHAT,
    new String[] { player.getDisplayName(), "I'd like to talk about houses." },
    IS_PLAYER, player.getIndex(), 9827);
    stage = 1;
    } else if (stage == 1) {
    sendDialogue(SEND_3_LARGE_OPTIONS, "What would you like to do?", "Purchase a house.", "Change the looks.", "Hire a servant.");
    stage = 2;
    } else if (stage == 2) {
    switch (componentId) {
    case 2:
    sendEntityDialogue(SEND_1_TEXT_CHAT,
    new String[] { player.getDisplayName(), "I'd like to buy a house please." },
    IS_PLAYER, player.getIndex(), 9827);
    stage = 3;
    break;
    case 3:
    sendEntityDialogue(SEND_1_TEXT_CHAT,
    new String[] { player.getDisplayName(), "I'd like to change the looks of my house please." },
    IS_PLAYER, player.getIndex(), 9827);
    stage = 6;
    break;
    case 4:
    sendEntityDialogue(SEND_1_TEXT_CHAT,
    new String[] { player.getDisplayName(), "I'd like to hire a servant." },
    IS_PLAYER, player.getIndex(), 9827);
    stage = 8;
    break;
    }
    } else if (stage == 3) {
    sendEntityDialogue(SEND_1_TEXT_CHAT,
    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
    "Where would you like to buy a house from?"}, IS_NPC, npcId, 9827);
    stage = 4;
    } else if (stage == 4) {
    sendDialogue(SEND_4_OPTIONS, "Where do you want your house?", "Rimmington", "Tavelry", "Yanille", "Never mind.");
    stage = 5;
    } else if (stage == 5) {
    switch (componentId) {
    case 1:
    player.setHouseLocation(HouseLocation.RIMMINGTON);
    player.getInventory().deleteItem(995, HouseLocation.RIMMINGTON.getHouseCost());
    end();
    break;
    case 2:
    if (i >= 50 && player.getInventory().containsItem(995, HouseLocation.TAVELRY.getHouseCost())) {
    player.setHouseLocation(HouseLocation.TAVELRY);
    player.getInventory().deleteItem(995, HouseLocation.TAVELRY.getHouseCost());
    end();
    } else if (i < 50){
    sendDialogue(SEND_1_TEXT_INFO, "You need a construction level of 50 or higher to buy this house!");
    stage = 4;
    } else if (!player.getInventory().containsItem(995, HouseLocation.TAVELRY.getHouseCost())) {
    int remainder = HouseLocation.TAVELRY.getHouseCost() - player.getInventory().getItems().getNumberOf(995);
    sendDialogue(SEND_2_TEXT_INFO, "You don't have " + HouseLocation.TAVELRY.getHouseCost() + " coins to buy this house.", "You need " + remainder + " more coins to buy it.");
    stage = 4;
    }
    break;
    case 3:
    if (i == 99 && player.getInventory().containsItem(995, HouseLocation.YANILLE.getHouseCost())) {
    player.setHouseLocation(HouseLocation.YANILLE);
    player.getInventory().deleteItem(995, HouseLocation.YANILLE.getHouseCost());
    end();
    } else if (i < 99) {
    sendDialogue(SEND_1_TEXT_INFO, "You need a construction level of 99 to buy this house!");
    stage = 4;
    } else if (!player.getInventory().containsItem(995, HouseLocation.YANILLE.getHouseCost())) {
    int remainder = HouseLocation.YANILLE.getHouseCost() - player.getInventory().getItems().getNumberOf(995);
    sendDialogue(SEND_2_TEXT_INFO, "You don't have " + HouseLocation.YANILLE.getHouseCost() + " coins to buy this house.", "You need " + remainder + " more coins to buy it.");
    stage = 4;
    }
    break;
    case 4:
    stage = -1;
    break;
    }
    } else if (stage == 6) {
    sendDialogue(SEND_5_OPTIONS, "What style would you like?", "Basic wood", "Basic Stone", "White Washed Stone", "Fremennik Wood", "More");
    stage = 7;
    } else if (stage == 7) {
    switch (componentId) {
    case 1:
    player.setPlace(0);
    break;
    case 2:
    if (i >= 10 && player.getInventory().containsItem(995, 5000)) {
    player.setPlace(1);
    end();
    } else if (i < 10) {
    sendDialogue(SEND_1_TEXT_INFO, "You need to have a level of 10 or more to buy this.");
    stage = 6;
    }
    break;
    }
    } else if (stage == 8) {
    int numberOfBedrooms = 0;
    for (RoomReference room : player.getRooms()) { //Check if player has 2+ bedrooms
    if (room.getRoom().getName().equalsIgnoreCase("bedroo m")) {
    numberOfBedrooms++;
    }
    }
    if (numberOfBedrooms > 1) {
    sendEntityDialogue(SEND_1_TEXT_CHAT,
    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
    "Which servant would you like to hire?" }, IS_NPC, npcId, 9827);
    stage = 9;
    } else {
    sendDialogue(SEND_1_TEXT_INFO, "You need at least 2 bedrooms to hire a servant.");
    return;
    }
    } else if (stage == 9) {
    sendDialogue(SEND_5_OPTIONS, "Which servant would you like to hire?", "Rick (level 20)", "Maid (level 25)",
    "Cook (level 30)", "Butler (level 40)", "Demonic Butler (level 50)");
    stage = 10;
    } else if (stage == 10) {
    int i = player.getSkills().getLevel(22);
    switch (componentId) {
    case 1:
    if (i >= 20) {
    player.setButler(ServantType.RICK);
    player.getPackets().sendGameMessage("You purchased Rick, the servant!");
    } else {

    }
    break;
    case 2:
    if (i >= 25) {

    } else {

    }
    break;
    case 3:
    if (i >= 30) {

    } else {

    }
    break;
    case 4:
    if (i >= 40) {

    } else {

    }
    break;
    case 5:
    if (i >= 50) {

    } else {

    }
    break;
    }
    }
    }

    @Override
    public void finish() {

    }

    }
    any know to fix?
    Reply With Quote  
     

  2. #2  
    Owner of Virtus
    k0ed ur mom's Avatar
    Join Date
    Jun 2012
    Age
    34
    Posts
    540
    Thanks given
    20
    Thanks received
    46
    Rep Power
    11
    Use Eclipse it is the best tool you can use besides us
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2013
    Posts
    10
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    it's fixed. but when I click "Purchase a house." it do nothing

    Code:
    package com.rs.game.player.dialogues;
    
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.npc.NPC;
    import com.rs.game.player.content.construction.HouseLocation;
    import com.rs.game.player.content.construction.RoomReference;
    import com.rs.game.player.content.construction.ServantType;
    
    public class EstateAgent extends Dialogue {
    
    	int npcId;
    	int i;
    	
    	@Override
    	public void start() {
    		npcId = (Integer) parameters[0];
    		i = player.getSkills().getLevel(22);
    		sendEntityDialogue(SEND_2_TEXT_CHAT,
    				new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
    						"Hello, I am Free-Run's estate agent. I can sell you a house ",
    						" and home upgrades, so how may I help you?" }, IS_NPC, npcId, 9827);
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			sendEntityDialogue(SEND_1_TEXT_CHAT,
    					new String[] { player.getDisplayName(), "I'd like to talk about houses." },
    					IS_PLAYER, player.getIndex(), 9827);
    			stage = 1;
    		} else if (stage == 1) {
    			sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "Purchase a house.", "Change the looks.", "Hire a servant.");
    			stage = 2;
    			switch (componentId) {
    			case 2:
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    					new String[] { player.getDisplayName(), "I'd like to buy a house please." },
    					IS_PLAYER, player.getIndex(), 9827);
    				stage = 3;
    				break;
    			case 3:
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(), "I'd like to change the looks of my house please." },
    						IS_PLAYER, player.getIndex(), 9827);
    				stage = 6;
    				break;
    			case 4:
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { player.getDisplayName(), "I'd like to hire a servant." },
    						IS_PLAYER, player.getIndex(), 9827);
    				stage = 8;
    				break;
    			}
    		} else if (stage == 3) {
    			sendEntityDialogue(SEND_1_TEXT_CHAT, 
    					new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, 
    						"Where would you like to buy a house from?"}, IS_NPC, npcId, 9827);
    			stage = 4;
    		} else if (stage == 4) {
    			sendOptionsDialogue("Where do you want your house?", "Rimmington", "Tavelry", "Yanille", "Never mind.");
    			stage = 5;
    		} else if (stage == 5) {
    			switch (componentId) {
    			case 1:
    				player.setHouseLocation(HouseLocation.RIMMINGTON);
    				player.getInventory().deleteItem(995, HouseLocation.RIMMINGTON.getHouseCost());
    				end();
    				break;
    			case 2:
    				if (i >= 50 && player.getInventory().containsItem(995, HouseLocation.TAVELRY.getHouseCost())) {
    					player.setHouseLocation(HouseLocation.TAVELRY);
    					player.getInventory().deleteItem(995, HouseLocation.TAVELRY.getHouseCost());
    					end();
    				} else if (i < 50){
    					sendPlayerDialogue(SEND_1_TEXT_INFO, "You need a construction level of 50 or higher to buy this house!");
    					stage = 4;
    				} else if (!player.getInventory().containsItem(995, HouseLocation.TAVELRY.getHouseCost())) {
    					int remainder = HouseLocation.TAVELRY.getHouseCost() - player.getInventory().getItems().getNumberOf(995);
    					sendPlayerDialogue(SEND_2_TEXT_INFO, "You don't have " + HouseLocation.TAVELRY.getHouseCost() + " coins to buy this house.", "You need " + remainder + " more coins to buy it.");
    					stage = 4;
    				}
    				break;
    			case 3:
    				if (i == 99 && player.getInventory().containsItem(995, HouseLocation.YANILLE.getHouseCost())) {
    					player.setHouseLocation(HouseLocation.YANILLE);
    					player.getInventory().deleteItem(995, HouseLocation.YANILLE.getHouseCost());
    					end();
    				} else if (i < 99) {
    					sendPlayerDialogue(SEND_1_TEXT_INFO, "You need a construction level of 99 to buy this house!");
    					stage = 4;
    				} else if (!player.getInventory().containsItem(995, HouseLocation.YANILLE.getHouseCost())) {
    					int remainder = HouseLocation.YANILLE.getHouseCost() - player.getInventory().getItems().getNumberOf(995);
    					sendPlayerDialogue(SEND_2_TEXT_INFO, "You don't have " + HouseLocation.YANILLE.getHouseCost() + " coins to buy this house.", "You need " + remainder + " more coins to buy it.");
    					stage = 4;
    				}
    				break;
    			case 4:
    				stage = -1;
    				break;
    			}
    		} else if (stage == 6) {
    			sendOptionsDialogue("What style would you like?", "Basic wood", "Basic Stone", "White Washed Stone", "Fremennik Wood", "More");
    			stage = 7;
    		} else if (stage == 7) {
    			switch (componentId) {
    			case 1:
    				player.setPlace(0);
    				break;
    			case 2:
    				if (i >= 10 && player.getInventory().containsItem(995, 5000)) {
    					player.setPlace(1);
    					end();
    				} else if (i < 10) {
    					sendPlayerDialogue(SEND_1_TEXT_INFO, "You need to have a level of 10 or more to buy this.");
    					stage = 6;
    				}
    				break;
    			}
    		} else if (stage == 8) {
    			int numberOfBedrooms = 0;
    			for (RoomReference room : player.getRooms()) { //Check if player has 2+ bedrooms
    				if (room.getRoom().getName().equalsIgnoreCase("bedroom")) {
    					numberOfBedrooms++;
    				}
    			}
    			if (numberOfBedrooms > 1) {
    				sendEntityDialogue(SEND_1_TEXT_CHAT,
    						new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
    								"Which servant would you like to hire?" }, IS_NPC, npcId, 9827);
    				stage = 9;
    			} else {
    				sendPlayerDialogue(SEND_1_TEXT_INFO, "You need at least 2 bedrooms to hire a servant.");
    				return;
    			}
    		} else if (stage == 9) {
    			sendOptionsDialogue("Which servant would you like to hire?", "Rick (level 20)", "Maid (level 25)", 
    					"Cook (level 30)", "Butler (level 40)", "Demonic Butler (level 50)");
    			stage = 10;
    		} else if (stage == 10) {
    			int i = player.getSkills().getLevel(22);
    			switch (componentId) {
    			case 1:
    				if (i >= 20) {
    					player.setButler(ServantType.RICK);
    					player.getPackets().sendGameMessage("You purchased Rick, the servant!");
    				} else {
    					
    				}
    				break;
    			case 2:
    				if (i >= 25) {
    					
    				} else {
    					
    				}
    				break;
    			case 3:
    				if (i >= 30) {
    					
    				} else {
    					
    				}
    				break;
    			case 4:
    				if (i >= 40) {
    					
    				} else {
    					
    				}
    				break;
    			case 5:
    				if (i >= 50) {
    					
    				} else {
    					
    				}
    				break;
    			}
    		}
    	}
    
    	@Override
    	public void finish() {
    
    	}
    
    }
    any know how i fix 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. 718 Dialogues help!
    By 'Brad in forum Help
    Replies: 11
    Last Post: 01-01-2013, 09:02 AM
  2. 718 Dialogue
    By Ozie in forum Help
    Replies: 8
    Last Post: 12-09-2012, 02:00 PM
  3. 718 dialogue weird error
    By Con Artist in forum Help
    Replies: 7
    Last Post: 10-06-2012, 07:17 PM
  4. 718 dialogue
    By L3git in forum Help
    Replies: 2
    Last Post: 10-02-2012, 02:46 AM
  5. 718 Dialogue
    By blayke in forum Requests
    Replies: 5
    Last Post: 08-11-2012, 07:27 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
  •