#script for weapons shop at (21,18)
from eventAPI import getTag, setTag, showPicture, playSpecAudio, giveItems, callEvent
from APIUtils import showMessage

def fireEvent(e):
    lFlagU = getTag(e, "lFlagU")
    if (lFlagU != 0):
        callEvent(e, 1012, ["21", "19", "0"])
        return 0
    showPicture(e, "Weapon_Shop")
    playSpecAudio(e, "WeaponShop")
    showMessage(e,
                ["You have just received a note by a poor dirty street urchin of a boy.",
                 "He wisps away before you have a chance to stop him..."])
    giveItems(e, ["Naris' Note"])
    setTag(e, "lFlagU", 1)
    callEvent(e, 1012, ["", "21", "19", "0"])
    return 0