Player username case is now consistent

This commit is contained in:
Player Name
2023-09-20 06:50:37 +00:00
committed by Ryan
parent 0b6be66cfd
commit 5e6f750cee
20 changed files with 35 additions and 36 deletions
@@ -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()
}
}
}
@@ -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() {
}
}
}
}
}
@@ -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)
}
}
}
@@ -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)
}
}
}