Multi skills bug

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
angkor
Posts: 99
Joined: Sat May 02, 2009 5:32 pm

Re: Multi skills bug

Post by angkor »

In you code error:

EXIT_DELAY = Integer.parseInt(L2JModSettings.getProperty("ExitDelay", "0"));
RESTART_DELAY = Integer.parseInt(L2JModSettings.getProperty("RestartDelay", "0"));
User avatar
Naonah
Posts: 357
Joined: Sun Apr 04, 2010 11:12 pm

Re: Multi skills bug

Post by Naonah »

angkor wrote:In you code error:

EXIT_DELAY = Integer.parseInt(L2JModSettings.getProperty("ExitDelay", "0"));
RESTART_DELAY = Integer.parseInt(L2JModSettings.getProperty("RestartDelay", "0"));
yes, just typo.

..but everyone can correct it by own :P
public void l2jserver ()
{
if (you want l2j server == no problems)
use Linux;
else
use Windows;
}
User avatar
SolidSnake
Posts: 865
Joined: Wed Jan 20, 2010 6:54 pm
Location: Italy

Re: Multi skills bug

Post by SolidSnake »

Code updated! Thanks
Image
angkor
Posts: 99
Joined: Sat May 02, 2009 5:32 pm

Re: Multi skills bug

Post by angkor »

mmm my players set dublicate skills after patch: ;-(

Code: Select all

WARNING: Error could not store char skills: Duplicate entry '270074084-1320-0' for key 'PRIMARY'com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '270074084-1320-0' for key 'PRIMARY'    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)    at java.lang.reflect.Constructor.newInstance(Unknown Source)    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)    at com.mysql.jdbc.Util.getInstance(Util.java:384)    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1367)    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.storeSkill(L2PcInstance.java:8074)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.addSkill(L2PcInstance.java:7952)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.rewardSkills(L2PcInstance.java:2908)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.setClassId(L2PcInstance.java:2690)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7348)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.load(L2PcInstance.java:1195)    at com.l2jserver.gameserver.network.L2GameClient.loadCharFromDisk(L2GameClient.java:507)    at com.l2jserver.gameserver.network.clientpackets.CharacterSelect.runImpl(CharacterSelect.java:87)    at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:93)    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    at java.lang.Thread.run(Unknown Source)
Help...
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Multi skills bug

Post by hope »

Check ur configs there might be a option in there to stop them from having skills that do not belong to there class not sure if this option is still there was on older versions not on main pc so cant check what config
User avatar
brutus
Posts: 325
Joined: Sat Nov 10, 2007 4:18 pm
Location: Bulgaria

Re: Multi skills bug

Post by brutus »

and whats gonna happen if i press restart and after few seconds to get the class ? lol? the fix should be easy just move the setclass method in upper places before u get the skills
angkor
Posts: 99
Joined: Sat May 02, 2009 5:32 pm

Re: Multi skills bug

Post by angkor »

brutus wrote:and whats gonna happen if i press restart and after few seconds to get the class ? lol? the fix should be easy just move the setclass method in upper places before u get the skills
And is more concrete?
angkor
Posts: 99
Joined: Sat May 02, 2009 5:32 pm

Re: Multi skills bug

Post by angkor »

Bug with multiskills use change subclass, how fix?
User avatar
qwerty13
Posts: 640
Joined: Mon Feb 02, 2009 9:57 am
Location: Europe
Contact:

Re: Multi skills bug

Post by qwerty13 »

It must be fixed in another way, not with delay to exit.
User avatar
achilless
Posts: 153
Joined: Thu Oct 02, 2008 7:40 pm
Location: Russia & Ukraine

Re: Multi skills bug

Post by achilless »

angkor wrote:mmm my players set dublicate skills after patch: ;-(

Code: Select all

WARNING: Error could not store char skills: Duplicate entry '270074084-1320-0' for key 'PRIMARY'com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '270074084-1320-0' for key 'PRIMARY'    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)    at java.lang.reflect.Constructor.newInstance(Unknown Source)    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)    at com.mysql.jdbc.Util.getInstance(Util.java:384)    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1367)    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.storeSkill(L2PcInstance.java:8074)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.addSkill(L2PcInstance.java:7952)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.rewardSkills(L2PcInstance.java:2908)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.setClassId(L2PcInstance.java:2690)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7348)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.load(L2PcInstance.java:1195)    at com.l2jserver.gameserver.network.L2GameClient.loadCharFromDisk(L2GameClient.java:507)    at com.l2jserver.gameserver.network.clientpackets.CharacterSelect.runImpl(CharacterSelect.java:87)    at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:93)    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    at java.lang.Thread.run(Unknown Source)
Help...
once stopped to give users to lvl through the admin panel, and use the command / / sethiro - passed

although it may help 5.1.13-bin.jar
Starter
Posts: 484
Joined: Sat Jan 23, 2010 4:42 pm

Re: Multi skills bug

Post by Starter »

So no proper patch from devs? oO
I have promises to keep and miles to go before I sleep.
angkor
Posts: 99
Joined: Sat May 02, 2009 5:32 pm

Re: Multi skills bug

Post by angkor »

no patch (((
but its very big trouble.

I see this again and again.

Code: Select all

28.09.2010 9:21:21 com.l2jserver.gameserver.model.actor.instance.L2PcInstance storeSkillWARNING: Error could not store char skills: Duplicate entry '268617084-212-0' for key 'PRIMARY'com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '268617084-212-0' for key 'PRIMARY'    at sun.reflect.GeneratedConstructorAccessor107.newInstance(Unknown Source)    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)    at java.lang.reflect.Constructor.newInstance(Unknown Source)    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)    at com.mysql.jdbc.Util.getInstance(Util.java:384)    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1367)    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.storeSkill(L2PcInstance.java:8074)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.addSkill(L2PcInstance.java:7952)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.giveAvailableSkills(L2PcInstance.java:3002)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.rewardSkills(L2PcInstance.java:2915)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.setClassId(L2PcInstance.java:2690)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7348)    at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.load(L2PcInstance.java:1195)    at com.l2jserver.gameserver.network.L2GameClient.loadCharFromDisk(L2GameClient.java:507)    at com.l2jserver.gameserver.network.clientpackets.CharacterSelect.runImpl(CharacterSelect.java:87)    at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:93)    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)    at java.lang.Thread.run(Unknown Source)
angkor
Posts: 99
Joined: Sat May 02, 2009 5:32 pm

Re: Multi skills bug

Post by angkor »

and new bug with fast logout
I try buy any item in shop with multisell list and fast logout - after I login and in my inventory item and full adena.
xBUTCHERx
Posts: 1
Joined: Fri Apr 09, 2010 10:45 am

Re: Multi skills bug

Post by xBUTCHERx »

I have exactly the same problem. Multi-skills are taken after a quickly relogin. This bug has been working on Gracia Epilogue and Freya.

I came up with another solution to this problem. The database has prescribed that when you create a character in his inventory were given three quest items. 1 item needed for a first occupation, 2 item - for second occupation, and 3 quest item for the 3 occupation.

In the class master to get the profession, need this quest items. After receiving the profession - quest items is taken from the inventory. These items are not transferable (sellable=false, dropable=false, tradeable=false). But when added a sub-class, the character is given a quest item for 3 profession (occupation). And when you change a sub-class, the character first takes all the quest items from inventory, and gives 1 quest items for the preparation of 3 occupation.

I decided to do it on Jython. But faced with difficulties. No errors, but for some reason is not given the character of objects in the added or change the sub-class.

gameserver\data\scripts\village_master\ and there - a folder with the names of classes and races.

kamael_occupation_change\__init__.py

where did I go wrong?

Code: Select all

 # Created by DrLecter for the L2J Official Datapack Project# Visit us at http://www.l2jdp.com/# See readme-dp.txt and gpl.txt for license and distribution details# Let us know if you did not receive a copy of such files.import sys from com.l2jserver.gameserver.model.quest        import Statefrom com.l2jserver.gameserver.model.quest        import QuestStatefrom com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest qn = "kamael_occupation_change" GWAINS_RECOMMENTADION = 9753ORKURUS_RECOMMENDATION = 9760STEELRAZOR_EVALUATION = 9772KAMAEL_INQUISITOR_MARK = 9782SOUL_BREAKER_CERTIFICATE = 9806#MAYNARD,KHADAVA,GERSHWIN,VALPOR,HOLST,CASCA,BROME,ZENYA,AETONIC,BARTA,#MIYA,VITUS,LIANE,EDDY,FERDINAND,TAINE,RUPAUL,MELDINA,HAGEL,CECI,#PIECHE,ZOLDART,NIZER,YENICHENPCS_MALE1=[32139,32196,32199]NPCS_MALE2=[32146,32205,32209,32213,32217,32221,32225,32229,32233]NPCS_FEMALE1=[32140,32193,32202]NPCS_FEMALE2=[32145,32206,32210,32214,32218,32222,32226,32230,32234]SHADOW_WEAPON_COUPON_DGRADE = 8869SHADOW_WEAPON_COUPON_CGRADE = 8870 QUESTITEM = 138 #Filenames are made with the lowest npcId from the NPCs list. Some scripts#contain generic dialogs for every npc to use, some others keep separate#dialogs for different npcs.preffix="32139"#event:[newclass,req_class,req_race,low_ni,low_i,ok_ni,ok_i,[req_items]]#low_ni : level too low, and you dont have quest item#low_i: level too low, despite you have the item#ok_ni: level ok, but you don't have quest item#ok_i: level ok, you got quest item, class change takes placeCLASSES = {    "DR":[125,123,5,20,"16","17","18","19",[GWAINS_RECOMMENTADION],SHADOW_WEAPON_COUPON_DGRADE],#m_kamael -> m_trooper    "WA":[126,124,5,20,"20","21","22","23",[STEELRAZOR_EVALUATION],SHADOW_WEAPON_COUPON_DGRADE], #f_kamael -> f_warder    "BE":[127,125,5,40,"24","25","26","27",[ORKURUS_RECOMMENDATION],SHADOW_WEAPON_COUPON_CGRADE], #m_trooper -> m_berserker    "AR":[130,126,5,40,"28","29","30","31",[KAMAEL_INQUISITOR_MARK],SHADOW_WEAPON_COUPON_CGRADE], #f_warder -> f_arbalester    "SBF":[129,126,5,40,"40","41","42","43",[SOUL_BREAKER_CERTIFICATE],SHADOW_WEAPON_COUPON_CGRADE], #f_warder -> f_soulbreaker    "SBM":[128,125,5,40,"40","41","42","43",[SOUL_BREAKER_CERTIFICATE],SHADOW_WEAPON_COUPON_CGRADE]  #m_trooper -> m_soulbreaker    }#Messagesdefault = "No Quest" def change(st,player,newclass,items) :   for item in items :      st.takeItems(item,1)      st.takeItems(QUESTITEM,5)   st.playSound("ItemSound.quest_fanfare_2")   player.setClassId(newclass)   player.setBaseClass(newclass)   player.broadcastUserInfo()   st.giveItems(QUESTITEM,1)   return class Quest (JQuest) :  def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)  def onAdvEvent (self,event,npc,player) :   npcId    = npc.getNpcId()   htmltext = default   suffix = ''   st = player.getQuestState(qn)   if not st : return   race     = player.getRace().ordinal()   classid  = player.getClassId().getId()   level    = player.getLevel()   if npcId not in NPCS_MALE1 + NPCS_MALE2 + NPCS_FEMALE1 + NPCS_FEMALE2 : return   if not event in CLASSES.keys() :     return event   else :     newclass,req_class,req_race,req_level,low_ni,low_i,ok_ni,ok_i,req_item,reward=CLASSES[event]     if race == req_race and classid == req_class :        item = True        st.giveItems(QUESTITEMS,1)        for i in req_item :            if not st.getQuestItemsCount(i):               item = False        if level < req_level :           suffix = low_i           if not item :              suffix = low_ni        else :           if not item :              suffix = ok_ni           else :              suffix = ok_i              change(st,player,newclass,req_item)              st.giveItems(reward,15)     st.giveItems(QUESTITEMS,1)     st.exitQuest(1)     htmltext = preffix+"-"+suffix+".htm"   return htmltext  def onTalk (self,npc,player):   st = player.getQuestState(qn)   npcId = npc.getNpcId()   race = player.getRace().ordinal()   classId = player.getClassId()   id = classId.getId()   htmltext = default   if player.isSubClassActive() :      st.exitQuest(1)      return htmltext   # Kamaels only   htmltext = preffix   if race in [5] :      if classId.level() >= 2 : # second/third occupation change already made         htmltext += "-32.htm"      elif npcId in NPCS_MALE1 :         if id == 123 :      # m_fighter            return htmltext+"-01.htm"         else :            return htmltext+"-34.htm"      elif npcId in NPCS_FEMALE1 :         if id == 124 :    # f_fighter            return htmltext+"-05.htm"         else :            return htmltext+"-34.htm"      elif npcId in NPCS_MALE2 :         if id == 125 :      # m_trooper            return htmltext+"-09.htm"         else :            return htmltext+"-34.htm"      elif npcId in NPCS_FEMALE2 :         if id == 126 :    # f_warder            return htmltext+"-35.htm"         else :            return htmltext+"-34.htm"   else :      htmltext += "-33.htm"  # other races   st.exitQuest(1)   return htmltext QUEST   = Quest(99990,qn,"village_master") for npc in NPCS_MALE1 + NPCS_MALE2 + NPCS_FEMALE1 + NPCS_FEMALE2:    QUEST.addStartNpc(npc)    QUEST.addTalkId(npc) 
Post Reply