Skip to content

Commit

Permalink
Gunnars ground quest (#436)
Browse files Browse the repository at this point in the history
* Fix asleep animation

* Fix human death animation

* Add weapon styles to npcs

* Fix knights sword animation ids

* Update Expression.kt with missing expressions

* Fix animation definition size calculation

* Fix message scroll interface scrollbar max script

---------

Co-authored-by: GregHib <[email protected]>
  • Loading branch information
jarryd229 and GregHib committed Feb 28, 2024
1 parent a628479 commit 8e9d403
Show file tree
Hide file tree
Showing 43 changed files with 2,975 additions and 110 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package world.gregs.voidps.cache.definition.decoder

import world.gregs.voidps.buffer.read.Reader
import world.gregs.voidps.cache.Cache
import world.gregs.voidps.cache.DefinitionDecoder
import world.gregs.voidps.cache.Index.ANIMATIONS
import world.gregs.voidps.cache.definition.data.AnimationDefinition
Expand All @@ -13,6 +14,10 @@ class AnimationDecoder : DefinitionDecoder<AnimationDefinition>(ANIMATIONS) {

override fun getArchive(id: Int) = id ushr 7

override fun size(cache: Cache): Int {
return cache.lastArchiveId(index) * 128 + (cache.fileCount(index, cache.lastArchiveId(index)))
}

override fun AnimationDefinition.read(opcode: Int, buffer: Reader) {
when (opcode) {
1 -> buffer.skip(buffer.readShort() * 6)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package world.gregs.voidps.cache.definition.decoder

import world.gregs.voidps.buffer.read.Reader
import world.gregs.voidps.cache.Cache
import world.gregs.voidps.cache.DefinitionDecoder
import world.gregs.voidps.cache.Index.ANIMATIONS
import world.gregs.voidps.cache.definition.data.AnimationDefinitionFull
Expand All @@ -13,6 +14,10 @@ class AnimationDecoderFull : DefinitionDecoder<AnimationDefinitionFull>(ANIMATIO

override fun getArchive(id: Int) = id ushr 7

override fun size(cache: Cache): Int {
return cache.lastArchiveId(index) * 128 + (cache.fileCount(index, cache.lastArchiveId(index)))
}

override fun AnimationDefinitionFull.read(opcode: Int, buffer: Reader) {
when (opcode) {
1 -> {
Expand Down
39 changes: 26 additions & 13 deletions data/definitions/animations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ expression_evil_grin2: 9799
expression_evil_grin3: 9800
expression_evil_grin4: 9801
expression_asleep: 9802
expression_asleep_old1: 600
expression_asleep_old2: 601
expression_asleep_old3: 602
expression_asleep_old4: 603
expression_talking1: 9803
expression_talking2: 9804
expression_talking3: 9805
Expand Down Expand Up @@ -129,7 +125,10 @@ expression_roll_eyes_old2: 563
expression_roll_eyes_old3: 564
expression_roll_eyes_old4: 565
expression_drunk: 9835
expression_drunk_old: 600
expression_drunk_old1: 600
expression_drunk_old2: 601
expression_drunk_old3: 602
expression_drunk_old4: 603
expression_suspicious1: 9836
expression_suspicious2: 9837
expression_suspicious3: 9838
Expand Down Expand Up @@ -158,10 +157,10 @@ expression_laugh1: 9851
expression_laugh2: 9852
expression_laugh3: 9853
expression_laugh4: 9854
expression_laugh_old1: 605
expression_laugh_old2: 606
expression_laugh_old3: 607
expression_laugh_old4: 608
expression_chuckle_old1: 605
expression_chuckle_old2: 606
expression_chuckle_old3: 607
expression_chuckle_old4: 608
expression_unamused1: 9855
expression_unamused2: 9856
expression_unamused3: 9857
Expand Down Expand Up @@ -1305,7 +1304,7 @@ rat_hit: 2706
giant_rat_attack: 14859
giant_rat_death: 14860
giant_rat_hit: 14861
player_death: 836
human_death: 836
sap: 12569
leech: 12575
deflect: 12573
Expand Down Expand Up @@ -1472,8 +1471,9 @@ delrith_appear: 4623
delrith_death: 4624
wally_demon_slay: 4603
silverlight_sword_case_open: 12630
silverlight_open_sword_case: 12629
silverlight_remove_sword: 12616
silverlight_unlock_sword_case: 12629
silverlight_open_sword_case: 12616
silverlight_remove_sword: 12628
silverlight_sword_removed: 12617
silverlight_hand_over: 12618
silverlight_take: 12615
Expand All @@ -1495,6 +1495,9 @@ unarmed_punch: 422
unarmed_kick: 423
unarmed_block: 422
unarmed_hit: 424
human_attack: 422
human_block: 422
human_hit: 424
staff_bash: 419
staff_pound: 419
staff_focus: 419
Expand Down Expand Up @@ -1625,4 +1628,14 @@ teleport_pharaohs_sceptre:
id: 9596
ticks: 3
fill_bucket: 895
altar_pray: 645
altar_pray: 645
engrave: 14736
hand_over_item: 14737
pocket_item: 14738
dororan_lean_on_door: 14725
player_lean_on_door_start: 6706
player_lean_on_door: 14724
player_calm_doroan: 6709
gunthor_announcement: 14734
kjell_cheer: 1531
haakon_cheer: 14739
6 changes: 6 additions & 0 deletions data/definitions/interfaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ inventory:
Option12: 17
Drag: 20
Option13: 21
message_scroll:
id: 156
type: wide_screen
components:
title: 5
line0: 7-106
slayer_rewards_assignment: 161
slayer_rewards_learn_old: 163
slayer_rewards: 164
Expand Down
106 changes: 106 additions & 0 deletions data/definitions/npcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ squire_asrol:
race: human
wander_radius: 4
examine: "Indentured servant of a Knight."
jeffery:
id: 637
wander_radius: 4
race: human
examine: "The man with the armour."
reldo:
id: 647
wander_radius: 4
Expand Down Expand Up @@ -595,6 +600,10 @@ banker_canifis:
interact_distance: 2
race: human
examine: "He can look after my money."
dororan:
id: 1168
race: dwarf
examine: "A dwarf in anguish."
yrsa:
id: 1301
race: human
Expand Down Expand Up @@ -674,6 +683,19 @@ quiz_master:
interact_distance: 4
race: human
examine: "Apparently a master of quizzes!"
dororan_after_cutscene:
id: 2646
dororan_after_cutscene2:
id: 2647
examine: "A dwarf on top of the world."
dororan_after_quest:
&dororan_after_quest
id: 2648
race: dwarf
examine: "A dwarf on top of the world."
dororan_after_quest2:
<<: *dororan_after_quest
id: 2651
reldo_normal:
id: 2661
race: human
Expand Down Expand Up @@ -709,6 +731,58 @@ ellis:
id: 2824
race: human
examine: "Manufacturer of fine leathers."
dororan_cutscene:
id: 2863
examine: "A dwarf in suspense."
gudrun:
&gudrun
id: 2864
wander_radius: 4
race: human
examine: "The chieftain's daughter."
gudrun2:
<<: *gudrun
id: 2865
gudrun_after_cutscene:
<<: *gudrun
id: 2866
gudrun_after_cutscene2:
<<: *gudrun
id: 2867
gudrun_after_quest:
<<: *gudrun
id: 2869
gudrun_after_quest2:
<<: *gudrun
id: 2870
gudrun_cutscene:
<<: *gudrun
id: 2871
kjell:
&kjell
id: 2872
race: human
examine: "A barbarian guard."
kjell_sword:
<<: *kjell
id: 2873
kjell_guitar:
<<: *kjell
id: 2874
kjell_cutscene:
id: 2875
examine: "A barbarian guard."
chieftain_gunthor:
&chieftain_gunthor
id: 2876
race: human
examine: "A heavily built barbarian with an air of power and authority."
chieftain_gunthor_icon:
<<: *chieftain_gunthor
id: 2877
chieftain_gunthort_no_icon:
<<: *chieftain_gunthor
id: 2878
rat_ratcatchers:
id: 2974
wander_radius: 4
Expand All @@ -731,6 +805,28 @@ rat_ratcatchers_7:
id: 2980
wander_radius: 4
examine: "A popular dwarven delicacy."
chieftain_gunthor_cutscene:
id: 3089
examine: "A heavily built barbarian with an air of power and authority."
haakon_the_champion:
id: 3090
hitpoints: 360
att: 22
str: 22
def: 25
mage: 240
attack_bonus: 8
max_hit_melee: 42
immune_poison: true
wander_radius: 4
respawn_delay: 75
weapon_style: 2h
style: crush
race: human
examine: "A mighty warrior, Haakon is powerfully concerned for his tribe."
haakon_the_champion_cutscene:
id: 3091
examine: "A mighty warrior, Haakon is powerfully concerned for his tribe."
prison_pete:
id: 3118
examine: "He wants to escape!"
Expand Down Expand Up @@ -767,6 +863,11 @@ frog_9_frogland:
cow_zanaris:
<<: *cow
id: 3309
jeffery3:
id: 3323
wander_radius: 4
race: human
examine: "The man with the armour."
tarquin:
id: 3328
examine: "A dandy canoe man."
Expand Down Expand Up @@ -1109,6 +1210,11 @@ fishing_spot_crayfish_lumbridge:
none:
- raw_crayfish
examine: "It looks like there might be fish swimming in the water."
jeffery2:
id: 6298
wander_radius: 4
race: human
examine: "The man with the armour."
pikkupstix:
id: 6970
race: human
Expand Down
3 changes: 2 additions & 1 deletion data/definitions/render-emotes.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
human_stand: 1426
human_stand: 1426
dororan_stand: 1880
3 changes: 2 additions & 1 deletion data/definitions/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ trade_warning: 143
int_entry: 108
string_entry: 109
dialogue_item_zoom: 3449
items_kept_on_death: 118
items_kept_on_death: 118
message_scroll_max: 677
9 changes: 9 additions & 0 deletions data/definitions/variables-custom.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
dororan_ruby_bracelet:
format: boolean
persist: true
dororan_dragonstone_necklace:
format: boolean
persist: true
dororan_onyx_amulet:
format: boolean
persist: true
demon_slayer_bones:
format: int
persist: true
Expand Down
66 changes: 66 additions & 0 deletions data/definitions/variables-player-bit.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
gunnars_ground:
id: 5730
persist: true
format: map
default: unstarted
values:
unstarted: 0
started: 1
love_poem: 2
jeffery_ring: 3
engrave: 4
engraved_ring: 5
show_gudrun: 6
meet_chieftain: 7
tell_gudrun: 8
tell_dororan: 9
write_poem: 10
more_poem: 11
one_more_poem: 12
poem_done: 13
poem: 14
recital: 15
gunnars_ground: 16
completed: 100
kjell:
id: 5819
persist: true
format: list
default: sword
values: [ sword, guitar ]
dororan:
id: 5820
persist: true
format: list
default: shown
values: [ shown, hidden ]
gudrun:
id: 6664
persist: true
format: list
default: shown
values: [ shown, hidden ]
dororan_after_quest:
id: 6665
persist: true
format: list
default: hidden
values: [ hidden, shown ]
gudrun_after_quest:
id: 6666
persist: true
format: list
default: hidden
values: [ hidden, shown ]
dororan_after_cutscene:
id: 8242
persist: true
format: list
default: hidden
values: [ hidden, shown ]
gudrun_after_cutscene:
id: 8243
persist: true
format: list
default: hidden
values: [ hidden, shown ]
demon_slayer:
id: 2561
persist: true
Expand Down
2 changes: 1 addition & 1 deletion data/definitions/variables-player.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ quest_points_total:
format: map
default: total
values:
total: 7
total: 12
cooks_assistant:
id: 29
persist: true
Expand Down
Loading

0 comments on commit 8e9d403

Please sign in to comment.