# Upgrade your Hatchling to Strider version 0.1 # by DrLecter #Quest info QUEST_NUMBER = 421 #or 3996 QUEST_NAME = "LittleWingAdventures" #or strider QUEST_DESCRIPTION = "Little Wings Big Adventures" #Variables #NPCs SG_CRONOS = 7610 FY_MYMYU = 7747 FAIRY_TREES = [ [5185,1],[5186,2],[5187,4],[5188,8] ] #Quest items FT_LEAF = 4325 CONTROL_ITEMS = [ [3500,4422],[3501,4423],[3502,4423] ] #Messages default = "I have nothing to say to you." event_1 = "Sage Cronos:
Then go and see Fairy Mymyu, she will help you" error_1 = "You're suppossed to own a hatchling to complete this quest." error_2 = "Hey! What happened with the other hatchling you had? This one is different." error_3 = "Sage Cronos:
You need to be level 55 to complete this quest." qston_1 = "Sage Cronos:
So, you want to turn your hatchling into a more powerful creature?

Yes, please tell me how
" error_4 = "Sage Cronos:
I've said you need to talk to Fairy Mymyu!!!. Am i clear???" error_5 = "Fairy Mymyu:
You weren't yet able to find the Fairy Trees of Wind, Star, Twilight and Abyss? Don't give up!" order_1 = "Fairy Mymyu:
Your pet must drink the sap of Fairy Trees of Wind, Star, Twilight and Abyss to grow up. The trees will probably agree but as we don't want to hurt them, take that leafs to heal any wound your hatchling coud cause them" frt_msg = "Fairy Tree:
I'll let your hatchling drink from my sap, but you will have to cover the wound your pet will do on me with one of these leafs you have, they are hypoalergenic" end_msg = "Fairy Mymyu:
Great job, enjoy your strider" print "importing quests: "+str(QUEST_NUMBER)+": "+QUEST_DESCRIPTION import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest def get_control_item(st) : item = [0,0] for i in range(3) : if st.getQuestItemsCount(CONTROL_ITEMS[i][0]) : item = CONTROL_ITEMS[i] if st.getState() == CREATED : st.set("item",str(item[0])) else : if int(st.get("item")) != item[0] : item = [ -1,-1 ] return item class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : htmltext = event if event == "1": htmltext = event_1 st.setState(STARTING) st.set("id","0") st.set("cond","1") st.playSound("ItemSound.quest_accept") return htmltext def onTalk (self,npcid,st): htmltext = default id = st.getState() item = get_control_item(st) if item[0] == 0 : htmltext = error_1 st.takeItems(FT_LEAF,-1) st.exitQuest(1) elif item[0] == -1 : htmltext = error_2 st.takeItems(FT_LEAF,-1) st.exitQuest(1) elif npcid == SG_CRONOS : if id == CREATED : if st.getPlayer().getLevel() < 55 : st.exitQuest(1) htmltext = error_3 htmltext = qston_1 else : htmltext = error_4 elif npcid == FY_MYMYU : if id == STARTING : if st.getQuestItemsCount(FT_LEAF) == 0 and int(st.get("id")) == 0 : st.set("cond","2") st.giveItems(FT_LEAF,4) st.playSound("ItemSound.quest_itemget") htmltext = order_1 else : htmltext = error_5 elif id == STARTED : st.takeItems(item[0],1) st.giveItems(item[1],1) st.setState(COMPLETED) st.exitQuest(1) st.playSound("ItemSound.quest_finish") htmltext = end_msg else: leafs = st.getQuestItemsCount(FT_LEAF) for i in range(4) : if npcid == FAIRY_TREES[i][0] and (int(st.get("id")) | FAIRY_TREES[i][1] != int(st.get("id"))) : st.set("id", str(int(st.get("id")) | FAIRY_TREES[i][1])) htmltext = frt_msg st.takeItems(FT_LEAF,1) if 1 < leafs <= 4 : st.playSound("ItemSound.quest_itemget") elif leafs == 1 and int(st.get("id")) == 15: st.playSound("ItemSound.quest_middle") st.set("cond","3") st.setState(STARTED) return htmltext def onKill (self,npcId,st) : return # Quest class and state definition QUEST = Quest(QUEST_NUMBER, str(QUEST_NUMBER)+"_"+QUEST_NAME, QUEST_DESCRIPTION) CREATED = State('Start', QUEST) STARTING = State('Starting', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) # Quest NPC starter initialization QUEST.addStartNpc(SG_CRONOS) # Quest initialization CREATED.addTalkId(SG_CRONOS) STARTING.addTalkId(SG_CRONOS) STARTING.addTalkId(FY_MYMYU) STARTED.addTalkId(FY_MYMYU) for i in range(4) : STARTING.addTalkId(FAIRY_TREES[i][0])