from eventAPI import *
from APIUtils import *

def fireEvent(e):
    if ((getTag(e, "lFlagS") & 0x100) == 0):
        return 1
    k = getTag(e, "kssAD")
    if (k <= 4):
        showMessage(e, ["A stone well provides water to this arid place.","","From its depths, your hear faint noises."])
        return 1
    elif (k >= 10):
        showMessage(e, ["You have no desire to jump in the well again. If (for whatever reason) you wish to return to the burrow, take the stairs!"])
        return 1
    elif (k == 5):
        setExit(e, "maps/kssburrow.cfg", 38, 16, 0)
        return (poseYesNo(e,["Faint noises echo from the depths of this well. It may lead to wherever the Arch-Druid went...","",
                             "Do you wish to climb down the well ?"]) == 0)
    else:
        return 1
