Jump to content
  • 0

Help Me NPCBuffer


Question

Posted

Hello Pedes Loipon Thelo an xserei kanenas kanena link gia Free NPCBuffer ti enow Loipon thelo mia buffer pou na sou kanei Buffs Xoris Adena.. Exo  Ftiaxsei tin Buffer Na min pernei adena ala to mionektima einai oti otan pas na kaneis buffs xoris katholou adena sou petaei No Tienes Adena. dld thelei na vlepei adena sto invectory pagma pou nai diskolo gia ena new char Se KvN Server edw exo kai to __init__.py pou exo ftiaxsei

 

 

 

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.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

qn = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)


def onEvent(self,event,st):
	htmltext = event
	count=
	if count < 150000 or st.getPlayer().getLevel() < 10 :
		htmltext = "<html><head><body>No Tienes Adena.<br></body></html>"
	else:
		st.takeItems(ADENA_ID)
		st.getPlayer().setTarget(st.getPlayer())

		if event == "1":
			st.takeItems(ADENA_ID)
			st.getPlayer().restoreMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Wind Walk
		if event == "2":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Decrease Weight
		if event == "3":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4343,3).getEffects(st.getPlayer(),st.getPlayer())
			return "2.htm"		
			st.setState(COMPLETED)

		#Shield
		if event == "4":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Might
		if event == "5":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			return "2.htm"		
			st.setState(COMPLETED)

		#Mental Shield
		if event == "6":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Bless the Body
		if event == "7":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Bless the Soul
		if event == "8":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Magic Barrier
		if event == "9":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Resist Shock
		if event == "10":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			return "2.htm"		
			st.setState(COMPLETED)


		if htmltext != event:
			st.setState(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(STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
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)

3 answers to this question

Recommended Posts

  • 0
Posted

Oriste :

 

 


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.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

qn = "9999_NPCBuffer"

NPC=[40006]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)


def onEvent(self,event,st):
	htmltext = event
	count=
	if count < 0 or st.getPlayer().getLevel() < 1 :
		htmltext = "<html><head><body>No Tienes Adena.<br></body></html>"
	else:
		st.takeItems(ADENA_ID)
		st.getPlayer().setTarget(st.getPlayer())

		if event == "1":
			st.takeItems(ADENA_ID)
			st.getPlayer().restoreMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Wind Walk
		if event == "2":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4342,2).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Decrease Weight
		if event == "3":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4343,3).getEffects(st.getPlayer(),st.getPlayer())
			return "2.htm"		
			st.setState(COMPLETED)

		#Shield
		if event == "4":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4344,3).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Might
		if event == "5":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4345,3).getEffects(st.getPlayer(),st.getPlayer())
			return "2.htm"		
			st.setState(COMPLETED)

		#Mental Shield
		if event == "6":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4346,4).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Bless the Body
		if event == "7":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4347,6).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Bless the Soul
		if event == "8":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4348,6).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Magic Barrier
		if event == "9":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4349,2).getEffects(st.getPlayer(),st.getPlayer())
			return "4.htm"		
			st.setState(COMPLETED)

		#Resist Shock
		if event == "10":
			st.takeItems(ADENA_ID)
			SkillTable.getInstance().getInfo(4350,4).getEffects(st.getPlayer(),st.getPlayer())
			return "2.htm"		
			st.setState(COMPLETED)


		if htmltext != event:
			st.setState(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(STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
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)

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