Jump to content

Recommended Posts

Posted (edited)

Hello everyone!

 

Since christmas are on the way, I thought an idea. Every time that you create a character, character will equip a santa hat.

 

Coded on aCis.

 

sz0F5c2.jpg

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 6)
+++ java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
@@ -168,6 +168,16 @@
  }
  }**/
  
+ if (Config.ALLOW_SANTA_HAT_ON_NEW_CHARACTERS)
+ {
+ L2ItemInstance item = newChar.getInventory().addItem("Init", 7836, 1, newChar, null);
+ if (item.isEquipable())
+ {
+ if (newChar.getActiveWeaponItem() == null || !(item.getItem().getType2() != L2Item.TYPE2_ACCESSORY))
+ newChar.getInventory().equipItemAndRecord(item);
+ }
+ }
+
  for (L2SkillLearn skill : SkillTreeTable.getInstance().getAvailableSkills(newChar, newChar.getClassId()))
  {
  newChar.addSkill(SkillTable.getInstance().getInfo(skill.getId(), skill.getLevel()), true);
Index: config/custom.properties
===================================================================
--- config/custom.properties (revision 25)
+++ config/custom.properties (working copy)
@@ -146,4 +146,7 @@
 # Remove cubics on death.
 RemoveCubicsOnDeath = False
 # Remove debuffs on death.
-RemoveDebuffsOnDeath = True
\ No newline at end of file
+RemoveDebuffsOnDeath = True
+
+# Santa hat for new players.
+AllowSantaHatOnNewCharacters = True
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 25)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -771,6 +771,8 @@
 
  public static boolean REMOVE_CUBICS_ON_DEATH;
  public static boolean REMOVE_DEBUFFS_ON_DEATH;
+
+ public static boolean ALLOW_SANTA_HAT_ON_NEW_CHARACTERS;
  
  // --------------------------------------------------
  
@@ -899,6 +901,8 @@
             
          REMOVE_CUBICS_ON_DEATH = custom.getProperty("RemoveCubicsOnDeath", true);
          REMOVE_DEBUFFS_ON_DEATH = custom.getProperty("RemoveDebuffsOnDeath", true);
+         
+         ALLOW_SANTA_HAT_ON_NEW_CHARACTERS = custom.getProperty("AllowSantaHatOnNewCharacters", true);
  // ...
  
  // Clans settings
Edited by Devlin
Posted

+ if (item.isEquipable())
+ {
+ if (newChar.getActiveWeaponItem() == null || !(item.getItem().getType2() != L2Item.TYPE2_ACCESSORY))
+ newChar.getInventory().equipItemAndRecord(item);
+ }
+ }
+

 

this is useless, since the santa hat is always TYPE2_ACCESSORY && isEquipable

  • 2 weeks later...
Posted

Locked.

 

 


- Do not post simple java strings or stupid Configuring Codes. Such topics will be immediately locked.

Guest
This topic is now closed to further replies.


  • Posts

    • Γεια σε ολους, προσπαθω εδω και 2 μερες να κανω αυτο το πραγμα να λειτουργει. το καταφερα για ενα διαστημα 5 ωρων. αλλα φαινεται οτι το discord μου κανει block to dll. ή κατι αλλο που δεν μπορω να ειμαι σιγουρος για το τι φταιει... αν καποιος γνωριζει κατι ας στειλει ενα pm να το δουμε μαζι.  *το source το εφιαξα εγω. https://youtu.be/kMvrbo9VBZc  ενα βιντεο που δειχνει πως δουλευε πριν σταματησει να δουλευει...   
    • thank you, please move to the desired category
    • wrong section, you need move this post to https://maxcheaters.com/forum/72-marketplace-l2packs-files/
    • Unlock Unlimited Access with GoProxy's Residential Proxies!   Experience seamless, secure, and unrestricted connectivity worldwide with GoProxy's Unlimited Residential Proxies. Our service offers access to a global network of rotating residential IPs, ensuring top performance for your large-scale data collection, streaming, and more.     ✔️Unlimited Traffic & IPs: Enjoy unrestricted access with our rotating residential proxies, delivering high performance through a vast global IP pool. ✔️High Success Rate: Achieve a 99.96% success rate with a rapid 0.6-second response time, ensuring efficient and reliable operations. ✔️Flexible Sessions: Customize IP rotation to fit your project needs, with options for automatic rotation and sticky sessions lasting up to 60 minutes. ✔️Global Coverage: Access IPs from over 120 countries, making it ideal for businesses requiring high bandwidth without region-specific constraints.     All plans include unlimited traffic and IPs, unlimited concurrent requests, and access to real residential IP addresses. Elevate your online operations with GoProxy's Unlimited Residential Proxies—your smart choice for large-scale projects.   👉 Learn more and get started today: GoProxy Unlimited Proxies
  • Topics

×
×
  • Create New...