Jump to content
  • 0

[Help]Npc buffer probblem with script.


MeVsYou

Question

Hello Mxc Members....

 

Well two days i am trying to fix the npc buffer i use .

Everything ok ,except Button "Heal" and "Cancel".

 

In the first page when you click on Npc buffer as .htm file for heal button and canel button is this :

 

<table>

<tr>

<td><button action="bypass -h Quest 60551_NPCBuffer 71" value="Heal" width=120 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

<td><button action="bypass -h Quest 60551_NPCBuffer 71" value="Cancel Buffs" width=120 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>

<td></td>

</tr>

</table>

 

 

Now as about : scripts/custom/60551_NPCBuffer/_init_.py    :

 

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 = "60551_NPCBuffer"
NPCS=[60551]
ADENA_ID=57
QuestId     = 60551
QuestName   = "NPCBuffer"
QuestDesc   = "custom"

print "Loaded: Buffer by Myxoske [version 0.5]"

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 < 0 or st.getPlayer().getLevel() < 1 :
		htmltext = "<html><head><body>Come back later.<br></body></html>"
	else:
		st.takeItems(ADENA_ID,0)
		st.getPlayer().setTarget(st.getPlayer())

		if event == "1":
			st.takeItems(ADENA_ID,0)
			SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
			st.getPlayer().stopAllEffects()
			return "1.htm"
			st.setState(State.COMPLETED)

		if event == "71":
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(90001,1),False,False)
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(90002,1),False,False)
			st.getPlayer().useMagic(SkillTable.getInstance().getInfo(90003,1),False,False)
			return "1.htm"		
			st.setState(State.COMPLETED)

			if htmltext != event:
			st.setState(State.COMPLETED)
			st.exitQuest(1)
	return htmltext
      
def onTalk (self,npc,player):
	return "1.htm"

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPCS:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

 

 

 

and at stats/skills  i made a .xml file named Heal with the following :

 

 

 

<?xml version='1.0' encoding='utf-8'?>
<list>
<skill id="90001" levels="1" name="Mega CP Heal">
  <set name="mpConsume" val="0"/>
  <set name="power" val="65535"/>
  <set name="target" val="TARGET_SELF"/>
  <set name="hitTime" val="1"/>
  <set name="reuseDelay" val="1"/>
  <set name="skillType" val="COMBATPOINTHEAL"/>
  <set name="isMagic" val="true"/>
  <set name="operateType" val="OP_ACTIVE"/>
  <set name="castRange" val="-1"/>
</skill>
<skill id="90002" levels="1" name="Mega HP Heal">
  <set name="mpConsume" val="0"/>
  <set name="power" val="65535"/>
  <set name="target" val="TARGET_SELF"/>
  <set name="reuseDelay" val="1"/>
  <set name="hitTime" val="1"/>
  <set name="skillType" val="HEAL"/>
  <set name="isMagic" val="true"/>
  <set name="operateType" val="OP_ACTIVE"/>
  <set name="castRange" val="-1"/>
</skill>
<skill id="90003" levels="1" name="Mega MP Heal">
  <set name="mpConsume" val="0"/>
  <set name="power" val="65535"/>
  <set name="target" val="TARGET_SELF"/>
  <set name="reuseDelay" val="1"/>
  <set name="hitTime" val="1"/>
  <set name="skillType" val="MANARECHARGE"/>
  <set name="isMagic" val="true"/>
  <set name="operateType" val="OP_ACTIVE"/>
  <set name="castRange" val="-1"/>
</skill>
</list>

 

 

 

 

But when i click at Heal and at Cancle button ingame,nothing happened.What i am doing wrong?

Plz help me,i can't any more this shit :/

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

Nevermind,solution not found.....

 

I lock the topic because i will stop trying add this ### npc,i will try with other one.

If i will have any further questions i will reply here.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



×
×
  • Create New...