This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
A-error
hi paidia 8a i8ela na ma po exo mia nobless custom kai 8elo na kano otan paei o allos 80lvl sto main tou na pataei kai na tou dinei ton nobless
edo einai to __init__ tis custom nobless
qn = "9998_Noble" NPC=[10003] NOBLESS_TIARA = 7694 ADENA_ID=57 InitialHtml = "1.htm" LUNARGENT = 5556 HELLFIRE_OIL = 3470 class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent(self,event,st): htmltext = event count=st.getQuestItemsCount(ADENA_ID) countluna=st.getQuestItemsCount(LUNARGENT) counthell=st.getQuestItemsCount(HELLFIRE_OIL) if count < 1 : htmltext = "<html><head><body>YIou dont haCve enouEgh adena.</body></html>" else: if event == "1": if st.getPlayer().isNoble() : return "noble.htm" st.setState(COMPLETED) if not st.getPlayer().isSubClassActive() : return "noSub.htm" st.setState(COMPLETED) if st.getPlayer().getLevel() < 75 : return "toLow.htm" st.setState(COMPLETED) if not st.getPlayer().isNoble() : if st.getPlayer().isSubClassActive() : if st.getPlayer().getLevel() >= 75 : if countluna == 0 and counthell == 0 : st.takeItems(LUNARGENT,5) st.takeItems(HELLFIRE_OIL,1) st.getPlayer().setNoble(True) st.giveItems(NOBLESS_TIARA,1) return "grat.htm" st.setState(COMPLETED) else : return "noMat.htm" st.setState(COMPLETED) if event == "2": return "no.htm" st.setState(COMPLETED) if htmltext != event: st.setState(COMPLETED) st.exitQuest(1) return htmltext def onTalk (self,npc,st): htmltext = "<html><head><body>I have nothing to say to you</body></html>" st = st.getQuestState(qn) st.setState(STARTED) return InitialHtml QUEST = Quest(9998,qn,"Noble") CREATED=State('Start',QUEST) STARTED=State('Started',QUEST) COMPLETED=State('Completed',QUEST) QUEST.setInitialState(CREATED) for npcId in NPC: QUEST.addStartNpc(npcId) QUEST.addTalkId(npcId) print "importing quests: 9998: Noble NPC"0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now