Dippindots Posted September 15, 2011 Posted September 15, 2011 Hello there! I have some problems seting up a buffer for my server. ( rin4a's buffer ) I get every time error in gameserver Anyone can help me? import sys from java.lang import System from java.util import Iterator from com.l2jserver import Config from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jserver.gameserver.instancemanager import QuestManager from com.l2jserver import L2DatabaseFactory from com.l2jserver.gameserver.datatables import SkillTable from com.l2jserver.gameserver.datatables import ItemTable from com.l2jserver.gameserver.model.actor.instance import L2PcInstance from com.l2jserver.gameserver.model.actor.instance import L2PetInstance from com.l2jserver.gameserver.model.actor.instance import L2SummonInstance from com.l2jserver.gameserver.network.serverpackets import SetSummonRemainTime from com.l2jserver.gameserver.network.serverpackets import SetupGauge QUEST_ID = 555 QUEST_NAME = "NPCBuffer" QUEST_DESCRIPTION = "custom" QUEST_LOADING_INFO = str(QUEST_ID)+"_"+QUEST_NAME NPC_ID = 555 TITLE_NAME = "Rin4a's Buffer" SCRIPT_RELOAD = True ENABLE_VIP_BUFFER = False VIP_ACCESS_LEVEL = 50 ENABLE_BUFF_SECTION = True ENABLE_SCHEME_SYSTEM = True ENABLE_HEAL = True ENABLE_BUFFS = True ENABLE_RESIST = True ENABLE_SONGS = True ENABLE_DANCES = True ENABLE_CHANTS = False ENABLE_OTHERS = True ENABLE_SPECIAL = True ENABLE_CUBIC = True ENABLE_BUFF_REMOVE = True ENABLE_BUFF_SET = True BUFF_WITH_KARMA = False FREE_BUFFS = True TIME_OUT = True TIME_OUT_TIME = 10 MIN_LEVEL = 1 BUFF_REMOVE_PRICE = 10000 HEAL_PRICE = 10000 BUFF_PRICE = 10000 RESIST_PRICE = 10000 SONG_PRICE = 10000 DANCE_PRICE = 10000 CHANT_PRICE = 10000 OTHERS_PRICE = 10000 SPECIAL_PRICE = 10000 CUBIC_PRICE = 10000 BUFF_SET_PRICE = 10000 SCHEME_BUFF_PRICE = 10000 SCHEMES_PER_PLAYER = 4 CONSUMABLE_ID = 57 MAX_SCHEME_BUFFS = Config.BUFFS_MAX_AMOUNT MAX_SCHEME_DANCES = Config.DANCES_MAX_AMOUNT def rebuildMainHtml(st) : MAIN_HTML_MESSAGE = "<html><head><title>"+TITLE_NAME+"</title></head><body><center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"; MESSAGE = "" bottonA="Auto Buff";bottonB="Heal Me";bottonC="Rem. Buffs";i=0;j=0;Temp="<tr><td> </td> <td> </td></tr>";TRS = Temp.split(" ") if st.getInt("Pet-On-Off") == 1: bottonA="Auto Buff Pet";bottonB="Heal My Pet";bottonC="Rem. Pet Buffs" MAIN_HTML_MESSAGE += "<button value=\"Pet Options\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " buffpet 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">" else: MAIN_HTML_MESSAGE += "<button value=\"Char Options\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " buffpet 1 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">" if ENABLE_BUFF_SECTION == True : if ENABLE_BUFFS == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Buffs\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_buffs 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_RESIST == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Resist\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_resists 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_SONGS == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Songs\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_songs 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_DANCES == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Dances\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_dances 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_CHANTS == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Chants\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_chants 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_SPECIAL == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Special\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_special 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_OTHERS == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Others\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_others 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_CUBIC == True: if i>2:i=0 MESSAGE += TRS[i]+"<button value=\"Cubics\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect view_cubic 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_BUFF_SET == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\""+bottonA+"\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " castBuffSet 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_HEAL == True : if i>2:i=0 MESSAGE += TRS[i]+"<button value=\""+bottonB+"\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " heal 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if ENABLE_BUFF_REMOVE == True: if i>2:i=0 MESSAGE += TRS[i]+"<button value=\""+bottonC+"\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " removeBuffs 0 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[i+1] i+=2;j+=1 if j == 1: MAIN_HTML_MESSAGE+= MESSAGE + "<br>" else: MAIN_HTML_MESSAGE+= "<table>" + MESSAGE + "</table><br>" if ENABLE_SCHEME_SYSTEM == True : MAIN_HTML_MESSAGE += generateScheme(st) if st.getPlayer().isGM() : MAIN_HTML_MESSAGE += "<br><button value=\"Manage Buffs\" action=\"bypass -h Quest " + QUEST_LOADING_INFO + " redirect manage_buffs 0 0\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">" MAIN_HTML_MESSAGE += "<br><font color=\"303030\">Edited by Z!T!oN</font>" MAIN_HTML_MESSAGE += "</center></body></html>" return MAIN_HTML_MESSAGE def generateScheme(st) : schemeName = [] schemeId = [] HTML = "" conn=L2DatabaseFactory.getInstance().getConnection() rss = conn.prepareStatement("SELECT * FROM buffer_scheme_list WHERE player_id="+str(st.getPlayer().getObjectId())) action=rss.executeQuery() while (action.next()) : try : schemeName += [action.getString("scheme_name")] schemeId += [action.getString("id")] except : print "Query error!" try : conn.close() except : pass if len(schemeName) > 0: MESSAGE = "" i=0;j=0;Temp="<tr><td> </td> <td> </td></tr>";TRS = Temp.split(" ") while i <= len(schemeName) - 1: if j>2:j=0 MESSAGE += TRS[j]+"<button value=\""+schemeName[i]+"\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" cast "+schemeId[i]+" x x\" width=130 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">"+TRS[j+1] i+=1;j+=2 if i == 1: HTML+= MESSAGE + "<br>" else: HTML+= "<table>" + MESSAGE + "</table><br>" if len(schemeName) < SCHEMES_PER_PLAYER : HTML += "<table><tr><td><button value=\"Create\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" create_1 x x x\" width=85 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>" else : HTML += "<table width=100><tr>" if len(schemeName) > 0 : HTML += "<td><button value=\"Edit\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" edit_1 x x x\" width=85 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>" HTML += "<td><button value=\"Delete\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" delete_1 x x x\" width=85 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>" else : HTML += "</tr></table>" return HTML def reloadPanel(st) : HTML_MESSAGE = "<html><head><title>"+TITLE_NAME+"</title></head><body><center><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>" HTML_MESSAGE += "<font color=\"303030\">"+TITLE_NAME+"</font><br>" HTML_MESSAGE += "<img src=\"L2UI.SquareGray\" width=250 height=1><br>" HTML_MESSAGE += "<table width=260 border=0 bgcolor=444444>" HTML_MESSAGE += "<tr><td><br></td></tr>" HTML_MESSAGE += "<tr><td align=\"center\"><font color=\"FFFFFF\">This option can be seen by GMs only and it<br1>allow to update any changes made in the<br1>script. You can disable this option in<br1>the settings section within the Script.<br><font color=\"LEVEL\">Do you want to update the SCRIPT?</font></font></td></tr>" HTML_MESSAGE += "<tr><td></td></tr></table><br>" HTML_MESSAGE += "<img src=\"L2UI.SquareGray\" width=250 height=1><br><br>" HTML_MESSAGE += "<button value=\"Yes\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" reloadscript 1 0 0\" width=50 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">" HTML_MESSAGE += "<button value=\"No\" action=\"bypass -h Quest "+QUEST_LOADING_INFO+" reloadscript 0 0 0\" width=50 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">" HTML_MESSAGE += "</center></body></html>" return HTML_MESSAGE def getitemname(st,itemval): conn=L2DatabaseFactory.getInstance().getConnection() itemidList = conn.prepareStatement("SELECT * FROM etcitem WHERE item_id="+str(itemval)) il=itemidList.executeQuery() val = "No Name" if il : il.next() try : val = il.getString("name") except : pass try : conn.close() except: pass return val def getBuffCount(scheme) : count = 0 conn=L2DatabaseFactory.getInstance().getConnection() rss = conn.prepareStatement("SELECT * FROM buffer_scheme_contents WHERE scheme_id=\""+str(scheme)+"\"") action=rss.executeQuery() while (action.next()) : try : count += 1 except : count = 0 try : conn.close() except : pass return count def getBuffType(id) : conn=L2DatabaseFactory.getInstance().getConnection() act = conn.prepareStatement("SELECT buffType FROM buffer_buff_list WHERE buffId=? LIMIT 1") act.setInt(1, int(id)) rs=act.executeQuery() val = "none" if rs : rs.next() try : val = rs.getString("buffType") except : val = "none" try : conn.close() except: pass return val PS. Im useing L2Brick Server! I Haven't posted the all the py code becouse i cant use only 25.000 characters in topics. Buffer Forum Link : http://maxcheaters.com/forum/index.php?topic=188080.0 Buffer Download Link : http://www.megaupload.com/?d=MQZ6W8PQ Someone said something about " Change imports " . But i dont know what to change :( Quote
0 CarmineAngelo Posted September 15, 2011 Posted September 15, 2011 did you registered script on script.xml? Quote
0 Dippindots Posted September 15, 2011 Author Posted September 15, 2011 i added scripts\custom\555_NPCBUFFER in to script.cfg, there isn't any xml Quote
0 Tryskell Posted September 15, 2011 Posted September 15, 2011 Dude, if there is only ONE thing MxC should forbid (even before idiots and scammers) it's python scripts :D. Just use a godamn java buffer which will give you REAL errors logs (and will be more easy to develop). L2J got a java scheme buffer. Python error is currently simple : "you got an error in that file, but GTFO to got the good line nor the place where mistake happens, mofo*". One word : deathtopythonscripts. * with a 50% chance, can be mofo or modafocka. Quote
0 CarmineAngelo Posted September 15, 2011 Posted September 15, 2011 On 9/15/2011 at 3:24 PM, Tryskell said: Dude, if there is only ONE thing MxC should forbid (even before idiots and scammers) it's python scripts :D. Just use a godamn java buffer which will give you REAL errors logs (and will be more easy to develop). L2J got a java scheme buffer. Python error is currently simple : "you got an error in that file, but GTFO to got the good line nor the place where mistake happens, mofo*". One word : deathtopythonscripts. * with a 50% chance, can be mofo or modafocka. your vocabulary IZ AWESOME. anyway as triskell said , add a java buffer with real errors 8) Quote
Question
Dippindots
Hello there! I have some problems seting up a buffer for my server. ( rin4a's buffer )
I get every time error in gameserver
Anyone can help me?
PS. Im useing L2Brick Server! I Haven't posted the all the py code becouse i cant use only 25.000 characters in topics.
Buffer Forum Link : http://maxcheaters.com/forum/index.php?topic=188080.0
Buffer Download Link : http://www.megaupload.com/?d=MQZ6W8PQ
Someone said something about " Change imports " . But i dont know what to change :(
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.