Свернуть ↑
import sys
from net.l2emuproject.gameserver.model.quest import State
from net.l2emuproject.gameserver.model.quest import QuestState
from net.l2emuproject.gameserver.model.quest.jython import QuestJython as JQuest
qn = "90000_BShopR"
NPC=[90000]
html = '<html><body>\
<center><img src="L2Font.mini_logo-k" width=250 height=90></center><br>\
<center><img src="L2UI.SquareWhite" width=245 height=1></center>\
<center>\
<table width=230 border=0 bgcolor=333333>\
<tr>\
<td align=center><button value="Life Stone" action="bypass -h npc_%objectId%_multisell 909930" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>\
<td align=center><button value="Scroll" action="bypass -h npc_%objectId%_multisell 909940" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>\
<td align=center><button value="Book" action="bypass -h npc_%objectId%_multisell 909960" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>\
</tr>\
<tr>\
<td align=center><button value="Sigil" action="bypass -h npc_%objectId%_multisell 909970" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>\
<td align=center><button value="Tatto" action="bypass -h npc_%objectId%_multisell 909990" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>\
<td align=center><button value="Armor PvP" action="bypass -h npc_%objectId%_multisell 909980" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>\
</tr>\
</table>\
<br>\
<center><button value="Pet" action="bypass -h npc_%objectId%_multisell 909950" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></center>\
<center><img src="L2UI.SquareWhite" width=245 height=1></center>\
<br>\
<button value="Back" action="bypass -h npc_%objectId%_Chat 0" width=85 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"><br>\
</center>\
</body>\
</html>'
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st):
return event
def onTalk (self,npc,player):
st = player.getQuestState(qn)
if player.isNoble() == 1 :
bypass = 'Quest 2040_NShop noble-nopass.htm'
if st.getQuestItemsCount(6651):
bypass = 'npc_%objectId%_Chat 3'
htmltext=html.replace("%bypass%",str(bypass)).repl ace("%objectId%",str(npc.getObjectId()))
else :
htmltext="nobleteleporter-no.htm"
return htmltext
QUEST = Quest(90000,qn,"custom")
for item in NPC:
QUEST.addStartNpc(item)
QUEST.addTalkId(item)
print " "
print "_________________________________________________ "
print " Special Shop for Baron Rus Gracia Final"
print " Created by Aniki La2offline Team (C) 2009"
print " For more details Visit WWW.LA2OFFLINE.NET"
print "_________________________________________________ "
print " "