Jump to content
  • 0

help nobless..


Question

Posted

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

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...