Jump to content
  • 0

[Help]Java, if (activeChar.isNiewbe).


Question

Posted

Hi guys, i have tried to add custom title on my pack, but i got so many errors.......

Then i opened EnterWorld.java and after

protected void runImpl()

i added

if (activeChar.isNiewbe())
         {
                 activeChar.setTitle(Welcome);
         }

 

I am sure this is the correct place to add this, because i have added more codes there, like activeChar.setHero(true); and more.

14 answers to this question

Recommended Posts

  • 0
Posted

-if (activeChar.isNiewbe())

-         {

-                 activeChar.setTitle("Welcome");

-         }

 

+if (activeChar.isNewbie())

+    activeChar.setTitle("Welcome");

 

 

  • 0
Posted

-if (activeChar.isNiewbe())

-        {

-                activeChar.setTitle("Welcome");

-        }

 

+if (activeChar.isNewbie())

+    activeChar.setTitle("Welcome");

 

 

 

you think compiler cares?

  • 0
Posted

you think compiler cares?

Ofcourse it does. The first message refers to a non-existing method hence you'll have compilation issues.

Its the same as you trying to eat a cake that doesn't exist.

  • 0
Posted

Ofcourse it does. The first message refers to a non-existing method hence you'll have compilation issues.

Its the same as you trying to eat a cake that doesn't exist.

 

duh i guess..

 

sorry lol, i was too wasted to see the red text.. and thought he meant the brackets {}.

  • 0
Posted

if (activeChar.isNewbie())
{
   activeChar.setTitle("Welcome");
   return;
}

 

i hope i help you

 

or if it still gives you error try and this way

 

if (activeChar.isNewbie())
{
   activeChar.setTitle("Welcome");
}

  • 0
Posted

why a check on enter world? o.o

 

Charactercreation.java

 

near to the adena given by config and you will see the method or add it by self ;]

  • 0
Posted

newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);

after this paste this

newChar.setTitle(JAJAJAJAJ);

  • 0
Posted

why a check on enter world? o.o

 

Charactercreation.java

 

near to the adena given by config and you will see the method or add it by self ;]

so it will be like this?

 

CharacterCreate.java

find this first

newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);
		newChar.setTitle("");

 

down of this paste this

if (Config.CHAR_TITLE)
		newChar.setTitle(Config.ADD_CHAR_TITLE);

 

at Config.java

public static boolean CHAR_TITLE;
public static String  ADD_CHAR_TITLE;

CHAR_TITLE       = Boolean.parseBoolean(L2JModSettings.getProperty("CharTitle", "False"));
ADD_CHAR_TITLE   = L2JModSettings.getProperty("AddCharTitle", "Welcome");

 

and at l2jmod.properties add this

+#---------------------------------------------------------------
# Custom Title                                                                        -
#---------------------------------------------------------------
# Deafult: False
CharTitle = False
AddCharTitle = Welcome

 

take the whole code if it's more helpful

Index: java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java	(revision 4017)
+++ java/net/sf/l2j/gameserver/clientpackets/CharacterCreate.java	(working copy)
@@ -174,6 +174,9 @@

		newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);
		newChar.setTitle("");
+		
+		if (Config.CHAR_TITLE)
+			newChar.setTitle(Config.ADD_CHAR_TITLE);

		L2ShortCut shortcut;
		//add attack shortcut
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 4017)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -881,6 +881,9 @@
    public static boolean L2JMOD_WEDDING_SAMESEX;
    public static boolean L2JMOD_WEDDING_FORMALWEAR;
    public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+    
+    public static boolean CHAR_TITLE;
+    public static String  ADD_CHAR_TITLE;

    // Packet information
    /** Count the amount of packets per minute ? */
@@ -1858,6 +1861,9 @@
                L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
+                
+                CHAR_TITLE       = Boolean.parseBoolean(L2JModSettings.getProperty("CharTitle", "False"));
+                ADD_CHAR_TITLE   = L2JModSettings.getProperty("AddCharTitle", "Welcome");

                if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                {
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4017)
+++ java/config/l2jmods.properties	(working copy)
@@ -132,3 +132,10 @@
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------------------------------------------------
+# Custom Title                     -
+#---------------------------------------------------------------
+# Deafult: False
+CharTitle = False
+AddCharTitle = Welcome

Guest
This topic is now closed to further replies.


  • Posts

    • What could be the price for source?
    • Yea actually you can tell this to whole mc shares about, there is no point on this. If you have some skills you can easy solve problems.
    • sql procedure missed and wrong...fixed it...ZOUMHS 
    • Hello Dexters! https://lineage2dex.com    This is pre-announcing of NEW season server, so we want to share some key points of it. Full details with road map, patch notes we will announce a bit latter Opening September 27 at 19:00 (UTC +3) Open Beta Test from September 23 What’s New This Season?, This is just a short preview of the most exciting changes and updates. A patch note with balance change will be posted later in this thread – one topic with all patchnotes history from 2022 year EXP/SP x25 - Over the past few seasons, our servers were drifting closer to a mid-rate style. And hard to call it now pure PVP server. That’s why we’ve reduced EXP/SP rates from x50 to x25 – making progression smoother, more balanced, and more in line with the mid-rate identity., Improved Olympiad matchmaking – opponents will be matched by strength, making feeding much harder., K/D stats for CC – track your real impact!, New In-Game Shop Interface - no more running to NPCs for supplies – buy everything directly from the interface. NPC Astarte will now only handle services like WH, sales, LS insertion, etc., Balance Adjustments - small but important tweaks for a smoother PvP experience (details in patch notes)., Replica Instance System Reworked - upgrading replicas now requires not only fragments but also real jewellery from B to S grades. You can choose from 3 instance types: PvP Instance – biggest rewards (everyone spawns together for mass PvP)., CC Instance – private instance for your CC., Party Instance – private instance for your party., , Dino Island Returns - back by popular demand: Dark Zone (PvP) and Light Zone (PvE)., Newbie Pass Questline - available at character creation – helps you get familiar with the server and make start progression faster., Clan members taxation system, Full announce - read on forum, https://forum.lineage2dex.com/threads/16723/ (edited)   We’re excited to show you how the Newbie Path will look on the Seasonal Server and share a few details about it. The Newbie Path is designed to help new players on Dex adapt more easily on project. While it won’t reveal the full content of the game, it will greatly assist during the early stages of your journey. But it’s not just for newcomers! Even veteran players will find it useful — completing Newbie Path steps will grant you small progression boosts and extra rewards(exp boosts, some gear, potions etc). Definitely worth using! You’ll be able to test the full Newbie Path system yourself during the Open Beta, launching on September 23rd!
  • Topics

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