summaryrefslogtreecommitdiff
path: root/example/scripts/items/candy.lua
blob: 617e1d5f8629e7c3cdbc4d7c51fbba69cd36551f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--[[

 Example item script.

 Makes the player character say "*munch*munch*munch*" when using a candy.
 The HP regeneration effect is handled separately based on the heal value in
 items.xml.

--]]

local candy = get_item_class("candy")

candy:on("use", function(user)
    being_say(user, "*munch*munch*munch*")
end)