Jump to content

[Help] Can't Create Newbie Buffer!!


Recommended Posts

newbiebuffri2.jpg

This is what i get, when its supposed to be buff selection :(((

heres the code, there was buffs avaible if char is 40lvl or more

i changed to 40lvl or less, but i guess something went wrong?

if some1 could tell me what  ???

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 = "9998_NPCBuffer"

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

print "importing custom: 9998: NPCBuffer"

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)
	if count < 150000  or st.getPlayer().getLevel() > 40 :
		htmltext = "<html><head><body>You dont have enough Adena,<br> or your level is too low. You must be 40 or lower.</body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		if event == "2":
			st.takeItems(ADENA_ID,16000000)
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4360,3),False,False)
			st.getPlayer().restoreHPMP()		
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4359,3),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4358,3),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4357,2),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4354,4),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4353,6),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4350,4),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4347,6),False,False)
			st.getPlayer().restoreHPMP()			
			return "4.htm"
			st.setState(COMPLETED)

		if event == "3": 
			st.takeItems(ADENA_ID,8000000)
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4352,2),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4351,6),False,False)	
			st.getPlayer().restoreHPMP()	
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4355,3),False,False)
			st.getPlayer().restoreHPMP()
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4356,3),False,False)
			st.getPlayer().restoreHPMP()				
			return "4.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)

Link to comment
Share on other sites

or just remove that line and dont have any problems left?

 

no wait, you should stop running a server!

 

Shut up... we are no pro only community ...take ur damn words stricktly...

none said that to run a server u must be the best of the best....

if it was so only official would exist.....

 

Be polite with the others and btw do u have a server?

i cab see that ur server is the perfect one ,...tell me how to join plz...if u are so cool and proffesional ..than i wanna join ,... really....

 

idiot....

 

By anghel...

 

PS.oxi maxtor den thelw flame section..kai sorry pou to kana edw alla tou aksizi tou typou!!! palio pseftomaga norvige na poume.....

Link to comment
Share on other sites

if count < 150000 or st.getPlayer().getLevel() < 1 :

 

try this one...it works for me like that :P

 

for me too..it works ok...

 

EDIT: ox ekana vlakia plz a moderator merge my replies and remove one post from me....

 

thank you

 

 

Link to comment
Share on other sites

Anghel COOOOOOOOOOOOOL the next one of these kind is -1karma..

 

problem solved topic locked  if SuperNovaX wants me to unlock the topic  for any reason pm me ..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock