Jump to content
  • 0

Buffer


Dippindots

Question

Hello there! I have some problems seting up a buffer for my server. ( rin4a's buffer )

I get every time error in gameserver

d1b298fab8ef042c8439e661e24164f0.png

 

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 :(

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Hello, I am using Interlude Java server and I am trying to create some new potions with higher skill id, but the main problem is when I spam this potion skills, the character is getting stuck few miliseconds everytime I use this skill. For example if you spawn in your skill list the skill from Greater Haste Potion and you start spam it, your character does not get stuck, it continue doing actions, but if I spawn the new skill with the same xml skill data as Greater Haste Potion, and I start spam it, the character is getting stuck for 5 miliseconds. Is there a place where I should edit something more about this?
    • Greetings, dear friends! We want to take a moment to express our gratitude to each and every one of you who has been part of our community. Your passion, dedication, and enthusiasm for our server make it all worthwhile. We know that sometimes arguments and discussions can get a little heated. We know you demand the best, and you only evoke those emotions because you expect the best. It’s the passion for wanting the best server that’s making this happen. Just know we’ll try our best! We understand that perfection is a journey, not a destination, and we’ve had our ups and downs. But your continuous feedback and support is very helpful to us, it’s what keeps up going. We want you to know that we’re committed to doing our absolute best, every day. We will listen to your feedback, your suggestions, and your concerns. We value them because they help us improve. We’ll do our best in addressing them. Please keep it coming, we’ll continue working on the server, making it better every day. As we move forward, we promise to keep trying, to keep listening, and to keep working to make this server and its community the best it can be. We’re excited about the upcoming Beta server in just a few days, we can’t wait to share it with you! So, thank you for being part of this community, and thank you for believing in us. If you have any feedback for us, please let us know. We’re in this together, and together, we’ll achieve greatness. Please keep sharing your feedback with us. Your input is invaluable and guides us towards creating a Lineage 2 experience that we can all be proud of. Thank you again!
    • I updated it as soon as I posted my comment though 😅    
    • any good updates on interface?
    • Added new Updates/Fixes: 25-09-2023.   Free update for free and premium members.   Added: Enchant Armor Effect System V1, +6,+7,+8 etc. you can edit the effects from system-eu -> FullArmorEnchantEffectData.dat.   How is working? you need to enchant your full set armor example to +6 to take the effect armor stats etc.   You download the Classic Mode update from here : Armor Enchant Effect for Classic: https://esl2.org/pts_classic_updates/Update Armor EnchantEffect For Classic Mode.rar   You download the Live Mode update from here : Armor Enchant Effect for Live: https://esl2.org/pts_classic_updates/Update Armor EnchantEffect For Live Mode.rar   if you find any problems report -> bugs here: https://discord.gg/AcbHDJUz5Q    
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock