Jump to content

Recommended Posts

Posted

Hello,since today i stay at home i decided to do 2 simple codes.

I took the idea from www.l2seraph.eu

This will announce to all instead of admin only,if any account got banned and if any player jailed

### Eclipse Workspace Patch 1.0
#P L2_GameServer_It
Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBan.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBan.java	(revision 57)
+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminBan.java	(working copy)
@@ -25,6 +25,7 @@
import java.util.StringTokenizer;

import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.L2DatabaseFactory;
import net.sf.l2j.gameserver.LoginServerThread;
import net.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;
@@ -88,7 +89,8 @@
				account_name = plyr.getAccountName();
				RegionBBSManager.getInstance().changeCommunityBoard();
				plyr.logout();
-				activeChar.sendMessage("Account "+account_name+" banned.");
+				Announcements.getInstance().announceToAll("Account "+account_name+" banned");
+				
			}
		}
		else if (command.startsWith("admin_unban"))
@@ -125,7 +127,7 @@
				if (playerObj != null)
				{
					playerObj.setInJail(true, delay);
-					activeChar.sendMessage("Character "+player+" jailed for "+(delay>0 ? delay+" minutes." : "ever!"));
+					Announcements.getInstance().announceToAll("Character "+player+" jailed for "+(delay>0 ? delay+" minutes." : "ever!"));
				}
				else
					jailOfflinePlayer(activeChar, player, delay);

and this one(i guess you will find it more impressive)

will show the server time(I mean,the day,the month,the time) when char logged in.

### Eclipse Workspace Patch 1.0
#P L2_GameServer_It
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 80)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -1005,6 +1005,9 @@
    public static boolean NOBLESSE_ITEM_LEVEL_RESTRICTION;
    public static boolean NOBLESSE_ITEM_SUBCLASS_RESTRICTION;
    public static boolean NOBLESSE_ITEM_ENABLED;
+    
+    /** Server time*/
+    public static boolean SHOW_SERVER_TIME;
       
    /** Custom Tittle When new char Login */
    public static boolean CHAR_TITLE;
@@ -2124,6 +2127,10 @@
                /** hero weaps enchant */
                ENCHANT_HERO_WEAPONS                                = Boolean.parseBoolean(L2JModSettings.getProperty("EnchantHeroWeapons", "False")); 
                
+                /** Server time */
+                
+                SHOW_SERVER_TIME                                    = Boolean.parseBoolean(L2JModSettings.getProperty("ShowServerTime", "True"));
+                
                /** Noblesse Custom Item */
                NOBLESSE_ITEM_ID						= Integer.parseInt(L2JModSettings.getProperty("NoblesseItemId", "6673"));
                NOBLESSE_ITEM_LEVEL_RESTRICTION			= Boolean.parseBoolean(L2JModSettings.getProperty("NoblesseItemLvlRestriction", "True"));
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 84)
+++ java/config/l2jmods.properties	(working copy)
@@ -387,4 +387,7 @@
# Alternative damage for dagger skills.
DaggerVSHeavy = 2.50
DaggerVSRobe = 1.80
-DaggerVSLight = 2.00
\ No newline at end of file
+DaggerVSLight = 2.00
+
+#Show Server Time when char logged in?
+ShowServerTime = True
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(revision 84)
+++ java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java	(working copy)
@@ -22,10 +22,12 @@
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.logging.Logger;
+import java.util.Date;

import net.sf.l2j.Base64;
import net.sf.l2j.Config;
import net.sf.l2j.L2DatabaseFactory;
+import net.sf.l2j.gameserver.GameTimeController;
import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.GmListTable;
import net.sf.l2j.gameserver.LoginServerThread;
@@ -256,6 +258,18 @@
                        activeChar.sendPacket(ni);
                           }
                
+                     if (Config.SHOW_SERVER_TIME)
+                     {
+                        int t = GameTimeController.getInstance().getGameTime();
+                		String h = "" + (t / 60) % 24;
+                		String m;
+                		if (t % 60 < 10)
+                			m = "0" + t % 60;
+                		else
+                			m = "" + t % 60;
+                        activeChar.sendMessage("SVR time is " + (new Date(System.currentTimeMillis())));		
+                     }
+                        
        if (Config.ANNOUNCE_HERO_LOGIN)
        {
        	if (activeChar.isHero())

 

Hope you like it all,

>.>

Posted

Well nice mods, thanks.The second one is cool. I think the first one will be better if you can do it kinda different, I mean with a config too. nvm I will try it.

Posted

Well nice mods, thanks.The second one is cool. I think the first one will be better if you can do it kinda different, I mean with a config too. nvm I will try it.

Aprreciate!

Yes ok i know its better with configs(for 1th i mean)but ok

thanks

Thanks for share man.

thanks
Posted

Well nice mods, thanks.The second one is cool. I think the first one will be better if you can do it kinda different, I mean with a config too. nvm I will try it.

Guest
This topic is now closed to further replies.


  • Posts

    • 🏰 L2EXALTA LEGACY — Interlude x45 📅 Grand Opening: 31/07/2026 — 21:30 (GMT+3) 🌐 Website: https://l2exalta.org/ 💬 Discord: https://discord.gg/zNTCZD4AcT 📌 Wiki: https://l2exalta.org/en/wiki.html#progression   ⚙️ MAIN INFO Chronicle : Interlude Rates : x45 Adena : x50 Spoil : x1 Drop : x5 Safe Enchant : +3 Files : L2OFF   💰 ECONOMY EX Coin : dynamic market currency, mined from monsters, Raid Bosses and Grand Bosses value fluctuates over time Exalta Vouchers : premium currency used for store, donations and EX Coin exchange Exchange : convert EX Coin into Exalta Vouchers Investment options : choose safer or riskier market strategies with EX Coin   ⚔️ PROGRESSION & GEAR Exalta Armors : signature top-tier gear line Forge System : upgrade weapons, armor and jewels with risk/reward mechanics Raid Boss progression tied to materials and prestige   🤖 AUTOFARM Access : Auto Hunting button, bottom-right UI Duration : controlled via tickets or in-game currency Route Mode : record custom farm routes Support Mode : healer/support builds auto-follow, heal and assist party Smart targeting logic with class-specific behavior (mage/archer/melee/support) Captcha designed not to interrupt legitimate AutoFarm sessions   🧪 BUFFER Exalta Buffer NPC/interface Scheme Buffer : save multiple buff loadouts Class presets for mage, fighter, support, PvP   🛠️ SMART GADGETS / QOL Autoloot filter Drop value tracker Boss timer tools Farm stats tracker Auto-consume system In-game server assistant   🗺️ DUNGEON FINDER / PVE Party matching with roles (Tank / Healer / DPS) Ready-check before teleport Monastery of Silence custom PvE zone Party-based reward structure   🎟️ DAILY PROGRESS / EXALTA PASS Daily and weekly tasks (farm, PvP, boss, check-in) Premium Pass track with extra rewards Monastery Daily Quest Reward boards for claiming progress   🏠 HOUSING & EXPEDITIONS Player residences with service NPCs Exalta Spirit Expeditions to themed territories Rewards vary by territory Owner-only access   🏆 PVP / TOURNAMENT Scheduled Tournament system Ranking points from wins/participation Spectator Mode for watching live matches PvP Statues for top-ranked players Anti-feed protections   🛡️ CLAN CONTENT Clan Civil War battlefield event Clan Dungeon Raid content DPS Meter for contribution tracking Support Credit system Classic siege/clan politics preserved   🏪 AUCTION / SHOPS Auction House with seller fee Black Market Dealer (limited-time special offers) Custom shops and multisells Confirmation prompts on purchases/sales   💳 DONATIONS / VIP Donation rewards linked to Exalta Vouchers VIP tiers with comfort/cosmetic bonuses Premium store Gift/promo codes for events   🎥 STREAMER / COMMUNITY Streamer Panel with visible stream links Viewer rewards system Streamer Points for cosmetics/vouchers In-game voice chat (global/party/clan/alliance/command)   🔒 FAIR PLAY Strong Anti-Bot protection Reward protection tied to valid client state Captcha on suspicious activity Staff investigation tools No bots, packet tools or modified clients allowed   👑 GRANDBOSS SPAWNS Orfen : 1 day + 1h random Core : 1 day + 1h random Queen Ant : 1 day 6h + 1h random Zaken : 2 days 12h + 1h random Baium : 5 days + 1h random Antharas : 8 days + 1h random Valakas : 11 days + 1h random   🏅 OLYMPIAD Runs Thursday, Friday, Saturday Heroes change monthly Balanced and fair matchmaking
    • yup basically another one just in case https://drive.google.com/file/d/1UtccbD9e50x3WEnQBab2PTZnBHwpcGYM/view?usp=sharing LineageWarrior.FMagic (CollideActors = True; > False) LineageWarrior.FOrc (CollideActors = True; > False) LineageWarrior.FShaman (CollideActors = True; > False) LineageWarrior.MDarkElf (CollideActors = True; > False) LineageWarrior.MDwarf (CollideActors = True; > False) LineageWarrior.MElf (CollideActors = True; > False) LineageWarrior.MFighter (CollideActors = True; > False) LineageWarrior.MMagic (CollideActors = True; > False) LineageWarrior.MOrc (CollideActors = True; > False) LineageWarrior.MShaman (CollideActors = True; > False) LineageWarrior.FDwarf (CollideActors = True; > False) LineageWarrior.FElf (CollideActors = True; > False) LineageWarrior.FFighter (CollideActors = True; > False)
    • @l2naylondev Requiring a player to log in just for the sake of logging  seems exploitable. Someone could log in only to claim the reward and immediately leave, or repeatedly change their ip. So i guess  are there are additional protections in place ? such as locking the reward by account, character , and ip. It would also be useful to add a playtime requirement. For example, after logging in, the player would need to remain active for at least x playtime  before getting the reward or other parameters configurable by the xml.  I suggest improving the system before selling it. 
  • 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..