From 4f8b58cc5366bfc2ea3b56fe6ff0443464d10f0f Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Wed, 14 May 2014 23:54:09 -0700 Subject: tome (2.3.11-ah-2) unstable; urgency=low * Modified the install paths to deploy to the FHS compliant /usr/games/tome and /var/games/tome, as we have always done * This is a major change, and includes theming. Some of the options have changed. Because of this, the manual page has been removed; there is a command line help option and in game help until the manual page is rewritten. # imported from the archive --- lib/scpt/drunk.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/scpt/drunk.lua (limited to 'lib/scpt/drunk.lua') diff --git a/lib/scpt/drunk.lua b/lib/scpt/drunk.lua new file mode 100644 index 00000000..7d90af8d --- /dev/null +++ b/lib/scpt/drunk.lua @@ -0,0 +1,21 @@ +-- silly function that allows a drunk to take a bottle of wine/ale from the player + +function drunk_takes_wine(m_idx, item) + + m_ptr = monster(m_idx) + o_ptr = get_object(item) + + if (m_ptr.r_idx == test_monster_name("Singing, happy drunk")) + and (o_ptr.tval == TV_FOOD) and ((o_ptr.sval == 38) or (o_ptr.sval == 39)) then + + cmsg_print(TERM_YELLOW, "'Hic!'") + + inven_item_increase(item, -1) + inven_item_optimize(item) + return TRUE + else + return FALSE + end +end + +add_hook_script(HOOK_GIVE, "drunk_takes_wine", "drunk_takes_wine") -- cgit v1.2.3