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

    • A widespread proxy service, operating through hijacked devices, has been shut down in a cross-industry effort led by Google. The network, known as IPIDEA, functioned by secretly converting millions of personal devices into proxies for malicious actors. The Mechanism of the Scheme The operation distributed hidden code within seemingly legitimate free apps and VPN services. Once installed, this code enrolled the user’s device into a pool of residential IP addresses. These addresses were then sold anonymously, primarily to cybercriminal and state-sponsored groups, to mask the origin of attacks, fraud, and espionage. Key impacts of the network included: Facilitating operations for more than 550 identified threat actors. Exposing unsuspecting device owners to potential legal and security risks by associating their IP addresses with criminal traffic. The Takedown Strategy Google and its partners disrupted the service by: Seizing core operational domains. Using Google Play Protect to detect and remove malicious applications. Coordinating with infrastructure providers to prevent the network from reestablishing itself. The action highlights the necessity of continuous user awareness, developer diligence in code reviews, and proactive industry cooperation to maintain cybersecurity. Front Companies Associated with IPIDEA IPIDEA masked its activities under various brand names, such as: Proxy Brands: 360 Proxy, 922 Proxy, Luna Proxy, IP2World, ABC Proxy. VPN Brands: Door VPN, Radish VPN, Galleon VPN. SDK Brands: PacketSDK, HexSDK (the toolkits used to embed proxy code).   Choosing Ethical Proxy Services Alternatives For lawful purposes like market research, ad verification, or data aggregation, selecting a transparent and consensual provider is essential. Reputable services obtain explicit user permission for their networks and enforce strict compliance measures. Examples of Established Providers: Bright Data: A leading, consent-based residential proxy network. Oxylabs: Provides large-scale proxy solutions for enterprise needs. MoMoProxy: Maintains a large pool of residential IPs for tasks like web scraping.   Only $850/1TB.  https://momoproxy.com   Identifying a Legitimate Provider: A trustworthy service will typically demonstrate: Informed Consent: Networks are built with the clear agreement of participants. Robust Compliance: Proactive systems to prevent abuse and respect website terms. Operational Transparency: Public-facing policies, identifiable corporate structure, and genuine customer support. Conduct thorough due diligence. Opt for providers that are clear about their IP sources and maintain strong anti-abuse policies, ensuring your legitimate activities do not inadvertently support harmful operations.
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
    • Lineage 2 Interlude Developer – Cliente + Datapack Hola, soy developer especializado en Lineage 2 Interlude con experiencia tanto en cliente como datapack/core. ✔ Desarrollo datapack (Java, scripts, quests, balance PvP/PvE) ✔ Fixes core / geodata / exploits ✔ Sistemas custom (events, Olympiad, instancias, mods PvP) ✔ Cliente: interface mods, system patches, .dat edits, UI personalizada ✔ Optimización y estabilidad de servidor ✔ Trabajo freelance o colaboración fija Si necesitáis soporte dev o mejoras para vuestro servidor Interlude, podéis contactarme por DM. Portfolio y ejemplos disponibles bajo petición.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..