How can we add custom start tittle?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 30
- Joined: Wed Nov 05, 2014 9:56 pm
How can we add custom start tittle?
Hello, i have the last rev hi5.
i have try everything patches, guides etc. and nothing happent
even this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
### Eclipse Workspace Patch 1.0
#P L2J_Server_BETA
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 6665)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -935,6 +935,8 @@
player.setNewbie(1);
// Give 20 recommendations
player.setRecomLeft(20);
+ // Set custom title
+ player.setTitle("Uber custom title!");
// Add the player in the characters table of the database
return player.createDb() ? player : null;
}
But when i make new character then nothing happent.
is there any other way? any guide?
thanks
i have try everything patches, guides etc. and nothing happent
even this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
### Eclipse Workspace Patch 1.0
#P L2J_Server_BETA
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 6665)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -935,6 +935,8 @@
player.setNewbie(1);
// Give 20 recommendations
player.setRecomLeft(20);
+ // Set custom title
+ player.setTitle("Uber custom title!");
// Add the player in the characters table of the database
return player.createDb() ? player : null;
}
But when i make new character then nothing happent.
is there any other way? any guide?
thanks
- Gries
- Posts: 307
- Joined: Fri Jun 17, 2011 9:45 am
Re: How can we add custom start tittle?
Open CharacterCreate.java file and find this part of the code:
Change the brackets part like this:
I think it should work like that.
Code: Select all
newChar.setTitle("");
Code: Select all
newChar.setTitle("TITLE HERE");
-
- Posts: 30
- Joined: Wed Nov 05, 2014 9:56 pm
Re: How can we add custom start tittle?
Gries i did that, but again nothing happent :/
where's the problem ?
where's the problem ?
-
- Posts: 30
- Joined: Wed Nov 05, 2014 9:56 pm
Re: How can we add custom start tittle?
{
if (Config.CHAR_TITLE)
{
newChar.setTitle(Config.ADD_CHAR_TITLE);
}
else
{
newChar.setTitle("Slave");
}
what is the Config.ADD_CHAR_TITLE); ? should i do something else?
if (Config.CHAR_TITLE)
{
newChar.setTitle(Config.ADD_CHAR_TITLE);
}
else
{
newChar.setTitle("Slave");
}
what is the Config.ADD_CHAR_TITLE); ? should i do something else?
- Zephyr
- L2j Veteran
- Posts: 331
- Joined: Wed Sep 19, 2012 10:44 pm
- Location: Argentina
Re: How can we add custom start tittle?
Check it out in java/com/l2jserver/Config.javaL2GOT wrote:{
if (Config.CHAR_TITLE)
{
newChar.setTitle(Config.ADD_CHAR_TITLE);
}
else
{
newChar.setTitle("Slave");
}
what is the Config.ADD_CHAR_TITLE); ? should i do something else?
-
- Posts: 30
- Joined: Wed Nov 05, 2014 9:56 pm
Re: How can we add custom start tittle?
still llooking for help
-
- Posts: 441
- Joined: Mon May 05, 2014 10:15 am
Re: How can we add custom start tittle?
where can i fine CharacterCreate.java file ?Gries wrote:Open CharacterCreate.java file and find this part of the code:
Change the brackets part like this:Code: Select all
newChar.setTitle("");
I think it should work like that.Code: Select all
newChar.setTitle("TITLE HERE");
- DreamStage
- Posts: 222
- Joined: Mon Oct 11, 2010 2:38 am
- Location: Portugal
Re: How can we add custom start tittle?
Hello L2GOT, how are you,
You can add the custom Title for every char at the folowing method from L2PcInstance.java class:
private static L2PcInstance restore(int objectId)
You can add the custom Title for every char at the folowing method from L2PcInstance.java class:
private static L2PcInstance restore(int objectId)
- at player.setTitle(rset.getString("title")); -> you can change to a custom title as: player.setTitle("Custom Title Here");
or - at player.setTitle(rset.getString("title")); -> you can make it from Config variable as -> player.setTitle(Config.ADD_CHAR_TITLE);
+
(add at Config.java file one new setting for this ADD_CHAR_TITLE variable with same name or your own setting, and ofc you will need to add this new setting configuration at the proper characters settings configuration file.
Ignorance comes when you dont want to know the truth about facts.
-
- Posts: 441
- Joined: Mon May 05, 2014 10:15 am
Re: How can we add custom start tittle?
Please help me to make it whitDreamStage wrote:Hello L2GOT, how are you,
You can add the custom Title for every char at the folowing method from L2PcInstance.java class:
private static L2PcInstance restore(int objectId)If you don't know how to do it, tell me which one you prefer and im happy to help you.
- at player.setTitle(rset.getString("title")); -> you can change to a custom title as: player.setTitle("Custom Title Here");
or- at player.setTitle(rset.getString("title")); -> you can make it from Config variable as -> player.setTitle(Config.ADD_CHAR_TITLE);
+
(add at Config.java file one new setting for this ADD_CHAR_TITLE variable with same name or your own setting, and ofc you will need to add this new setting configuration at the proper characters settings configuration file.
[*] at player.setTitle(rset.getString("title")); -> you can make it from Config variable as -> player.setTitle(Config.ADD_CHAR_TITLE);
- DreamStage
- Posts: 222
- Joined: Mon Oct 11, 2010 2:38 am
- Location: Portugal
Re: How can we add custom start tittle?
Use this:
Code: Select all
### Eclipse Workspace Patch 1.0
#P L2J_HI5_Server
diff --git dist/game/config/Character.properties dist/game/config/Character.properties
index f1ab10d..e5648af 100644
--- dist/game/config/Character.properties
+++ dist/game/config/Character.properties
@@ -645,6 +645,10 @@
# Default: 0
StartingSP = 0
+# This is the title that a new character starts their character with.
+# Default: ""
+StartingTitle = ""
+
# ---------------------------------------------------------------------------
# Other Settings:
# ---------------------------------------------------------------------------
diff --git java/com/l2jserver/Config.java java/com/l2jserver/Config.java
index 796d027..04c36a2 100644
--- java/com/l2jserver/Config.java
+++ java/com/l2jserver/Config.java
@@ -227,6 +227,7 @@
public static long STARTING_ADENA;
public static byte STARTING_LEVEL;
public static int STARTING_SP;
+ public static String STARTING_TITLE;
public static long MAX_ADENA;
public static boolean AUTO_LOOT;
public static boolean AUTO_LOOT_RAIDS;
@@ -1618,6 +1619,7 @@
STARTING_ADENA = Character.getLong("StartingAdena", 0);
STARTING_LEVEL = Character.getByte("StartingLevel", (byte) 1);
STARTING_SP = Character.getInt("StartingSP", 0);
+ STARTING_TITLE = Character.getString("StartingTitle", "");
MAX_ADENA = Character.getLong("MaxAdena", 99900000000L);
if (MAX_ADENA < 0)
{
diff --git java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java
index f2148ea..101c6b1 100644
--- java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java
+++ java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java
@@ -260,7 +260,7 @@
final L2PcTemplate template = newChar.getTemplate();
Location createLoc = template.getCreationPoint();
newChar.setXYZInvisible(createLoc.getX(), createLoc.getY(), createLoc.getZ());
- newChar.setTitle("");
+ newChar.setTitle(Config.STARTING_TITLE);
if (Config.ENABLE_VITALITY)
{
Ignorance comes when you dont want to know the truth about facts.
-
- Posts: 441
- Joined: Mon May 05, 2014 10:15 am
Re: How can we add custom start tittle?
Thanks
This is what I wanted
He works well
thanks
This is what I wanted
He works well
thanks