Jump to content

[Share]Olympiad Name Color + Olympiad Custom Title


Recommended Posts

When the player is on Olympiad Match get Name Color.

 

config:
Index: net/sf/l2j/config/l2jmods.properties
# Specified reward item rnd qty
ChampionRewardItemQty = 1
+
+#---------------------------------------------------------------
+# Olympiad Custom Name Color                
+#---------------------------------------------------------------
OlympiadColorSystem = false
OlympiadNameColor = FFF000
+
=====
Index: net/sf/l2j/config.java
      public static int L2JMOD_CHAMPION_REWARD_ID;
      public static int L2JMOD_CHAMPION_REWARD_QTY;
+     public static boolean OLYMPIAD_COLOR_SYSTEM;
+     public static int OLYMPIAD_NAME_COLOR;

                  L2JMOD_CHAMPION_REWARD_ID             = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemID", "6393"));
                  L2JMOD_CHAMPION_REWARD_QTY            = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1"));
+                 OLYMPIAD_COLOR_SYSTEM              = Boolean.parseBoolean(L2JModSettings.getProperty("OlympiadColorSystem", "false"));
+                 OLYMPIAD_NAME_COLOR            = Integer.decode("0x" + L2JModSettings.getProperty("OlympiadNameColor", "FFF000"));

=====
Index: sf/l2j/gameserver/Olympiad.java

                                //Remove Clan Skills
			if (player.getClan() != null)
			{
				for(L2Skill skill: player.getClan().getAllSkills())
					player.removeSkill(skill,false);
			}

+
+				//Olympiad Color Title
+				if (Config.OLYMPIAD_COLOR_SYSTEM)
+					{
+					if (player.isOlympiadStart())
+					player.getAppearance().setNameColor(Config.OLYMPIAD_NAME_COLOR);
+					broadcastUserInfo();
+				}
+

			//Abort casting if player casting  
			if (player.isCastingNow())

 

 

Well a second Code.

 

When the player is on Olympiad Match get Title "Go Fight".

 

config:
Index: net/sf/l2j/config/l2jmods.properties
# Specified reward item rnd qty
ChampionRewardItemQty = 1
+
#---------------------------------------------------------------
# Olympiad Custom Title               
#---------------------------------------------------------------
OlympiadTitleSystem = false
OlympiadTitle = "Go Fight"
+
=====
Index: net/sf/l2j/config.java
      public static int L2JMOD_CHAMPION_REWARD_ID;
      public static int L2JMOD_CHAMPION_REWARD_QTY;
+     public static boolean OLYMPIAD_TITLE_SYSTEM;
+     public static int OLYMPIAD_TITLE;

                  L2JMOD_CHAMPION_REWARD_ID             = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemID", "6393"));
                  L2JMOD_CHAMPION_REWARD_QTY            = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemQty", "1"));
+                 OLYMPIAD_TITLE_SYSTEM              = Boolean.parseBoolean(L2JModSettings.getProperty("OlympiadTitleSystem", "false"));
+                 OLYMPIAD_TITLE            = Integer.parseInt(L2JModSettings.getProperty("OlympiadTitle", "Go Fight"));


=====
Index: sf/l2j/gameserver/Olympiad.java

                                //Remove Clan Skills
			if (player.getClan() != null)
			{
				for(L2Skill skill: player.getClan().getAllSkills())
					player.removeSkill(skill,false);
			}

+
+						//Olympiad Title
+						if (Config.OLYMPIAD_TITLE_SYSTEM)
+							{
+							if (player.isOlympiadStart())
+							player.getAppearance().setTitle(Config.OLYMPIAD_TITLE);
+							      broadcastUserInfo();
+							}

			//Abort casting if player casting  
			if (player.isCastingNow())

 

Credit's:Me

Thanks to Fanky for the correction

Link to comment
Share on other sites

I'll start pointin' out your mistakes starting from 1st to 2nd code.

 

first of all,

  OLYMPIAD_NAME_COLOR            = Integer.parseInt(L2JModSettings.getProperty("OlympiadNameColor", "FFF000"));

 

color its not parseInt,its Integer.decode

so the above line is wrong,the followin' one is the correct

OLYMPIAD_NAME_COLOR            = Integer.decode("0x" + L2JModSettings.getProperty("OlympiadNameColor", "FFF000"));

 

secondly,

+	private static final int OLYMPIAD_NAME_COLOR = 0;

that's completely wrong and useless,delete it.

 

To continue with,

updateNameColor(getNameColor());

completely useless,the broadcastUserInfo(); is doin' the job.

 

After that,delete them

+	/**
+	 * @return the olympiadNameColor
+	 */
+	public static int getOlympiadNameColor()
+	{
+		return OLYMPIAD_NAME_COLOR;
+	}
+}
+
+	/**
+	 * @return
+	 */
+	public Object getNameColor()
+	{
+		return null;
+	}
+
+	/**
+	 * 
+	 */
+	public void broadcastUserInfo()
+	{
+		
+	}
+
+	/**
+	 * @param nameColor
+	 */
+	public void updateNameColor(Object nameColor)
+	{
+		
+	}
+}

 

quick fix ain't always good >.>,keep that in your mind.

 

Now,2nd code.

 

private static final int OLYMPIAD_TITLE = 0;

its tittle dude,by this way you are setting the tittle as integer(aka number up to 2,1kkk (lol)).

 

same,before delete that

updateNameColor(getNameColor());

 

and delete every single method which you created after that,

for sure it'll pop up more errors since the code is still bad.

 

Hope I helped,anyway start doing smaller things(check my guide on gr section,I give some ideas for newbies)

Link to comment
Share on other sites

You should add a method to allow players to recover their previous title & name color, when leaving from olympiads, not?

I think it's much easier doing it via packets.

Link to comment
Share on other sites

You should add a method to allow players to recover their previous title & name color, when leaving from olympiads, not?

I think it's much easier doing it via packets.

or just put whatever tittle & name color he wants when they are teleportin' back.

protected void portPlayersBack()
{
   //
}

 

ofc if he wanna have the previous status,that's not the way :P

Link to comment
Share on other sites

wut? dude im just encourage ppl to make more shares here in forum.

my point was that this share isn't working,and I just pointed out his mistakes I didnt fix nor shared a new code.

 

how this comes?

hmm nice share  Baggos/Fanky!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Buy Chinese Passports,(WhatsApp +1(615)314-6286) ID Cards, Driver's License, SSN, Birth Certificates, Death Certificates, Residence Permits, Marriage License, Divorce Papers, Work Permits, Utility Bills, Toefl, Ielts, Diplomas, Certificates, Gun license, Passport Visas, Entry and Exit Stamps, Jobs, CV, Counterfeit Notes,  Change all identity documents, Buy Chinese passport, Clear criminal records and many others..... CONTACT US: E-Mail: guanyuguohai@gmail.com Signal: +12026564683 WhatsApp +1(615)314-6286 New Identity Package: How to change your identity completely and restart a new life. No criminal records. Best way to regain your freedom with a full new identity. New id card, new passport, new driver's license, new birth certificate, new diploma, marriage certificate, ssn card with good score *NOTE:  We will show you proof of your passport done before delivery.* Legit Documents Ltd is the best and useful Document producer. Work with us! For more information: https://buylegitpassports.com/ WhatsApp: +1(615)314-6286 Buy Real and fake Passports, ID Cards, Driver's License, Certificates ,SSN, Birth Certificates, Death Certificates, Residence Permits,Marriage License, Divorce Papers,(Email : (guanyuguohai@gmail.com) Work Permits, Utility Bills, Toefl, Ielts, Diplomas, Certificates,Gun license, Passport Visas, Entry and Exit Stamps, Jobs, CV, Counterfeit Notes, Change all identity documents, Clear criminal records and many others We offer only high quality original true passports, driver's licenses, ID cards, stamps and other products for a number of countries such as: USA, Australia, Belgium, Brazil, Canada, Italy, Finland, France, Germany, Israel, Mexico, the Netherlands, South Africa, Spain, the United Kingdom. This list is not complete. For additional information and to place your order, visit our website or contact us by email or mobile. BUY REAL DOCUMENTS ONLINE CONTACT US: E-Mail: guanyuguohai@gmail.com Signal: +12026564683 uy drivers license online Buy passports online Buy diplomates online Buy SSN online Buy birth certificates online Buy ID cards online Buy visa online Buy certificates online Buy TOEFL, IELTS online   Order real and fake drivers license online Order real and fake passports online Order real and fake SSN online Order real and fake birth certificates online Order real and fake ID cards online Order real and fake visa online Order real and fake certificates online Order real and fake TOEFL, IELTS online Clear criminal Records Student Cards Private Cards Adoption Certificates Baptism Certificates Birth Certificates Death Certificates Divorce Certificates Marriage Certificates Custom Certificates High School Diplomas G.E.D. Diplomas Home School Diplomas College Degrees University Degrees Trade Skill Certificates ID cards Residence Permits Visas Gun Permit Concealed Carry Weapon License(CCW) Federal Firearms License (FFL) Passport Social Security Card Driver's License (All States $ Countries) Good and verifiable Bank records Bank Statement University certificates Non criminal records Travel Document package Clear criminal Record from FBI Database Create Active Paypal account Create Bank Account Utility Bills Permits US Green card SIN Passport IDs Social Security Card TOEFL Certificates DELTA Certificates IELTS Certificates TOIEC Certificate Clear criminal Record We also sell FAKE BANK NOTES, buy fake money EUR - EUR USD - US dollars GBP - British pound INR - Indian Rupee AUD - Australian Dollar CAD - Canadian Dollars AED - Emirati Dirham ZAR edge CHF - Swiss Franc CNY - Chinese Yuan Renminbi MYR - Malaysian Ringgit Apply For Real Registered Documents Online, Real Russian (Russia) Passports, Real USA (USA) Passports, Real Belgian passports, Real Brazilian (Brazil) passports, Real Canadian (Canada) passports, Genuine Finnish (Finland) passports, Real French (France) passports, Real German (Germany) passports, Real Dutch (Netherlands / Holland) Passports, Real Israel passports, Obtain Real UK (United Kingdom) Passports, Real Spanish (Spain) Passports, Real Mexican (Mexico) passports, Buy genuine South African passport. Buy genuine Australian Driver's Licenses, Buy Real Italian Driver's Licenses, Buy real French (France) Driver's Licenses, Legit Dutch (Netherlands / Holland) Driver's Licenses, Real Estate German (Germany) Driver's Licenses, Sale Real UK (United Kingdom) Driver's Licenses, Purchase of genuine diplomatic passports, Sell Real USA (United States) Passports, Buy genuine Australian passports, Buy Properties Belgium Passports, Buy real Brazilian (Brazil) passports, Sale Real Canadian (Canada) passports, Buy and renew documents online --Buy genuine Passports --Buy real and fake passports online --Buy real registered passports online, --Buy real registered drivers license online --Buy real and fake drivers license --Buy quality and legit passports, --Buy real ID cards online --Buy real and fake drivers license online, --Buy real /fake residence permit online --Buy real Visa online -- Apply for citizenship -- renew passports online -- renew Id cards online -- renew drivers license online BUY REAL DOCUMENTS ONLINE CONTACT US: E-Mail: guanyuguohai@gmail.com Signal: +12026564683 WhatsApp +1(615)314-6286 1401 S Grand Ave, Los Angeles, CA 90015, United States Buy real and fake Documents | ID card | Driving Licence | Passport | Biometric resident permit card | Green Card | Passport  Card | Diploma | Marriage Certificate | Divorce Certificate | Visa | Ielts certificate | USA | Canada | UK | Spain | Italy | Germany | Ireland | Singapore | Australia | Switzerland | France | Mexico | Belgium | Denmark | Bulgaria | Sweden | Norway...
    • I was interested in the items for sale, but afraid of being scammed again. 😞
    • As title say. I’m from America, so the only thing I’m using is PayPal. I don’t mine to have a middleman for the transaction.  i don’t want to waste time with scammers as I got scams couple time on here and had reported several people on here to get banned. 
    • Telegram chan: https://t.me/Lineage2dexcom Dear Dexters! We are pleased to inform you that on Saturday (May 18) from 16:00(UTC +3) the 9x9 GvG tournament will be held at the NEW server! ✅ Basical information about tournament: ➡️ The tournament will be held according to the Double Elimination system (up to two defeats), but if there will be more than 8 teams participating in Tournament, we will use the Single Elimination system (elimination after first loose) ➡️ Every match will be played until two wins (best of 3 system). ➡️ The tournament grid will be published after the registration is completed, and will be updated periodically during the tournament. ➡️ There will be no restrictions on equipment, enchantment level, skills or classes. You can use everything, including hero weapons, hero skills or quick healing potions.   Its a preannounce of tournament. All details, how register on it, location where tournament will be, detailed rules and process of tournament we post later. Old Tournament on Dex https://youtu.be/Ug0kqPjtEIw?si=girGvagas3UMnn4L ✅ Episode 2 - Primeval Wars (April 29 - May 5) ➡️ Event: 🍉Watermelons (for 2 weeks) Details (we will provide a link to the forum here a little later) ➡️ Instances: TOP A-Grade at Rune available ➡️ Giran Harbor Fair (without temporary epic jewelry) - For details press in game: ALT+B -> Events tab -> Giran Harbor Fair ➡️ Preparation for Grand Olympiad Games (week without fights) ➡️ May 5 - first sieges  
  • Topics

×
×
  • Create New...