# Note to be passed at the entrance to the inner walls near Hughter's
#
# Only active if you talked to the red vial guards, and gave the vials back willingly
#
from eventAPI import getTag, showPicture, optionInput, setTag
from APIUtils import issetall, showMessage
from SDLKeys import SDLK_SPACE

def fireEvent(e):
    if (getTag(e, "lFlagU") == 0xFFFFFFFF):
        return 1
    VB1 = getTag(e, "VialBarracks1")
    if (VB1 != 4):
        return 1
    showMessage(e,
        ["\"Here's a note for you. Consider it and we will cease our pursuit.\"",
         "",
         "The guard and his partner quietly walk off as though you were a routine stop on their patrol..."])
    showPicture(e, "Note_Guard001")
    optionInput(e,
        ["The guards are now gone and the note is in your hands..."],
        ["(SPACE) to walk away"], [SDLK_SPACE])
    setTag(e, "lFlagU", 0xFFFFFFFF)
    # Yeodaugh will show up at the Magic College
    setTag(e, "YeodPlt", 1)
    return 1
