How do I make a gun and how do I make It shoot?
Also how do I make inventory items do something?
Try reading this recent thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27663.0) which asks the same thing. You could also try a forum search - this has been asked and answered before (in this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26180.0) for example, although the code is a little out of date in places).