Skip to content

Commit

Permalink
druidic ritual quest (#554)
Browse files Browse the repository at this point in the history
* druidic ritual quest

* added gudrun hug to gunnars ground quest

* Add suits of armour to taverley dungeon

* Fix forced positioning when entering through double doors

* Convert Al Kharid tollgate to use Doors

---------

Co-authored-by: GregHib <[email protected]>
  • Loading branch information
jarryd229 and GregHib authored Nov 19, 2024
1 parent 70d4590 commit e390164
Show file tree
Hide file tree
Showing 14 changed files with 620 additions and 61 deletions.
1 change: 1 addition & 0 deletions data/definitions/animations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1799,3 +1799,4 @@ wolves_attack: 6559
wolves_death: 6558
run_replenish: 9988
play_organ: 3675
gudrun_hugging: 14733
37 changes: 35 additions & 2 deletions data/definitions/npcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ man_2:
man_3:
<<: *man
id: 3
woman:
id: 4
max_hit_melee: 10
hitpoints: 70
wander_radius: 4
respawn_delay: 25
style: crush
race: human
examine: "One of Gielinor's many citizens."
musician_lumbridge:
id: 29
song: 702
Expand Down Expand Up @@ -378,6 +387,16 @@ cow_brown:
frog_8_frogland:
<<: *frog_frogland
id: 403
sanfew:
id: 454
wander_radius: 2
race: human
examine: "An old druid."
kaqemeex:
id: 455
wander_radius: 4
race: human
examine: "A wise druid."
father_urhney:
id: 458
wander_radius: 4
Expand Down Expand Up @@ -771,7 +790,7 @@ diango:
wander_radius: 4
shop: diangos_toy_store
race: human
examine: "A toy-seller who looks after people's toys for them."
examine: "A toy-seller who looks after people's toys for them."
hamid:
id: 1008
race: human
Expand Down Expand Up @@ -2293,4 +2312,18 @@ easter_egg_3:
easter_egg_4:
id: 3693
easter_egg_5:
id: 3694
id: 3694
suit_of_armour:
id: 453
hitpoints: 290
att: 16
str: 14
def: 9
style: slash
max_hit_melee: 30
wander_radius: 5
attack_radius: 8
hunt_mode: aggressive
weapon_style: sword
race: human
examine: "A dusty old suit of armour."
35 changes: 23 additions & 12 deletions data/definitions/objects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2682,6 +2682,9 @@ chair_21:
large_door_18_opened:
id: 26207
examine: "A sturdy wooden door."
gudrun_and_dororan:
id: 5657
examine: "gudrun and dororan"
large_door_18_closed:
id: 5667
examine: "A sturdy wooden door."
Expand Down Expand Up @@ -3697,15 +3700,21 @@ trapdoor_44_opened:
trapdoor_44_closed:
id: 10558
examine: "I wonder what's beneath it?"
toll_gate_al_kharid_opened:
toll_gate_al_kharid_south_opened:
id: 35550
toll_gate_al_kharid_closed:
toll_gate_al_kharid_south_closed:
id: 35549
door: true
toll_gate_al_kharid_south:
id: 10565
gate: false
examine: "Marks the border between Al Kharid and the Kingdom of Misthalin."
toll_gate_al_kharid_north_opened:
id: 35552
toll_gate_al_kharid_north_closed:
id: 35551
door: true
toll_gate_al_kharid_north:
id: 10566
gate: false
examine: "Marks the border between Al Kharid and the Kingdom of Misthalin."
Expand Down Expand Up @@ -8074,14 +8083,14 @@ door_547_opened:
door_547_closed:
id: 31838
examine: "A single door."
door_549_opened:
door_taverley_1_opened:
id: 31840
door_549_closed:
door_taverley_1_closed:
id: 31841
examine: "Stops people getting out."
door_550_opened:
id: 31840
door_550_closed:
door_taverley_2_opened:
id: 31843
door_taverley_2_closed:
id: 31844
examine: "Stops people getting out."
pillar_61:
Expand Down Expand Up @@ -8478,10 +8487,6 @@ cell_door_14_opened:
cell_door_14_closed:
id: 35540
examine: "This looks sturdier than the rest of the building."
toll_gate_al_kharid:
id: 35549
toll_gate_al_kharid_north:
id: 35551
door_593_opened:
id: 35631
examine: "An open door."
Expand Down Expand Up @@ -11862,4 +11867,10 @@ fire_barbarian_village:
examine: "Hot!"
wizards_tower_staircase:
id: 12537
examine: "I can climb these stairs."
examine: "I can climb these stairs."
cauldron_of_thunder:
id: 2142
examine: "An eerie glow permeates the cauldron."
suit_of_armour:
id: 32292
examine: "A dusty old suit of armour."
14 changes: 13 additions & 1 deletion data/definitions/variables-player.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
druidic_ritual:
id: 80
type: varp
persist: true
format: map
default: unstarted
values:
unstarted: 0
started: 1
cauldron: 2
kaqemeex: 3
completed: 4
the_knights_sword:
id: 122
persist: true
Expand Down Expand Up @@ -95,7 +107,7 @@ quest_points_total:
format: map
default: total
values:
total: 12
total: 16
cooks_assistant:
id: 29
persist: true
Expand Down
5 changes: 5 additions & 0 deletions data/spawns/npc-spawns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1305,10 +1305,12 @@
- { id: cow_calf, x: 2933, y: 3276 }
- { id: iconis, x: 2930, y: 3326, direction: SOUTH }
# 11573
- { id: sanfew, x: 2897, y: 3426, level: 1, members: true }
- { id: pikkupstix_spawn, x: 2925, y: 3443 }
- { id: pikkupstix_spawn_2, x: 2925, y: 3443 }
# 11574
- { id: nora_t_hagg, x: 2904, y: 3463 }
- { id: kaqemeex, x: 2925, y: 3486, members: true }
# 11668
- { id: rat, x: 2899, y: 9520, members: true }
- { id: rat, x: 2938, y: 9496, members: true }
Expand Down Expand Up @@ -1948,6 +1950,9 @@
- { id: giant_rat_dark_injured, x: 3202, y: 3161 }
- { id: giant_rat_dark_injured, x: 3233, y: 3161 }
# 12850
- { id: woman, x: 3217, y: 3205 }
- { id: woman, x: 3211, y: 3213, level: 1 }
- { id: woman, x: 3235, y: 3206 }
- { id: harlan, x: 3208, y: 3252 }
- { id: nemarti, x: 3210, y: 3255 }
- { id: mikasi, x: 3212, y: 3253 }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package world.gregs.voidps.world.activity.quest

import world.gregs.voidps.engine.client.ui.interfaceSlot

interfaceSlot(component = "journals", id = "quest_journals", itemSlot = 33) {
val lines = when (player.quest("druidic_ritual")) {
"completed" -> listOf(
"<str>I told Kaqemeex I would help them prepare their ceremony",
"<str>The ceremony required various meats being placed in the",
"<str>Cauldron of Thunder. I did this and gave them to Sanfew.",
"<str>Kaqemeex then tought me the basics of the skill Herblore.",
"",
"<red>QUEST COMPLETE!",
""
)
"started" -> listOf(
"<str>I told Kaqemeex I would help them prepare their ceremony",
"<navy>I should speak to <maroon>Sanfew <navy>in the village to the <maroon>South"
)
"cauldron" -> listOf(
"<str>I told Kaqemeex I would help them prepare their ceremony",
"",
"<maroon>Sanfew <navy>told me for the ritual they would need me to place",
"<maroon>raw bear meat<navy>, <maroon>raw chicken<navy>, <maroon>raw rat meat <navy>and <maroon>raw beef <navy>in",
"<navy>the <maroon>Cauldron of Thunder <navy>in the <maroon>dungeon South <navy>of <maroon>Taverley"
)
"kaqemeex" -> listOf(
"<str>I told Kaqemeex I would help them prepare their ceremony",
"<str>The ceremony required various meats being placed in the",
"<str>Cauldron of Thunder. I did this and gave them to Sanfew.",
"<navy>I should speak to <maroon>Kaqemeex <navy>again and claim my <maroon>reward"
)
else -> listOf(
"<navy>I can start this quest by talking to <maroon>Kaqemeex <navy>at the<maroon> Taverley Stone Circle."
)
}
player.sendQuestJournal("Druidic Ritual", lines)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ val quests = arrayOf(
"dorics_quest",
"gunnars_ground",
"the_knights_sword",
"rune_mysteries"
"rune_mysteries",
// members
"druidic_ritual"
)

interfaceOpen("quest_journals") { player ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ object Door {
return
}
val direction = door.tile.delta(player.tile).toDirection()
val target = if (direction == Direction.NONE) {
tile(door, 1)
} else {
val vertical = door.rotation == 0 || door.rotation == 2
val target = if (vertical && direction.isHorizontal() || !vertical && direction.isVertical()) {
door.tile
} else {
tile(door, 1)
}
player.start("input_delay", ticks)
player.walkTo(target, noCollision = true, noRun = true)
Expand Down Expand Up @@ -159,6 +160,6 @@ object Door {

private fun rotate(rotation: Int, clockwise: Int) = (rotation + clockwise) and 0x3

fun ObjectDefinition.isDoor() = (name.contains("door", true) && !name.contains("trap", true)) || name.contains("gate", true)
fun ObjectDefinition.isDoor() = (name.contains("door", true) && !name.contains("trap", true)) || name.contains("gate", true) || this["door", false]
}

104 changes: 104 additions & 0 deletions game/src/main/kotlin/world/gregs/voidps/world/map/ManAndWoman.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
package world.gregs.voidps.world.map

import world.gregs.voidps.engine.entity.character.mode.interact.Interact
import world.gregs.voidps.engine.entity.character.npc.npcOperate
import world.gregs.voidps.engine.entity.character.player.PlayerOption
import world.gregs.voidps.engine.entity.item.floor.FloorItems
import world.gregs.voidps.engine.inject
import world.gregs.voidps.engine.inv.add
import world.gregs.voidps.engine.inv.inventory
import world.gregs.voidps.type.random
import world.gregs.voidps.world.interact.dialogue.*
import world.gregs.voidps.world.interact.dialogue.type.choice
import world.gregs.voidps.world.interact.dialogue.type.npc
import world.gregs.voidps.world.interact.dialogue.type.player

val floorItems: FloorItems by inject()

npcOperate("Talk-to", "man", "woman") {
player<Happy>("Hello, how's it going?")
when (random.nextInt(0, 23)) {
0 -> {
npc<Neutral>("Not too bad, but I'm a little worried about the increase of goblins these days.")
player<Happy>("Don't worry, I'll kill them.")
}
1 -> {
npc<Neutral>("How can I help you?")
choice {
option<Neutral>("Do you wish to trade?") {
npc<Neutral>("No, I have nothing I wish to get rid of. If you want to do some trading, there are plenty of shops and market stalls around though.")
}
option<Happy>("I'm in search of a quest.") {
npc<Neutral>("I'm sorry I can't help you there.")
}
option<Neutral>("I'm in search of enemies to kill.") {
npc<Neutral>("I've heard there are many fearsome creatures that dwell under the ground...")
}
}
}
2 -> npc<Angry>("Get out of my way, I'm in a hurry!")
3 -> {
npc<Happy>("I'm fine, how are you?")
player<Happy>("Very well thank you.")
}
4 -> npc<Happy>("Hello there! Nice weather we've been having.")
5 -> npc<Happy>("I'm very well thank you.")
6 -> {
npc<Uncertain>("Who are you?")
player<Happy>("I'm a bold adventurer.")
npc<Happy>("Ah, a very noble profession.")
}
7 -> npc<Uncertain>("Do I know you? I'm in a hurry!")
8 -> npc<Neutral>("I think we need a new king. The one we've got isn't very good.")
9 -> npc<Happy>("Not too bad thanks.")
10 -> {
npc<Angry>("Are you asking for a fight?")
target.mode = Interact(target, player, PlayerOption(target, player, "Attack"))
}
11 -> npc<Neutral>("I'm busy right now.")
12 -> npc<Happy>("Hello.")
13 -> npc<Angry>("None of your business.")
14 -> {
player<Neutral>("Do you wish to trade?")
npc<Neutral>("No, I have nothing I wish to get rid of. If you want to do some trading, there are plenty of shops and market stalls around though.")
}
15 -> {
player<Happy>("I'm in search of a quest.")
npc<Neutral>("I'm sorry I can't help you there.")
}
16 -> {
player<Neutral>("I'm in search of enemies to kill.")
npc<Neutral>("I've heard there are many fearsome creatures that dwell under the ground...")
}
17 -> npc<Uncertain>("No I don't have any spare change.")
18 -> npc<Neutral>("I'm a little worried - I've heard there's lots of people going about, killing citizens at random.")
19 -> npc<Angry>("No, I don't want to buy anything!")
20 -> npc<Neutral>("That is classified information.")
21 -> {
npc<Happy>("Have this flyer...")
if (player.inventory.isFull()) {
floorItems.add(player.tile, "flier", disappearTicks = 300, owner = player)
} else {
player.inventory.add("flier")
}
}
22 -> npc<Happy>("Yo, wassup!")
}
}

















Loading

0 comments on commit e390164

Please sign in to comment.