diff --git a/Server/src/plugin/dialogue/HansDialoguePlugin.java b/Server/src/plugin/dialogue/HansDialoguePlugin.java index e59438b1d..6b29ac373 100644 --- a/Server/src/plugin/dialogue/HansDialoguePlugin.java +++ b/Server/src/plugin/dialogue/HansDialoguePlugin.java @@ -3,6 +3,7 @@ package plugin.dialogue; import org.crandor.game.content.dialogue.DialoguePlugin; import org.crandor.game.content.dialogue.FacialExpression; import org.crandor.game.node.entity.npc.NPC; +import org.crandor.game.node.entity.player.link.IronmanMode; import org.crandor.plugin.InitializablePlugin; import org.crandor.game.node.entity.player.Player; @@ -51,7 +52,7 @@ public final class HansDialoguePlugin extends DialoguePlugin { switch (stage) { case 0: - interpreter.sendOptions("Select an Option", "I'm looking for whoever is in charge of this place.", "I have come to kill everyone in this castle!", "I don't know. I'm lost. Where am I?", "Have you been here as long as me?", "I'd like to learn faster!"); + interpreter.sendOptions("Select an Option", "I'm looking for whoever is in charge of this place.", "I have come to kill everyone in this castle!", "I don't know. I'm lost. Where am I?", "More Options..."); stage++; break; case 1: @@ -72,60 +73,220 @@ public final class HansDialoguePlugin extends DialoguePlugin { stage = 50; break; case 4: - interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I've been patrolling this castle for years!"); - stage = 40; + interpreter.sendOptions("Select an Option", "Have you been here as long as me?", "I'd like to learn faster!", "About Iron Man mode...", "Go Back..."); + stage = 10; break; - case 5: - if (player.getSkills().experienceMutiplier == 15.0) { - interpreter.sendDialogues(npc, FacialExpression.OSRS_NORMAL, "Sorry, but you're already at the fastest experience", "rate. It's only a one way operation, and", "you can't learn faster yet I'm afraid!"); + } + break; + case 10: + switch (buttonId) { + case 1: + //Have you been here as long as me? + interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I've been patrolling this castle for years!"); + stage = 41; + break; + case 2: + //I'd Like to Learn Faster + if (player.getSkills().experienceMutiplier == 10.0) { + interpreter.sendDialogues(npc, FacialExpression.GUILTY, "Sorry, but you're already at the fastest experience", "rate. It's only a one way operation, and", "you can't learn faster yet I'm afraid!"); stage = 50; } else { interpreter.sendDialogues(npc, FacialExpression.HAPPY, "That's great! I can help you with that, but", "I must warn you it's only a one-way thing. There's no", "going back!"); - stage = 150; + stage = 200; } break; + case 3: + //About Iron Man Mode... + if (player.getIronmanManager().isIronman()) + { + interpreter.sendOptions("Select an Option", "I no longer want to be an Iron Man", "I'd like to change my Iron Man mode", "What is an Iron Man?", "Go Back..."); + stage = 100; + } else { + interpreter.sendOptions("Select an Option", "I would like to be an Iron Man.", "What is an Iron Man?", "Go Back..."); + stage = 110; + } + break; + case 4: // Go back + interpreter.sendOptions("Select an Option", "I'm looking for whoever is in charge of this place.", "I have come to kill everyone in this castle!", "I don't know. I'm lost. Where am I?", "More Options..."); + stage = 1; + break; } - break; - case 40: + + //Have you been here as long as me? + case 41: interpreter.sendDialogues(player, FacialExpression.THINKING, "You must be old then?"); stage++; break; - case 41: + case 42: interpreter.sendDialogues(npc, FacialExpression.LAUGH, "Haha, you could say I'm quite the veteran of these lands.", "Yes, I've been here a fair while..."); stage++; break; - case 42: //mixing OSRS here + case 43: //mixing OSRS here interpreter.sendDialogues(player, FacialExpression.ASKING, "Can you tell me how long I've been here?"); stage++; break; - case 43: + case 44: interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Ahh, I see all the newcomers arriving in Lumbridge, fresh-faced ","and eager for adventure. I remember you..."); + player.sendMessage("Feature not currently available."); stage = 50; break; - /*case 44: - getTimePlayed(); + /*case 45: + getTimePlayed(); - //The text: - //NOTE: it splits the text in different spots if the hours/minutes/days are 0 (because 0 days sounds weird, so it doesn't show it). + //The text: + //NOTE: it splits the text in different spots if the hours/minutes/days are 0 (because 0 days sounds weird, so it doesn't show it). - //You've spent [amount] days, [amount] hours, [amount] minutes in the world (NEXT LINE) since you arrived [amount] days ago. - //You've spent [amount] (days/hours), [amount] (hours/minutes) in the world since (NEXT LINE) you arrived [amount] days ago. - //You've spent [amount] (days/hours/minutes) in the world since you arrived (NEXT LINE) [amount] days ago. - */ + //You've spent [amount] days, [amount] hours, [amount] minutes in the world (NEXT LINE) since you arrived [amount] days ago. + //You've spent [amount] (days/hours), [amount] (hours/minutes) in the world since (NEXT LINE) you arrived [amount] days ago. + //You've spent [amount] (days/hours/minutes) in the world since you arrived (NEXT LINE) [amount] days ago. + */ //Closing Chat case 50: end(); break; - case 150: - interpreter.sendOptions("Select an Option", "Set my exp rate to 10x", "Nevermind"); + + //About Iron Man Mode... + case 100: + switch (buttonId) { + case 1: //no longer want to be iron + if (player.getIronmanManager().checkRestriction(IronmanMode.HARDCORE_DEAD)) { + interpreter.sendDialogues(npc, FacialExpression.GUILTY, "Sorry, but you've fallen as a Hardcore Iron Man", "already. It would be unfair for those with other", " restrictions if your status were to be removed!"); + stage = 50; + break; + } + if (player.getSkills().getTotalLevel() > 500 || player.getQuestRepository().getPoints() > 10){ + interpreter.sendDialogues(npc, FacialExpression.GUILTY, "Sorry, but you are too far along your journey.", "It would be unfair for those with other", " restrictions if your status were to be removed!"); + stage = 50; + break; + } else { + interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I have removed your Iron Man status."); + player.getIronmanManager().setMode(IronmanMode.NONE); + player.sendMessage("Your Iron Man status has been removed."); + stage = 50; + break; + } + case 2: //change ironman mode + if (player.getIronmanManager().checkRestriction(IronmanMode.HARDCORE_DEAD)) { + interpreter.sendDialogues(npc, FacialExpression.GUILTY, "Sorry, but you've fallen as a Hardcore Iron Man", "already. It would be unfair for those with other", " restrictions if your status were to be changed!"); + stage = 50; + break; + } + if (player.getSkills().getTotalLevel() > 500 || player.getQuestRepository().getPoints() > 10){ + interpreter.sendDialogues(npc, FacialExpression.GUILTY, "Sorry, but you are too far along your journey.", "It would be unfair for those with other", " restrictions if your status were to be changed!"); + stage = 50; + break; + } else { + interpreter.sendOptions("Select a Mode", "Standard", "