Jump to content

Question

Posted

Someone can help me to do an html for this code? Its an NOBLESS NPC script

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j			       import L2DatabaseFactory
from net.sf.l2j.gameserver.model.actor.appearance import PcAppearance
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.actor.appearance import PcAppearance
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

qn = "8204_NpcNoblesse"

NPC=[100009]
GOLDBAR= 3470
NOBLESS_TIARA = 7694
QuestId     = 8204
QuestName   = "NpcNoblesse"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "INFO Loaded: Noblesse Manager"

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(GOLDBAR)
		
		if count < 250  and st.getPlayer().getLevel() < 75 :
			htmltext = "<html><head><body>Sorry, but you dont have enought gb or u low lvl</body></html>"

		elif st.getPlayer().isNoble() == 1 :
			htmltext = "<html><head><body>Sorry, But you are alrdy nobles</body></html>"


		else:
			st.getPlayer().setTarget(st.getPlayer())
			
			if event == "2":
		            	st.takeItems(GOLDBAR,250)
                                st.getPlayer().setNoble(true)
                                st.giveItems(NOBLESS_TIARA,1)
                                st.playSound("ItemSound.quest_finish")
				st.setState(State.COMPLETED)
				return "End.htm"
                                st.exitQuest(1)	
	
				
			if htmltext != event:
				st.setState(State.COMPLETED)
				st.exitQuest(1)
		return htmltext


	def onTalk (self,npc,player):
	   st = player.getQuestState(qn)
	   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
	   st.setState(State.STARTED)
	   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
 QUEST.addStartNpc(npcId)
 QUEST.addTalkId(npcId)

Thanks, sorry for my bad english, and i dont know how to create an htm, for the npc 100009 .

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

Copy and htm from htm folder, paste inside your custom folder and rename it to 1 then change the content.

Edited by SweeTs

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...