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 .

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