Jump to content
  • 0

[Help]Java prob.


Question

Posted

Hi all.

I want to make a custom title based on pvp point. i use This system  but i have 1 problem here.

 

 

+            if ((pvpKillAmount >= (Config.PVP_AMOUNT1)) && (pvpKillAmount < (Config.PVP_AMOUNT2)))

+            {

+               getAppearance().setTitleColor(Config.TITLE_COLOR_FOR_PVP_AMOUNT1);

 

 

If i use.. setTitle i got an error (i can't fix with eclpise quick fix)

15 answers to this question

Recommended Posts

  • 0
Posted

Make sure that your config is an int value.

Otherwise I can't understand the reason for this error to appear.

 

He said that he cant fix it via eclipse quick fix (and in this case there should be "Change to String")

 

But maybe You're right.

 

Or maybe he is blind.

  • 0
Posted

He said that he cant fix it via eclipse quick fix (and in this case there should be "Change to String")

 

But maybe You're right.

 

Or maybe he is blind.

 

or maybe he's oppening files as text editors, so eclipse doesn't provide quick fixes ;] (I used to do that at my first steps with eclipse)

  • 0
Posted

or maybe he's oppening files as text editors, so eclipse doesn't provide quick fixes ;] (I used to do that at my first steps with eclipse)

 

Maybe, who knows.

 

I was (Still I'm) sure that he was/is enough smart..

  • 0
Posted

Hi all.

I want to make a custom title based on pvp point. i use This system  but i have 1 problem here.

 

 

+            if ((pvpKillAmount >= (Config.PVP_AMOUNT1)) && (pvpKillAmount < (Config.PVP_AMOUNT2)))

+            {

+              getAppearance().setTitleColor(Config.TITLE_COLOR_FOR_PVP_AMOUNT1);

 

 

If i use.. setTitle i got an error (i can't fix with eclpise quick fix)

 

If you want to use "setTitle" you need to remove getAppearance()

  • 0
Posted

If you want to use "setTitle" you need to remove getAppearance()

 

He's talking about the setTitleColor.

He mentions that he tried the setTitle as a fix, but it didn't help at all.

  • 0
Posted

No i am talking about setTitle...

 

 

With what i need to replace getAppearance() ????

 

pf, with nothing.

Ex.: player.setTitle(String);

Otherwise it should be

player.getAppearance().setTitleColor(FFFF00); //or smth similar with this, but remember: we need int values.

  • 0
Posted

off you don't understund. i don't want title color. i want when you make 20 pvp for example... your title wil be Warrior... etc.

i use that because i don't know java ... and i edit only color system.. because of that is TITLE_COLOR_FOR_PVP_AMOUNT1 etc..

  • 0
Posted

off you don't understund. i don't want title color. i want when you make 20 pvp for example... your title wil be Warrior... etc.

Finally an explanation.

Then the config's name/purpose is wrong.

It should be:

setTitle(String); //and were I say String, I mean a text, not numbers that form integers or floating points!

  • 0
Posted

This no is ok?

# Pvp Amount, Title & color level 1.
PvpAmount1 = 50
TitleForAmount1 = Warrior

# Pvp Amount, Title & color level 2.
PvpAmount2 = 100
PkAmount2 = 100
TitleForAmount2 = Soldier

# Pvp Amount, Title & color level 3.
PvpAmount3 = 150
TitleForAmount3 = Elite Soldier

# Pvp Amount, Title & color level 4.
PvpAmount4 = 200
TitleForAmount4 = Gladiator

# Pvp Amount, Title & color level 5.
PvpAmount5 = 250
TitleForAmount1 = Veteran

# Pvp Amount, Title & color level 6.
PvpAmount6 = 300
TitleForAmount6 = Champion

# Pvp Amount, Title & color level 7.
PvpAmount7 = 350
TitleForAmount7 = Commander

# Pvp Amount, Title & color level 8.
PvpAmount8 = 400
TitleForAmount8 = Master

# Pvp Amount, Title & color level 9.
PvpAmount9 = 450
TitleForAmount9 = Assassin

# Pvp Amount, Title & color level 10.
PvpAmount10 = 500
TitleForAmount10 = Hero

	public static boolean   PVP_TITLE_AND_COLOR_SYSTEM_ENABLED;
public static boolean   PK_COLOR_SYSTEM_ENABLED;
public static int      PVP_AMOUNT1;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT1;
public static int      PVP_AMOUNT2;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT2;
public static int      PVP_AMOUNT3;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT3;
public static int      PVP_AMOUNT4;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT4;
public static int      PVP_AMOUNT5;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT5;
public static int      PVP_AMOUNT6;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT6;
public static int      PVP_AMOUNT7;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT7;
public static int      PVP_AMOUNT8;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT8;
public static int      PVP_AMOUNT9;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT9;
public static int      PVP_AMOUNT10;
public static int      TITLE_COLOR_FOR_PVP_AMOUNT10;

				PVP_TITLE_AND_COLOR_SYSTEM_ENABLED      = Boolean.parseBoolean(L2JModSettings.getProperty("EnablePvPColorSystem", "false"));
				   
	            PVP_AMOUNT1                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount1", "50"));
				TITLE_COLOR_FOR_PVP_AMOUNT1             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount1", "Warrior"));
				PVP_AMOUNT2                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount2", "100"));
				TITLE_COLOR_FOR_PVP_AMOUNT2             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount2", "Soldier"));
				PVP_AMOUNT3                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount3", "150"));
				TITLE_COLOR_FOR_PVP_AMOUNT3             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount3", "Elite Soldier"));
				PVP_AMOUNT4                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount4", "200"));
				TITLE_COLOR_FOR_PVP_AMOUNT4             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount4", "Gladiator"));
				PVP_AMOUNT5                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount5", "250"));
				TITLE_COLOR_FOR_PVP_AMOUNT5             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount5", "Veteran"));
				PVP_AMOUNT6                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount6", "300"));
				TITLE_COLOR_FOR_PVP_AMOUNT6             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount6", "Champion"));
				PVP_AMOUNT7                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount7", "350"));
				TITLE_COLOR_FOR_PVP_AMOUNT7             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount7", "Commander"));
				PVP_AMOUNT8                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount8", "400"));
				TITLE_COLOR_FOR_PVP_AMOUNT8             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount8", "Master"));
				PVP_AMOUNT9                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount9", "450"));
				TITLE_COLOR_FOR_PVP_AMOUNT9             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount9", "Assassin"));
				PVP_AMOUNT10                             = Integer.parseInt(L2JModSettings.getProperty("PvpAmount10", "500"));
				TITLE_COLOR_FOR_PVP_AMOUNT10             = Integer.decode("0x" + L2JModSettings.getProperty("TitleForAmount10", "Hero"));

public void updatePvPTitle(int pvpKillAmount)
   {
      if (Config.PVP_TITLE_AND_COLOR_SYSTEM_ENABLED)
      {
         //Check if the character has GM access and if so, let them be.
         if (isGM())
            return;
         {
            if ((pvpKillAmount >= (Config.PVP_AMOUNT1)) && (pvpKillAmount < (Config.PVP_AMOUNT1)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT1);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT2)) && (pvpKillAmount < (Config.PVP_AMOUNT2)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT2);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT3)) && (pvpKillAmount < (Config.PVP_AMOUNT3)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT3);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT4)) && (pvpKillAmount < (Config.PVP_AMOUNT4)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT4);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT5)) && (pvpKillAmount < (Config.PVP_AMOUNT5)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT5);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT6)) && (pvpKillAmount < (Config.PVP_AMOUNT6)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT6);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT7)) && (pvpKillAmount < (Config.PVP_AMOUNT7)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT7);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT8)) && (pvpKillAmount < (Config.PVP_AMOUNT8)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT8);
            }
            if ((pvpKillAmount >= (Config.PVP_AMOUNT9)) && (pvpKillAmount < (Config.PVP_AMOUNT9)))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT9);
            }
            else if (pvpKillAmount >= (Config.PVP_AMOUNT10))
            {
               getAppearance().setTitle(Config.TITLE_COLOR_FOR_PVP_AMOUNT10);
            }
         }
      }
   }

Guest
This topic is now closed to further replies.


  • Posts

    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • PERFECT PERSPECTIVE IS ALMOST ALWAYS A DEATH SENTENCE ▪ Think if the document lies perfectly flat and everything is “level” it’ll be fine? Most of the time, that’s exactly what gives away the fake. Real smartphones, especially wide-angle cameras, always add natural distortions: - Slight warping at the edges of the document - Perspective distortions in the corners - Light curvature of the plane due to distance and shooting angle When everything is perfectly flat and geometrically flawless — algorithms and verifiers immediately recognize a “staged scene.” ▪ A genuine shot is never mathematically perfect. It’s these small lens distortions that make the frame look alive and believable.  Want perspective that won’t raise questions even from the most demanding verifiers? Write to us — we’ll create geometry that looks like it was shot with a real phone in real conditions. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #documents #drawing #perspective #editing #geometry
    • Gemini Pro 18 Month Personal Gmail Upgrade Available We are now accepting new orders for Gemini Pro + Google One AI Pro 18 Month Plan.   Plan Details: ✅ 18 Months Validity ✅ Upgrade on Your Personal Gmail ✅ 5TB Google One Storage ✅ Gemini Pro / Google AI Pro Access ✅ Veo 3, NotebookLM, Google AI Features ✅ Family Sharing Support where available ✅ Fast Delivery: 10 minutes to 24 hours ✅ 24/7 KloudItem Support   Price: $15 One Time Payment   Important: Stock is limited, so please check availability before ordering.   Order & Support: Order from KloudItem or contact us through our official support channel. ------------------------------------------- CONTACT Order Here: BUY GEMINI PRO Email: support@klouditem.com Telegram Channel: @klouditemcom Telegram Support: klouditem All Contact: https://linktr.ee/klouditem Website: https://klouditem.com Hours: 24/7 -- Always online
    • Hello everyone,   A quick update from the Emerge team. The official launch of Emerge Eclipse x10 is just around the corner and we are currently finishing the final preparations to ensure a smooth and stable opening for all players. Our team has been working on performance improvements, network optimizations, and additional infrastructure to provide the best possible experience from day one.   🚀 Launch Date: 7 June 2026 🕕 Launch Time: 18:00 CET We would like to invite everyone to join our Discord community where all announcements, updates, events, and support information are posted first. 🌐 Website: https://l2emerge.com 💬 Discord: https://discord.gg/l2emerge Thank you for all the support and feedback during the preparation phase. We look forward to seeing both new and veteran Lineage II players on launch day. See you soon on Emerge!
  • 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..