From 5e6f750cee9b9ee2b9005f359d6183b7b145e1a4 Mon Sep 17 00:00:00 2001 From: Player Name Date: Wed, 20 Sep 2023 06:50:37 +0000 Subject: [PATCH] Player username case is now consistent --- .../global/ame/events/evilchicken/EvilChickenNPC.kt | 6 +++--- .../main/content/global/ame/events/genie/GenieDialogue.kt | 4 ++-- .../src/main/content/global/ame/events/genie/GenieNPC.kt | 6 +++--- .../global/ame/events/sandwichlady/SandwichLadyRENPC.kt | 8 ++++---- .../region/asgarnia/burthorpe/dialogue/UnferthDialogue.kt | 2 +- .../region/asgarnia/dialogue/ZandarHorfyreDialogue.kt | 4 ++-- .../rellekka/dialogue/BjornAndEldgrimDialogues.kt | 2 +- .../quest/thefremenniktrials/TFTInteractionListeners.kt | 4 ++-- .../kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt | 4 ++-- .../region/karamja/quest/tribaltotem/CrompertyDialogue.kt | 2 +- .../apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt | 2 +- .../region/misc/entrana/dialogue/MazionDialogue.kt | 2 +- .../region/misc/keldagrim/dialogue/DwarfsDialogue.kt | 4 ++-- .../misc/keldagrim/dialogue/DwarvenBoatmanDialogue.kt | 8 ++++---- .../content/region/misc/zanaris/dialogue/BlaecDialogue.kt | 2 +- .../dorgeshuun/dialogue/randomChildrenDialogue.kt | 2 +- .../quest/cooksassistant/LumbridgeCookDialogue.kt | 4 ++-- .../varrock/quest/familycrest/PerfectJewelryHandler.kt | 1 - .../region/tirranwn/dialogue/ElfTrackerDialogue.kt | 2 +- Server/src/main/core/game/node/entity/player/Player.java | 2 +- 20 files changed, 35 insertions(+), 36 deletions(-) diff --git a/Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt b/Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt index 56131f8fb..ac26b914b 100644 --- a/Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt +++ b/Server/src/main/content/global/ame/events/evilchicken/EvilChickenNPC.kt @@ -23,7 +23,7 @@ class EvilChickenNPC(override var loot: WeightBasedTable? = null) : RandomEventN val id = ids.toList()[index] this.transform(id) this.attack(player) - sendChat(phrases.random().replace("@name",player.name.capitalize())) + sendChat(phrases.random().replace("@name",player.username.capitalize())) this.isRespawn = false } @@ -37,9 +37,9 @@ class EvilChickenNPC(override var loot: WeightBasedTable? = null) : RandomEventN this.terminate() } if(getWorldTicks() % 10 == 0){ - sendChat(phrases.random().replace("@name",player.name.capitalize())) + sendChat(phrases.random().replace("@name",player.username.capitalize())) } super.tick() if(!player.viewport.currentPlane.npcs.contains(this)) this.clear() } -} \ No newline at end of file +} diff --git a/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt b/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt index 4022eb26d..7bcaa3c4d 100644 --- a/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt +++ b/Server/src/main/content/global/ame/events/genie/GenieDialogue.kt @@ -9,7 +9,7 @@ import org.rs09.consts.Items class GenieDialogue() : DialogueFile() { override fun handle(componentID: Int, buttonID: Int) { when (stage) { - 0 -> npcl(FacialExpression.NEUTRAL, "Ah, so you are there, ${player!!.name.capitalize()}. I'm so glad you summoned me. Please take this lamp and make your wish."). also { stage++ } + 0 -> npcl(FacialExpression.NEUTRAL, "Ah, so you are there, ${player!!.username.capitalize()}. I'm so glad you summoned me. Please take this lamp and make your wish."). also { stage++ } 1 -> { end() addItemOrDrop(player!!, Items.LAMP_2528) @@ -17,4 +17,4 @@ class GenieDialogue() : DialogueFile() { } } } -} \ No newline at end of file +} diff --git a/Server/src/main/content/global/ame/events/genie/GenieNPC.kt b/Server/src/main/content/global/ame/events/genie/GenieNPC.kt index ef69fe786..6f3cf39a1 100644 --- a/Server/src/main/content/global/ame/events/genie/GenieNPC.kt +++ b/Server/src/main/content/global/ame/events/genie/GenieNPC.kt @@ -13,7 +13,7 @@ class GenieNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPC override fun tick() { if(RandomFunction.random(1,15) == 5){ - sendChat(phrases.random().replace("@name",player.name.capitalize())) + sendChat(phrases.random().replace("@name",player.username.capitalize())) } super.tick() } @@ -21,10 +21,10 @@ class GenieNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPC override fun init() { super.init() playAudio(player, Sounds.GENIE_APPEAR_2301) - sendChat(phrases.random().replace("@name",player.name.capitalize())) + sendChat(phrases.random().replace("@name",player.username.capitalize())) } override fun talkTo(npc: NPC) { player.dialogueInterpreter.open(GenieDialogue(),npc) } -} \ No newline at end of file +} diff --git a/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt index 0eef0f2f0..1c5a14956 100644 --- a/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt +++ b/Server/src/main/content/global/ame/events/sandwichlady/SandwichLadyRENPC.kt @@ -8,13 +8,13 @@ import content.global.ame.RandomEventNPC import core.api.utils.WeightBasedTable class SandwichLadyRENPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SANDWICH_LADY_3117) { - val phrases = arrayOf("Hello, @name, can you hear me?","Sandwiches, @name!","Are you ignoring me @name??","Yoohoo! Sandwiches, @name!","Hello, @name?", "Come get your sandwiches @name!", "How could you ignore me like this @name?!", "Do you even want your sandwiches, @name?") + val phrases = arrayOf("Hello, @name, can you hear me?","Sandwiches, @name!","Are you ignoring me, @name??","Yoohoo! Sandwiches, @name!","Hello, @name?", "Come get your sandwiches, @name!", "How could you ignore me like this, @name?!", "Do you even want your sandwiches, @name?") var assigned_item = 0 val items = arrayOf(Items.BAGUETTE_6961,Items.TRIANGLE_SANDWICH_6962,Items.SQUARE_SANDWICH_6965,Items.ROLL_6963,Items.MEAT_PIE_2327,Items.KEBAB_1971,Items.CHOCOLATE_BAR_1973) override fun tick() { if(RandomFunction.random(1,15) == 5){ - sendChat(phrases.random().replace("@name",player.name.capitalize())) + sendChat(phrases.random().replace("@name",player.username.capitalize())) } super.tick() } @@ -22,7 +22,7 @@ class SandwichLadyRENPC(override var loot: WeightBasedTable? = null) : RandomEve override fun init() { super.init() assignItem() - sendChat(phrases.random().replace("@name",player.name.capitalize())) + sendChat(phrases.random().replace("@name",player.username.capitalize())) } fun assignItem(){ @@ -33,4 +33,4 @@ class SandwichLadyRENPC(override var loot: WeightBasedTable? = null) : RandomEve override fun talkTo(npc: NPC) { player.dialogueInterpreter.open(SandwichLadyDialogue(false),npc) } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/UnferthDialogue.kt b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/UnferthDialogue.kt index ac3af751f..58252f0cd 100644 --- a/Server/src/main/content/region/asgarnia/burthorpe/dialogue/UnferthDialogue.kt +++ b/Server/src/main/content/region/asgarnia/burthorpe/dialogue/UnferthDialogue.kt @@ -21,7 +21,7 @@ class UnferthDialogue(player: Player? = null) : DialoguePlugin(player) { // 2 -> playerl(FacialExpression.FRIENDLY, "I'm so sorry Unferth.").also { stage++ } // 3 -> npcl(FacialExpression.FRIENDLY, "Gertrude asked me if I'd like one of her new kittens. I don't think I'm ready for that yet.").also { stage++ } // 4 -> playerl(FacialExpression.FRIENDLY, "Give it time. Things will get better, I promise.").also { stage++ } -// 5 -> npcl(FacialExpression.FRIENDLY, "Thanks ${player.name}.").also { stage = END_DIALOGUE } +// 5 -> npcl(FacialExpression.FRIENDLY, "Thanks, ${player.username}.").also { stage = END_DIALOGUE } // } when (stage) { START_DIALOGUE -> npcl(FacialExpression.GUILTY, "Hello.").also { stage++ } diff --git a/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt b/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt index c2050df95..191f7237e 100644 --- a/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt +++ b/Server/src/main/content/region/asgarnia/dialogue/ZandarHorfyreDialogue.kt @@ -29,7 +29,7 @@ class ZandarHorfyreDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int) : Boolean { when (stage) { - -1 -> npcl(FacialExpression.NEUTRAL,"My name is Zandar Horfyre, and you ${ player.name } are trespassing in my tower, not to mention attacking my students! I thank you to leave immediately!").also{ stage++ } + -1 -> npcl(FacialExpression.NEUTRAL,"My name is Zandar Horfyre, and you, ${ player.username }, are trespassing in my tower, not to mention attacking my students! I thank you to leave immediately!").also{ stage++ } 0 -> options("Ok, I was going anyway.", "No, I think I'll stay for a bit.").also{ stage++ } 1 -> when(buttonId) { 1 -> player("Ok, I was going anyway.").also{ stage = 10 } @@ -50,4 +50,4 @@ class ZandarHorfyreDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds() : IntArray { return intArrayOf(3308) } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt b/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt index 5a99069ae..216967b80 100644 --- a/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt +++ b/Server/src/main/content/region/fremennik/rellekka/dialogue/BjornAndEldgrimDialogues.kt @@ -32,7 +32,7 @@ class BjornAndEldgrimDialogues(player: Player? = null) : DialoguePlugin(player){ 1 -> player(FacialExpression.ASKING, "The who?").also { stage++ } 2 -> npcl(FacialExpression.DRUNK, "That guy over there by that stuff! (hic) Yeh, abshoultely! He's da bosh!").also { stage = END_DIALOGUE } - 10 -> player(FacialExpression.ASKING, "${player.name}?").also { stage++ } + 10 -> player(FacialExpression.ASKING, "${player.username}?").also { stage++ } 11 -> npcl(FacialExpression.DRUNK, "Nah nah nah, not them, the other one, whatshyerfashe!").also { stage++ } 12 -> player(FacialExpression.ASKING, "${player.getAttribute("fremennikname","fremmyname")}?").also { stage++ } 13 -> npc(FacialExpression.DRUNK, "Thatsh what I said diddle I?").also { stage++ } diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/TFTInteractionListeners.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/TFTInteractionListeners.kt index ec7ce8381..5a6686c29 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/TFTInteractionListeners.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/TFTInteractionListeners.kt @@ -354,7 +354,7 @@ class TFTInteractionListeners : InteractionListener { class LyreConcertPulse(val player: Player, val Lyre: Int) : Pulse(){ val GENERIC_LYRICS = arrayOf( - "${player.name?.capitalize()} is my name,", + "${player.username?.capitalize()} is my name,", "I haven't much to say", "But since I have to sing this song.", "I'll just go ahead and play." @@ -487,4 +487,4 @@ class TFTInteractionListeners : InteractionListener { return false } } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt b/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt index 84c191cb6..625bf6a7a 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/merlinsquest/TheLadyOfTheLake.kt @@ -52,7 +52,7 @@ class TheLadyOfTheLake(player: Player? = null) : DialoguePlugin(player) { 100 -> npcl(FacialExpression.HAPPY,"I am the Lady of the Lake.").also { stage = 145 } 110 -> player("And I'm-").also { stage++ } 111 -> npc( - "You're " + player.name + ". And I see from the sign you", + "You're " + player.username + ". And I see from the sign you", "wear that you have earned the trust of Sir Kay." ).also { stage++ } 112 -> player("It was nothing.. really...").also { stage++ } @@ -157,4 +157,4 @@ class TheLadyOfTheLake(player: Player? = null) : DialoguePlugin(player) { override fun getIds(): IntArray { return intArrayOf(250) } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/karamja/quest/tribaltotem/CrompertyDialogue.kt b/Server/src/main/content/region/karamja/quest/tribaltotem/CrompertyDialogue.kt index dd473e825..ed7a7948f 100644 --- a/Server/src/main/content/region/karamja/quest/tribaltotem/CrompertyDialogue.kt +++ b/Server/src/main/content/region/karamja/quest/tribaltotem/CrompertyDialogue.kt @@ -19,7 +19,7 @@ class CrompertyDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu override fun open(vararg args: Any?): Boolean { npc = args[0] as NPC - npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello ${player.name}, I'm Cromperty. Sedridor has told me about you. As a wizard and an inventor he has aided me in my great invention!") + npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello, ${player.username}, I'm Cromperty. Sedridor has told me about you. As a wizard and an inventor he has aided me in my great invention!") stage = 0 return true } diff --git a/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt b/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt index 80e833132..5eee207d0 100644 --- a/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt +++ b/Server/src/main/content/region/misc/apeatoll/dialogue/bananaplantation/BonzaraDialogue.kt @@ -36,7 +36,7 @@ class BonzaraDialogue(player: Player? = null) : DialoguePlugin(player){ 20 -> npcl(FacialExpression.OLD_DEFAULT, "Never mind that child. You should worry more about who you are and the nature of the forces that have driven you here.").also { stage++ } 21 -> player(FacialExpression.THINKING, "I'll ... keep that in mind, thanks.").also { stage++ } - 22 -> npc(FacialExpression.OLD_DEFAULT, "We WILL meet again, " + player.name + ".").also { stage++ } + 22 -> npc(FacialExpression.OLD_DEFAULT, "We WILL meet again, " + player.username + ".").also { stage++ } 23 -> player(FacialExpression.SUSPICIOUS, "Ok...").also { stage = 99 } 99 -> end() diff --git a/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt b/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt index 63801ca58..60368b2cc 100644 --- a/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt +++ b/Server/src/main/content/region/misc/entrana/dialogue/MazionDialogue.kt @@ -18,7 +18,7 @@ class MazionDialogue(player: Player? = null) : DialoguePlugin(player){ npc = args[0] as NPC when ((1..3).random()) { 1 -> npc(FacialExpression.FRIENDLY, "Nice weather we're having today!").also { stage = 99 } - 2 -> npc(FacialExpression.FRIENDLY, "Hello " + player.name + ", fine day today!").also { stage = 99 } + 2 -> npc(FacialExpression.FRIENDLY, "Hello, " + player.username + ", fine day today!").also { stage = 99 } 3 -> npc(FacialExpression.ANNOYED, "Please leave me alone, a parrot stole my banana.").also { stage = 99 } } return true diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/DwarfsDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/DwarfsDialogue.kt index 83100bcaa..a2b818a5a 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/DwarfsDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/DwarfsDialogue.kt @@ -16,7 +16,7 @@ class DwarfsDialogue(player: Player? = null) : DialoguePlugin(player) { var random = arrayOf(1, 2, 3, 4, 5).random() when (random) { 1 -> npcl(FacialExpression.OLD_DEFAULT, "I hope the goblins are properly maintaining their stretch of track! I'd hate to see them spoil good Dwarven workmanship.").also { stage = END_DIALOGUE } - 2 -> npcl(FacialExpression.OLD_DEFAULT, "You're ${player.name}, aren't you? It's a good job you did helping to get this train link open.").also { stage = END_DIALOGUE } + 2 -> npcl(FacialExpression.OLD_DEFAULT, "You're ${player.username}, aren't you? It's a good job you did helping to get this train link open.").also { stage = END_DIALOGUE } 3 -> npcl(FacialExpression.OLD_DEFAULT, "Y'know, at first I didn't like the idea of visiting a goblin city, but these cave goblins are alright.").also { stage = END_DIALOGUE } 4 -> npcl(FacialExpression.OLD_DEFAULT, "These goblins have so much more advanced technology than us. Take a look at their magical lights! We could never create something like them.").also { stage = END_DIALOGUE } 5 -> npcl(FacialExpression.OLD_DEFAULT, "Dorgesh-Kaan's very nice to visit, but I don't think I'd want to live there.").also { stage = END_DIALOGUE } @@ -33,4 +33,4 @@ class DwarfsDialogue(player: Player? = null) : DialoguePlugin(player) { override fun getIds(): IntArray { return intArrayOf(NPCs.DWARF_5880, NPCs.DWARF_5881, NPCs.DWARF_5882, NPCs.DWARF_5883, NPCs.DWARF_5884, NPCs.DWARF_5885) } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/misc/keldagrim/dialogue/DwarvenBoatmanDialogue.kt b/Server/src/main/content/region/misc/keldagrim/dialogue/DwarvenBoatmanDialogue.kt index 3caa733fc..c25041dc4 100644 --- a/Server/src/main/content/region/misc/keldagrim/dialogue/DwarvenBoatmanDialogue.kt +++ b/Server/src/main/content/region/misc/keldagrim/dialogue/DwarvenBoatmanDialogue.kt @@ -20,8 +20,8 @@ class DwarvenBoatmanForthDialogue(player: Player? = null) : DialoguePlugin(playe if (!getAttribute(player, "/save:keldagrim-visited", false)) { when (stage) { START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Ho there, human!").also { stage++ } - 1 -> playerl(FacialExpression.FRIENDLY, "${player.name}.").also { stage++ } - 2 -> npcl(FacialExpression.OLD_HAPPY, "Ho there, ${player.name}! Want to take a ride with me?").also { stage++ } + 1 -> playerl(FacialExpression.FRIENDLY, "${player.username}.").also { stage++ } + 2 -> npcl(FacialExpression.OLD_HAPPY, "Ho there, ${player.username}! Want to take a ride with me?").also { stage++ } 3 -> playerl(FacialExpression.FRIENDLY, "Where are you going? Across the river?").also { stage++ } 4 -> npcl(FacialExpression.OLD_HAPPY, "No no, that's what the ferryman is for! I'm going to Keldagrim, my home!").also { stage++ } 5 -> playerl(FacialExpression.FRIENDLY, "How much will that cost me then?").also { stage++ } @@ -54,7 +54,7 @@ class DwarvenBoatmanForthDialogue(player: Player? = null) : DialoguePlugin(playe } } else { when (stage) { - START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Hello again, ${player.name}! Want to go back to Keldagrim?").also { stage++ } + START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Hello again, ${player.username}! Want to go back to Keldagrim?").also { stage++ } 1 -> showTopics( Topic(FacialExpression.FRIENDLY, "Yes, please take me.", 2), Topic(FacialExpression.FRIENDLY, "What, on your ship? No way.", 3), @@ -149,4 +149,4 @@ class TravelBackPulse(val player: Player): Pulse(1){ } return false } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt b/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt index 339f40c2a..ce6c7f48b 100644 --- a/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt +++ b/Server/src/main/content/region/misc/zanaris/dialogue/BlaecDialogue.kt @@ -18,7 +18,7 @@ class BlaecDialogue(player: Player? = null) : DialoguePlugin(player){ npc = args[0] as NPC when ((1..3).random()) { 1 -> npc(FacialExpression.FRIENDLY,"Wunnerful weather we're having today!").also { stage = 99 } - 2 -> npc(FacialExpression.FRIENDLY,"Greetin's " + player.name + ", fine day today!").also { stage = 99 } + 2 -> npc(FacialExpression.FRIENDLY,"Greetin's, " + player.username + ", fine day today!").also { stage = 99 } 3 -> npcl(FacialExpression.ANNOYED,"Please leave me alone, I'm busy trapping the pygmy shrews.").also { stage = 99 } } return true diff --git a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt index 6b6a2de2f..9063efe67 100644 --- a/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt +++ b/Server/src/main/content/region/misthalin/dorgeshuun/dialogue/randomChildrenDialogue.kt @@ -20,7 +20,7 @@ class randomChildrenDialogue(player: Player? = null) : DialoguePlugin(player){ npc = args[0] as NPC when ((1..5).random()) { 1 -> npc(FacialExpression.OLD_NORMAL, "Are you a surface-dweller?").also { stage = 0 } - 2 -> npcl(a, "Are you " + player.name + "? Did you help Zanik save the city?").also { stage = 10 } + 2 -> npcl(a, "Are you " + player.username + "? Did you help Zanik save the city?").also { stage = 10 } 3 -> npc(a, "Sorry, I'm not meant to talk to strangers.").also { stage = 99 } 4 -> npc(a, "Shh! Don't tell anyone!").also { stage = 20 } 5 -> npc(a, "Help! Help! The surface people are attacking!").also { stage = 30 } diff --git a/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt b/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt index ff9ad0b57..67e96da73 100644 --- a/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt +++ b/Server/src/main/content/region/misthalin/lumbridge/quest/cooksassistant/LumbridgeCookDialogue.kt @@ -64,7 +64,7 @@ class LumbridgeCookDialogue (player: Player? = null) : DialoguePlugin(player){ 1 -> npc("It looked a bit like a goblin, but it had big bulging eyes.","It wasn't wearing armour, but it had this odd helmet","with a light on it.").also { stage++ } 2 -> npc("The tunnel was too dark for me to follow it, so I went","to tell the Duke. But when we went down to the cellar","the hole had been blocked up, and no one believes me.").also { stage++ } 3 -> player("I believe you.").also { stage++ } - 4 -> npc("Thank you, ${player.name}! If you can convince the Duke","I'm telling the truth then we can get to the bottom of","this mystery.").also { stage = 1000; player.questRepository.getQuest("Lost Tribe").setStage(player,20) } + 4 -> npc("Thank you, ${player.username}! If you can convince the Duke","I'm telling the truth then we can get to the bottom of","this mystery.").also { stage = 1000; player.questRepository.getQuest("Lost Tribe").setStage(player,20) } 5 -> end() } return true @@ -280,4 +280,4 @@ class LumbridgeCookDialogue (player: Player? = null) : DialoguePlugin(player){ override fun getIds(): IntArray { return intArrayOf(278) } -} \ No newline at end of file +} diff --git a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt index 2cba709b5..ff615e0e1 100644 --- a/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt +++ b/Server/src/main/content/region/misthalin/varrock/quest/familycrest/PerfectJewelryHandler.kt @@ -15,7 +15,6 @@ class PerfectJewelryHandler (player: Player? = null): DialoguePlugin(player){ } override fun open(vararg args: Any?): Boolean { - println(player.name) if(player.inventory.containItems(2365, 1603)){ options("Craft perfect ruby ring", "Craft perfect ruby necklace") stage = 1 diff --git a/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt b/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt index 640b94ce4..d11634cee 100644 --- a/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt +++ b/Server/src/main/content/region/tirranwn/dialogue/ElfTrackerDialogue.kt @@ -33,7 +33,7 @@ class ElfTrackerDialogue(player: Player? = null) : DialoguePlugin(player){ override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 0 -> npc(FacialExpression.SUSPICIOUS, "Human! You must be one of Tyras's men...").also { stage++ } - 1 -> playerl(FacialExpression.HALF_GUILTY, "No, I'm " + player.name + "! Lord Iorwerth said you might be able to help me.").also { stage++ } + 1 -> playerl(FacialExpression.HALF_GUILTY, "No, I'm " + player.username + "! Lord Iorwerth said you might be able to help me.").also { stage++ } 2 -> npc(FacialExpression.SUSPICIOUS, "And you have something to prove this?").also { stage++ } 3 -> { //todo check quest stages whenever it's added diff --git a/Server/src/main/core/game/node/entity/player/Player.java b/Server/src/main/core/game/node/entity/player/Player.java index f0edca232..330f2fb0e 100644 --- a/Server/src/main/core/game/node/entity/player/Player.java +++ b/Server/src/main/core/game/node/entity/player/Player.java @@ -613,7 +613,7 @@ public class Player extends Entity { } if (killer instanceof Player && getWorldTicks() - killer.getAttribute("/save:last-murder-news", 0) >= 500) { Item wep = getItemFromEquipment((Player) killer, EquipmentSlot.WEAPON); - sendNews(killer.getName() + " has murdered " + getName() + " with " + (wep == null ? "their fists." : (StringUtils.isPlusN(wep.getName()) ? "an " : "a ") + wep.getName())); + sendNews(killer.getUsername() + " has murdered " + getUsername() + " with " + (wep == null ? "their fists." : (StringUtils.isPlusN(wep.getName()) ? "an " : "a ") + wep.getName())); killer.setAttribute("/save:last-murder-news", getWorldTicks()); } getPacketDispatch().sendMessage("Oh dear, you are dead!");