А что если такой
Скрытый текстimport sysfrom java.lang import Integer
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 import Quest
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
from net.sf.l2j import L2DatabaseFactory
from net.sf.l2j.gameserver.ai import CtrlIntention
from java.lang import System
###################
qn = "50301_Hero" #
NPC = 300300 #
###################
QuestDesc = "custom" # Папка хранения скрипта #
QuestName = "Hero" # Название квеста #
QuestId = 50301 # ID Квеста #
##############################################################
Item = 3478 # ID валюты #
Count = 30 # Цена на хиро за 1 день #
Count2 = 30 # Цена на хиро за 7 дней #
Count3 = 30 # Цена на хиро за 14 дней #
Count4 = 30 # Цена на хиро за месяц #
Count5 = 30 # Цена на хиро за год #
Iname = "Wmz Coin" # Имя валюты #
##############################################################
day = [] # Тут не трогаем
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onAdvEvent(self,event,npc,player) :
global day
st = player.getQuestState(qn)
htmltext = event
xHRx = 0
eventSplit = event.split(" ")
event = eventSplit[0]
if event == "setHero1den" :
if not player.isNoble() :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e,<br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0440\u044f\u043d\u0438\u043d\u043e\u043c !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif player.isHero():
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044b \u0438 \u0442\u0430\u043a \u0433\u0435\u0440\u043e\u0439 !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif st.getQuestItemsCount(Item) >= Count :
st.takeItems(Item,Count)
player.setHero(True)
heroTime = 86400000
heroTime2 = System.currentTimeMillis()
heroTime3 = heroTime2 + heroTime
obj_Id = str(player.getObjectId())
char_name = str(player.getName())
writelog=L2DatabaseFactory.getInstance().getConnection()
write=writelog.prepareStatement("INSERT INTO hero_custom_data (obj_Id,char_name,hero,hero_end_date) VALUES (?,?,?,?)")
write.setString(1, obj_Id)
write.setString(2, char_name)
write.setInt(3, 1)
write.setLong(4, heroTime3)
try :
write.executeUpdate()
write.close()
writelog.close()
except :
try : writelog.close()
except : pass
st.giveItems(6842,1)
st.playSound("ItemSound.quest_finish")
htmltext = "<html><title> HEROOUUU</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0445\u0438\u0440\u043E \u043D\u0430 1 \u0434\u0435\u043D\u044C.</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
st.exitQuest(1)
day = []
return htmltext
elif st.getQuestItemsCount(Item) < Count :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043D\u0435\u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043F\u0440\u0435\u0434\u043C\u0435\u0442\u043E\u0432 \u0434\u043B\u044F \u0445\u0438\u0440\u043E !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
if event == "setHero7den" :
if not player.isNoble() :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e,<br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0440\u044f\u043d\u0438\u043d\u043e\u043c !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif player.isHero():
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044b \u0438 \u0442\u0430\u043a \u0433\u0435\u0440\u043e\u0439 !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif st.getQuestItemsCount(Item) >= Count2 :
st.takeItems(Item,Count)
player.setHero(True)
heroTime = 604800000
heroTime2 = System.currentTimeMillis()
heroTime3 = heroTime2 + heroTime
obj_Id = str(player.getObjectId())
char_name = str(player.getName())
writelog=L2DatabaseFactory.getInstance().getConnection()
write=writelog.prepareStatement("INSERT INTO hero_custom_data (obj_Id,char_name,hero,hero_end_date) VALUES (?,?,?,?)")
write.setString(1, obj_Id)
write.setString(2, char_name)
write.setInt(3, 1)
write.setLong(4, heroTime3)
try :
write.executeUpdate()
write.close()
writelog.close()
except :
try : writelog.close()
except : pass
st.giveItems(6842,1)
st.playSound("ItemSound.quest_finish")
htmltext = "<html><title> HEROOUUU</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0445\u0438\u0440\u043E \u043D\u0430 1 \u0434\u0435\u043D\u044C.</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
st.exitQuest(1)
day = []
return htmltext
elif st.getQuestItemsCount(Item) < Count2 :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0445\u0438\u0440\u043E \u043D\u0430 7 \u0434\u043D\u0435\u0439.</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
if event == "setHero14den" :
if not player.isNoble() :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e,<br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0440\u044f\u043d\u0438\u043d\u043e\u043c !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif player.isHero():
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044b \u0438 \u0442\u0430\u043a \u0433\u0435\u0440\u043e\u0439 !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif st.getQuestItemsCount(Item) >= Count3 :
st.takeItems(Item,Count)
player.setHero(True)
heroTime = 1209600000
heroTime2 = System.currentTimeMillis()
heroTime3 = heroTime2 + heroTime
obj_Id = str(player.getObjectId())
char_name = str(player.getName())
writelog=L2DatabaseFactory.getInstance().getConnection()
write=writelog.prepareStatement("INSERT INTO hero_custom_data (obj_Id,char_name,hero,hero_end_date) VALUES (?,?,?,?)")
write.setString(1, obj_Id)
write.setString(2, char_name)
write.setInt(3, 1)
write.setLong(4, heroTime3)
try :
write.executeUpdate()
write.close()
writelog.close()
except :
try : writelog.close()
except : pass
st.giveItems(6842,1)
st.playSound("ItemSound.quest_finish")
htmltext = "<html><title> HEROOUUU</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0445\u0438\u0440\u043E \u043D\u0430 14 \u0434\u043D\u0435\u0439.</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
st.exitQuest(1)
day = []
return htmltext
elif st.getQuestItemsCount(Item) < Count3 :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043D\u0435\u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043F\u0440\u0435\u0434\u043C\u0435\u0442\u043E\u0432 \u0434\u043B\u044F \u0445\u0438\u0440\u043E !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
if event == "setHero31den" :
if not player.isNoble() :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e,<br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0440\u044f\u043d\u0438\u043d\u043e\u043c !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif player.isHero():
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044b \u0438 \u0442\u0430\u043a \u0433\u0435\u0440\u043e\u0439 !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif st.getQuestItemsCount(Item) >= Count4 :
st.takeItems(Item,Count)
player.setHero(True)
heroTime = 2678400000
heroTime2 = System.currentTimeMillis()
heroTime3 = heroTime2 + heroTime
obj_Id = str(player.getObjectId())
char_name = str(player.getName())
writelog=L2DatabaseFactory.getInstance().getConnection()
write=writelog.prepareStatement("INSERT INTO hero_custom_data (obj_Id,char_name,hero,hero_end_date) VALUES (?,?,?,?)")
write.setString(1, obj_Id)
write.setString(2, char_name)
write.setInt(3, 1)
write.setLong(4, heroTime3)
try :
write.executeUpdate()
write.close()
writelog.close()
except :
try : writelog.close()
except : pass
st.giveItems(6842,1)
st.playSound("ItemSound.quest_finish")
htmltext = "<html><title> HEROOUUU</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0445\u0438\u0440\u043E \u043D\u0430 \u043C\u0435\u0441\u044F\u0446.</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
st.exitQuest(1)
day = []
return htmltext
elif st.getQuestItemsCount(Item) < Count4 :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043D\u0435\u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043F\u0440\u0435\u0434\u043C\u0435\u0442\u043E\u0432 \u0434\u043B\u044F \u0445\u0438\u0440\u043E !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
if event == "setHeroGod" :
if not player.isNoble() :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e,<br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0440\u044f\u043d\u0438\u043d\u043e\u043c !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif player.isHero():
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044b \u0438 \u0442\u0430\u043a \u0433\u0435\u0440\u043e\u0439 !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
elif st.getQuestItemsCount(Item) >= Count5 :
st.takeItems(Item,Count)
player.setHero(True)
heroTime = 31536000000
heroTime2 = System.currentTimeMillis()
heroTime3 = heroTime2 + heroTime
obj_Id = str(player.getObjectId())
char_name = str(player.getName())
writelog=L2DatabaseFactory.getInstance().getConnection()
write=writelog.prepareStatement("INSERT INTO hero_custom_data (obj_Id,char_name,hero,hero_end_date) VALUES (?,?,?,?)")
write.setString(1, obj_Id)
write.setString(2, char_name)
write.setInt(3, 1)
write.setLong(4, heroTime3)
try :
write.executeUpdate()
write.close()
writelog.close()
except :
try : writelog.close()
except : pass
st.giveItems(6842,1)
st.playSound("ItemSound.quest_finish")
htmltext = "<html><title> HEROOUUU</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0412\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u043B\u0438 \u0445\u0438\u0440\u043E \u043D\u0430 \u0433\u043E\u0434.</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
st.exitQuest(1)
day = []
return htmltext
elif st.getQuestItemsCount(Item) < Count5 :
htmltext = "<html><title>Exclusive Shop</title><body><center><br><br>"
htmltext += "<img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043D\u0435\u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043F\u0440\u0435\u0434\u043C\u0435\u0442\u043E\u0432 \u0434\u043B\u044F \u0445\u0438\u0440\u043E !</font>"
htmltext += u"<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "</center></body></html>"
return htmltext
def onTalk(self,npc,player) :
htmltext = "Sorry !"
st = player.getQuestState(qn)
if not st :
st = self.newQuestState(player)
htmltext = "start.htm"
return htmltext
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
QUEST.addStartNpc(NPC)
QUEST.addTalkId(NPC)