from eventAPI import getTag, showPicture, optionInput, giveItems, setTag
from SDLKeys import SDLK_t, SDLK_w, SDLK_SPACE

def fireEvent(eventPtr):
    lFlagU = getTag(eventPtr, "lFlagU")
    if (lFlagU == 0xFFFFFFFF):
        return 1
    choice = optionInput(eventPtr,
                         ["You stumble upon a pack...",
                          "After close inspection it seems to contain some",
                          "rather curious looking blood red vials."],
                         ["(T)ake the vials", "(W)alk away"],
                         [SDLK_t, SDLK_w])
    if (choice == SDLK_t):
        optionInput(eventPtr,
                    ["You take the vials and move away as to not draw attention."],
                    ["(SPACE) to Continue"],
                    [SDLK_SPACE])
        giveItems(eventPtr, ["Unknown Vial (Red)", "Unknown Vial (Red)", "Unknown Vial (Red)"])
        setTag(eventPtr, "lFlagU", 0xFFFFFFFF)
    return 1
