Jump to content
  • 0

Stack skills ?


Noah

Question

5 answers to this question

Recommended Posts

  • 0

When some1 do retail ?? you probably mean to do sub ^_^

Anyway in order to do that you need to know how to compile & have some java knowledge :P

 

Check this guide

 

 

First of all you need to get the source code with eclipse:

You can do that using the wiki`s

 

CODE FROM HERE:

 

Index: C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/config/altsettings.properties

===================================================================

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/config/altsettings.properties (revision 223)

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/config/altsettings.properties (working copy)

# - skills of fighters/mages costs x3 SP

AltGameSkillLearn = False

 

# If true, previous skills will not be removed when you change your subclass.

# Default = False

AltSubClassSkills = False

 

# Allow player sub-class addition without checking for unique quest items.

AltSubClassWithoutQuests = False

 

Index: C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/Config.java

===================================================================

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/Config.java (revision 223)

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/Config.java (working copy)

 

/** How much adena receive characters who pick two or less of the winning number */

public static int ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;

 

/** AltSettings for subclass. Load Subclass skills if false, Load all character skills if true. */

public static boolean ALT_SUBCLASS_SKILLS;

 

/* **************************************************************************

* GM CONFIG General GM AccessLevel *

 

ALT_LOTTERY_4_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery4NumberRate","0.2"));

ALT_LOTTERY_3_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery3NumberRate","0.2"));

ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = Integer.parseInt(altSettings.getProperty("AltLottery2and1NumberPrize","200"

));

 

ALT_SUBCLASS_SKILLS = Boolean.parseBoolean(altSettings.getProperty("AltSubClassSkills", "False"));

}

catch (Exception e)

{

Index: C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/actor

/instance/L2PcInstance.java

===================================================================

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/actor

/instance/L2PcInstance.java (revision 223)

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/actor

/instance/L2PcInstance.java (working copy)

 

public final class L2PcInstance extends L2PlayableInstance

{

private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?";

+ private static final String RESTORE_SKILLS_FOR_CHAR_ALT_SUBCLASS = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=?";

private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (char_obj_id,skill_id,skill_level,skill_name,class_index) VALUES (?,?,?,?,?)";

private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND char_obj_id=? AND class_index=?";

private static final String DELETE_SKILL_FROM_CHAR = "DELETE FROM character_skills WHERE skill_id=? AND char_obj_id=? AND class_index=?";

 

try

{

// Retrieve all skills of this L2PcInstance from the database

con = L2DatabaseFactory.getInstance().getConnection();

PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR);

statement.setInt(1, getObjectId());

statement.setInt(2, getClassIndex());

ResultSet rset = statement.executeQuery();

 

// Go though the recordset of this SQL query

while (rset.next())

if(!Config.ALT_SUBCLASS_SKILLS)

{

int id = rset.getInt("skill_id");

int level = rset.getInt("skill_level");

 

if (id > 9000)

continue; // fake skills for base stats

 

// Create a L2Skill object for each record

L2Skill skill = SkillTable.getInstance().getInfo(id, level);

 

// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character

super.addSkill(skill);

}

 

 

 

rset.close();

statement.close();

}

 

CODE END HERE

 

 

CREDITS:distroy

 

Link to comment
Share on other sites

  • 0

When some1 do retail ?? you probably mean to do sub ^_^

Anyway in order to do that you need to know how to compile & have some java knowledge :P

 

Check this guide

 

Thanks :D

 

First of all you need to get the source code with eclipse:

You can do that using the wiki`s

 

CODE FROM HERE:

 

Index: C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/config/altsettings.properties

===================================================================

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/config/altsettings.properties (revision 223)

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/config/altsettings.properties (working copy)

# - skills of fighters/mages costs x3 SP

AltGameSkillLearn = False

 

# If true, previous skills will not be removed when you change your subclass.

# Default = False

AltSubClassSkills = False

 

# Allow player sub-class addition without checking for unique quest items.

AltSubClassWithoutQuests = False

 

Index: C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/Config.java

===================================================================

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/Config.java (revision 223)

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/Config.java (working copy)

 

/** How much adena receive characters who pick two or less of the winning number */

public static int ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;

 

/** AltSettings for subclass. Load Subclass skills if false, Load all character skills if true. */

public static boolean ALT_SUBCLASS_SKILLS;

 

/* **************************************************************************

* GM CONFIG General GM AccessLevel *

 

ALT_LOTTERY_4_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery4NumberRate","0.2"));

ALT_LOTTERY_3_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery3NumberRate","0.2"));

ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = Integer.parseInt(altSettings.getProperty("AltLottery2and1NumberPrize","200"

));

 

ALT_SUBCLASS_SKILLS = Boolean.parseBoolean(altSettings.getProperty("AltSubClassSkills", "False"));

}

catch (Exception e)

{

Index: C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/actor

/instance/L2PcInstance.java

===================================================================

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/actor

/instance/L2PcInstance.java (revision 223)

C:/Documents and Settings/Administrator/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/actor

/instance/L2PcInstance.java (working copy)

 

public final class L2PcInstance extends L2PlayableInstance

{

private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?";

+ private static final String RESTORE_SKILLS_FOR_CHAR_ALT_SUBCLASS = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=?";

private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (char_obj_id,skill_id,skill_level,skill_name,class_index) VALUES (?,?,?,?,?)";

private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND char_obj_id=? AND class_index=?";

private static final String DELETE_SKILL_FROM_CHAR = "DELETE FROM character_skills WHERE skill_id=? AND char_obj_id=? AND class_index=?";

 

try

{

// Retrieve all skills of this L2PcInstance from the database

con = L2DatabaseFactory.getInstance().getConnection();

PreparedStatement statement = con.prepareStatement(RESTORE_SKILLS_FOR_CHAR);

statement.setInt(1, getObjectId());

statement.setInt(2, getClassIndex());

ResultSet rset = statement.executeQuery();

 

// Go though the recordset of this SQL query

while (rset.next())

if(!Config.ALT_SUBCLASS_SKILLS)

{

int id = rset.getInt("skill_id");

int level = rset.getInt("skill_level");

 

if (id > 9000)

continue; // fake skills for base stats

 

// Create a L2Skill object for each record

L2Skill skill = SkillTable.getInstance().getInfo(id, level);

 

// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character

super.addSkill(skill);

}

 

 

 

rset.close();

statement.close();

}

 

CODE END HERE

 

 

CREDITS:distroy

 

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.
Note: Your post will require moderator approval before it will be visible.

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.



×
×
  • 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