Jump to content
  • 0

Admin Command: Hero For A Limited Time..!


Question

Posted

Hello Maxcheaters!

 

So I need a code that i can make ap layer hero for a limited time or forever..!

for example if i'll use the admin command //makehero forever [target] the player will become hero for ever..!

and if I'll press //makehero 30 [target] the player will become hero for 30 days!

 

I know i need a database table, a code on EnterWorld.java and a code in admincommandhandlers folder... any knowledge on how to create and merge those codes to make this thing i want? :D

Recommended Posts

  • 0
Posted

Which devlin posted still misses sql queries and so. Try this one...

 

http://pastebin.com/FWVTjQi4

 

Should work, u must add the line in MasterHandler.java to load the admincommand and modify your characters table adding customherotime field, at the end.

The command should work like //admin customhero 30   -> 30 or any number (hero days) 0 to make it unlimited or without any number.

  • 0
Posted

Its neither easy nor oh so hard to be made, none is gonna give it to you for free by the way. If you want it send me a pm

  • 0
Posted (edited)

You can add one filed in characters table like "customherotime" (long) then you can create a variable in L2PcInstance with the same name, make it default -1, then you must add that variable in the UPDATE,RESTORE,CREATE character sql methods of L2PcInstance.

 

Finally you create a command that will change the variable value of X player to X time "player.customherotime = 0;" (0 unlimited for example) and your "player.setHero(true);" or whatever it's called in your pack. To make it 30 days limited, instead of making the variable value 0, make it like

player.customherotime = Calendar.getInstance().getTimeInMillis()+2592000000;
Then you must create a check inside EnterWorld.java like

if(player.customherotime == 0 || player.customherotime > Calendar.getInstance().getTimeInMillis())
{
player.setHero(true);
}
else
{
 player.customherotime = -1;
}
If your server is restarting every day u would be fine, if not, u coul create a task every 2-3hours that will check all players online, using the check of enterworld, modified like

if(player.customherotime != 0 && player.customherotime != -1 && player.customherotime < Calendar.getInstance().getTimeInMillis())
{
player.customherotime = -1;
player.setHero(false);
}
Edited by ^Wyatt
  • 0
Posted

without database ? lol

O.o?

You can add one filed in characters table like "customherotime" (long) then you can create a variable in L2PcInstance with the same name, make it default -1, then you must add that variable in the UPDATE,RESTORE,CREATE character sql methods of L2PcInstance.

 
  • 0
Posted

I believe you could use my aio system as a base. Since everything that you ask is done, you just need to midify it a lil bit :P

  • 0
Posted

Its neither easy nor oh so hard to be made, none is gonna give it to you for free by the way. If you want it send me a pm

will you give it me for free? :D

 

 

You can add one filed in characters table like "customherotime" (long) then you can create a variable in L2PcInstance with the same name, make it default -1, then you must add that variable in the UPDATE,RESTORE,CREATE character sql methods of L2PcInstance.

 

Finally you create a command that will change the variable value of X player to X time "player.customherotime = 0;" (0 unlimited for example) and your "player.setHero(true);" or whatever it's called in your pack. To make it 30 days limited, instead of making the variable value 0, make it like

player.customherotime = Calendar.getInstance().getTimeInMillis()+2592000000;
Then you must create a check inside EnterWorld.java like

if(player.customherotime == 0 || player.customherotime > Calendar.getInstance().getTimeInMillis())
{
player.setHero(true);
}
else
{
 player.customherotime = -1;
}
If your server is restarting every day u would be fine, if not, u coul create a task every 2-3hours that will check all players online, using the check of enterworld, modified like

if(player.customherotime != 0 && player.customherotime != -1 && player.customherotime < Calendar.getInstance().getTimeInMillis())
{
player.customherotime = -1;
player.setHero(false);
}

hmm... thank you very much for your help... i will check it if i will not found someone to give it to me! :P

 

 

 

I believe you could use my aio system as a base. Since everything that you ask is done, you just need to midify it a lil bit :P

can you show me the link of this "AIO"? :)

  • 0
Posted (edited)

since i know where you got that idea from and i was dev there for a while i will give you a tip ;)

in l2sexi there are 2 kind of heroes ...
real one and

fake one

 

fake heroes just have the hero aura and the hero skills ;) in addition there are not real heroes ;)

eg. their name will not be listed on olympiad manager...

they are normal player with an aura and the hero skills ;)

 

so you can easily remake one "VIP" system to a "fakehero" system ;)

Edited by NeverMore™
  • 0
Posted

fake heroes just have the hero aura and the hero skills ;) in addition there are not real heroes ;)

eg. their name will not be listed on olympiad manager...

they are normal player with an aura and the hero skills ;)

 

so you can easily remake one "VIP" system to a "fakehero" system ;)

Well that was obvious and we told him that, just setHero(true) to make "fake heros", not a big deal  :rage:

Btw @author I explained u how to do it, practically at all, u could try to do it instead of waiting for someone to give it to you already done  :rage:

  • 0
Posted

thank you my friend..!

 

 

since i know where you got that idea from and i was dev there for a while i will give you a tip ;)

in l2sexi there are 2 kind of heroes ...

real one and

fake one

 

fake heroes just have the hero aura and the hero skills ;) in addition there are not real heroes ;)

eg. their name will not be listed on olympiad manager...

they are normal player with an aura and the hero skills ;)

 

so you can easily remake one "VIP" system to a "fakehero" system ;)

i know that..! but i think ^Wyatt's pack is something like this..!

 

 

Well that was obvious and we told him that, just setHero(true) to make "fake heros", not a big deal  :rage:

Btw @author I explained u how to do it, practically at all, u could try to do it instead of waiting for someone to give it to you already done  :rage:

you are right... i will try to put your code and if i will couldn't, i will check the other shares..!

 

btw thank you all of you.!

  • 0
Posted

Well that was obvious and we told him that, just setHero(true) to make "fake heros", not a big deal  :rage:

Btw @author I explained u how to do it, practically at all, u could try to do it instead of waiting for someone to give it to you already done  :rage:

Didnt read the rest replies at all :P 

  • 0
Posted (edited)

^Wyatt..!

 

am i putting this as a field?

 


player.customherotime = Calendar.getInstance().getTimeInMillis()+2592000000;

 

cause i have error on customherotime (Syntax error on token "customherotime", VariableDeclaratorId expected after this token)

 

edit: i've made it like this:

private long customherotime = Calendar.getInstance().getTimeInMillis()+456;

and i have no errors... is it ok?!

Edited by xXObanXx
Guest
This topic is now closed to further replies.


  • Posts

    • Server owners, Top.MaxCheaters.com is now live and accepting Lineage 2 server listings. There is no voting, no rankings manipulation, and no paid advantages. Visibility is clean and equal, and early listings naturally appear at the top while the platform grows. If your server is active, it should already be listed. Submit here  https://Top.MaxCheaters.com This platform is part of the MaxCheaters.com network and is being built as a long-term reference point for the Lineage 2 community. — MaxCheaters.com Team
    • 🔥 Lineage 2 Haruna x3 – Interlude 🔥   Grand Opening 06.02.2026  Welcome to L2 Haruna x3, a classic Interlude server focused on retail-like gameplay, fair competition, and long-term stability. No pay-to-win, no broken customs — just real Lineage 2 the way it was meant to be played.   Website: https://l2haruna.com/ Discord: https://discord.gg/7DDC9Dsxnh Chronicle: Interlude Rates:  EXP/SP: x3   Adena: x2   Drop/Spoil: x1   Seal Stones: x1   Boss EXP/SP: x2 More Info: Click me Server Time: UTC +2 📈 Core Gameplay • Classic Interlude mechanics & formulas • Balanced economy • Real PvP, clan wars, sieges, and Olympiad 🏆 Olympiad Information • Olympiad starts 3 months after server opening • Participation only through the Olympiad Master • Competition time: 20:00 – 02:00 (UTC +2) ⚙️ Website & Account System • Master Account (MA) system on website • Game accounts must be created via Master Account • Vote system inside MA • Website rankings: PvP, PK, Clans, Castles 🧙 NPCs, Buffs & Utilities • Server Manager NPC in all towns and villages • Adventurer’s Guide (Miss Queen) in all towns and villages • Offline Buff Shops (.buffshop) allowed only in Monster Derby Track • In-game Mailbox system • Start-Up Bonus for all characters • FREE Teleport in all towns/villages until level 40 🎮 Interface & Quality of Life • ALT + K – Skill Panel (learn and enchant skills) • Alt + Click – Buff removal • Shift + Click on monsters – Drop and spoil information • Offline Shop system (set shop and exit game) • 35 seconds spawn protection • Captcha system in game (anti-bot protection) 💬 Chat System • Global chat (!) – Free, requires level 15 • Trade chat (+) – Free, requires level 15 • (!) Global chat • (+) Regional trade chat 🛡 Fair Play & Restrictions • Maximum 2 game clients per IP • Donate Coins and Vote Coins cannot be sold, dropped, traded, or destroyed • Cursed weapons disabled until first Heroes • Wedding system disabled (will be activated later) ⚔️ Class Progression • 1st Class Transfer – Quest required • 2nd Class Transfer – Quest required • 3rd Class Transfer – Full quest required • Subclass – Full quest required • Noblesse – Full quest required   🗡 Equipment • Shadow Weapons (D / C / B Grade) available via Shadow Weapon Manager 🧠 Technical & Protection • High-quality geodata and geo-engine • Advanced protection against DDoS attacks • Protection against third-party programs and cheats   Join Us Now! https://l2haruna.com/ 
    • High Five Part 5 can be uploaded?
  • 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..