При нажатии на баф Flu, окно обновляется, но баф не бафается.
Сборка PW (Interlude).
Вот html код:
Скрытый текст<html><title>Баффер->Баффы->Атакующие</title><body>
<table>
<tr>
<td width=60><font color=666666>В ручную</font></td>
<td width=50> </td>
<td width=50> </td>
<td width=40 align=right><a action="bypass -h npc_%objectId%_Chat 0">Назад</a></td>
</tr>
<tr>
<td><button value="Атака" action="" width=75 height=21 back="pw_pack.Bt_normalDisable2" fore="pw_pack.Bt_normalDisable2"></td>
<td><button value="Защита" action="bypass -h npc_%objectId%_Chat 12" width=75 height=21 back="pw_pack.Bt_normalDisable" fore="pw_pack.Bt_normalDisable"></td>
<td><button value="Поддержка" action="bypass -h npc_%objectId%_Chat 14" width=75 height=21 back="pw_pack.Bt_normalDisable" fore="pw_pack.Bt_normalDisable"></td>
</tr>
</table>
<font color=666666>Хороший баффер на ***.ru залог хорошей игры.</font><br1>
<center>
<table width=240>
<tr>
<td valign=top><img src=icon.skill1068 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1068 3">Might</a></td>
<td valign=top><img src=icon.skill1388 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1388 3">Greater Might</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1086 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1086 2">Haste</a></td>
<td valign=top><img src=icon.skill1077 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1077 3">Focus</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1242 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1242 2">Death Whisper</a></td>
<td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1240 3">Guidance</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1062 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 4352 2">Berserker</a></td>
<td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1085 3">Acumen</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1059 3">Empower</a></td>
<td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1303 2">Wild Magic</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1043 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1043 1">Holy Weapon</a></td>
<td valign=top><img src=icon.skill1356 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1356 1">Pr. of Fire</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1355 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1355 1">Pr. of Water</a></td>
<td valign=top><img src=icon.skill1357 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 1357 1">Pr. of Wind</a></td>
</tr>
<tr>
<td valign=top><img src=icon.skill1164 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 4553 4">Flu</a></td>
<td valign=top><img src=icon.skill1164 width=32 height=32 align=left></td>
<td><a action="bypass -h npc_%objectId%_Buff 1 4554 4">Malaria</a></td>
</tr>
</table>
</center>
</body>
</html>
вот скрипт:
Скрытый текстimport sysfrom 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 = "912_buffer"
attack = "ON"
defence = "ON"
resist = "ON"
support = "ON"
warcryer = "ON"
overlord = "ON"
song = "ON"
dance = "ON"
noble = "ON"
summon = "ON"
cubic = "ON"
NPC = [40003]
prise_ID = 57
QuestId = 912
QuestName = "buffer"
QuestDesc = "custom"
InitialHtml = "buff.htm"
#Выставление цен на бафы
min_level = 1
max_level = 90
min_prise = 25000
buff_prise = 25000
Chant_prise = 25000
song_prise = 25000
Dance_prise = 25000
Hero_prise = 25000
Noble_prise = 25000
Summon_prise = 25000
Prophecy_prise = 25000
cubic_prise = 50000
Full_buff_f1_prise = 200000
Full_buff_f2_prise = 400000
Full_buff_f3_prise = 600000
Full_buff_m1_prise = 200000
Full_buff_m2_prise = 400000
Full_buff_m3_prise = 600000
all_song_prise = 100000
all_dance_prise = 100000
print "importing custom: 912_buffer OK"
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(prise_ID)
if count < min_prise :
htmltext = u"<html><head><body>\u0423 \u0432\u0430\u0441 \u043d\u0435\u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432.</body></html>"
if st.getPlayer().getLevel() < min_level :
htmltext = u"<html><head><body>\u0412\u0430\u0448 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043d\u0438\u0437\u043a\u0438\u0439.</body></html>"
if st.getPlayer().getLevel() < max_level :
htmltext = u"<html><head><body>\u0412\u0430\u0448 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u0438\u0439.</body></html>"
else:
st.takeItems(prise_ID,0)
st.getPlayer().setTarget(st.getPlayer())
#Full buff fighter 3p
if event == "124":
st.takeItems(prise_ID,Full_buff_f3_prise)
SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1242,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1268,4).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(4699,13).getEffects(st.getPlayer(),st.getPlayer
())
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(), st.getPlayer().getMaxMp())
return "buff.htm"
st.exitQuest(1)
#Full buff fighter 2p
if event == "125":
st.takeItems(prise_ID,Full_buff_f2_prise)
SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1242,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1268,4).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer(
))
SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer()
)
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer()
)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(), st.getPlayer().getMaxMp())
return "buff.htm"
st.exitQuest(1)
#Full buff fighter 1p
if event == "126":
st.takeItems(prise_ID,Full_buff_f1_prise)
SkillTable.getInstance().getInfo(4553,4).getEffects(st.getPlayer(),st.getPlayer(
))
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(), st.getPlayer().getMaxMp())
return "buff.htm"
st.exitQuest(1)