Jump to content
  • 0

[Help]Java prob.


Madboy

Question

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)

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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)

Link to comment
Share on other sites

  • 0

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..

Link to comment
Share on other sites

  • 0

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()

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

LOL.

Pf, all you need to do is to remove the player.

>.>

And obviously make it like:

getAppearance.setTitleColor(TheConfigHere);

Link to comment
Share on other sites

  • 0

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..

Link to comment
Share on other sites

  • 0

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!

Link to comment
Share on other sites

  • 0

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);
            }
         }
      }
   }

Link to comment
Share on other sites

  • 0

Here you are

http://pastebin.com/sXZ8BT9k

If still problems occur (I doubt) pm me for further support.

Locked for now, to avoid spam.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Thank you for your reply. I have removed it from the L2Server.exe file, but the L2Server still crashes. It doesn't crash if I don't start l2npc, otherwise it will crash within a few days at the latest.
    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
  • Topics

×
×
  • Create New...