mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
amulet dialogue logic
This commit is contained in:
parent
064ad43c55
commit
6eb1174db8
1 changed files with 42 additions and 21 deletions
|
|
@ -20,7 +20,8 @@ import org.rs09.consts.Items
|
|||
|
||||
class FatherUrhneyQuestDialogueFile : DialogueLabeller() {
|
||||
override fun addConversation() {
|
||||
|
||||
//mid quest asking for amulet
|
||||
|
||||
npc(FacialExpression.ANGRY, "I suppose I'd better talk to you then. What problems", "has he got himself into this time?");
|
||||
player("He's got a ghost haunting his graveyard.");
|
||||
|
||||
|
|
@ -69,34 +70,54 @@ class FatherUrhneyQuestDialogueFile : DialogueLabeller() {
|
|||
|
||||
class FatherUrhneyQuestAmuletDialogueFile : DialogueLabeller() {
|
||||
override fun addConversation() {
|
||||
|
||||
//mid or after finishing quest and needing another one or doing the drop trick
|
||||
|
||||
npc("Father Urhney sighs.")
|
||||
|
||||
exec { player, npc ->
|
||||
if (anyInEquipment(player, Items.GHOSTSPEAK_AMULET_552) || anyInInventory(player, Items.GHOSTSPEAK_AMULET_552)) {
|
||||
npc("What are you talking about? I can see you've got it", "with you!")
|
||||
}
|
||||
|
||||
if (inBank(player, Items.GHOSTSPEAK_AMULET_552)) {
|
||||
npc(FacialExpression.ANGRY, "You come here wasting my time... Has it even", "occurred to you to look in your bank? Now GO", "AWAY!")
|
||||
}
|
||||
|
||||
npc(FacialExpression.ANGRY, "How careless can you get? Those things aren't easy to", "come by you know! It's a good job I've got a spare.")
|
||||
|
||||
if (freeSlots(player) >= 1) {
|
||||
if (addItem(player, Items.GHOSTSPEAK_AMULET_552, 1)) {
|
||||
item(Item(Items.GHOSTSPEAK_AMULET_552), "Father Urhney hands you an amulet.")
|
||||
|
||||
player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 1, 12)
|
||||
|
||||
npc(FacialExpression.ANGRY, "Be more careful this time.")
|
||||
player("Ok, I'll try to be.");
|
||||
}
|
||||
loadLabel(player, "amulet_equip_resp")
|
||||
} else if (inBank(player, Items.GHOSTSPEAK_AMULET_552)) {
|
||||
loadLabel(player, "amulet_in_bank_resp")
|
||||
} else {
|
||||
sendMessage(player, "You don't have enough inventory space to accept this amulet.")
|
||||
loadLabel(player, "give_amulet")
|
||||
}
|
||||
}
|
||||
|
||||
goto("nowhere")
|
||||
label("amulet_equip_resp") {
|
||||
npc("What are you talking about? I can see you've got it", "with you!")
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
label("amulet_in_bank_resp") {
|
||||
npc(FacialExpression.ANGRY, "You come here wasting my time... Has it even", "occurred to you to look in your bank? Now GO", "AWAY!")
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
label("give_amulet") {
|
||||
npc(FacialExpression.ANGRY, "How careless can you get? Those things aren't easy to", "come by you know! It's a good job I've got a spare.")
|
||||
|
||||
exec { player, npc ->
|
||||
if (freeSlots(player) >= 1) {
|
||||
if (addItem(player, Items.GHOSTSPEAK_AMULET_552, 1)) {
|
||||
item(Item(Items.GHOSTSPEAK_AMULET_552), "Father Urhney hands you an amulet.")
|
||||
|
||||
player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 1, 12)
|
||||
loadLabel(player, "give_amulet_response")
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You don't have enough inventory space to accept this amulet.")
|
||||
loadLabel(player, "nowhere")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label("give_amulet_resp") {
|
||||
npc(FacialExpression.ANGRY, "Be more careful this time.")
|
||||
player("Ok, I'll try to be.")
|
||||
goto("nowhere")
|
||||
}
|
||||
|
||||
//because end() breaks shit
|
||||
label("nowhere") {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue