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

    • That's exactly how it’s designed — everything important is handled on the API server side, for example, processing requests to the game server. Each website has its own token/key for authentication; without it, there will be no interaction with the game server. Some data can be stored both on my side and on the server side to avoid making frequent requests to the server, which is logical.   Yes, there’s a lot of old, unused code that just needs to be cleaned up. It was used before, but after major rewrites it was left lying around. It doesn’t interfere with anything — it’s just there and doesn’t affect the system's operation.   Beaver meme kurwa is my favorite. Unfortunately, you don't know Russian — otherwise, you would’ve spotted even more Easter eggs. 😂   I said it’s been installed over 250 times on different domains. You can join my Telegram, there are almost 200 people there — and those are just the ones who entered the chat — and we’ll have a good laugh together at your doubts! 😂😂😂
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
    • i saw somewhere that: $var = (int) $_POST['some_id'] ?? string::error_class('text'); it was when i gave up and deleted the sources let him, he does not even understand what cross site or mitm means   still waiting for any client of yours so i can play with them     DUDE IM GONNA CALL YOU BoberKurwa FROM NOW ON!! rename your account aswell! BoberKurwa!   Note: what happend to your chatgpt answers boberkurwa did your subscription of $12.5/$20 ended?   it is PSR12 standard
    • if i was you i would check first argentinian developer team to learn and contribute then start my own project privatly and then practice in free coding for my self, then you would be ready to learn standards and code out of nothing, and if you fail means you are in good path, if you win you are in for higher level, whatever you do be persistent and focused, thats what i did when i had time.
  • Topics

×
×
  • Create New...