thanks
This is a discussion on [Share] Subclass Master (Stackable Skills) by Allen within the Old L2J Releases forums, part of the L2J Archives category; Hi guys, well this is my first share, is a Stackable subclass NPC, Made by me . This is not ...
Hi guys, well this is my first share, is a Stackable subclass NPC, Made by me. This is not a AIO Grand Master that let add original game subclasses. Really this npc let stack skills from choose subclass to the Main or Retail class. Besides it let switch or delete these subclasses if you want. Also Has a system that automatically check and reset the skills that not belong to the choose classes, before taking any action.
BTW take some time to read the settings options into the script, so you can set the NPC to your liking.
PictureCode:#------------------------------------------------------------------------------------------------------------------------------------- # SETTINGS #------------------------------------------------------------------------------------------------------------------------------------- #For more than 3 subclasses, you must increase the variable number into the SQL and add to the database. #inside the sql you will find some variables named SubclassidX. Just change the "X" increasing the number. #This value shouldn't be changed if you don't want to increase the subclasses number beyond 3. #Increase or decrease the "maxsubsindb" value without make these changes, will cause errors. Be carefull!. maxsubsindb = 3 #True, allows reloading the configuration script from the game, without restarting the server (for GMs only). False, disables it. ShowReloadScriptPanel = True # Subclasses number that can be added. Must be less than or equal to "maxsubsindb". SubsNumber = 3 # True, allows add stackable subclasses in every original game subclass (Mainclass and every retails). # False, allows add stackable subclasses in only one original game subclass or main class AllowMultiSubs = False # True, allows any stackable subclass. False, allows add your own race's subclasses only. AllowAllSubs = True #This option work if "AllowAllSubs = False", Also you need to be using a original game subclass (Retail) to get available this. #True, allow add a subclass with the same main class's race. False, allow add a subclass with the same Retail's race. AllowMutantRetail = True #The next three options work if "AllowAllSubs = True" only. #True, allows everybody add Kamael subclass. False otherwise. AllowKamaelSubs = False #True, allows Dark Elf class do elf subclass, and Elf class do Dark Elf Subclass. False otherwise. AllowDElfvsElfSubs = False #True, allows Kamaels add any subclass. False, allows Kamaels to add their own race only. AllowAllSubsToKamael = False #True, allows delete the main class or any subclass added. False, allow to delete added subclasses only. Default: False AllowDelMainClass = False # Minimum Level to add a subclass. Default: 76 MinLevel = 76 #True, allows add subsclasses if the character is a Noblesse only. False, otherwise. Default: False AllowOnlyNobles = False #True, allow to add subclass or any other actions if you have the required items only. False, otherwise ReqItems = True #Required Item to switch between the subclasses. Default: 57 (Adena) #Required items number. Item1_Req = 57 Item1_Num = 1000000 #Required Item to add a subclass. #Required items number. Item2_Req = 3481 Item2_Num = 100 #Required Item to delete subclasses. #Required items number. Item3_Req = 3481 Item3_Num = 10 # True: Change level after add a subclass # False: Not to change level after add a subclass. Default: True DecLevel= True # True: HTML will show 3rd Class trasfer to choose, also it disallow add subclasses if the characters haven't added 3rd job. # False: HTML Will show 2nd Class trasfer to choose, also it disallow add subclasses if the characters haven't added 2nd or 3rd job. AllowThirdJob = True #Level at which the character will be changed after add a subclass. Default: 40 NewLevel= 40 # Delay time in seconds before being restarted automatically. Not recommended a number bellow to 5 seconds. Default: 5 seconds RestartDelay = 5 # True: The user must wait a while before take any action. Default: True # False: The user can do any action without time constraints. Not recommended Block = True #Blocking time in seconds before take any action. BlockTime = 20
Link: Subclass Master By Allen (L2jServer Gracia Epilogue)
Link: Subclass Master By Allen (L2jServer Gracia Final)
Link: Subclass Master By Allen (L2jServer-L2jFree Interlude)
Credits: Inspired by the foxer's NPC but Remade by Me
GMS haven't restrictions, so i recommend you test it as a gm and with a normal character.
This Npc was tested on L2jServerCT2.3, L2jOfficialCT2.3, L2emuCT2.3 and L2EmuCT2.2 successfully.
If you liked this Share a thanx is a nice answer. Well Enjoy it
Edit1: Added new option "AllowDelMainClass" check settings within the script
Edit2: Added new option "AllowMutantRetail" check settings within the script
Edit3: Added new option "AllowThirdJob" check settings within the script
Edit4: Added new option "ShowReloadScriptPanel" and now the file has english and Spanish Version to choose.
fixed overflow with longs names at HTML
Edit5: Added new option "AllowMultiSubs" check settings within the script. Fixed problems with skills enchanted and gracia final skills.
. Added new table for skills exceptions.
Edit6: Updated to Gracia Epilogue. I will now only support epilogue client.
. Added new option "AllowDElfvsElfSubs" check settings within the script.
. Added new option "RestartDelay" check settings within the script. Really important option to avoid some buggers players.
. Added skill exceptions for Certification skills
. Delete some lines of code and Queries unnecessarily and remake some codes too, for improving the performance of NPC.
Last edited by Allengc; 18-08-10 at 02:35 AM.
thanks
THANKS! Its working good on L2jFree ct2! Just for me newbie it took like 3 hours to understand what where to configure but it works on l2jfree :))) realy thx for share!
It seams that this npc gives the skills from skill_trees but doesn't return the forgotten scollskills nor the enchanted skills. :(
---------- Post added at 12:49 PM ---------- Previous post was at 12:19 PM ----------
Maby this will do the trick?
Code:def resetskills(st): parametros = "\"-1\""; j=-1 subs=getVarcharactersubs(st) SubSplit = subs.split(" ") for k in range(maxsubsindb + 1): conn=L2DatabaseFactory.getInstance().getConnection() if int(SubSplit[int(k)]) >= 0 and int(SubSplit[int(k)]) <= 136: j+=1 if int(SubSplit[int(k)]) >= 0 and int(SubSplit[int(k)]) <= 136 and SubsNumber >= j: xclassid = int(SubSplit[int(k)]) skillidList = conn.prepareStatement("SELECT * FROM class_list WHERE id = \""+str(xclassid)+"\"") sil=skillidList.executeQuery() while (sil.next()) : try : parametros+=",\"" +str(xclassid)+ "\"" xclassid = sil.getInt("parent_id") skillidList = conn.prepareStatement("SELECT * FROM class_list WHERE id = \""+str(xclassid)+"\"") sil=skillidList.executeQuery() except : pass try : conn.close() except : pass conn=L2DatabaseFactory.getInstance().getConnection() listskillid = conn.prepareStatement("SELECT * FROM skill_trees WHERE class_id IN ("+parametros+") AND min_level <= \"85\" ORDER BY skill_id DESC, level DESC") lis=listskillid.executeQuery() xskill = 0; cskill = 0; i=0 availableSkillsB = "" while (lis.next()) : try : xskill = lis.getInt("skill_id") if xskill != cskill : xlevel = lis.getInt("level") cskill = xskill i=i+1 availableSkillsB += str(xskill)+"_"+str(xlevel)+" " except : pass availableSkillsB+= "0_0" xvar="AND skill_id NOT BETWEEN \"1312\" AND \"1315\" AND skill_id NOT BETWEEN \"1368\" AND \"1372\"" xvar+="AND skill_id NOT BETWEEN \"755\" AND \"791\" AND skill_id NOT BETWEEN \"818\" AND \"821\"" if st.player.isGM(): xvar+=" AND skill_id NOT BETWEEN \"7029\" AND \"7064\"" listallskill = conn.prepareStatement("SELECT * FROM character_skills WHERE charId =\""+str(st.player.getObjectId())+"\" AND class_index =\""+str(st.player.getClassIndex())+"\" "+xvar+"") las=listallskill.executeQuery() availableSkillsA = [] while (las.next()) : try : xskill = las.getInt("skill_id") xlevel = las.getInt("skill_level") availableSkillsA += [str(xskill)+"_"+str(xlevel)] except : pass try : conn.close() except : pass try : skillSplit = availableSkillsB.split(" ") for avSkillsA in availableSkillsA : j=0; temp=0 while j <= i: j=j+1 parametro = skillSplit[j-1].replace("_"," ") skillSplitB = parametro.split(" ") avSkillsA = avSkillsA.replace("_"," ") skillSplitA = avSkillsA.split(" ") if int(skillSplitB[0]) == int(skillSplitA[0]): temp=1 if int(skillSplitB[1]) < int(skillSplitA[1]) : re = SkillTable.getInstance().getInfo(int(skillSplitA[0]), int(skillSplitA[1])) st.player.removeSkill(re) sk = SkillTable.getInstance().getInfo(int(skillSplitB[0]), int(skillSplitB[1])) st.player.addSkill(sk, True) st.player.sendMessage("You got fixed "+sk.getName()+" Skill.") if temp == 0 : sk = SkillTable.getInstance().getInfo(int(skillSplitA[0]), int(skillSplitA[1])) st.player.removeSkill(sk) st.player.sendMessage("You got removed "+sk.getName()+" Skill.") except : st.player.sendMessage("You dont have skills to remove") st.player.sendSkillList() if st.player.isNoble(): st.player.setNoble(True) if st.player.isHero(): st.player.setHero(True) val=0 return val
Last edited by Jouk0; 21-10-09 at 11:07 AM.
Knowledge:
PHP, ASP, PERL(Basics), Java(Basics), HTML, CSS, JavaScript, jQuery, ASP.NET, NAS, MOSS, SQL(My and :smilie_xp)
I solved this already some days ago, but nobody asked me about it, thanx for comment ^^. upload done!
Last edited by Allengc; 23-10-09 at 10:22 PM.
I wondering posible to add sub class from other race without changing race and relogin? just add skills and stats
Allengc what about changing in config files that when u sub to get only the active skills and passive but no stacking mastery like double weapon mastery or armor this will make subs less OP
well is not the first time that someone ask me about this (both case)![]()
is posible but i prefer dont doit, because i should create a system to gives the skills from any chooce race, increasing the querries and the peformance system use. this npc dont give buff just change your race the server system give you the skills by itself so you need change to the curresponding class for that. About race body, u can use the original game subclasss to add any stackable subclasses so your body will be the same that the main class.
the same, this npc change your race only, you get the skills from server, so skills like mastery need be edited by yourself not from npc.
Both case the problem is the server not the npc. cya![]()
Last edited by Allengc; 12-11-09 at 09:36 PM.
I need this NPC for Server L2 OFF!! stackable subclasses NPC Please!
emmmm.. you did not create from zero
http://forum.ragezone.com/f323/npc-s...t1-5-a-451653/
SorryI can not deny that your NPC was the pillar for the creation of this one, but I worked so much in this new NPC and all the new system that I forgot how it started. Well sorry for not add you in the credits
![]()
Hello,
this was not compatible with l2emu. Can you help me?
best regardsCode:import sys from java.lang import System from java.util import Iterator from net.sf.l2j import L2DatabaseFactory from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest from net.sf.l2j.gameserver.network.serverpackets import CharInfo from net.sf.l2j.gameserver.network.serverpackets import UserInfo from net.sf.l2j.gameserver.network.serverpackets import SetupGauge from net.sf.l2j.gameserver.model.base import ClassId from net.sf.l2j.gameserver.model.base import Experience from net.sf.l2j.gameserver.instancemanager import QuestManager from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance from net.sf.l2j.gameserver.datatables import SkillTable from net.sf.l2j.gameserver.datatables import SkillTreeTable from net.sf.l2j.gameserver.model import L2Skill
It is possible to work only like as a Grand Master without stackeble skills?? I want to make it work just to take simple subclass without any skill at all subclasses. Waiting for reply. Thanks
Will this work with hellbound?
Tnx!