Last active
January 12, 2023 00:34
-
-
Save gesslar/0e3bbc44bc9fb0c965f74f9874f08184 to your computer and use it in GitHub Desktop.
Sample menu-chest using loot table from Calinvar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /d/thrace/mforest/sanguine/obj/chest.c | |
// Treasure chest for Wrathful Beast | |
// | |
// Created: 2023/01/11: Gesslar | |
// Last Change: 2023/01/11: Gesslar | |
// | |
// 2023/01/11: Gesslar - Created | |
#include <colors.h> | |
inherit STD_CHEST_MENU ; | |
void setup(object killer, object dead) { | |
set_id("/Admium Chest/admium chest/chest") ; | |
set("short", MAT_COLORS["admium"] + "Admium Chest`<res>`") ; | |
set("long", "") ; | |
color1 = MAT_COLORS["admium"] ; | |
color2 = "`<g12>`" ; | |
offer_num_categories = 4 ; | |
#if 0 | |
// Loot menu in the form of: | |
({ | |
({ // using an array of rewards from which to randomly reward | |
"label", int or int func of number of rewards, | |
({ | |
"/obj/file_name1", | |
"/obj/file_name2", | |
"/obj/file_name3", | |
"/obj/file_name4", | |
}), | |
}), | |
({ // using a mapping of rewards with chances to use array_item_weighted | |
"label", int or int func of number of rewards, | |
([ | |
"/obj/file_name1" : 5 | |
"/obj/file_name2" : 5 | |
"/obj/file_name3" : 10 | |
"/obj/file_name4" : 15 | |
]), | |
}) | |
}) | |
#endif | |
loot_menu = ({ | |
({ | |
"gems", (: 3 + random(4) :), | |
({ | |
"/obj/gems/tourmaline", | |
"/obj/gems/lapis_lazuli", | |
"/obj/gems/garnet", | |
"/obj/gems/jacinth", | |
"/obj/gems/greensapphire", | |
"/obj/gems/beryl", | |
}), | |
}), | |
({ | |
"food", (: 6 + random(3) :), | |
({ | |
"/obj/food/banquet", | |
"/obj/food/fortune_cookie", | |
"/obj/food/trail_mix", | |
"/obj/food/gator_meat", | |
"/obj/food/bell_peppers", | |
"/obj/food/dates", | |
"/obj/food/moose", | |
}), | |
}), | |
({ | |
"drink", (: 4 + random(5) :), | |
({ | |
"/obj/potions/elixir_feasting", | |
"/obj/potions/potion_growth", | |
"/obj/potions/potion_clairvoyance", | |
"/obj/potions/potion_firebreath", | |
"/obj/potions/potion_healing", | |
"/obj/potions/potion_mana", | |
"/obj/potions/potion_speed", | |
"/obj/potions/potion_vitality", | |
"/obj/potions/potion_healing_extra", | |
"/obj/potions/potion_youth", | |
}) | |
}), | |
({ | |
"helmet", 1, | |
({ | |
"/obj/armor/helmet/circlet_golden", | |
"/obj/armor/helmet/circlet_obsidian", | |
"/obj/armor/helmet/circlet_silver", | |
"/obj/armor/helmet/coronet_golden", | |
"/obj/armor/helmet/coronet_obsidian", | |
"/obj/armor/helmet/coronet_silver", | |
"/obj/armor/sets/thracian_mail/thracian_mail_coif", | |
"/obj/armor/helmet/woodland_leather_cap", | |
}), | |
}), | |
({ | |
"amulet", 1, | |
({ | |
"/obj/armor/amulet/oceanic_amulet", | |
"/obj/armor/amulet/axazelmedallion", | |
"/obj/armor/amulet/amulet_purity", | |
"/obj/armor/amulet/amulet_healing", | |
"/obj/armor/amulet/ear_amulet", | |
"/obj/armor/amulet/lightamulet", | |
}), | |
}), | |
({ | |
"suit", 1, | |
([ | |
"/obj/armor/suit/black_shroud" : 10, | |
"/obj/armor/suit/necrorobe" : 10, | |
"/obj/armor/suit/cloudarmor" : 15, | |
"/obj/armor/suit/ancient_chainmail" : 15, | |
"/obj/armor/suit/silverplatemail" : 15, | |
"/obj/armor/sets/thracian_mail/thracian_mail_hauberk" : 10, | |
"/obj/armor/suit/woodland_leather_jerkin" : 10, | |
"/obj/armor/suit/emerald_chainmail" : 5, | |
"/obj/armor/suit/mithril_fullplate" : 5, | |
"/obj/armor/suit/golden_fullplate" : 5, | |
]), | |
}), | |
({ | |
"shield", 1, | |
([ | |
"/obj/armor/shield/towershield" : 20, | |
"/obj/armor/shield/oceanic_shield" : 30, | |
"/obj/armor/shield/fortressshield" : 40, | |
"/obj/armor/shield/leaf_faith" : 10, | |
]), | |
}), | |
({ | |
"gloves", 1, | |
([ | |
"/obj/armor/gloves/enchanted_leather_gloves" : 15, | |
"/obj/armor/gloves/steelgauntlets" : 15, | |
"/obj/armor/gloves/oceanic_gloves" : 20, | |
"/obj/armor/sets/thracian_mail/thracian_mail_gloves" : 20, | |
"/obj/armor/gloves/woodland_leather_gloves" : 20, | |
"/obj/armor/gloves/mithril_gauntlets" : 10, | |
]), | |
}), | |
({ | |
"boots", 1, | |
([ | |
"/obj/armor/boots/forest_boots" : 15, | |
"/obj/armor/boots/steelboots" : 15, | |
"/obj/armor/boots/travellers_boots" : 20, | |
"/obj/armor/sets/thracian_mail/thracian_mail_boots" : 20, | |
"/obj/armor/boots/woodland_leather_boots" : 20, | |
"/obj/armor/boots/oceanic_boots" : 10, | |
]), | |
}), | |
({ | |
"cloak", 1, | |
([ | |
"/obj/armor/cloak/serpent_cloak" : 20, | |
"/obj/armor/cloak/badger_cloak" : 20, | |
"/obj/armor/cloak/oceanic_cloak" : 20, | |
"/obj/armor/cloak/desert_cloak" : 20, | |
"/obj/armor/cloak/baladrana" : 20, | |
"/obj/armor/cloak/velvet_cloak" : 10, | |
]), | |
}), | |
({ | |
"ring", 1, | |
({ | |
"/obj/armor/rings/blazering", | |
"/obj/armor/rings/protectring_two", | |
"/obj/armor/rings/light_ring", | |
"/obj/armor/rings/protectring_three", | |
"/obj/armor/rings/oceanic_ring", | |
}), | |
}), | |
({ | |
"weapon", 1, | |
([ | |
"/obj/weapon/cutting/khopesh_obsidian" : 10, | |
"/obj/weapon/cutting/minotaur_axe" : 10, | |
"/obj/weapon/cutting/magic/flaming_sword" : 15, | |
"/obj/weapon/thrusting/magic/kris_dagger" : 15, | |
"/obj/weapon/thrusting/magic/flame_prongs" : 15, | |
"/obj/weapon/blunt/silver_staff" : 10, | |
"/obj/weapon/blunt/silver_great_hammer" : 10, | |
"/obj/weapon/thrusting/magic/kris_sword" : 5, | |
"/obj/weapon/flexible/magic/flail_submission" : 5, | |
"/obj/weapon/cutting/magic/emerald_broadsword" : 5, | |
]), | |
}), | |
}) ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment