![]() |
![]() |
|
Lineage II
|
![]() |
Опции темы |
![]() |
#1 |
Пользователь
|
![]()
Здравствуйте.
Столкнулся с проблемой при установке донат шопа на сборку L2jTeon. Переделал импорты, всё вписал в скрипт.цфг. При запуске ГС выдает ошибку: Еррор с лога: 2:Свернуть ↑
Error on: C:\L2j-Teon_rev.1124\L2j-Teon_rev.1124\L2j-Teon rev.1124\L2jTeon_GameServer\L2jTeon_GameServer\dat a\scripts\custom\q8019_SetHero\__init__.py.error.l og
Свернуть ↑Развернуть ↓
Line: -1 - Column: -1 Traceback (innermost last): File "__init__.py", line 80, in ? TypeError: net.sf.l2j.gameserver.model.quest.State(): expected 0 args; got 2 Возможно проблема в не правельном написании импортов? Импорты: import sys from java.util import Iterator from java.lang import System from time import gmtime, strftime from net.sf.l2j import L2DatabaseFactory from net.sf.l2j.util import Rnd 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 from net.sf.l2j.gameserver.network.serverpackets import CharInfo from net.sf.l2j.gameserver.network.serverpackets import SocialAction from net.sf.l2j.gameserver.network.serverpackets import UserInfo Очень прошу вас о помощи. Буду очень благодарен. Или вся проблема заключается в неправельном написании ___init___py? init.py:Свернуть ↑
import sys
Свернуть ↑Развернуть ↓
from java.util import Iterator from java.lang import System from time import gmtime, strftime from net.sf.l2j import L2DatabaseFactory from net.sf.l2j.util import Rnd 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 from net.sf.l2j.gameserver.network.serverpackets import CharInfo from net.sf.l2j.gameserver.network.serverpackets import SocialAction from net.sf.l2j.gameserver.network.serverpackets import UserInfo qn = "q8019_SetHero" NPC = 99999 ITEM = 5962 # итем необходимый для обмена COST = 80 # стоимость INAME = "Gold Golem" # название итема class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onAdvEvent (self,event,npc,player): st = player.getQuestState(qn) if event == "step1": if st.getQuestItemsCount(ITEM) < COST: htmltext = "<html><body>Статус хиро: <font color=74bff5>"+str(COST)+" "+INAME+"</font></body></html>" return htmltext elif player.isHero(): htmltext = "<html><body>Вы уже герой..)</body></html>" return htmltext htmltext = "<html><body><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI.SquareBlank\" width=260 height=2><br1>" htmltext += "Статус хиро на 1 месяц: <font color=74bff5>"+str(COST)+" "+INAME+"</font>" htmltext += "<button value=\"Продолжить\" action=\"bypass -h Quest q8019_SetHero step2\" width=80 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32></body></html>" elif event == "step2": if st.getQuestItemsCount(ITEM) < COST: htmltext = "<html><body>Статус хиро: <font color=74bff5>"+str(COST)+" "+INAME+"</font></body></html>" return htmlte htmltext = "<html><body>Теперь вы Герой!<br><br>" #< st.takeItems(ITEM,COST) player.setHero(30) #< login = str(player.getAccountName()) name = str(player.getName()) date = str(strftime("%Y-%m-%d", gmtime())) time = str(strftime("%H:%M:%S", gmtime())) writelog=L2DatabaseFactory.getInstance().getConnec tion() write=writelog.prepareStatement("INSERT INTO zz_donate_log (date,time,login,name,action,payment) VALUES (?,?,?,?,?,?)") write.setString(1, date) write.setString(2, time) write.setString(3, login) write.setString(4, name) write.setString(5, "Hero Status") write.setInt(6, COST) try : write.executeUpdate() write.close() writelog.close() except : try : writelog.close() except : pass #< htmltext += "<font color=bef574>Спасибо за поддержку!</font><br></body></html>" else: htmltext = "<html><body>Статус хиро:<br>Oops!</body></html>" return htmltext def onTalk (self,npc,player): st = player.getQuestState(qn) npcId = npc.getNpcId() if npcId == NPC: self.startQuestTimer("step1",100,None,player) return QUEST = Quest(8019,qn,"custom") CREATED = State('Start', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(NPC) QUEST.addTalkId(NPC) Добавлено через 40 минут Уже вот 3-ий день сижу над этим донат шопом, продвежений вообще нету ![]() Последний раз редактировалось MegaPvP; 27.03.2011 в 14:29. Причина: Добавлено сообщение |
![]() |
![]() |
![]() |
#2 |
Супергерой
|
![]()
Если думаете, что в импортах проблема, почему бы не пройтись по этим импортам и не посмотреть самому их правильность?
Web программист\разработчик — Есть только один способ проделать большую работу — полюбить ее. Если вы к этому не пришли, подождите. Не беритесь за дело. |
![]() ![]() |
![]() |
[STIGMATED] |
Посмотреть профиль |
Найти ещё сообщения от [STIGMATED] |
![]() |
#3 |
Пользователь
|
![]()
А возможно есть какой нибудь другой способ создать под раздел в донат шопе "Геройство"??
Добавлено через 31 минуту Как я понял, вся проблема вот в этих строках: 1:Свернуть ↑
QUEST = Quest(8019,qn,"custom")
Свернуть ↑Развернуть ↓
CREATED = State('Start', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(NPC) QUEST.addTalkId(NPC) Только вот я даже представления не имею, что в них нужно изменить. ![]() Очень прошу вас о помощи! ![]() Последний раз редактировалось MegaPvP; 27.03.2011 в 15:15. Причина: Добавлено сообщение |
![]() |
![]() |
![]() |
#4 |
Пользователь
|
![]() 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 = 300301 # ################### ################################################## ############ 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\u04 43\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\u 0430,</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\u 043e\" 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\u 043d\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\u 043e,<br>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u043e\u0440\u044f\u043d\u0438\u043d\u 043e\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\u 043e \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) init.py 2:Свернуть ↑
from com.l2jcore.Game.datatables.sql import CharNameTable
Свернуть ↑Развернуть ↓
from com.l2jcore.Game.model import L2World 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 from com.l2jcore.Game.util import Util; from java.util.regex import Pattern; NPC = 300301 ITEM_ID = 4037 NAME_COUNT = 20 COLOR_COUNT = 20 class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent(self,event,st) : if event == "1": return "1.htm" if event == "2": return "2.htm" if event == "3": return "3.htm" if event == "200": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x0000 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "201": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x0000 90) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "202": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x0000 ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "203": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x0090 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "204": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x00ff 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "205": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x9000 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "206": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0xff00 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "207": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x0090 90) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "208": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x0090 ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "209": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x00ff ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "210": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x9000 90) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "211": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x9000 ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "212": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0xff00 ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "213": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0x9090 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "214": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0xffff 00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "215": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setNameColor(0xffff ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "300": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x000 000) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "301": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x000 090) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "302": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x000 0ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "303": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x009 000) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "304": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x00f f00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "305": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x900 000) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "306": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0xff0 000) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "307": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x009 090) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "308": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x009 0ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "309": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x00f fff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "310": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x900 090) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "311": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x900 0ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "312": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0xff0 0ff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "313": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0x909 000) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "314": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0xfff f00) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if event == "315": if st.getQuestItemsCount(ITEM_ID) >= COLOR_COUNT: st.takeItems(ITEM_ID,COLOR_COUNT) st.getPlayer().getAppearance().setTitleColor(0xfff fff) st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" if not CharNameTable.getInstance().doesCharNameExist(even t): if len(event) >= 3 and len(event) <= 16 and Pattern.matches("[A-Za-z0-9\`\~\!\@\#\$\%\^\*\(\)\_\-\=\[\]\'\.\,\:\;]*", event): if st.getPlayer().isClanLeader(): return "<html><head><body><center>Clan leaders no can change name!</center></body></html>" if st.getPlayer().getClan(): return "<html><head><body><center>Clan members no can change name!</center></body></html>" if st.getQuestItemsCount(ITEM_ID) >= NAME_COUNT: st.takeItems(ITEM_ID,NAME_COUNT) L2World.getInstance().removeFromAllPlayers(st.getP layer()); st.getPlayer().setName(event); st.getPlayer().store(); L2World.getInstance().addToAllPlayers(st.getPlayer ()); st.getPlayer().broadcastUserInfo(); return "4.htm" else: return "<html><head><body><center>Item count is incorrect!</center></body></html>" else: return "<html><head><body><center>Name is incorrect!</center></body></html>" else: return "<html><head><body><center>Name already exist!</center></body></html>" return "<html><head><body><center>Item count is incorrect!</center></body></html>" def onTalk (self,npc,player): return "0.htm" QUEST = Quest(8833, "8833_Name", "custom") CREATED = State('Start',QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(NPC) QUEST.addTalkId(NPC) init.py(Clan):Свернуть ↑
import sys
Свернуть ↑Развернуть ↓
from com.l2jcore.Game.model import L2Skill 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 from com.l2jcore.Game.model.actor.instance import L2PcInstance from com.l2jcore.Game.datatables import SkillTable from com.l2jcore.Game.network.serverpackets import PledgeSkillList from com.l2jcore.Game.network.serverpackets import PledgeShowInfoUpdate from com.l2jcore.Game.network.serverpackets import SystemMessage from java.lang import Integer ################# qn = "917_Clan" # NPC = 300301 # ################# ######################################### # Управление лвл-ом клана # ######################################### Item1 = 4037 # ID Итема # Name1 = "CoL" # Имя Итема # Count1 = 10 # Цена за 6 лвл клана # Count2 = 15 # Цена за 7 лвл клана # Count3 = 20 # Цена за 8 лвл клана # ######################################### ######################################### # Управление репутацией клана # ######################################### Item2 = 4037 # ID Итема # Name2 = "CoL" # Имя Итема # Count4 = 5 # Цена 50к репутации # Count5 = 10 # Цена 100к репутации # ######################################### ######################################### # Управление скиллами клана # ######################################### Item3 = 4037 # ID Итема # Name3 = "CoL" # Имя Итема # Count6 = 20 # Цена за клан скиллы # ######################################### class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onAdvEvent(self, event, npc, player) : st = player.getQuestState(qn) htmltext = event xCLANx = 0 eventSplit = event.split(" ") event = eventSplit[0] try : xCLANx = Integer.parseInt(eventSplit[1]) except : 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 \u043d\u0435 \u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0432\u0435\u043b\u0438 \u0432 \u043f\u043e\u043b\u0435 !</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><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 == "level": if xCLANx == 6 : 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\">6 LvL \u043a\u043b\u0430\u043d\u0430 \u0441\u0442\u043e\u0438\u0442:</font> <font color=\"FF0000\">"+str(Count1)+"</font> <font color=\"LEVEL\">"+Name1+" !</font>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c LvL\" action=\"bypass -h Quest 917_Clan lvl 6\" 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>" st.playSound("ItemSound.quest_accept") elif xCLANx == 7 : 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\">7 LvL \u043a\u043b\u0430\u043d\u0430 \u0441\u0442\u043e\u0438\u0442:</font> <font color=\"FF0000\">"+str(Count2)+"</font> <font color=\"LEVEL\">"+Name1+" !</font>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c LvL\" action=\"bypass -h Quest 917_Clan lvl 7\" 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>" st.playSound("ItemSound.quest_accept") elif xCLANx == 8 : 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\">8 LvL \u043a\u043b\u0430\u043d\u0430 \u0441\u0442\u043e\u0438\u0442:</font> <font color=\"FF0000\">"+str(Count3)+"</font> <font color=\"LEVEL\">"+Name1+" !</font>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c LvL\" action=\"bypass -h Quest 917_Clan lvl 8\" 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>" st.playSound("ItemSound.quest_accept") else: 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\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 6,7,8 LvL \u043a\u043b\u0430\u043d\u0430 !</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><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) return htmltext if event == "lvl": if not st.getPlayer().isClanLeader() : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u041f\u043e\u0432\u044b\u0441\u04 38\u0442\u044c LvL \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0434\u0435\u0440 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" elif st.getPlayer().getClan().getLevel() >= 8 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u 044c\u043d\u044b\u0439 LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" elif xCLANx == 6 : if st.getQuestItemsCount(Item1) < Count1 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u 043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" elif st.getPlayer().getClan().getLevel() >= 7 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043d\u0438\u0437\u0438\u0442\u044c LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" elif st.getPlayer().getClan().getLevel() >= 6 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 6 LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.takeItems(Item1,Count1) st.getPlayer().getClan().changeLevel(6) st.getPlayer().getClan().broadcastToOnlineMembers( PledgeShowInfoUpdate(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 6 LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.exitQuest(1) elif xCLANx == 7 : if st.getQuestItemsCount(Item1) < Count2 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u 043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" elif st.getPlayer().getClan().getLevel() >= 7 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 7 LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.takeItems(Item1,Count2) st.getPlayer().getClan().changeLevel(7) st.getPlayer().getClan().broadcastToOnlineMembers( PledgeShowInfoUpdate(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 7 LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.exitQuest(1) elif xCLANx == 8 : if st.getQuestItemsCount(Item1) < Count3 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u 043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.takeItems(Item1,Count3) st.getPlayer().getClan().changeLevel(8) st.getPlayer().getClan().broadcastToOnlineMembers( PledgeShowInfoUpdate(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 8 LvL \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.exitQuest(1) if event == "reput": if xCLANx == 50000 : 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\">50k \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 0438 \u0441\u0442\u043e\u0438\u0442:</font> <font color=\"FF0000\">"+str(Count4)+"</font> <font color=\"LEVEL\">"+Name2+" !</font>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 044e\" action=\"bypass -h Quest 917_Clan rep 50000\" 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>" st.playSound("ItemSound.quest_accept") elif xCLANx == 100000 : 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\">100k \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 0438 \u0441\u0442\u043e\u0438\u0442:</font> <font color=\"FF0000\">"+str(Count5)+"</font> <font color=\"LEVEL\">"+Name2+" !</font>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 044e\" action=\"bypass -h Quest 917_Clan rep 100000\" 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>" st.playSound("ItemSound.quest_accept") else: 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\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 50k \u0438\u043b\u0438 100k \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 0438 !</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><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) return htmltext if event == "rep": if xCLANx == 50000 : if st.getQuestItemsCount(Item1) < Count4 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u 043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.takeItems(Item1,Count4) st.getPlayer().getClan().setReputationScore(st.get Player().getClan().getReputationScore()+50000,True ) st.getPlayer().getClan().broadcastToOnlineMembers( PledgeShowInfoUpdate(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 50k \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 0438 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.exitQuest(1) elif xCLANx == 100000 : if st.getQuestItemsCount(Item1) < Count5 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u 043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.takeItems(Item1,Count5) st.getPlayer().getClan().setReputationScore(st.get Player().getClan().getReputationScore()+100000,Tru e) st.getPlayer().getClan().broadcastToOnlineMembers( PledgeShowInfoUpdate(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 100k \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 0438 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.exitQuest(1) if event == "skill": if xCLANx == 9999 : 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\u0441\u0435 \u043a\u043b\u0430\u043d \u0441\u043a\u0438\u043b\u043b\u044b \u0441\u0442\u043e\u044f\u0442:</font> <font color=\"FF0000\">"+str(Count6)+"</font> <font color=\"LEVEL\">"+Name3+" !</font>" 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\u0438\u0442 \u044c \u0441\u043a\u0438\u043b\u043b\u044b\" action=\"bypass -h Quest 917_Clan skills 8888\" 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>" st.playSound("ItemSound.quest_accept") else: 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 \u0441\u043a\u0438\u043b\u043b\u044b,<br>\u0412 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e !</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><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) return htmltext if event == "skills": if xCLANx == 8888 : if st.getQuestItemsCount(Item3) < Count6 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u 043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" elif not st.getPlayer().isClanLeader() : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0422\u043e\u043b\u044c\u043a\u04 3e \u043b\u0438\u0434\u0435\u0440 \u043a\u043b\u0430\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043a\u0438\u043b\u043b\u044b !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.takeItems(Item3,Count6) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(370,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(371,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(372,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(373,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(374,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(375,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(376,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(377,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(378,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(379,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(380,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(381,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(382,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(383,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(384,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(385,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(386,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(387,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(388,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(389,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(390,3)) st.getPlayer().getClan().addNewSkill(SkillTable.ge tInstance().getInfo(391,1)) st.getPlayer().getClan().broadcastToOnlineMembers( PledgeSkillList(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u043a\u043b\u0430\u043d \u0441\u043a\u0438\u043b\u043b\u044b !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" st.exitQuest(1) def onTalk(self, npc, player) : htmltext = u"<html><title>Exclusive Shop</title><body><br><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u041c\u043d\u0435 \u043d\u0435 \u0447\u0435\u0433\u043e \u0432\u0430\u043c \u0441\u043a\u0430\u0437\u0430\u0442\u044c !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=center><br><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\"></center></body></html>" st = player.getQuestState(qn) if not st : st = self.newQuestState(player) elif not player.getClan(): return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435\u0442\u0443 \u043a\u043b\u0430\u043d\u0430 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><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></center></body></html>" clanlvl = str(st.getPlayer().getClan().getLevel()) reputation = str(st.getPlayer().getClan().getReputationScore()) htmltext = "<html><title>Exclusive Shop</title><body><center><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 width=150><tr><td align=center><font color=\"FF0000\">..:: \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u 0438\u044f \u043e \u043a\u043b\u0430\u043d\u0435 ::..</font></td></tr>" htmltext += u"<tr><td align=center>LvL \u043a\u043b\u0430\u043d\u0430: <font color=\"LEVEL\">"+clanlvl+"</font></td></tr>" htmltext += u"<tr><td align=center>\u041e\u0447\u043a\u043e\u0432 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 0438: <font color=\"LEVEL\">"+reputation+"</font></td></tr></table>" htmltext += "<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" htmltext += u"<table width=140><tr><td align=center>\u0412\u0432\u0435\u0434\u0438\u0442\ u0435 \u0447\u0438\u0441\u043b\u043e:</td><td align=center><edit var=\"name\" width=45 length=6></td></tr></table><br>" htmltext += u"<table><tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c LvL \u043a\u043b\u0430\u043d\u0430\" action=\"bypass -h Quest 917_Clan level $name no_name\" width=135 height=24 back=\"L2UI_CH3.bigbutton3_down\" fore=\"L2UI_CH3.bigbutton3\"></td></tr>" htmltext += u"<tr><td align=center><button value=\"\u041f\u043e\u0432\u044b\u0441\u0438\u0442 \u044c \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u 044e\" action=\"bypass -h Quest 917_Clan reput $name no_name\" width=135 height=24 back=\"L2UI_CH3.bigbutton3_down\" fore=\"L2UI_CH3.bigbutton3\"></td></tr>" htmltext += u"<tr><td align=center><button value=\"\u041f\u043e\u043b\u0443\u0447\u0438\u0442 \u044c \u0441\u043a\u0438\u043b\u043b\u044b\" action=\"bypass -h Quest 917_Clan skill 9999\" width=135 height=24 back=\"L2UI_CH3.bigbutton3_down\" fore=\"L2UI_CH3.bigbutton3\"></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 QUEST = Quest(917,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) |
![]() |
![]() |
![]() |
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1) | |
Опции темы | |
|
|
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Импорты,питон | Илюхастый | Работа со скриптами | 2 | 12.02.2011 11:05 |
L2Evo 3.1.5 (Импорты-Классы) | expos | Lineage II | 1 | 23.09.2010 04:30 |