Witaj
Gość

Wątek: Problem z NPC  (Przeczytany 3217 razy)

  • Wiadomości: 67

  • Pochwał: 0

Problem z NPC
« dnia: Wrzesień 22, 2008, 10:29:00 am »
Ściągnełem sobie buffera. Wgrałem go wszystko ok ale jak chce wziąśc buffy to pisze mi takie cos: You are either not carrying out your quest or don't meet the criteria. Nie wiem o jakie kryteria chodzi. Wie ktoś co może byc przyczyna nie działania NPC?


  • Wiadomości: 20

  • Pochwał: -2

Odp: Problem z NPC
« Odpowiedź #1 dnia: Wrzesień 22, 2008, 10:59:46 am »
you are either brainless or fucktarded, or dont meet the niggaz there which would help you - bardzo popularny problem, albo źle wgrany bufferek a nawet jeśli dobrze to sie lubi podupczyć tak ze niepasuje

//minusik, chyba wiesz za co. Salek.
« Ostatnia zmiana: Wrzesień 22, 2008, 04:03:54 pm wysłana przez Saladin »


  • ******
  • Wiadomości: 1390

  • Pochwał: 15

  • Urażona dzidzia, urażona dzidzia!
Odp: Problem z NPC
« Odpowiedź #2 dnia: Wrzesień 22, 2008, 01:07:01 pm »
Pierw sprawdzcie w pliku pythona czy lvl od którego można brać buffy jest spełniony (często to jest deklarowane). Czy ID adeny jest dobrze wpisany oraz czy w pliku scripts.cfg jest dokładny wpis


  • Wiadomości: 20

  • Pochwał: -2

Odp: Problem z NPC
« Odpowiedź #3 dnia: Wrzesień 22, 2008, 02:03:14 pm »
wsumie w C:\SERVER\gameserver\data\scripts\custom\9999_NPCBuffer wygenerowało dokument "__init__.py.error" a oto jego zawartość:
Error on: C:\SERVER\gameserver\data\scripts\custom\9999_NPCBuffer\__init__.py.error.log
Line: -1 - Column: -1

Traceback (innermost last):
  (no code object) at line 0
SyntaxError: ('invalid syntax', ('__init__.py', 8, 40, 'from net.sf.l2j.gameserver.model.quest'))
tyle że nie wiem jak to zinterpretować


  • ******
  • Wiadomości: 1390

  • Pochwał: 15

  • Urażona dzidzia, urażona dzidzia!
Odp: Problem z NPC
« Odpowiedź #4 dnia: Wrzesień 22, 2008, 02:05:17 pm »
Cytuj
SyntaxError: ('invalid syntax', ('__init__.py', 8, 40, 'from net.sf.l2j.gameserver.model.quest'))

Pisze jak byk ?


  • Wiadomości: 67

  • Pochwał: 0

Odp: Problem z NPC
« Odpowiedź #5 dnia: Wrzesień 22, 2008, 03:08:04 pm »
Teraz mam problem ze sklepem wyskakuje mi to samo. Oto kod pythona:
Ja nie moge dojsc co jest nie tak.

import sys
from java.util import Iterator
from net.sf.l2j.util import Rnd
from net.sf.l2j.gameserver.serverpackets import CreatureSay
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 import L2DatabaseFactory
from net.sf.l2j.gameserver.serverpackets import SystemMessage
from net.sf.l2j.gameserver.model import L2ItemInstance
from net.sf.l2j.gameserver.model import L2World
from net.sf.l2j.gameserver.serverpackets import ConfirmDlg
from net.sf.l2j.gameserver.serverpackets import UserInfo
from net.sf.l2j.gameserver.serverpackets import CharInfo
from net.sf.l2j.gameserver.serverpackets import InventoryUpdate
from net.sf.l2j.gameserver.datatables import ItemTable
from net.sf.l2j.gameserver.idfactory import IdFactory
from net.sf.l2j.gameserver.serverpackets import ShowCalculator

qn = "q8032_MarketBuy"

MARKET = 80007

#limit na stranicu
LIMIT = 14

#äë˙ îňîáđŕćĺíč˙ öĺí
FIRMONEY = "Adena" #1ŕ˙ âŕëţňŕ, íŕçâŕíčĺ
SECMONEY = "Coin of Luck" #2ŕ˙ âŕëţňŕ, íŕçâŕíčĺ

#type
weapons = "<button value=\"Îđóćčĺ\" action=\"bypass -h Quest q8032_MarketBuy show_1\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
armors = "<button value=\"Áđîí˙\" action=\"bypass -h Quest q8032_MarketBuy show_2\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
resources = "<button value=\"Đĺńű\" action=\"bypass -h Quest q8032_MarketBuy show_3\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
recipes = "<button value=\"Đĺöĺďňű\" action=\"bypass -h Quest q8032_MarketBuy show_4\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
books = "<button value=\"Ęíčăč\" action=\"bypass -h Quest q8032_MarketBuy show_5\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
soulshots = "<button value=\"Ďŕňđîíű\" action=\"bypass -h Quest q8032_MarketBuy show_6\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
aadena = "<button value=\"Ďĺ÷ŕňč\" action=\"bypass -h Quest q8032_MarketBuy show_7\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
scrolls = "<button value=\"Ńęđîëëű\" action=\"bypass -h Quest q8032_MarketBuy show_8\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
crystals = "<button value=\"Ęđč\" action=\"bypass -h Quest q8032_MarketBuy show_9\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
potions = "<button value=\"Çĺëü˙\" action=\"bypass -h Quest q8032_MarketBuy show_10\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
tatoos = "<button value=\"Ňŕňó\" action=\"bypass -h Quest q8032_MarketBuy show_11\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
arrows = "<button value=\"Ńňđĺëű\" action=\"bypass -h Quest q8032_MarketBuy show_12\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
sacry = "<button value=\"ŃŔ ęđč\" action=\"bypass -h Quest q8032_MarketBuy show_13\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
fishing = "<button value=\"Óäî÷ęč\" action=\"bypass -h Quest q8032_MarketBuy show_14\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
questsit = "<button value=\"Ęâĺńň\" action=\"bypass -h Quest q8032_MarketBuy show_15\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">"
poisk = ""
#
sorts = {1: "Weapon", 2: "Armor", 3: "Resource", 4: "Recipe", 5: "Spellbook", 6: "Soulshot", 7: "AncientAdena", 8: "Scroll", 9: "Crystal", 10: "Potion", 11: "Tatoo", 12: "Arrow", 13: "SoulCrystal", 14: "Rod", 15: "QuestItems"}
trans = {1: "Îđóćčĺ", 2: "Áđîí˙", 3: "Đĺńóđńű", 4: "Đĺöĺďňű", 5: "Ęíčćęč", 6: "Ďŕňđîíű", 7: "7 ďĺ÷ŕňĺé", 8: "Ńęđîëëű", 9: "Ęđčńňŕëëű", 10: "Çĺëü˙", 11: "Ňŕňó", 12: "Ńňđĺëű", 13: "ŃŔ ęđč", 14: "Óäî÷ęč", 15: "Ęâĺńňîâűĺ"}
#

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 == "list" :
     st.unset("stranic")
     st.unset("moreitem")
     st.unset("morecount")
     st.unset("moreprice")
     htmltext = "<html><body>Cďčńîę ňîâŕđîâ:<br>"
     htmltext += "<table width=300><tr><td>"+weapons+"</td><td>"+armors+"</td><td>"+resources+"</td><td>"+recipes+"</td><td>"+books+"</td></tr>"
     htmltext += "<tr><td>"+potions+"</td><td>"+crystals+"</td><td>"+scrolls+"</td><td>"+aadena+"</td><td>"+soulshots+"</td></tr>"
     htmltext += "<tr><td>"+questsit+"</td><td>"+fishing+"</td><td>"+sacry+"</td><td>"+arrows+"</td><td>"+tatoos+"</td></tr></table>"
     htmltext += "<table width=300><tr><td></td><td>Ďîńëĺäíčĺ "+str(LIMIT)+":</td></tr>"
     con=L2DatabaseFactory.getInstance().getConnection()
     listitems=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE mag.itemId>1 AND magicon.itemId=mag.itemId LIMIT 0,?")
     listitems.setInt(1, int(LIMIT))
     rs=listitems.executeQuery()
     while (rs.next()) :
       obj=rs.getInt("ownerId")
       nick=rs.getString("char_name")
       itemname=rs.getString("ItemName")
       ench=rs.getInt("enchLvl")
       item=rs.getInt("itemId")
       grade=rs.getInt("itemGrade")
       itype=rs.getString("itemType")
       itemobj=rs.getInt("itemObjId")
       count=rs.getInt("count")
       price=rs.getInt("prise")
       money=rs.getInt("money")
       icon=rs.getString("itemIcon")
       try :
         chk = count
         if money == 57:
           prmoney = str("Adena")
           dmoney = str(FIRMONEY)
         else:
           prmoney = str("COL")
           dmoney = str(SECMONEY)
         s = str(price)
         for i in xrange(len(s)-3,s[0] in ('+','-'),-3):
           s=s[:i]+','+s[i:]
         pprice = "<font color=00CCFF>"+str(s)+"</font>"
         count = (count > 1 and str(count)) or str("")
         if chk == 1:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a msg=\"Ęóďčňü "+str(itemname)+" ó  "+str(nick)+" çŕ "+str(s)+" "+dmoney+"?\" action=\"bypass -h Quest q8032_MarketBuy bye_"+str(itemobj)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
         else:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a action=\"bypass -h Quest q8032_MarketBuy showm_"+str(itemobj)+"_"+str(item)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
       except :
         try : insertion.close()
         except : pass
     try :
       con.close()
     except :
       pass
     htmltext += "</table><br>"
     cona=L2DatabaseFactory.getInstance().getConnection()
     getcount=cona.prepareStatement("SELECT COUNT(itemId) FROM z_market_sell WHERE itemId>1")
     rsc=getcount.executeQuery()
     if (rsc.next()):
       rows  = rsc.getInt(1)
       vsego = int((rows/LIMIT)+2)
       if vsego > 3:
         htmltext += "Ńňđŕíčöű: "
         st.set("stranic",str(vsego))
         prvsego = range(1,vsego)
         for i in prvsego:
           htmltext += ""
           htmltext += " <a action=\"bypass -h Quest q8032_MarketBuy str_0_"+str(i)+"_99\">"+str(i)+"</a><font color=>  </font>"
         else:
           htmltext += ""
     rsc.close()
     getcount.close()
     cona.close()
     htmltext += "</body></html>"
   elif event.startswith("str_"):
     search = str(event.replace("str_", ""))
     iotype,zagluwka,grade=search.split("_")
     iotype,zagluwka,grade=int(iotype),int(zagluwka),int(grade)
     strlist = int(zagluwka - 1)
     strCount = st.getInt("stranic")
     sortType = sorts.get(iotype, str(""))
     razdel = trans.get(iotype, str(""))
     htmltext = "<html><body><a action=\"bypass -h Quest q8032_MarketBuy list\">Cďčńîę ňîâŕđîâ</a>: "+razdel+"<br>"
    #>
     if iotype > 0:
       htmltext += ""
     else:
       htmltext += "<table width=300><tr><td>"+weapons+"</td><td>"+armors+"</td><td>"+resources+"</td><td>"+recipes+"</td><td>"+books+"</td></tr>"
       htmltext += "<tr><td>"+potions+"</td><td>"+crystals+"</td><td>"+scrolls+"</td><td>"+aadena+"</td><td>"+soulshots+"</td></tr>"
       htmltext += "<tr><td>"+questsit+"</td><td>"+fishing+"</td><td>"+sacry+"</td><td>"+arrows+"</td><td>"+tatoos+"</td></tr></table>"
     ones = {1: 0, 2: LIMIT}
     one = ones.get(zagluwka, int(LIMIT*strlist))
     two = LIMIT
     con=L2DatabaseFactory.getInstance().getConnection()
    #>
     if iotype == 0:
       sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE mag.itemId>1 AND magicon.itemId=mag.itemId LIMIT ?,?")
       sql.setInt(1, one)
       sql.setInt(2, two)
     elif iotype == 1 or iotype == 2 or iotype == 6 or iotype == 9 or iotype == 12:
       htmltext += "<table width=300><tr><td><button value=\"NG\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_0\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"D\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_1\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"C\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_2\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"B\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_3\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"A\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_4\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"S\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_5\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr></table>"
       if grade == 0 or grade == 99:
         sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND magicon.itemId=mag.itemId LIMIT ?,?")
         sql.setString(1, sortType)
         sql.setInt(2, one)
         sql.setInt(3, two)
       else:
         sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND itemGrade=? AND magicon.itemId=mag.itemId LIMIT ?,?")
         sql.setString(1, sortType)
         sql.setInt(2, grade)
         sql.setInt(3, one)
         sql.setInt(4, two)
     elif iotype > 2 and iotype <16:
       if grade == 0 or grade == 99:
         sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND magicon.itemId=mag.itemId LIMIT ?,?")
         sql.setString(1, sortType)
         sql.setInt(2, one)
         sql.setInt(3, two)
       else:
         sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND itemGrade=? AND magicon.itemId=mag.itemId LIMIT ?,?")
         sql.setString(1, sortType)
         sql.setInt(2, grade)
         sql.setInt(3, one)
         sql.setInt(4, two)
     rs=sql.executeQuery()
     htmltext += "<table width=300><tr><td></td><td>Ńňđŕíčöŕ: "+str(zagluwka)+"</td></tr>"
    #>
     while (rs.next()) :
       obj=rs.getInt("ownerId")
       nick=rs.getString("char_name")
       itemname=rs.getString("ItemName")
       ench=rs.getInt("enchLvl")
       item=rs.getInt("itemId")
       grade=rs.getInt("itemGrade")
       itype=rs.getString("itemType")
       itemobj=rs.getInt("itemObjId")
       count=rs.getInt("count")
       price=rs.getInt("prise")
       money=rs.getInt("money")
       icon=rs.getString("itemIcon")
       try :
         chk = count
         if money == 57:
           prmoney = str("Adena")
           dmoney = str(FIRMONEY)
         else:
           prmoney = str("COL")
           dmoney = str(SECMONEY)
         s = str(price)
         for i in xrange(len(s)-3,s[0] in ('+','-'),-3):
           s=s[:i]+','+s[i:]
         pprice = "<font color=00CCFF>"+str(s)+" "+prmoney+"</font>"
         count = (count > 1 and str(count)) or str("")
         if chk == 1:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a msg=\"Ęóďčňü "+str(itemname)+" ó  "+str(nick)+" çŕ "+str(s)+" "+dmoney+"?\" action=\"bypass -h Quest q8032_MarketBuy bye_"+str(itemobj)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
         else:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a action=\"bypass -h Quest q8032_MarketBuy showm_"+str(itemobj)+"_"+str(item)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
       except :
         try : sql.close()
         except : pass
     try :
       con.close()
     except :
       pass
     htmltext += "</table><br>Ńňđŕíčöű: "
     prvsego = range(1,strCount)
     for i in prvsego:
       htmltext += "<a action=\"bypass -h Quest q8032_MarketBuy str_"+str(iotype)+"_"+str(i)+"_"+str(grade)+"\">"+str(i)+"</a><font color=>  </font>"
     htmltext += "</body></html>"
   elif event.startswith("show_"):
     iotype = int(event.replace("show_", ""))
     sortType = sorts.get(iotype, str(""))
     razdel = trans.get(iotype, str(""))
     iotype = str(iotype)
     htmltext = "<html><body><a action=\"bypass -h Quest q8032_MarketBuy list\">Cďčńîę ňîâŕđîâ</a>: "+razdel+"<br>"
     con=L2DatabaseFactory.getInstance().getConnection()
     if iotype == "1" or iotype == "2" or iotype == "6" or iotype =="9" or iotype =="12":
       htmltext += "<table width=300><tr><td><button value=\"NG\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_0\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"D\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_1\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"C\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_2\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"B\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_3\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"A\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_4\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"S\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_5\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr></table>"
       htmltext += "<table width=300><tr><td></td><td>Ďîńëĺäíčĺ "+str(LIMIT)+":</td></tr>"
       sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND magicon.itemId=mag.itemId LIMIT 0,?")
       sql.setString(1, sortType)
       sql.setInt(2, int(LIMIT))
     else:
       htmltext += "<table width=300><tr><td></td><td></td><td></td><td></td></tr>"
       sql=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND magicon.itemId=mag.itemId LIMIT 0,?")
       sql.setString(1, sortType)
       sql.setInt(2, int(LIMIT))
     htmltext += "<tr><td></td><td>Ďđĺäěĺň</td></tr>"
     rs=sql.executeQuery()
     while (rs.next()) :
       obj=rs.getInt("ownerId")
       nick=rs.getString("char_name")
       itemname=rs.getString("ItemName")
       ench=rs.getInt("enchLvl")
       item=rs.getInt("itemId")
       grade=rs.getInt("itemGrade")
       itype=rs.getString("l2Type")
       ltype=rs.getString("itemType")
       itemobj=rs.getInt("itemObjId")
       count=rs.getInt("count")
       price=rs.getInt("prise")
       money=rs.getInt("money")
       icon=rs.getString("itemIcon")
       try :
         chk = count
         if money == 57:
           prmoney = str("Adena")
           dmoney = str(FIRMONEY)
         else:
           prmoney = str("COL")
           dmoney = str(SECMONEY)
         s = str(price)
         for i in xrange(len(s)-3,s[0] in ('+','-'),-3):
           s=s[:i]+','+s[i:]
         pprice = "<font color=00CCFF>"+str(s)+" "+prmoney+"</font>"
         count = (count > 1 and str(count)) or str("")
         if chk == 1:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a msg=\"Ęóďčňü "+str(itemname)+" ó  "+str(nick)+" çŕ "+str(s)+" "+dmoney+"?\" action=\"bypass -h Quest q8032_MarketBuy bye_"+str(itemobj)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
         else:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a action=\"bypass -h Quest q8032_MarketBuy showm_"+str(itemobj)+"_"+str(item)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
       except :
         try : sql.close()
         except : pass
     try :
       con.close()
     except :
       pass
     htmltext += "</table><br>"
     cona=L2DatabaseFactory.getInstance().getConnection()
     getcount=cona.prepareStatement("SELECT COUNT(l2Type) FROM z_market_sell WHERE l2Type=?")
     getcount.setString(1, sortType)
     rsc=getcount.executeQuery()
     if (rsc.next()):
       rows  = rsc.getInt(1)
       vsego = int((rows/LIMIT)+2)
       if vsego > 3:
         htmltext += "Ńňđŕíčöű: "
         st.set("stranic",str(vsego))
         prvsego = range(1,vsego)
         for i in prvsego:
           htmltext += ""
           htmltext += " <a action=\"bypass -h Quest q8032_MarketBuy str_"+str(iotype)+"_"+str(i)+"_99\">"+str(i)+"</a><font color=>  </font>"
         else:
           htmltext += ""
     rsc.close()
     getcount.close()
     cona.close()
     htmltext += "</body></html>"
   elif event.startswith("iotype_"):
     search = str(event.replace("iotype_", ""))
     iotype,grade=search.split("_")
     iotype,grade=int(iotype),int(grade)
     sortType = sorts.get(iotype, str(""))
     razdel = trans.get(iotype, str(""))
     link = str(iotype)
     grades = {0: str("NG"),1: str("[D]"), 2: str("[C]"), 3: str("[B]"), 4: str("[A]"), 5: str("[S]")}
     pgrade = grades.get(grade, str(""))
     htmltext = "<html><body><a action=\"bypass -h Quest q8032_MarketBuy list\">Cďčńîę ňîâŕđîâ</a>: <a action=\"bypass -h Quest q8032_MarketBuy show_"+link+"\">"+razdel+"</a>: "+pgrade+" <br>"
     htmltext += "<table width=300><tr><td><button value=\"NG\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_0\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"D\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_1\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"C\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_2\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"B\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_3\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"A\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_4\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><button value=\"S\" action=\"bypass -h Quest q8032_MarketBuy iotype_"+str(iotype)+"_5\" width=25 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr></table>"
     htmltext += "<table width=300><tr><td></td><td>Ďđĺäěĺň</td></tr>"
     con=L2DatabaseFactory.getInstance().getConnection()
     listitems=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE l2Type=? AND itemGrade=? AND magicon.itemId=mag.itemId LIMIT 0,?")
     listitems.setString(1, sortType)
     listitems.setInt(2, grade)
     listitems.setInt(3, int(LIMIT))
     rs=listitems.executeQuery()
     while (rs.next()) :
       obj=rs.getInt("ownerId")
       nick=rs.getString("char_name")
       itemname=rs.getString("ItemName")
       ench=rs.getInt("enchLvl")
       item=rs.getInt("itemId")
       grade=rs.getInt("itemGrade")
       itype=rs.getString("itemType")
       itemobj=rs.getInt("itemObjId")
       count=rs.getInt("count")
       price=rs.getInt("prise")
       money=rs.getInt("money")
       icon=rs.getString("itemIcon")
       try :
         chk = count
         if money == 57:
           prmoney = str("Adena")
           dmoney = str(FIRMONEY)
         else:
           prmoney = str("COL")
           dmoney = str(SECMONEY)
         s = str(price)
         for i in xrange(len(s)-3,s[0] in ('+','-'),-3):
           s=s[:i]+','+s[i:]
         pprice = "<font color=00CCFF>"+str(s)+" "+prmoney+"</font>"
         count = (count > 1 and str(count)) or str("")
         if chk == 1:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a msg=\"Ęóďčňü "+str(itemname)+" ó  "+str(nick)+" çŕ "+str(s)+" "+dmoney+"?\" action=\"bypass -h Quest q8032_MarketBuy bye_"+str(itemobj)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
         else:
           htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a action=\"bypass -h Quest q8032_MarketBuy showm_"+str(itemobj)+"_"+str(item)+"\">"+count+" "+str(itemname)+"</a> <br1> "+str(pprice)+" "+prmoney+"; PM: "+str(nick)+"</td></tr>"
       except :
         try : insertion.close()
         except : pass
     try :
       con.close()
     except :
       pass
     htmltext += "</table><br>"
     cona=L2DatabaseFactory.getInstance().getConnection()
     getcount=cona.prepareStatement("SELECT COUNT(itemGrade) FROM z_market_sell WHERE l2Type=? AND itemGrade=?")
     getcount.setString(1, str(sortType))
     getcount.setInt(2, grade)
     rsc=getcount.executeQuery()
     if (rsc.next()):
       rows  = rsc.getInt(1)
       vsego = int((rows/LIMIT)+2)
       if vsego > 3:
         htmltext += "Ńňđŕíčöű: "
         st.set("stranic",str(vsego))
         prvsego = range(1,vsego)
         for i in prvsego:
           htmltext += ""
           htmltext += " <a action=\"bypass -h Quest q8032_MarketBuy str_"+str(iotype)+"_"+str(i)+"_"+str(grade)+"\">"+str(i)+"</a><font color=>  </font>"
         else:
           htmltext += ""
     rsc.close()
     getcount.close()
     cona.close()
     htmltext += "</body></html>"
   elif event.startswith("bye_"):
     itemObjId = int(event.replace("bye_", ""))
     #=====#
     cona=L2DatabaseFactory.getInstance().getConnection()
     getcount=cona.prepareStatement("SELECT COUNT(itemObjId) FROM z_market_sell WHERE itemObjId=?")
     getcount.setInt(1, itemObjId)
     rsc=getcount.executeQuery()
     if (rsc.next()):
       if rsc.getInt(1)>0:
         conn=L2DatabaseFactory.getInstance().getConnection()
         byeitem=conn.prepareStatement("SELECT * FROM z_market_sell WHERE itemObjId=?")
         byeitem.setInt(1, itemObjId)
         rs=byeitem.executeQuery()
         while (rs.next()) :
           owner=rs.getInt("ownerId")
           nick=rs.getString("char_name")
           itemname=rs.getString("ItemName")
           ench=rs.getInt("enchLvl")
           item=rs.getInt("itemId")
           grade=rs.getInt("itemGrade")
           itype=rs.getString("itemType")
           itemobj=rs.getInt("itemObjId")
           count=rs.getInt("count")
           price=rs.getInt("prise")
           money=rs.getInt("money")
           try :
             chkprice = int(count*price)
             if money == 57:
               pmoney = str(FIRMONEY)
             else:
               pmoney = str(SECMONEY)         
             if st.getQuestItemsCount(money) >= chkprice:
               price = int(count*price)
               st.takeItems(money,price)
               if ench == 0:
                 st.giveItems(item,count)
                 enchant = str("")
               else:
                 st.giveItems(item,count,ench)
                 enchant = " +"+str(ench)+""
               st.getPlayer().sendPacket(SystemMessage.sendString("Ęóďëĺíî "+str(count)+" "+(itemname)+" ó "+str(nick)+" çŕ "+str(price)+" "+pmoney+"!"));
               htmltext = "<html><body>Ęóďëĺíî <font color=LEVEL>"+str(count)+" "+(itemname)+"</font> ó "+str(nick)+" çŕ "+str(price)+" "+pmoney+"!<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
               #
               seller = L2World.getInstance().getPlayer(nick)
               if seller:
                 seller.sendPacket(SystemMessage.sendString("Ďđĺäěĺň "+str(count)+" "+(itemname)+" áűë ďđîäŕí íŕ ŕóęöčîíĺ!"));
                 seller.sendPacket(ConfirmDlg(614,"Ďđĺäěĺň "+str(count)+" "+(itemname)+" áűë ďđîäŕí íŕ ŕóęöčîíĺ!"))
               #
               pvin = ""+str(count)+" "+str(itemname)+""
               private=L2DatabaseFactory.getInstance().getConnection()
               newItemObj = IdFactory.getInstance().getNextId()
               off=private.prepareStatement("INSERT INTO z_market_private (ownerId,ItemName,itemObjId,prise,money) VALUES (?,?,?,?,?)")
               off.setInt(1, owner)
               off.setString(2, pvin)
               off.setInt(3, newItemObj)
               off.setInt(4, price)
               off.setInt(5, money)
               try :
                 off.executeUpdate()
                 off.close()
                 private.close()
               except :
                 try : private.close()
                 except : pass
               #
               con=L2DatabaseFactory.getInstance().getConnection()
               kupleno=con.prepareStatement("DELETE FROM z_market_sell WHERE itemObjId = ?")
               kupleno.setInt(1, itemObjId)
               try :
                 kupleno.executeUpdate()
                 kupleno.close()
                 con.close()
               except :
                 try : con.close()
                 except : pass
             else:
               htmltext = "<html><body>Ó âŕń íĺ őâŕňŕĺň "+pmoney+"<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
           except :
             try :
               byeitem.close()
             except : pass
         try :
           conn.close()
         except :
           pass
         #     
       else:
         htmltext = "<html><body>Ďđĺäěĺň óćĺ ęňî-ňî ęóďčë ): <br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
     else:
       htmltext = "<html><body>Oops!<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
     rsc.close()
     getcount.close()
     cona.close()
   elif event.startswith("showm_"):
     search = str(event.replace("showm_", ""))
     obj,itemid=search.split("_")
     obj,itemid=int(obj),int(itemid)
     con=L2DatabaseFactory.getInstance().getConnection()
     listitems=con.prepareStatement("SELECT * FROM `z_market_sell` mag, `z_market_icons` magicon WHERE mag.itemObjId=? AND magicon.itemId=?")
     listitems.setInt(1, obj)
     listitems.setInt(2, itemid)
     rs=listitems.executeQuery()
     while (rs.next()) :
       icon=rs.getString("itemIcon")
       itemname=rs.getString("ItemName")
       nickname=rs.getString("char_name")
       grade=rs.getInt("itemGrade")
       enchan=rs.getInt("enchLvl")
       count=rs.getInt("count")
       price=rs.getInt("prise")
       money=rs.getInt("money")
       try :
         st.set("moreitem",str(obj))
         st.set("morecount",str(count))
         st.set("moreprice",str(price))
         if money == 57:
           dmoney = str(FIRMONEY)
         else:
           dmoney = str(SECMONEY)
         mprice = int(count*price)
         s = str(price)
         for i in xrange(len(s)-3,s[0] in ('+','-'),-3):
           s=s[:i]+','+s[i:]
         pprice = "<font color=00CCFF>"+str(s)+" "+dmoney+"</font>"
         grades = {1: "d", 2: "c", 3: "b", 4: "a", 5: "s"}
         pgrade = grades.get(grade, str(""))
         enchant = (enchan > 0 and " +"+str(enchan)+"") or str("")
         htmltext = "<html><body>Âű âűáđŕëč:<br>"
         htmltext += "<table width=300><tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><font color=LEVEL>"+str(itemname)+" "+str(enchant)+"</font><br1>Öĺíŕ: "+str(pprice)+"; Ďđîäŕâĺö:  "+str(nickname)+"</td></tr></table>"
         htmltext += "<br>Â ďđîäŕćĺ: "+str(count)+""
         htmltext += "<br>Ńęîëüęî őîňčňĺ ęóďčňü?:"
         htmltext += "<edit var=\"cols\" width=200 length=\"10\"><br>"
         htmltext += "<button value=\"Ok\" action=\"bypass -h Quest q8032_MarketBuy byem_ $cols _ xz\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>"
         htmltext += "<br><a msg=\"Ńęóďčňü âńĺ "+str(count)+" "+str(itemname)+" ó  "+str(nickname)+" çŕ "+str(mprice)+" adena?\" action=\"bypass -h Quest q8032_MarketBuy bye_"+str(obj)+"\">Ńęóďčňü âń¸</a><br>"
         htmltext += "<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
       except :
         try : listitems.close()
         except : pass
     try :
       con.close()
     except :
       pass
   elif event.startswith("byem_ "):
     search = str(event.replace("byem_ ", ""))
     search,ptype=search.split("_")
     search,ptype=str(search),str(ptype)
     search = str(search.replace(" ", ""))
     ptype = str(ptype.replace(" ", ""))
     if search == "":
       htmltext = "<html><body>Âű íĺ óęŕçŕëč ęîëč÷ĺńňâî.<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
       return htmltext
     wantcount = int(search) 
     itemObjId = st.getInt("moreitem")
     itemCount = st.getInt("morecount")
     onePrice = st.getInt("moreprice")
     #=====#
     cona=L2DatabaseFactory.getInstance().getConnection()
     getcount=cona.prepareStatement("SELECT COUNT(itemObjId) FROM z_market_sell WHERE itemObjId=?")
     getcount.setInt(1, itemObjId)
     rsc=getcount.executeQuery()
     if (rsc.next()):
       if rsc.getInt(1)>0:
         conn=L2DatabaseFactory.getInstance().getConnection()
         byeitem=conn.prepareStatement("SELECT * FROM z_market_sell WHERE itemObjId=?")
         byeitem.setInt(1, itemObjId)
         rs=byeitem.executeQuery()
         while (rs.next()) :
           owner=rs.getInt("ownerId")
           nick=rs.getString("char_name")
           itemname=rs.getString("ItemName")
           ench=rs.getInt("enchLvl")
           item=rs.getInt("itemId")
           grade=rs.getInt("itemGrade")
           itype=rs.getString("itemType")
           itemobj=rs.getInt("itemObjId")
           count=rs.getInt("count")
           price=rs.getInt("prise")
           money=rs.getInt("money")
           try :
             writepr = price
             price = int(onePrice*wantcount)
             ost = int(count-wantcount)
             if money == 57:
               pmoney = str(FIRMONEY)
             else: 
               pmoney = str(SECMONEY)   
             if wantcount > count:
               htmltext = "<html><body>Íĺďđŕâčëüíîĺ ęîëč÷ĺńňâî ďđĺäěĺňîâ!<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
             elif st.getQuestItemsCount(money) >= price:
               st.takeItems(money,price)
               if ench == 0:
                 st.giveItems(item,wantcount)
                 enchant = str("")
               else:
                 st.giveItems(item,wantcount,ench)
                 enchant = " +"+str(ench)+""
               st.getPlayer().sendPacket(SystemMessage.sendString("Ęóďëĺíî "+str(wantcount)+" "+(itemname)+" ó "+str(nick)+" çŕ "+str(price)+" "+pmoney+"!"));
               htmltext = "<html><body>Ęóďëĺíî <font color=LEVEL>"+str(wantcount)+" "+(itemname)+"</font> ó "+str(nick)+" çŕ "+str(price)+" "+pmoney+"!<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
               #
               seller = L2World.getInstance().getPlayer(nick)
               if seller:
                 seller.sendPacket(SystemMessage.sendString("Ďđĺäěĺň "+str(wantcount)+" "+(itemname)+" áűë ďđîäŕí íŕ ŕóęöčîíĺ!"));
                 seller.sendPacket(ConfirmDlg(614,"Ďđĺäěĺň "+str(wantcount)+" "+(itemname)+" áűë ďđîäŕí íŕ ŕóęöčîíĺ!"))
               #
               pvin = ""+str(wantcount)+" "+str(itemname)+""
               newItemObj = IdFactory.getInstance().getNextId()
               private=L2DatabaseFactory.getInstance().getConnection()
               off=private.prepareStatement("INSERT INTO z_market_private (ownerId,ItemName,itemObjId,prise,money) VALUES (?,?,?,?,?)")
               off.setInt(1, owner)
               off.setString(2, pvin)
               off.setInt(3, newItemObj)
               off.setInt(4, price)
               off.setInt(5, money)
               try :
                 off.executeUpdate()
                 off.close()
                 private.close()
               except :
                 try : private.close()
                 except : pass
               #
               if ost>0:
                 con=L2DatabaseFactory.getInstance().getConnection()
                 kupleno=con.prepareStatement("UPDATE z_market_sell SET count=?, prise=? WHERE itemObjId =?")
                 kupleno.setInt(1, ost)
                 kupleno.setInt(2, writepr)
                 kupleno.setInt(3, itemObjId)
                 try :
                   kupleno.executeUpdate()
                   kupleno.close()
                   con.close()
                 except :
                   try : con.close()
                   except : pass
               else:
                 con=L2DatabaseFactory.getInstance().getConnection()
                 kupleno=con.prepareStatement("DELETE FROM z_market_sell WHERE itemObjId = ?")
                 kupleno.setInt(1, itemObjId)
                 try :
                   kupleno.executeUpdate()
                   kupleno.close()
                   con.close()
                 except :
                   try : con.close()
                   except : pass
             else:
               htmltext = "<html><body>Ó âŕń íĺ őâŕňŕĺň "+pmoney+"</body></html>"
           except :
             try :
               byeitem.close()
             except : pass
         try :
           conn.close()
         except :
           pass
         #     
       else:
         htmltext = "<html><body>Ďđĺäěĺň óćĺ ęňî-ňî ęóďčë ):<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a> </body></html>"
     else:
       htmltext = "<html><body>Oops!<br><br><a action=\"bypass -h Quest q8032_MarketBuy list\">Âĺđíóňüń˙.</a></body></html>"
     rsc.close()
     getcount.close()
     cona.close()
   return htmltext

 def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   npcId = npc.getNpcId()
   if npcId == MARKET:
     htmltext = "privetstvie.htm"
   return htmltext

QUEST       = Quest(8032,qn,"custom")
CREATED     = State('Start', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(MARKET)
QUEST.addTalkId(MARKET)
« Ostatnia zmiana: Wrzesień 22, 2008, 03:19:58 pm wysłana przez Luno »


  • Wiadomości: 20

  • Pochwał: -2

Odp: Problem z NPC
« Odpowiedź #6 dnia: Wrzesień 22, 2008, 05:36:37 pm »
a oto init.py kolejnego npc buffera i z tym działa jak należy ajajajjajajajaj xD:
import sys
from 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 = "9999_NPCBuffer"

NPC=[40006]
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: NPCBuffer"

class Quest (JQuest) :

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)


def onEvent(self,event,st):
htmltext = event

#Acumen
if event == "1":
SkillTable.getInstance().getInfo(1085,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Advanced Block
if event == "2":
SkillTable.getInstance().getInfo(1304,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Agility
if event == "3":
SkillTable.getInstance().getInfo(1087,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Arcane Protection
if event == "4":
SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Berserker Spirit
if event == "5":
SkillTable.getInstance().getInfo(1062,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Bless Shield
if event == "6":
SkillTable.getInstance().getInfo(1243,6).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Blessed Body
if event == "7":
SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Blessed Soul
if event == "8":
SkillTable.getInstance().getInfo(1048,6).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Clarity
if event == "9":
SkillTable.getInstance().getInfo(1397,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Chant of Protection
if event == "10":
SkillTable.getInstance().getInfo(1461,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Chant of Victory
if event == "11":
SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Concentration
if event == "12":
SkillTable.getInstance().getInfo(1078,6).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Death whisper
if event == "13":
SkillTable.getInstance().getInfo(1242,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Divine Protection
if event == "14":
SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Elemental Protection
if event == "15":
SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Empower
if event == "16":
SkillTable.getInstance().getInfo(1059,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Focus
if event == "17":
SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Greater Might
if event == "18":
SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Greater Shield
if event == "19":
SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Guidance
if event == "20":
SkillTable.getInstance().getInfo(1240,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Haste
if event == "21":
SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Holy Resistance
if event == "22":
SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Holy Weapon
if event == "23":
SkillTable.getInstance().getInfo(1043,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Invigor
if event == "24":
SkillTable.getInstance().getInfo(1032,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Magic Barrier
if event == "25":
SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Magnus' Chant
if event == "26":
SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Mana Gain
if event == "27":
SkillTable.getInstance().getInfo(1460,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Mental Shield
if event == "28":
SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Might
if event == "29":
SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Prophecy of Fire
if event == "30":
SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Prophecy of Water
if event == "31":
SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Prophecy of Wind
if event == "32":
SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Regeneration
if event == "33":
SkillTable.getInstance().getInfo(1044,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Resist Aqua
if event == "34":
SkillTable.getInstance().getInfo(1182,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Resist Fire
if event == "35":
SkillTable.getInstance().getInfo(1191,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Resist Poison
if event == "36":
SkillTable.getInstance().getInfo(1033,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Resist Shock
if event == "37":
SkillTable.getInstance().getInfo(1259,4).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Resist Wind
if event == "38":
SkillTable.getInstance().getInfo(1189,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Shield
if event == "39":
SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Unholy Resistance
if event == "40":
SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Vampiric Rage
if event == "41":
SkillTable.getInstance().getInfo(1268,4).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Wild Magic
if event == "42":
SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"
st.setState(COMPLETED)

#Dance of Alignment
if event == "43":
SkillTable.getInstance().getInfo(530,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Aqua Guard
if event == "44":
SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Concentration
if event == "45":
SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Earth Guard
if event == "46":
SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Fire
if event == "47":
SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Fury
if event == "48":
SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Inspiration
if event == "49":
SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Light
if event == "50":
SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of Protection
if event == "51":
SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of the Mystic
if event == "52":
SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of the Vampire
if event == "53":
SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Dance of the Warrior
if event == "54":
SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Siren's Dance
if event == "55":
SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"
st.setState(COMPLETED)

#Song of Champion
if event == "56":
SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Earth
if event == "57":
SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Elemental
if event == "58":
SkillTable.getInstance().getInfo(529,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Flame Guard
if event == "59":
SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Hunter
if event == "60":
SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Invocation
if event == "61":
SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Life
if event == "62":
SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Meditation
if event == "63":
SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Renewal
if event == "64":
SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Storm Guard
if event == "65":
SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Vengeance
if event == "66":
SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Vitality
if event == "67":
SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Warding
if event == "68":
SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Water
if event == "69":
SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)

#Song of Wind
if event == "70":
SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"
st.setState(COMPLETED)


#Chant of Battle
if event == "71":
SkillTable.getInstance().getInfo(1007,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Shielding
if event == "72":
SkillTable.getInstance().getInfo(1009,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Fire
if event == "73":
SkillTable.getInstance().getInfo(1006,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Flame
if event == "74":
SkillTable.getInstance().getInfo(1002,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of life
if event == "75":
SkillTable.getInstance().getInfo(1229,18).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Fury
if event == "76":
SkillTable.getInstance().getInfo(1251,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Evasion
if event == "77":
SkillTable.getInstance().getInfo(1252,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Rage
if event == "78":
SkillTable.getInstance().getInfo(1253,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Revenge
if event == "79":
SkillTable.getInstance().getInfo(1284,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Vampire
if event == "80":
SkillTable.getInstance().getInfo(1310,4).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Eagle
if event == "81":
SkillTable.getInstance().getInfo(1309,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Chant of Predator
if event == "82":
SkillTable.getInstance().getInfo(1308,3).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

#Wind Walk
if event == "83":
SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"
st.setState(COMPLETED)

if htmltext != event:
st.setState(COMPLETED)
st.exitQuest(1)
return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body><center>ERROR<br1>Please, contact the administrator.</center></body></html>"
   st.setState(State.STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

for npcId in NPC:
 QUEST.addStartNpc(npcId)
 QUEST.addTalkId(npcId)
« Ostatnia zmiana: Wrzesień 22, 2008, 05:47:11 pm wysłana przez damianELO »


  • ******
  • Wiadomości: 1390

  • Pochwał: 15

  • Urażona dzidzia, urażona dzidzia!
Odp: Problem z NPC
« Odpowiedź #7 dnia: Wrzesień 22, 2008, 06:01:50 pm »
Teraz mam problem ze sklepem wyskakuje mi to samo. Oto kod pythona:
Ja nie moge dojsc co jest nie tak.


Możesz podać całościowy plik NPC ? Wgram go do siebie i obbadam - jeżeli zajdzie potrzeba - naprawie

Cytat: damianELO

Mam taki sam: http://forum.lineage2.com.pl/index.php/topic,20403.0.html


  • Wiadomości: 20

  • Pochwał: -2

Odp: Problem z NPC
« Odpowiedź #8 dnia: Wrzesień 24, 2008, 10:55:04 am »
korzystając z okazji spytam: ma ktoś gotowe 1h, 2h lub więcej buffki pod l2j hellbound aka ct1.5 ?
halp!!!!!!!1!!!!1!111!1oneku*rwaeleven


  • ******
  • Wiadomości: 1390

  • Pochwał: 15

  • Urażona dzidzia, urażona dzidzia!
Odp: Problem z NPC
« Odpowiedź #9 dnia: Wrzesień 24, 2008, 02:54:40 pm »
korzystając z okazji spytam: ma ktoś gotowe 1h, 2h lub więcej buffki pod l2j hellbound aka ct1.5 ?
halp!!!!!!!1!!!!1!111!1oneku*rwaeleven

se poszukaj - forum.ragezone.com


  • Wiadomości: 20

  • Pochwał: -2

Odp: Problem z NPC
« Odpowiedź #10 dnia: Wrzesień 24, 2008, 05:09:12 pm »
szukalem i znalazlem tylko jakies stare z wygaslym linkiem :p tu na forum tez jest tyle ze do ct1 i sprawdzalem niepodchodzi do ct1.5, tak pisze bo moze ktos ma juz gotowe : p nie wiem moze niepotrafie szukac lub jestem niedostatecznie zmotywowany xd


  • ******
  • Wiadomości: 1390

  • Pochwał: 15

  • Urażona dzidzia, urażona dzidzia!
Odp: Problem z NPC
« Odpowiedź #11 dnia: Wrzesień 24, 2008, 07:13:05 pm »
To sie zmotywuj - jak nic nie znalazłeś - nie ma :P Sam musisz po zmieniać tak jak to jest napisane w FAQ


  • Wiadomości: 20

  • Pochwał: -2

Odp: Problem z NPC
« Odpowiedź #12 dnia: Wrzesień 25, 2008, 11:53:21 am »
nie spieszy sie :p btw to powinien byc staly dodatek w kazdej paczce z kazdym npc bufferem, na co komu npc buffer z 2 min dance/songs itd nie ?;p


  • ******
  • Wiadomości: 1390

  • Pochwał: 15

  • Urażona dzidzia, urażona dzidzia!
Odp: Problem z NPC
« Odpowiedź #13 dnia: Wrzesień 25, 2008, 02:43:12 pm »
jakby tak było to po co sam komputer bez neta ?