from eventAPI import *
from APIUtils import *

def fireEvent(e):
    if ((getTag(e, "lFlagS") & 0x100) == 0):
        return 1
    k = getTag(e, "kssCrypt")
    if ((k <= 20) or (k >= 50)):
        return 1
    elif (k == 23):
        setTag(e, "kssCrypt", 24)
    elif (k == 31):
        setTag(e, "kssCrypt", 32)
    elif (k == 39):
        setTag(e, "kssCrypt", 40)
    else:
        setTag(e, "kssCrypt", 21)
    return 1
