Скачал с ихнего сайта бонус пак . В нем во всех __init__.py бонус пака кодированный русский текст.Подскажите пожалуйста какой программой кодирован он ,в какой кодировке.
Вот сам скрипт :
Если что не так оформлено , не ругайтесь.
Вот сам скрипт :
Код:
import sys
from java.lang import Integer
from com.l2jcore.Game.model.entity import Hero
from com.l2jcore.Game.model.quest import State
from com.l2jcore.Game.model.quest import QuestState
from com.l2jcore.Game.model.quest.jython import QuestJython as JQuest
###################
qn = "50301_Hero" #
NPC = 300300 #
###################
##############################################################
Item = 4037 # ID валюты #
Count = 2 # Каждый день гер.уможается на цену #
Iname = "Coin of Luck" # Имя валюты #
##############################################################
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 == "countHero" :
try :
xHRx = Integer.parseInt(eventSplit[1])
except :
htmltext = "start.htm"
return htmltext
if (xHRx < 10):
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\">\u041c\u0438\u043d\u0438\u043c\u0443\u043c \u0445\u0438\u0440\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 10 \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
day.append(xHRx)
counts = int(xHRx*Count)
st.playSound("ItemSound.quest_accept")
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>"
htmltext += u"<table><tr><td align=center><font color=\"FF0000\">"+str(xHRx)+"</font> "
htmltext += u"<font color=\"LEVEL\">\u0434\u043d\u0435\u0439 \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u0430,</td></tr>"
htmltext += u"<tr><td align=center>C\u0442\u043e\u0438\u0442:</font> <font color=\"FF0000\">"+str(counts)+"</font> <font color=\"LEVEL\">"+Iname+" !</font></td></tr></table>"
htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"
htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u043b\u0443\u0447\u0442\u044c \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e\" action=\"bypass -h Quest 50301_Hero setHero\" width=135 height=24 back=\"L2UI_CH3.bigbutton3_down\" fore=\"L2UI_CH3.bigbutton3\"></td></tr>"
htmltext += u"<tr><td></td></tr><tr><td align=center><button value=\"\u041e\u0442\u043c\u0435\u043d\u0430\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table>"
htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32>"
htmltext += "</center></body></html>"
return htmltext
if event == "setHero" :
days = day[0]
countss = int(days*Count)
if st.getQuestItemsCount(Item) < countss :
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 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</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 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
st.takeItems(Item,countss)
Heroes.getInstance().addHero(player,days)
st.giveItems(6842,1)
st.playSound("ItemSound.quest_finish")
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 \u0433\u0435\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430</font> <font color=\"FF0000\">"+str(days)+"</font> "
htmltext += u"<font color=\"LEVEL\">\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
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(50301,qn,"custom")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(NPC)
QUEST.addTalkId(NPC)
Если что не так оформлено , не ругайтесь.