# Maked by Polo Have fun! print "importing quests: 628: Hunt of the Golden Ram Mercenary Force" 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 #Npcs KAHMAN = 31554 #Items CHITIN = 7248 #Splinter Stakato Chitin CHITIN2 = 7249 #Needle Stakato Chitin RECRUIT = 7246 #Golden Ram Badge - Recruit SOLIDER = 7247 #Golden Ram Badge - Soldier DROPLIST={ 21508:[CHITIN,25], 21509:[CHITIN,25], 21510:[CHITIN,25], 21511:[CHITIN,25], 21512:[CHITIN,25], } DROPLIST2={ 21508:[CHITIN,25], 21509:[CHITIN,25], 21510:[CHITIN,25], 21511:[CHITIN,25], 21512:[CHITIN,25], 21513:[CHITIN2,25], 21514:[CHITIN2,25], 21515:[CHITIN2,25], 21516:[CHITIN2,25], 21517:[CHITIN2,25], } class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : htmltext = event if htmltext == "31554-04.htm" : st.set("cond","2") st.takeItems(CHITIN,100) st.giveItems(RECRUIT,1) return htmltext def onTalk (Self,npc,st): npcId = npc.getNpcId() htmltext = "Ich habe dir nichts zu sagen" id = st.getState() if id == CREATED : st.set("cond","0") st.set("onlyone","0") if npcId == KAHMAN and int(st.get("cond"))==0 and int(st.get("onlyone"))==0 : if st.getPlayer().getLevel()>=66 : htmltext = "31554-02.htm" st.set("cond","1") st.setState(STARTED) st.playSound("ItemSound.quest_accept") else : htmltext = "31554-01.htm" st.exitQuest(1) elif npcId == KAHMAN and int(st.get("cond"))==1 and st.getQuestItemsCount(CHITIN)>=100 : htmltext = "31554-03.htm" elif npcId == KAHMAN and int(st.get("cond"))==2 and st.getQuestItemsCount(CHITIN)>=100 and st.getQuestItemsCount(CHITIN2)>=100 : htmltext = "31554-05.htm" st.takeItems(CHITIN,100) st.takeItems(CHITIN2,100) st.takeItems(RECRUIT,1) st.giveItems(SOLIDER,1) st.set("onlyone","1") st.playSound("ItemSound.quest_finish") return htmltext def onKill (Self,npc,st): if int(st.get("cond"))==1 : item,chance=DROPLIST[npc.getNpcId()] if st.getRandom(100)