from eventAPI import *
from APIUtils import *

def fireEvent(e):
    if ((getTag(e, "lFlagS") & 0x100) == 0):
        return 1
    global k
    k = getTag(e, "kssAD")
    if (k < 4):
        return 1
    elif (k == 4):
        showMessage(e, ["You enter this hidden nook just in time to see a stone panel slide shut. The faint sound of retreating footsteps echoes while you search for a way to reopen the panel."])
        showMessage(e, ["You eventually spot a circular indentation in the stone wall, but the key to this hypothetical lock remains in the possession of the Arch-Druid. You have no way to pursue him any farther."])
        setTag(e, "kssAD", 5)
        return 1
    elif (k < 10):
        showMessage(e, ["Knowing the existence of a passage, you can faintly discern the outline of the sliding panel. However, you are still unable to open it."])
        return 1
    else:
        setExit(e, "maps/kssburrow.cfg", 47, 11, 90)
        return (poseYesNo(e,["The passage remains open, allowing you to return to the burrow.",
                             "","Do you want to?"]) == 0)
