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

    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock