diff --git a/data/definitions/animations.yml b/data/definitions/animations.yml index 0e972bf3c..371dbd3f0 100644 --- a/data/definitions/animations.yml +++ b/data/definitions/animations.yml @@ -1647,4 +1647,24 @@ gunthor_announcement: 14734 kjell_cheer: 1531 haakon_cheer: 14739 mixing_potion: 363 -pestle_and_mortar: 5249 \ No newline at end of file +pestle_and_mortar: 5249 +fletching_log: 1248 +fletching_string_normal_shortbow: 6678 +fletching_string_normal_longbow: 6684 +fletching_string_oak_shortbow: 6679 +fletching_string_oak_longbow: 6685 +fletching_string_willow_shortbow: 6680 +fletching_string_willow_longbow: 6686 +fletching_string_maple_shortbow: 6681 +fletching_string_maple_longbow: 6687 +fletching_string_yew_shortbow: 6682 +fletching_string_yew_longbow: 6688 +fletching_string_magic_shortbow: 6683 +fletching_string_magic_longbow: 6689 +fletching_string_bronze_crossbow: 6671 +fletching_string_blurite_crossbow: 6672 +fletching_string_iron_crossbow: 6673 +fletching_string_steel_crossbow: 6674 +fletching_string_mithril_crossbow: 6675 +fletching_string_adamant_crossbow: 6676 +fletching_string_rune_crossbow: 6677 diff --git a/data/definitions/item-on-item.yml b/data/definitions/item-on-item.yml index a8e7c8abb..54aec56ce 100644 --- a/data/definitions/item-on-item.yml +++ b/data/definitions/item-on-item.yml @@ -5416,4 +5416,794 @@ crushed_gem: remove: [ uncut_opal ] add: [ crushed_gem ] animation: pestle_and_mortar - message: "You crush the uncut opal." \ No newline at end of file + message: "You crush the uncut opal." +#fletching bolt tipping +opal_bronze_bolts: + skill: fletching + level: 11 + xp: 16.0 + remove: + - item: bronze_bolts + amount: 10 + - item: opal_bolt_tips + amount: 10 + add: + - item: opal_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +jade_blurite_bolts: + skill: fletching + level: 11 + xp: 24.0 + remove: + - item: blurite_bolts + amount: 10 + - item: jade_bolt_tips + amount: 10 + add: + - item: jade_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +pearl_iron_bolts: + skill: fletching + level: 39 + xp: 32.0 + ticks: 2 + remove: + - item: iron_bolts + amount: 10 + - item: pearl_bolt_tips + amount: 10 + add: + - item: pearl_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +red_topaz_steel_bolts: + skill: fletching + level: 48 + xp: 39.0 + ticks: 2 + remove: + - item: steel_bolts + amount: 10 + - item: topaz_bolt_tips + amount: 10 + add: + - item: topaz_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +sapphire_mithril_bolts: + skill: fletching + level: 56 + xp: 47.0 + ticks: 0 + remove: + - item: mithril_bolts + amount: 10 + - item: sapphire_bolt_tips + amount: 10 + add: + - item: sapphire_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +emerald_mithril_bolts: + skill: fletching + level: 58 + xp: 55.0 + ticks: 2 + remove: + - item: mithril_bolts + amount: 10 + - item: emerald_bolt_tips + amount: 10 + add: + - item: emerald_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +ruby_adamant_bolts: + skill: fletching + level: 63 + xp: 63.0 + ticks: 2 + remove: + - item: adamant_bolts + amount: 10 + - item: ruby_bolt_tips + amount: 10 + add: + - item: ruby_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +diamond_adamant_bolts: + skill: fletching + level: 65 + xp: 70.0 + ticks: 2 + remove: + - item: adamant_bolts + amount: 10 + - item: diamond_bolt_tips + amount: 10 + add: + - item: diamond_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +dragonstone_runite_bolts: + skill: fletching + level: 71 + xp: 82.0 + ticks: 2 + remove: + - item: runite_bolts + amount: 10 + - item: dragon_bolt_tips + amount: 10 + add: + - item: dragon_bolts + amount: 10 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +kebbit_bolts: + skill: fletching + level: 32 + xp: 5.8 + ticks: 3 + requires: [ chisel ] + remove: + - item: kebbit_spike + amount: 1 + add: + - item: kebbit_bolts + amount: 12 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +long_kebbit_bolts: + skill: fletching + level: 42 + xp: 7.9 + ticks: 3 + requires: [ chisel ] + remove: + - item: long_kebbit_spike + amount: 1 + add: + - item: long_kebbit_bolts + amount: 12 + message: "You fletch 10 bolts." + question: "How many set of 10 would you like to tip?" + maximum: 10 +mithril_grapple_bolt_unf: + skill: fletching + level: 59 + xp: 11.0 + ticks: 2 + remove: + - item: mithril_grapple_tip + - item: mithril_bolts + add: + - item: mithril_grapple_unf + message: "You fletch an unfinished mithril grapple." + question: "How many set of 10 would you like to tip?" + maximum: 10 +mithril_grapple_bolt_finished: + skill: fletching + level: 59 + xp: 0.0 + ticks: 1 + remove: + - item: mithril_grapple_unf + - item: rope + add: + - item: mithril_grapple + message: "You fletch a mithril grapple." + question: "How many set of 10 would you like to tip?" + maximum: 10 +# tipping headless arrows +bronze_arrows: + skill: fletching + level: 1 + xp: 19.5 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: bronze_arrowtips + amount: 15 + add: + - item: bronze_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +iron_arrows: + skill: fletching + level: 15 + xp: 37.5 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: iron_arrowtips + amount: 15 + add: + - item: iron_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +steel_arrows: + skill: fletching + level: 30 + xp: 75.0 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: steel_arrowtips + amount: 15 + add: + - item: steel_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +mithril_arrows: + skill: fletching + level: 45 + xp: 112.5 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: mithril_arrowtips + amount: 15 + add: + - item: mithril_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +adamant_arrows: + skill: fletching + level: 60 + xp: 150 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: adamant_arrowtips + amount: 15 + add: + - item: adamant_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +rune_arrows: + skill: fletching + level: 75 + xp: 187.5 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: rune_arrowtips + amount: 15 + add: + - item: rune_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +dragon_arrows: + skill: fletching + level: 90 + xp: 225.0 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: dragon_arrowtips + amount: 15 + add: + - item: dragon_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +#fletch tipping special arrows +ogre_arrow: + skill: fletching + level: 5 + xp: 6.0 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: wolfbone_arrowtips + amount: 6 + add: + - item: ogre_arrow + amount: 6 + message: "You attach arrows heads to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +bronze_ogre_arrow: + skill: fletching + level: 7 + xp: 8.4 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: bronze_nails + amount: 6 + add: + - item: bronze_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +iron_ogre_arrow: + skill: fletching + level: 18 + xp: 15.6 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: iron_nails + amount: 6 + add: + - item: iron_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +steel_ogre_arrow: + skill: fletching + level: 33 + xp: 30.6 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: steel_nails + amount: 6 + add: + - item: steel_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +black_ogre_arrow: + skill: fletching + level: 38 + xp: 39.0 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: black_nails + amount: 6 + add: + - item: black_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +mithril_ogre_arrow: + skill: fletching + level: 49 + xp: 45.0 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: mithril_nails + amount: 6 + add: + - item: mithril_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +adamant_ogre_arrow: + skill: fletching + level: 62 + xp: 61.2 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: adamant_nails + amount: 6 + add: + - item: adamant_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +rune_ogre_arrow: + skill: fletching + level: 77 + xp: 75.0 + ticks: 2 + remove: + - item: flighted_ogre_arrow + amount: 6 + - item: rune_nails + amount: 6 + add: + - item: rune_brutal + amount: 6 + message: "You attach the nails to 6 arrow shafts." + question: "How many set of 6 would you like to make?" + maximum: 10 +broad_arrows: + skill: fletching + level: 52 + xp: 150.0 + ticks: 2 + remove: + - item: headless_arrow + amount: 15 + - item: broad_arrow_heads + amount: 15 + add: + - item: broad_arrow + amount: 15 + message: "You attach arrows heads to 15 arrow shafts." + question: "How many set of 15 would you like to make?" + maximum: 10 +unstrung_ogre_comp_bow: + skill: fletching + level: 30 + xp: 45.0 + ticks: 3 + requires: [ knife ] + remove: + - item: achey_tree_logs + - item: wolf_bones + add: + - item: unstrung_comp_bow + message: "You carefully cut the wood and add the bones." + question: "What would you like to fletch?" + animation: fletching_bow_log +# fletching finished bows +shortbow_finished: + skill: fletching + level: 5 + xp: 5.0 + ticks: 2 + remove: + - item: bowstring + - item: shortbow_u + add: + - item: shortbow + message: "You add a string to the bow." + animation: fletching_string_normal_shortbow +longbow_finished: + skill: fletching + level: 10 + xp: 10.0 + ticks: 2 + remove: + - item: bowstring + - item: longbow_u + add: + - item: longbow + message: "You add a string to the bow." + animation: fletching_string_normal_longbow +oak_shortbow_finished: + skill: fletching + level: 20 + xp: 16.5 + ticks: 2 + remove: + - item: bowstring + - item: oak_shortbow_u + add: + - item: oak_shortbow + message: "You add a string to the bow." + animation: fletching_string_oak_shortbow +oak_longbow_finished: + skill: fletching + level: 25 + xp: 25.0 + ticks: 2 + remove: + - item: bowstring + - item: oak_longbow_u + add: + - item: oak_longbow + message: "You add a string to the bow." + animation: fletching_string_oak_longbow +ogre_comp_finished: + skill: fletching + level: 30 + xp: 45.0 + ticks: 2 + remove: + - item: bowstring + - item: unstrung_comp_bow + add: + - item: comp_ogre_bow + message: "You add a string to the bow." +willow_shortbow_finished: + skill: fletching + level: 35 + xp: 33.2 + ticks: 2 + remove: + - item: bowstring + - item: willow_shortbow_u + add: + - item: willow_shortbow + message: "You add a string to the bow." + animation: fletching_string_willow_shortbow +willow_longbow_finished: + skill: fletching + level: 40 + xp: 41.5 + ticks: 2 + remove: + - item: bowstring + - item: willow_longbow_u + add: + - item: willow_longbow + message: "You add a string to the bow." + animation: fletching_string_willow_longbow +maple_shortbow_finished: + skill: fletching + level: 50 + xp: 50.0 + ticks: 2 + remove: + - item: bowstring + - item: maple_shortbow_u + add: + - item: maple_shortbow + message: "You add a string to the bow." + animation: fletching_string_maple_shortbow +maple_longbow_finished: + skill: fletching + level: 55 + xp: 58.2 + ticks: 2 + remove: + - item: bowstring + - item: maple_longbow_u + add: + - item: maple_longbow + message: "You add a string to the bow." + animation: fletching_string_maple_longbow +yew_shortbow_finished: + skill: fletching + level: 65 + xp: 67.4 + ticks: 2 + remove: + - item: bowstring + - item: yew_shortbow_u + add: + - item: yew_shortbow + message: "You add a string to the bow." + animation: fletching_string_yew_shortbow +yew_longbow_finished: + skill: fletching + level: 70 + xp: 75.0 + ticks: 2 + remove: + - item: bowstring + - item: yew_longbow_u + add: + - item: yew_longbow + message: "You add a string to the bow." + animation: fletching_string_yew_longbow +magic_shortbow_finished: + skill: fletching + level: 80 + xp: 83.2 + ticks: 2 + remove: + - item: bowstring + - item: magic_shortbow_u + add: + - item: magic_shortbow + message: "You add a string to the bow." + animation: fletching_string_magic_shortbow +magic_longbow_finished: + skill: fletching + level: 85 + xp: 91.5 + ticks: 2 + remove: + - item: bowstring + - item: magic_longbow_u + add: + - item: magic_longbow + message: "You add a string to the bow." + animation: fletching_string_magic_longbow +#fletching crossbow unfinished +bronze_crossbow_unfinished: + skill: fletching + level: 9 + xp: 12.0 + ticks: 2 + remove: + - item: wooden_stock + - item: bronze_limbs + add: + - item: bronze_crossbow_u + message: "You add a limbs to the stock." +blurite_crossbow_unfinished: + skill: fletching + level: 24 + xp: 32.0 + ticks: 2 + remove: + - item: oak_stock + - item: blurite_limbs + add: + - item: blurite_crossbow_u + message: "You add a limbs to the stock." +iron_crossbow_unfinished: + skill: fletching + level: 24 + xp: 32.0 + ticks: 2 + remove: + - item: willow_stock + - item: iron_limbs + add: + - item: iron_crossbow_u + message: "You add a limbs to the stock." +steel_crossbow_unfinished: + skill: fletching + level: 46 + xp: 54.0 + ticks: 2 + remove: + - item: teak_stock + - item: steel_limbs + add: + - item: steel_crossbow_u + message: "You add a limbs to the stock." +mithril_crossbow_unfinished: + skill: fletching + level: 54 + xp: 64.0 + ticks: 2 + remove: + - item: maple_stock + - item: mithril_limbs + add: + - item: mithril_crossbow_u + message: "You add a limbs to the stock." +adamant_crossbow_unfinished: + skill: fletching + level: 61 + xp: 82.0 + ticks: 2 + remove: + - item: mahogany_stock + - item: adamant_limbs + add: + - item: adamant_crossbow_u + message: "You add a limbs to the stock." +rune_crossbow_unfinished: + skill: fletching + level: 69 + xp: 100.0 + ticks: 2 + remove: + - item: yew_stock + - item: rune_limbs + add: + - item: rune_crossbow_u + message: "You add a limbs to the stock." +#fletching crossbow finished +bronze_crossbow_finished: + skill: fletching + level: 9 + xp: 6.0 + ticks: 2 + remove: + - item: bronze_crossbow_u + - item: crossbow_string + add: + - item: bronze_crossbow + message: "You add a string to the stock." + animation: fletching_string_bronze_crossbow +blurite_crossbow_finished: + skill: fletching + level: 24 + xp: 16.0 + ticks: 2 + remove: + - item: blurite_crossbow_u + - item: crossbow_string + add: + - item: blurite_crossbow + message: "You add a string to the stock." + animation: fletching_string_blurite_crossbow +iron_crossbow_finished: + skill: fletching + level: 39 + xp: 22.0 + ticks: 2 + remove: + - item: iron_crossbow_u + - item: crossbow_string + add: + - item: iron_crossbow + message: "You add a string to the stock." + animation: fletching_string_iron_crossbow +steel_crossbow_finished: + skill: fletching + level: 46 + xp: 27.0 + ticks: 2 + remove: + - item: steel_crossbow_u + - item: crossbow_string + add: + - item: steel_crossbow + message: "You add a string to the stock." + animation: fletching_string_steel_crossbow +mithril_crossbow_finished: + skill: fletching + level: 54 + xp: 32.0 + ticks: 2 + remove: + - item: mithril_crossbow_u + - item: crossbow_string + add: + - item: mithril_crossbow + message: "You add a string to the stock." + animation: fletching_string_mithril_crossbow +adamant_crossbow_finished: + skill: fletching + level: 61 + xp: 41.0 + ticks: 2 + remove: + - item: adamant_crossbow_u + - item: crossbow_string + add: + - item: adamant_crossbow + message: "You add a string to the stock." + animation: fletching_string_adamant_crossbow +rune_crossbow_finished: + skill: fletching + level: 69 + xp: 41.0 + ticks: 2 + remove: + - item: rune_crossbow_u + - item: crossbow_string + add: + - item: rune_crossbow + message: "You add a string to the stock." + animation: fletching_string_rune_crossbow \ No newline at end of file diff --git a/data/definitions/items.yml b/data/definitions/items.yml index e7af4ef56..136fc299d 100644 --- a/data/definitions/items.yml +++ b/data/definitions/items.yml @@ -290,6 +290,12 @@ longbow_u: price: 10 limit: 10000 weight: 1.332 + fletching_unf: + level: 10 + xp: 10.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung longbow; I need a bowstring for this." kept: "Wilderness" longbow_u_noted: 49 @@ -298,6 +304,12 @@ shortbow_u: price: 2 limit: 10000 weight: 0.992 + fletching_unf: + level: 5 + xp: 5.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "I need to find a string for this." kept: "Wilderness" shortbow_u_noted: 51 @@ -305,6 +317,12 @@ arrow_shaft: id: 52 price: 4 limit: 20000 + fletching_unf: + level: 1 + xp: 5.0 + animation: "fletching_bow_log" + make_amount: 15 + tick: 2 examine: "A wooden arrow shaft." kept: "Wilderness" headless_arrow: @@ -318,6 +336,12 @@ oak_shortbow_u: price: 6 limit: 10000 weight: 0.992 + fletching_unf: + level: 20 + xp: 16.5 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung oak shortbow; I need a bowstring for this." kept: "Wilderness" oak_shortbow_u_noted: 55 @@ -326,6 +350,12 @@ oak_longbow_u: price: 13 limit: 10000 weight: 1.332 + fletching_unf: + level: 25 + xp: 25.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung oak longbow; I need a bowstring for this." oak_longbow_u_noted: 57 willow_longbow_u: @@ -333,6 +363,12 @@ willow_longbow_u: price: 33 limit: 10000 weight: 1.332 + fletching_unf: + level: 40 + xp: 41.5 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung willow longbow; I need a bowstring for this." willow_longbow_u_noted: 59 willow_shortbow_u: @@ -340,6 +376,12 @@ willow_shortbow_u: price: 13 limit: 10000 weight: 0.992 + fletching_unf: + level: 35 + xp: 33.3 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung willow shortbow; I need a bowstring for this." willow_shortbow_u_noted: 61 maple_longbow_u: @@ -347,6 +389,12 @@ maple_longbow_u: price: 89 limit: 10000 weight: 1.332 + fletching_unf: + level: 55 + xp: 58.3 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung maple bow; I need a bowstring for this." maple_longbow_u_noted: 63 maple_shortbow_u: @@ -354,6 +402,12 @@ maple_shortbow_u: price: 47 limit: 10000 weight: 0.992 + fletching_unf: + level: 50 + xp: 50.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung maple shortbow; I need a bowstring for this." maple_shortbow_u_noted: 65 yew_longbow_u: @@ -361,6 +415,12 @@ yew_longbow_u: price: 410 limit: 10000 weight: 1.332 + fletching_unf: + level: 70 + xp: 75.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung yew longbow; I need a bowstring for this." yew_longbow_u_noted: 67 yew_shortbow_u: @@ -368,6 +428,12 @@ yew_shortbow_u: price: 143 limit: 10000 weight: 0.992 + fletching_unf: + level: 65 + xp: 67.5 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung yew shortbow; I need a bowstring for this." yew_shortbow_u_noted: 69 magic_longbow_u: @@ -375,6 +441,12 @@ magic_longbow_u: price: 1246 limit: 10000 weight: 1.332 + fletching_unf: + level: 85 + xp: 91.5 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung magic longbow; I need a bowstring for this." magic_longbow_u_noted: 71 magic_shortbow_u: @@ -382,6 +454,12 @@ magic_shortbow_u: price: 673 limit: 10000 weight: 0.992 + fletching_unf: + level: 80 + xp: 83.3 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "An unstrung magic shortbow; I need a bowstring for this." magic_shortbow_u_noted: 73 khazard_helmet: @@ -4304,6 +4382,9 @@ bronze_dart_tip: smithing: level: 4 xp: 12.5 + fletch_dart: + level: 1 + xp: 1.8 examine: "A deadly looking dart tip made of bronze - needs feathers for flight." iron_dart_tip: id: 820 @@ -4312,6 +4393,9 @@ iron_dart_tip: smithing: level: 19 xp: 25.0 + fletch_dart: + level: 22 + xp: 3.8 examine: "A deadly looking dart tip made of iron - needs feathers for flight." steel_dart_tip: id: 821 @@ -4320,6 +4404,9 @@ steel_dart_tip: smithing: level: 34 xp: 37.5 + fletch_dart: + level: 37 + xp: 7.5 examine: "A deadly-looking dart tip made of steel - needs feathers for flight." mithril_dart_tip: id: 822 @@ -4328,6 +4415,9 @@ mithril_dart_tip: smithing: level: 54 xp: 50.0 + fletch_dart: + level: 52 + xp: 11.2 examine: "A deadly looking dart tip made of mithril - needs feathers for flight." adamant_dart_tip: id: 823 @@ -4336,6 +4426,9 @@ adamant_dart_tip: smithing: level: 74 xp: 62.5 + fletch_dart: + level: 67 + xp: 15.0 examine: "A deadly-looking dart tip made of adamant - needs feathers for flight." rune_dart_tip: id: 824 @@ -4344,6 +4437,9 @@ rune_dart_tip: smithing: level: 89 xp: 75.0 + fletch_dart: + level: 81 + xp: 18.8 examine: "A deadly-looking dart tip made of runite - needs feathers for flight." bronze_javelin: id: 825 @@ -7836,6 +7932,7 @@ logs: price: 30 limit: 25000 weight: 2.0 + fletchables: [ arrow_shaft, shortbow_u, longbow_u, wooden_stock ] firemaking: level: 1 xp: 40.0 @@ -7848,6 +7945,7 @@ magic_logs: price: 1323 limit: 25000 weight: 2.0 + fletchables: [ arrow_shaft, magic_shortbow_u, magic_longbow_u ] firemaking: level: 75 xp: 303.8 @@ -7860,6 +7958,7 @@ yew_logs: price: 410 limit: 25000 weight: 2.0 + fletchables: [ arrow_shaft, yew_shortbow_u, yew_longbow_u, yew_stock ] firemaking: level: 60 xp: 202.5 @@ -7872,6 +7971,7 @@ maple_logs: price: 51 limit: 25000 weight: 2.0 + fletchables: [ arrow_shaft, maple_shortbow_u, maple_longbow_u, maple_stock ] firemaking: level: 45 xp: 135.0 @@ -7884,6 +7984,7 @@ willow_logs: price: 16 limit: 25000 weight: 2.0 + fletchables: [ arrow_shaft, willow_shortbow_u, willow_ongbow_u, willow_stock ] firemaking: level: 30 xp: 90.0 @@ -7896,6 +7997,7 @@ oak_logs: price: 29 limit: 25000 weight: 2.0 + fletchables: [ arrow_shaft, oak_shortbow_u, oak_longbow_u, oak_stock ] firemaking: level: 15 xp: 60.0 @@ -27554,6 +27656,7 @@ mahogany_logs: price: 512 limit: 25000 weight: 1.36 + fletchables: [ arrow_shaft, mahogany_stock ] firemaking: level: 50 xp: 157.5 @@ -27564,6 +27667,7 @@ teak_logs: price: 88 limit: 25000 weight: 1.36 + fletchables: [ arrow_shaft, teak_stock ] firemaking: level: 35 xp: 105.0 @@ -39378,10 +39482,16 @@ bronze_bolts_unf: smithing: level: 3 xp: 12.5 + fletch_bolts: + level: 9 + xp: 0.5 examine: "Unfeathered bronze crossbow bolts." blurite_bolts_unf: id: 9376 tradeable: false + fletch_bolts: + level: 24 + xp: 1.0 examine: "Unfeathered blurite crossbow bolts." kept: "Reclaim" iron_bolts_unf: @@ -39391,6 +39501,9 @@ iron_bolts_unf: smithing: level: 18 xp: 25.0 + fletch_bolts: + level: 39 + xp: 1.5 examine: "Unfeathered iron crossbow bolts." steel_bolts_unf: id: 9378 @@ -39399,6 +39512,9 @@ steel_bolts_unf: smithing: level: 33 xp: 37.5 + fletch_bolts: + level: 46 + xp: 3.5 examine: "Unfeathered steel crossbow bolts." mithril_bolts_unf: id: 9379 @@ -39407,6 +39523,9 @@ mithril_bolts_unf: smithing: level: 53 xp: 50.0 + fletch_bolts: + level: 54 + xp: 5.0 examine: "Unfeathered mithril crossbow bolts." adamant_bolts_unf: id: 9380 @@ -39415,6 +39534,9 @@ adamant_bolts_unf: smithing: level: 73 xp: 62.5 + fletch_bolts: + level: 61 + xp: 7.0 examine: "Unfeathered adamantite crossbow bolts." rune_bolts_unf: id: 9381 @@ -39423,11 +39545,17 @@ rune_bolts_unf: smithing: level: 88 xp: 75.0 + fletch_bolts: + level: 69 + xp: 10.0 examine: "Unfeathered runite crossbow bolts." silver_bolts_unf: id: 9382 price: 1 limit: 10000 + fletch_bolts: + level: 43 + xp: 2.5 examine: "Unfeathered silver crossbow bolts." grapple: id: 9415 @@ -39581,6 +39709,12 @@ wooden_stock: limit: 1000 weight: 3.0 slot: "Weapon" + fletching_unf: + level: 9 + xp: 6.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 examine: "A wooden crossbow stock." wooden_stock_noted: 9441 oak_stock: @@ -39588,6 +39722,12 @@ oak_stock: price: 1 limit: 1000 weight: 3.0 + fletching_unf: + level: 24 + xp: 16.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 slot: "Weapon" examine: "An oak crossbow stock." oak_stock_noted: 9443 @@ -39596,6 +39736,12 @@ willow_stock: price: 2 limit: 1000 weight: 3.0 + fletching_unf: + level: 39 + xp: 22.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 slot: "Weapon" examine: "A willow crossbow stock." willow_stock_noted: 9445 @@ -39604,6 +39750,12 @@ teak_stock: price: 8 limit: 1000 weight: 3.0 + fletching_unf: + level: 46 + xp: 27.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 slot: "Weapon" examine: "A teak crossbow stock." teak_stock_noted: 9447 @@ -39612,6 +39764,12 @@ maple_stock: price: 12 limit: 1000 weight: 3.0 + fletching_unf: + level: 54 + xp: 32.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 slot: "Weapon" examine: "A maple crossbow stock." maple_stock_noted: 9449 @@ -39620,6 +39778,12 @@ mahogany_stock: price: 29 limit: 1000 weight: 3.0 + fletching_unf: + level: 61 + xp: 41.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 slot: "Weapon" examine: "A mahogany crossbow stock." mahogany_stock_noted: 9451 @@ -39628,6 +39792,12 @@ yew_stock: price: 36 limit: 1000 weight: 3.0 + fletching_unf: + level: 69 + xp: 50.0 + animation: "fletching_bow_log" + make_amount: 1 + tick: 3 slot: "Weapon" examine: "A yew crossbow stock." yew_stock_noted: 9453 @@ -39672,13 +39842,13 @@ adamant_crossbow_u: weight: 8.0 examine: "An unstrung adamantite crossbow." adamant_cbow_u_noted: 9464 -runite_crossbow_u: +rune_crossbow_u: id: 9465 price: 9552 limit: 500 weight: 8.0 examine: "An unstrung runite crossbow." -runite_cbow_u_noted: 9466 +rune_crossbow_u_noted: 9466 blurite_bar: id: 9467 tradeable: false @@ -48233,6 +48403,9 @@ dragon_dart_tip: id: 11232 price: 622 limit: 1000 + fletch_dart: + level: 95 + xp: 25.0 examine: "A deadly looking dragon dart tip - needs feathers for flight." dragon_dart_p+: id: 11233 diff --git a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemDefinitions.kt b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemDefinitions.kt index 594f06e29..9d4c2b215 100644 --- a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemDefinitions.kt +++ b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemDefinitions.kt @@ -113,6 +113,9 @@ class ItemDefinitions( "runecrafting" -> Rune(value as Map) "ammo" -> ObjectOpenHashSet(value as List) "cleaning" -> Cleaning(value as Map) + "fletch_dart" -> FletchDarts(value as Map) + "fletch_bolts" -> FletchBolts(value as Map) + "fletching_unf" -> Fletching(value as Map) "skill_req" -> (value as MutableMap).mapKeys { Skill.valueOf(it.key.toSentenceCase()) } else -> value }, indent, parentMap) diff --git a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemOnItemDefinitions.kt b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemOnItemDefinitions.kt index 6f0fa4450..992930f58 100644 --- a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemOnItemDefinitions.kt +++ b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/ItemOnItemDefinitions.kt @@ -1,5 +1,6 @@ package world.gregs.voidps.engine.data.definition +import com.github.michaelbull.logging.InlineLogger import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap import it.unimi.dsi.fastutil.objects.ObjectArrayList import net.pearx.kasechange.toSentenceCase @@ -24,14 +25,18 @@ class ItemOnItemDefinitions { fun contains(one: Item, two: Item) = definitions.containsKey(id(one, two)) || definitions.containsKey(id(two, one)) @Suppress("UNCHECKED_CAST") - fun load(yaml: Yaml = get(), path: String = getProperty("itemOnItemDefinitionsPath")): ItemOnItemDefinitions { + fun load(yaml: Yaml = get(), path: String = getProperty("itemOnItemDefinitionsPath"), itemDefinitions: ItemDefinitions = get()): ItemOnItemDefinitions { timedLoad("item on item definition") { val definitions = Object2ObjectOpenHashMap>() var count = 0 val config = object : DefinitionIdsConfig() { override fun add(list: MutableList, value: Any, parentMap: String?) { super.add(list, if (value is Map<*, *>) { - Item(value["item"] as String, value["amount"] as? Int ?: 1) + val id = value["item"] as String + if (itemDefinitions != null && !itemDefinitions.contains(id)) { + logger.warn { "Invalid item id: $id" } + } + Item(id, value["amount"] as? Int ?: 1) } else { Item(value as String, amount = 1) }, parentMap) @@ -73,6 +78,7 @@ class ItemOnItemDefinitions { } companion object { + private val logger = InlineLogger() private fun id(one: Item, two: Item): String = "${one.id}&${two.id}" } diff --git a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/FletchBolts.kt b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/FletchBolts.kt new file mode 100644 index 000000000..54d2f0863 --- /dev/null +++ b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/FletchBolts.kt @@ -0,0 +1,20 @@ +package world.gregs.voidps.engine.data.definition.data + +/** + * @param level required to make bolt + * @param xp experience per bolt made + */ +data class FletchBolts( + val level: Int = 1, + val xp: Double = 0.0 +) { + companion object { + + operator fun invoke(map: Map) = FletchBolts( + level = map["level"] as? Int ?: EMPTY.level, + xp = map["xp"] as? Double ?: EMPTY.xp, + ) + + val EMPTY = FletchBolts() + } +} \ No newline at end of file diff --git a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/FletchDarts.kt b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/FletchDarts.kt new file mode 100644 index 000000000..7afb99010 --- /dev/null +++ b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/FletchDarts.kt @@ -0,0 +1,20 @@ +package world.gregs.voidps.engine.data.definition.data + +/** + * @param level required to make dart + * @param xp experience per dart made + */ +data class FletchDarts( + val level: Int = 1, + val xp: Double = 0.0 +) { + companion object { + + operator fun invoke(map: Map) = FletchDarts( + level = map["level"] as? Int ?: EMPTY.level, + xp = map["xp"] as? Double ?: EMPTY.xp, + ) + + val EMPTY = FletchDarts() + } +} \ No newline at end of file diff --git a/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/Fletching.kt b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/Fletching.kt new file mode 100644 index 000000000..1ca9a8d64 --- /dev/null +++ b/engine/src/main/kotlin/world/gregs/voidps/engine/data/definition/data/Fletching.kt @@ -0,0 +1,29 @@ +package world.gregs.voidps.engine.data.definition.data + +/** + * @param level required to make item + * @param xp experience per item + * @param animation the animation the player will perform will fletching item + * @param makeAmount the amount of items fletched from a log + * @param tick the amount of ticks for fletching an item + */ +data class Fletching( + val level: Int = 1, + val xp: Double = 0.0, + val animation: String = "", + val makeAmount: Int = 1, + val tick: Int = -1 +) { + companion object { + + operator fun invoke(map: Map) = Fletching( + level = map["level"] as? Int ?: EMPTY.level, + xp = map["xp"] as? Double ?: EMPTY.xp, + animation = map["animation"] as? String ?: EMPTY.animation, + makeAmount = map["make_amount"] as? Int ?: EMPTY.makeAmount, + tick = map["tick"] as? Int ?: EMPTY.tick, + ) + + val EMPTY = Fletching() + } +} \ No newline at end of file diff --git a/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/ItemOnItems.kts b/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/ItemOnItems.kts index 0fe4a1c87..839160768 100644 --- a/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/ItemOnItems.kts +++ b/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/ItemOnItems.kts @@ -2,6 +2,7 @@ package world.gregs.voidps.world.activity.skill import net.pearx.kasechange.toSentenceCase import world.gregs.voidps.engine.client.message +import world.gregs.voidps.engine.client.ui.chat.plural import world.gregs.voidps.engine.client.ui.closeDialogue import world.gregs.voidps.engine.client.ui.closeInterfaces import world.gregs.voidps.engine.client.ui.event.interfaceClose @@ -140,7 +141,7 @@ fun makeImmediately(player: Player, overlaps: List, maximu return false } val definition = overlaps.first() - val stackable = definition.maximum == -1 &&definition.remove.all { inventory.stackable(it.id) } && definition.one.all { inventory.stackable(it.id) } + val stackable = definition.maximum == -1 && definition.remove.all { inventory.stackable(it.id) } && definition.one.all { inventory.stackable(it.id) } return stackable || maximum == 1 || player["selecting_amount", false] || player.inCombat } @@ -155,7 +156,7 @@ fun getMaximum(overlaps: List, player: Player): Int { if (min > max) { max = min } - if (overlap.maximum < max) { + if (overlap.maximum in 1.. ?: return@itemOnItem + it.weakQueue("fletching_make_dialog") { + val (selected, amount) = makeAmount( + displayItems, + type = "Make", + maximum = 27, + text = "What would you like to fletch?" + ) + val itemToFletch: Fletching = itemDefinitions.get(selected).getOrNull("fletching_unf") ?: return@weakQueue + if (!it.has(Skill.Fletching, itemToFletch.level, true)) { + return@weakQueue + } + fletch(it, selected, itemToFletch, toItem.id, amount) + } +} + +fun fletch(player: Player, addItem: String, addItemDef: Fletching, removeItem: String, amount: Int) { + if (amount <= 0) { + player.softTimers.stop("fletching") + return + } + + if (!player.inventory.contains("knife") || !player.inventory.contains(removeItem)) { + player.softTimers.stop("fletching") + return + } + + player.weakQueue("fletching", addItemDef.tick) { + val success = player.inventory.transaction { + remove(removeItem) + add(addItem, addItemDef.makeAmount) + } + + if (!success) { + return@weakQueue + } + + val itemCreated = getFletched(addItem) + player.message("You carefully cut the wood into $itemCreated.", ChatType.Game) + player.experience.add(Skill.Fletching, addItemDef.xp) + player.setAnimation(addItemDef.animation) + fletch(player, addItem, addItemDef, removeItem, amount - 1) + } +} + +fun getFletched(itemName: String): String { + return when { + itemName.contains("shortbow", ignoreCase = true) -> "a Shortbow" + itemName.contains("longbow", ignoreCase = true) -> "a Longbow" + itemName.contains("stock", ignoreCase = true) -> "a Stock" + itemName.contains("shaft", ignoreCase = true) -> "Shafts" + else -> "null" + } +} \ No newline at end of file diff --git a/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/fletching/HeadlessArrows.kts b/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/fletching/HeadlessArrows.kts new file mode 100644 index 000000000..4abb49f1a --- /dev/null +++ b/game/src/main/kotlin/world/gregs/voidps/world/activity/skill/fletching/HeadlessArrows.kts @@ -0,0 +1,82 @@ +package world.gregs.voidps.world.activity.skill.fletching + +import world.gregs.voidps.engine.client.message +import world.gregs.voidps.engine.client.ui.interact.itemOnItem +import world.gregs.voidps.engine.entity.character.player.Player +import world.gregs.voidps.engine.entity.character.player.chat.ChatType +import world.gregs.voidps.engine.entity.character.player.skill.Skill +import world.gregs.voidps.engine.inv.inventory +import world.gregs.voidps.engine.inv.transact.operation.AddItem.add +import world.gregs.voidps.engine.inv.transact.operation.RemoveItem.remove +import world.gregs.voidps.engine.queue.weakQueue +import world.gregs.voidps.world.interact.dialogue.type.makeAmount + +itemOnItem("feather", "arrow_shaft") { + if (fromItem.amount <= 15 || toItem.amount <= 15) { + val amountToMake = minOf(fromItem.amount, toItem.amount) + makeImmediately(it, "headless_arrow", amountToMake) + return@itemOnItem + } + it.weakQueue("feather_to_shaft_dialog") { + val (selected, amount) = makeAmount( + listOf("headless_arrow"), + type = "Make sets: ", + maximum = 10, + text = "How many sets of 15 do you wish to feather?" + ) + makeHeadlessArrows(player, selected, amount) + } +} + +fun makeHeadlessArrows(player: Player, addItem: String, amount: Int) { + if (amount <= 0) { + player.queue.clear("feather_to_shaft_create") + return + } + + val currentShafts = player.inventory.count("arrow_shaft") + val currentFeathers = player.inventory.count("feather") + + val actualAmount = when { + currentShafts < 15 || currentFeathers < 15 -> minOf(currentShafts, currentFeathers) + else -> 15 + } + + if (actualAmount < 1) { + player.message("You don't have enough materials to fletch headless arrows.", ChatType.Game) + return + } + + player.weakQueue("feather_to_shaft_create", 2) { + val success = player.inventory.transaction { + remove("feather", actualAmount) + remove("arrow_shaft", actualAmount) + add(addItem, actualAmount) + } + if (!success) { + return@weakQueue + } + val experiencePerArrow = 15.0 / 15 + val totalExperience = experiencePerArrow * actualAmount + player.experience.add(Skill.Fletching, totalExperience) + player.message("You attach feathers to $actualAmount arrow shafts.") + makeHeadlessArrows(player, addItem, amount - 1) + } +} + +fun makeImmediately(player: Player, addItem: String, amount: Int) { + player.weakQueue("feather_to_shaft_create", 2) { + val success = player.inventory.transaction { + remove("feather", amount) + remove("arrow_shaft", amount) + add(addItem, amount) + } + if (!success) { + return@weakQueue + } + val experiencePerArrow = 15.0 / 15 + val totalExperience = experiencePerArrow * amount + player.experience.add(Skill.Fletching, totalExperience) + player.message("You attach feathers to $amount arrow shafts.") + } +} \ No newline at end of file diff --git a/game/src/main/kotlin/world/gregs/voidps/world/interact/dialogue/type/MakeAmount.kt b/game/src/main/kotlin/world/gregs/voidps/world/interact/dialogue/type/MakeAmount.kt index e4c93711b..5c9334f51 100644 --- a/game/src/main/kotlin/world/gregs/voidps/world/interact/dialogue/type/MakeAmount.kt +++ b/game/src/main/kotlin/world/gregs/voidps/world/interact/dialogue/type/MakeAmount.kt @@ -43,7 +43,7 @@ suspend fun CharacterContext.makeAmountIndex( player["skill_creation_type"] = type setItemOptions(player, items, names) - setMax(player, maximum) + setMax(player, maximum.coerceAtLeast(1)) val choice: Int = IntSuspension() player.close(INTERFACE_ID) player.close(INTERFACE_AMOUNT_ID)