def onEvent(self, event, st):
    htmltext = event
    if (event == '1'):
        htmltext = '30829-01.htm'
        st.set('cond', '1')
        st.setState(STARTED)
        st.playSound('ItemSound.quest_accept')
    elif ((event == '3') and st.getQuestItemsCount(CRAFTED_DAGGER)):
        htmltext = '30829-03.htm'
        st.takeItems(CRAFTED_DAGGER, 1)
        st.set('cond', '2')
    elif ((event == '4') and (st.getQuestItemsCount(MAP_PIECE) >= MAX_COUNT)):
        htmltext = '30829-05.htm'
        st.takeItems(MAP_PIECE, MAX_COUNT)
        st.giveItems(MAP, 1)
        st.set('cond', '4')
    elif ((event == '5') and st.getQuestItemsCount(MAP)):
        htmltext = '30097-06.htm'
        st.takeItems(MAP, 1)
        st.set('cond', '5')
    elif (event == '7'):
        htmltext = '30829-07.htm'
        st.giveItems(PET_TICKET, 1)
        st.setState(COMPLETED)
        st.exitQuest(0)
    return htmltext
def onEvent(self, event, st):
    htmltext = event
    if (event == '1'):
        htmltext = '30829-01.htm'
        st.set('cond', '1')
        st.setState(STARTED)
        st.playSound('ItemSound.quest_accept')
    elif ((event == '3') and st.getQuestItemsCount(CRAFTED_DAGGER)):
        htmltext = '30829-03.htm'
        st.takeItems(CRAFTED_DAGGER, 1)
        st.set('cond', '2')
    elif ((event == '4') and (st.getQuestItemsCount(MAP_PIECE) >= MAX_COUNT)):
        htmltext = '30829-05.htm'
        st.takeItems(MAP_PIECE, MAX_COUNT)
        st.giveItems(MAP, 1)
        st.set('cond', '4')
    elif ((event == '5') and st.getQuestItemsCount(MAP)):
        htmltext = '30097-06.htm'
        st.takeItems(MAP, 1)
        st.set('cond', '5')
    elif (event == '7'):
        htmltext = '30829-07.htm'
        st.giveItems(PET_TICKET, 1)
        st.setState(COMPLETED)
        st.exitQuest(0)
    return htmltext