Page 3 of 3

Re: Multi skills bug

Posted: Mon Sep 13, 2010 8:03 am
by angkor
In you code error:

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

Re: Multi skills bug

Posted: Mon Sep 13, 2010 8:08 am
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

Re: Multi skills bug

Posted: Mon Sep 13, 2010 11:21 am
by SolidSnake
Code updated! Thanks

Re: Multi skills bug

Posted: Sat Sep 25, 2010 1:11 am
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...

Re: Multi skills bug

Posted: Sat Sep 25, 2010 2:59 am
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

Re: Multi skills bug

Posted: Sat Sep 25, 2010 9:18 am
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

Re: Multi skills bug

Posted: Sat Sep 25, 2010 10:07 am
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?

Re: Multi skills bug

Posted: Tue Sep 28, 2010 6:27 am
by angkor
Bug with multiskills use change subclass, how fix?

Re: Multi skills bug

Posted: Tue Sep 28, 2010 5:17 pm
by qwerty13
It must be fixed in another way, not with delay to exit.

Re: Multi skills bug

Posted: Tue Sep 28, 2010 5:47 pm
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

Re: Multi skills bug

Posted: Wed Sep 29, 2010 5:55 pm
by Starter
So no proper patch from devs? oO

Re: Multi skills bug

Posted: Wed Sep 29, 2010 7:13 pm
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)

Re: Multi skills bug

Posted: Wed Sep 29, 2010 7:20 pm
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.

Re: Multi skills bug

Posted: Mon Apr 04, 2011 11:05 am
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)