Corrected XP rate options
Fixed some minor tutorial island bugs
This commit is contained in:
@@ -137,19 +137,19 @@ object TutorialInteractionReceiver : EventHook<InteractionEvent>
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Prospect rock - Tin
|
//Prospect rock - Tin
|
||||||
31 -> if(MiningNode.forId(event.target.id).identifier == 2.toByte() && event.option == "prospect"){
|
31 -> if(MiningNode.forId(event.target.id)?.identifier?.equals(2.toByte()) == true && event.option == "prospect"){
|
||||||
setAttribute(entity, "tutorial:stage", 32)
|
setAttribute(entity, "tutorial:stage", 32)
|
||||||
TutorialStage.load(entity, 32)
|
TutorialStage.load(entity, 32)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Prospect rock- Copper
|
//Prospect rock- Copper
|
||||||
33 -> if(MiningNode.forId(event.target.id).identifier == 1.toByte() && event.option == "prospect"){
|
33 -> if(MiningNode.forId(event.target.id)?.identifier?.equals(1.toByte()) == true && event.option == "prospect"){
|
||||||
setAttribute(entity, "tutorial:stage", 34)
|
setAttribute(entity, "tutorial:stage", 34)
|
||||||
TutorialStage.load(entity, 34)
|
TutorialStage.load(entity, 34)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Mine rock - Tin
|
//Mine rock - Tin
|
||||||
35 -> if(MiningNode.forId(event.target.id).identifier == 2.toByte() && event.option == "mine"){
|
35 -> if(MiningNode.forId(event.target.id)?.identifier?.equals(2.toByte()) == true && event.option == "mine"){
|
||||||
setAttribute(entity, "tutorial:stage", 36)
|
setAttribute(entity, "tutorial:stage", 36)
|
||||||
TutorialStage.load(entity, 36)
|
TutorialStage.load(entity, 36)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,20 +98,33 @@ class TutorialMagicTutorDialogue(player: Player? = null) : DialoguePlugin(player
|
|||||||
0 -> options("Set Ironman Mode (current: ${player.ironmanManager.mode.name})", "Change XP Rate (current: ${player.skills.experienceMutiplier}x)", "I'm ready now.").also { stage++ }
|
0 -> options("Set Ironman Mode (current: ${player.ironmanManager.mode.name})", "Change XP Rate (current: ${player.skills.experienceMutiplier}x)", "I'm ready now.").also { stage++ }
|
||||||
1 -> when(buttonId){
|
1 -> when(buttonId){
|
||||||
1 -> options("None","Standard","Hardcore (Permadeath!)","Ultimate","Nevermind.").also { stage = 10 }
|
1 -> options("None","Standard","Hardcore (Permadeath!)","Ultimate","Nevermind.").also { stage = 10 }
|
||||||
2 -> options("1.0x","2.5x","5.0x","10x","20x").also { stage = 20 }
|
2 -> options("1.0x","2.5x","5.0x","10x").also { stage = 20 }
|
||||||
3 -> npcl(FacialExpression.FRIENDLY, "Well, you're all finished here now. I'll give you a reasonable number of starting items when you leave.").also { stage = 30 }
|
3 -> npcl(FacialExpression.FRIENDLY, "Well, you're all finished here now. I'll give you a reasonable number of starting items when you leave.").also { stage = 30 }
|
||||||
}
|
}
|
||||||
|
|
||||||
10 -> {
|
10 -> {
|
||||||
val mode = IronmanMode.values()[buttonId - 1]
|
|
||||||
player.dialogueInterpreter.sendDialogue("You set your ironman mode to: ${mode.name}.")
|
|
||||||
player.ironmanManager.mode = mode
|
|
||||||
stage = 0
|
stage = 0
|
||||||
|
if(buttonId < 5)
|
||||||
|
{
|
||||||
|
val mode = IronmanMode.values()[buttonId - 1]
|
||||||
|
player.dialogueInterpreter.sendDialogue("You set your ironman mode to: ${mode.name}.")
|
||||||
|
player.ironmanManager.mode = mode
|
||||||
|
if (player.skills.experienceMutiplier == 10.0 && mode != IronmanMode.HARDCORE) player.skills.experienceMutiplier = 5.0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
handle(interfaceId, 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
20 -> {
|
20 -> {
|
||||||
val rates = arrayOf(1.0,2.5,5.0,10.0,20.0)
|
val rates = arrayOf(1.0,2.5,5.0,10.0)
|
||||||
val rate = rates[buttonId - 1]
|
val rate = rates[buttonId - 1]
|
||||||
|
if(rate == 10.0 && player.ironmanManager.mode != IronmanMode.HARDCORE) {
|
||||||
|
player.dialogueInterpreter.sendDialogue("10.0x is only available to Hardcore Ironmen!")
|
||||||
|
stage = 0
|
||||||
|
return true
|
||||||
|
}
|
||||||
player.dialogueInterpreter.sendDialogue("You set your XP rate to: ${rate}x.")
|
player.dialogueInterpreter.sendDialogue("You set your XP rate to: ${rate}x.")
|
||||||
player.skills.experienceMutiplier = rate
|
player.skills.experienceMutiplier = rate
|
||||||
stage = 0
|
stage = 0
|
||||||
@@ -138,6 +151,15 @@ class TutorialMagicTutorDialogue(player: Player? = null) : DialoguePlugin(player
|
|||||||
player.inventory.add(*STARTER_PACK)
|
player.inventory.add(*STARTER_PACK)
|
||||||
player.bank.add(*STARTER_BANK)
|
player.bank.add(*STARTER_BANK)
|
||||||
|
|
||||||
|
if(player.ironmanManager.mode == IronmanMode.HARDCORE)
|
||||||
|
{
|
||||||
|
setAttribute(player, "/save:permadeath", true)
|
||||||
|
}
|
||||||
|
else if(player.skills.experienceMutiplier == 10.0)
|
||||||
|
{
|
||||||
|
player.skills.experienceMutiplier = 5.0
|
||||||
|
}
|
||||||
|
|
||||||
//This overwrites the stuck dialogue after teleporting to Lumbridge for some reason
|
//This overwrites the stuck dialogue after teleporting to Lumbridge for some reason
|
||||||
//Dialogue from 2007 or thereabouts
|
//Dialogue from 2007 or thereabouts
|
||||||
//Original is five lines, but if the same is done here it will break. Need to find another way of showing all this information.
|
//Original is five lines, but if the same is done here it will break. Need to find another way of showing all this information.
|
||||||
|
|||||||
@@ -42,12 +42,14 @@ class TutorialMasterChefDialogue(player: Player? = null) : DialoguePlugin(player
|
|||||||
{
|
{
|
||||||
sendItemDialogue(player, Items.BUCKET_OF_WATER_1929, "The Master Chef gives you another bucket of water.")
|
sendItemDialogue(player, Items.BUCKET_OF_WATER_1929, "The Master Chef gives you another bucket of water.")
|
||||||
addItem(player, Items.BUCKET_OF_WATER_1929)
|
addItem(player, Items.BUCKET_OF_WATER_1929)
|
||||||
|
TutorialStage.load(player, 19)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(!inInventory(player, Items.POT_OF_FLOUR_1933))
|
if(!inInventory(player, Items.POT_OF_FLOUR_1933))
|
||||||
{
|
{
|
||||||
sendItemDialogue(player, Items.POT_OF_FLOUR_1933, "The Master Chef gives you another pot of flour.")
|
sendItemDialogue(player, Items.POT_OF_FLOUR_1933, "The Master Chef gives you another pot of flour.")
|
||||||
addItem(player, Items.POT_OF_FLOUR_1933)
|
addItem(player, Items.POT_OF_FLOUR_1933)
|
||||||
|
TutorialStage.load(player, 19)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -67,7 +67,7 @@ class TutorialMiningInstructorDialogue(player: Player? = null) : DialoguePlugin(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
34 -> when(stage) {
|
34,35 -> when(stage) {
|
||||||
0 -> npcl(FacialExpression.FRIENDLY, "Absolutely right, ${player.username}. These two ore types can be smelted together to make bronze.").also { stage++ }
|
0 -> npcl(FacialExpression.FRIENDLY, "Absolutely right, ${player.username}. These two ore types can be smelted together to make bronze.").also { stage++ }
|
||||||
1 -> npcl(FacialExpression.FRIENDLY, "So now you know what ore is in the rocks over there, why don't you have a go at mining some tin and copper? Here, you'll need this to start with.").also { stage++ }
|
1 -> npcl(FacialExpression.FRIENDLY, "So now you know what ore is in the rocks over there, why don't you have a go at mining some tin and copper? Here, you'll need this to start with.").also { stage++ }
|
||||||
2 -> {
|
2 -> {
|
||||||
@@ -82,7 +82,7 @@ class TutorialMiningInstructorDialogue(player: Player? = null) : DialoguePlugin(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
40 -> when(stage){
|
40,41 -> when(stage){
|
||||||
0 -> npcl(FacialExpression.FRIENDLY, "Okay, I'll show you how to make a dagger out of it. You'll be needing this..").also { stage++ }
|
0 -> npcl(FacialExpression.FRIENDLY, "Okay, I'll show you how to make a dagger out of it. You'll be needing this..").also { stage++ }
|
||||||
1 -> {
|
1 -> {
|
||||||
addItem(player, Items.HAMMER_2347)
|
addItem(player, Items.HAMMER_2347)
|
||||||
|
|||||||
Reference in New Issue
Block a user