Code cleanup
Reorganised imports Removed redundant qualifiers
This commit is contained in:
+12
-12
@@ -14,7 +14,7 @@ import org.rs09.consts.NPCs
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){
|
||||
class ArchaeologistDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
@@ -29,9 +29,9 @@ class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.Dialogu
|
||||
player.skills.getStaticLevel(Skills.FIREMAKING) >= 50 &&
|
||||
player.skills.getStaticLevel(Skills.MAGIC) >= 50 &&
|
||||
player.skills.getStaticLevel(Skills.THIEVING) >= 53 ) {
|
||||
player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 }
|
||||
player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 }
|
||||
} else {
|
||||
player(core.game.dialogue.FacialExpression.FRIENDLY,"Hello there.").also { stage = 999 }
|
||||
player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 999 }
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -46,36 +46,36 @@ class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.Dialogu
|
||||
|
||||
999 -> sendDialogue("He seems to be lost in his own thoughts...").also { stage = 99 }
|
||||
|
||||
0 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "Howdy stranger. What brings you out to these parts?").also { stage++ }
|
||||
0 -> npc(FacialExpression.FRIENDLY, "Howdy stranger. What brings you out to these parts?").also { stage++ }
|
||||
1 -> options("What are you doing here?", "Do you have any quests?", "Who are you?", "Nothing really.").also { stage++ }
|
||||
2 -> when (buttonId) {
|
||||
//1 -> todo
|
||||
2 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Do you have any quests?", "Call it a hunch, but you look like the type of man who", "might...").also { stage = 20 }
|
||||
2 -> player(FacialExpression.FRIENDLY, "Do you have any quests?", "Call it a hunch, but you look like the type of man who", "might...").also { stage = 20 }
|
||||
//3 -> todo
|
||||
//4 -> todo
|
||||
}
|
||||
|
||||
20 -> npc(core.game.dialogue.FacialExpression.HALF_THINKING, "Well, it's funny you should say that.",
|
||||
20 -> npc(FacialExpression.HALF_THINKING, "Well, it's funny you should say that.",
|
||||
"I'm not sure if I would really call it a quest as such,",
|
||||
"but I found this ancient stone tablet in one of my",
|
||||
"excavations, and it would really help me out if you").also { stage++ }
|
||||
21 -> npc(core.game.dialogue.FacialExpression.FRIENDLY, "could go and take it back to the digsite for me and get",
|
||||
21 -> npc(FacialExpression.FRIENDLY, "could go and take it back to the digsite for me and get",
|
||||
"it examined.").also { stage++ }
|
||||
22 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "It's very old, and I don't recognise and of the",
|
||||
22 -> npc(FacialExpression.NEUTRAL, "It's very old, and I don't recognise and of the",
|
||||
"inscriptions on it.").also { stage++ }
|
||||
23 -> options("Yes, I'll help you.", "No thanks, I don't want to help.").also { stage++ }
|
||||
24 -> when(buttonId) {
|
||||
1 -> player(core.game.dialogue.FacialExpression.FRIENDLY, "Sure, I was heading that way anyways.",
|
||||
1 -> player(FacialExpression.FRIENDLY, "Sure, I was heading that way anyways.",
|
||||
"Any particular person at the digsite you want me to",
|
||||
"talk to?").also { stage = 30 }
|
||||
// 2 -> todo
|
||||
}
|
||||
|
||||
30 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "His name's Terry Balando. Give it to nobody but him.",
|
||||
30 -> npc(FacialExpression.NEUTRAL, "His name's Terry Balando. Give it to nobody but him.",
|
||||
"I'm sorry, I can't entrust you with the actual tablet I",
|
||||
"found, but it is far too valuable to give away, but I took",
|
||||
"these etchings - they should be enough for him to make").also { stage++ }
|
||||
31 -> npc(core.game.dialogue.FacialExpression.NEUTRAL, "a preliminary translation on.",
|
||||
31 -> npc(FacialExpression.NEUTRAL, "a preliminary translation on.",
|
||||
"Come back and let me know what he says, I would hate",
|
||||
"to waste my time excavating anything that isn't worth",
|
||||
"my time as a world famous archaeologist!").also {
|
||||
@@ -92,7 +92,7 @@ class ArchaeologistDialogue(player: Player? = null) : core.game.dialogue.Dialogu
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return ArchaeologistDialogue(player)
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ class TheGolemListeners : InteractionListener {
|
||||
fun initializeStatuettes(player: Player) {
|
||||
if(!player.getAttribute("the-golem:statuette-rotation:initialized", false)) {
|
||||
for(i in 0 until 4) {
|
||||
player.setAttribute("/save:the-golem:statuette-rotation:${i}", RandomFunction.random(2));
|
||||
player.setAttribute("/save:the-golem:statuette-rotation:${i}", RandomFunction.random(2))
|
||||
}
|
||||
player.setAttribute("/save:the-golem:statuette-rotation:initialized", true)
|
||||
}
|
||||
@@ -331,7 +331,7 @@ class TheGolemListeners : InteractionListener {
|
||||
|
||||
fun penOnPapyrus(player: Player): Boolean {
|
||||
if(!player.getAttribute("the-golem:varmen-notes-read", false)) {
|
||||
player.sendMessage("You don't know what to write.");
|
||||
player.sendMessage("You don't know what to write.")
|
||||
return true
|
||||
}
|
||||
if(player.inventory.remove(Item(Items.PAPYRUS_970, 1))) {
|
||||
@@ -343,7 +343,7 @@ class TheGolemListeners : InteractionListener {
|
||||
|
||||
fun implementOnGolem(player: Player): Boolean {
|
||||
if(!player.getAttribute("the-golem:varmen-notes-read", false)) {
|
||||
player.sendMessage("You don't know what that would do.");
|
||||
player.sendMessage("You don't know what that would do.")
|
||||
return true
|
||||
}
|
||||
if(player.questRepository.getStage("The Golem") == 7) {
|
||||
|
||||
Reference in New Issue
Block a user