Jump to content
  • 0

{HELP} Buffer .Html Problem!


Question

Posted

Well , I've Made A Buffer With Buff_Templates + Html. ( NO JSCRIPT + No QUESTS )

 

And I Have A Problem. Everything Works Correctly.

 

            BUT

 

When I Press a Buff The .HTML Closes And I Have To Press On The NPC Again To Take Buffs..

 

I Hope You Understand What I Mean.

 

Thanx In Advance.

 

P . S : HELP MEEEEEEEEEEEEEEEEEEEEEEE

1 answer to this question

Recommended Posts

  • 0
Posted

The problem is that you have not a script to return ur window back . Look what i mean .

Check this one :

 

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=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 higher.</body></html>"

else:

st.takeItems(ADENA_ID,0)

st.getPlayer().setTarget(st.getPlayer())

 

if event == "2":

st.takeItems(ADENA_ID,160000)

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)

 

==================================================================================================

 

Also i will tell you something to know . Script is something like effect or something like an event .

Hope you understood .

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..