Page 1 of 1

problem legend system

Posted: Fri May 28, 2010 12:43 pm
by Darkfeiter
last interlude pack l2j.

hey dudes i add a legend system in my interlude server now i have a problem i create char and get error and cant login.

here error : Image
http://img189.imageshack.us/img189/3699/unbenanntmv.jpg

here theproblem i added a line like that in l2pcinstance .

Code: Select all

 "INSERT INTO characters " +			                                 "(account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp," +			                                 "acc,crit,evasion,mAtk,mDef,mSpd,pAtk,pDef,pSpd,runSpd,walkSpd," +			                                 "str,con,dex,_int,men,wit,face,hairStyle,hairColor,sex," +			                                 "movement_multiplier,attack_speed_multiplier,colRad,colHeight," +			                                 "exp,sp,karma,pvpkills,pkkills,clanid,maxload,race,classid,deletetime," +			                                 "cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace," +			                                 "base_class,newbie,nobless,power_grade,last_recom_date,[color=#80BF00]legend[/color]) " +

Code: Select all

 statement.setInt(54, isNewbie() ? 1 : 0);			statement.setInt(55, isNoble() ? 1 :0);			statement.setLong(56, 0);			statement.setLong(57,System.currentTimeMillis());			[color=#40BF00]statement.setLong(58, islegend() ? 1 : 0);[/color]			statement.executeUpdate();			statement.close();
so new is the 58. so what to make that the error will go away from console ? thanks

Re: problem legend system

Posted: Fri May 28, 2010 1:07 pm
by janiii
the problem is somewhere else. it tells you about charId column not found .

Re: problem legend system

Posted: Fri May 28, 2010 1:22 pm
by Darkfeiter
it tells every thing with parameter index what mean it and where find it ?
maybe this is the problem i have 55 there and 54 is max or whatever i need it

Re: problem legend system

Posted: Fri May 28, 2010 1:50 pm
by janiii
54? 55? but you set param 58.. check it again..

Re: problem legend system

Posted: Fri May 28, 2010 1:56 pm
by Darkfeiter
i donno what mean param lol i added just from a code

so donno just added the one line

statement.setInt(58, islegend() ? 1 : 0);

becurse the other lines are there and if i try add as 56 becurse theline is so

Code: Select all

statement.setLong(56, 0);
here complete

Code: Select all

			statement.setInt(49, isOnline());                                                statement.setInt(50, isIn7sDungeon() ? 1 : 0);			statement.setInt(51, getClanPrivileges());			statement.setInt(52, getWantsPeace());			statement.setInt(53, getBaseClass());			statement.setInt(54, isNewbie() ? 1 : 0);			statement.setInt(55, isNoble() ? 1 :0);			statement.setLong(56, 0);			statement.setLong(57,System.currentTimeMillis());			statement.setLong(58, islegend() ? 1 : 0);			statement.executeUpdate();			statement.close();
and in console stays anything with 55 and 54 donno what is the problem

so just added and now not work thanks

Re: problem legend system

Posted: Sun May 30, 2010 7:45 pm
by Darkfeiter
i donno what is false but i need the help from you here the code from l2pcinstance

Code: Select all

--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 3289)+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)@@ -62,6 +62,7 @@ import net.sf.l2j.gameserver.datatables.HennaTable; import net.sf.l2j.gameserver.datatables.HeroSkillTable; import net.sf.l2j.gameserver.datatables.ItemTable;+import net.sf.l2j.gameserver.datatables.LegendSkillTable; import net.sf.l2j.gameserver.datatables.MapRegionTable; import net.sf.l2j.gameserver.datatables.NobleSkillTable; import net.sf.l2j.gameserver.datatables.NpcTable;@@ -243,8 +244,8 @@  	// Character Character SQL String Definitions:     private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,last_recom_date) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=? WHERE charId=?";-    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot FROM characters WHERE charId=?";+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,legend=? WHERE charId=?";+    private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,legend FROM characters WHERE charId=?";      // Character Teleport Bookmark:     private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)";@@ -518,6 +519,8 @@ 	private boolean _noble = false; 	private boolean _hero = false; +	private boolean _legend = false;+ 	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */ 	private L2NpcInstance _lastFolkNpc = null; @@ -2622,6 +2625,10 @@ 		if (isHero()) 			setHero(true); +		// Add Legend Skills if legend+		if (islegend())+			setlegend(true);+		 		// Add clan skills  		if (getClan() != null) 		{@@ -7402,7 +7409,8 @@ 			statement.setString(50, getName()); 			statement.setLong(51, getDeathPenaltyBuffLevel()); 			statement.setInt(52, getBookMarkSlot());-            statement.setInt(53, getObjectId());+			statement.setInt(53, islegend() ? 1 : 0);+            statement.setInt(54, getObjectId());  			statement.execute(); 			statement.close();
i a
added manually but cant login after create char so pls help mee .

Re: problem legend system

Posted: Mon May 31, 2010 4:50 am
by janiii
you added legend in 2 statements, dont see changes when reading it out and dont see the methods for setting and getting legend. not complete patch you provided.

Re: problem legend system

Posted: Mon May 31, 2010 11:07 am
by Darkfeiter
ok i try other way so just need to know if i paste in workspace handler admincommandhanlder a new file like

AdminPremium.java how i register it in interlude ?

becurse i start server without i get 345 and if paste is the same so thanks for help

Re: problem legend system

Posted: Mon May 31, 2010 11:09 am
by JIV
afaik in IL handlers were in core.