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.


  • Posts

    • Thank you for your reply. I have removed it from the L2Server.exe file, but the L2Server still crashes. It doesn't crash if I don't start l2npc, otherwise it will crash within a few days at the latest.
    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
  • Topics

×
×
  • Create New...