Jump to content
  • 0

Admin Command: Hero For A Limited Time..!


xXObanXx

Question

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

Link to comment
Share on other sites

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

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.

 
Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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"? :)

Link to comment
Share on other sites

  • 0

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™
Link to comment
Share on other sites

  • 0

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:

Link to comment
Share on other sites

  • 0

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.!

Link to comment
Share on other sites

  • 0

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 

Link to comment
Share on other sites

  • 0

^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
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Gift30 — is a promo code for a -30% discount on all fares. Have time to activate the promo code before 03.06.2023.   SELECT TARIFY   As a reminder, we are open to cooperation and ready to offer favourable conditions for bulk rates, as well as to make you the personalised rate you've been dreaming of for so long.    Kind regards, Proxy5 Team.
    • Good luck, i like Pride Style.
    • Opening June 17 at 19:00 (UTC +3) Open Beta Test from June 10   Link to announce : https://forum.lineage2dex.com/threads/16500/ This is pre-announcing of summer season server, so we want to share some key points of this new server. Full details we announce a bit latter. Summer is a time for rest and vacations, so we decided to make this season much easier and less hardcore than usual. Our features: We use classic Interlude rules, no Kamaels, new races or new gear (maximum S gr like it should be on Interlude). But yes, we are using a new modern client, and we add new content to make your gameplay more varied and interesting. So if you before play only on default Interlude servers it will be not a problem for you  And for players who before not play in la2 at all, we have good Data Base in game where you can get all detailed info about server + we have very friendly core Dex community on discord who will help you with pleasure. New Classic Game client (more FPS) Unique TvT system, with 1 week season, rating for best players in classes. Good reward (you can get for it even epics, even if you solo player, just regular visit it) Daily Instance Zones with good rewards (Rim Kamaloka, Labyrinth of Abyss + others instance) Daily reward system. Visit game each day being Nobless and get reward. Daily Quests Item Broker Auctions in towns and Fair on Giran Harbor Masterwork items (can be obtained by crafting or farming RBs ) PvP Items Residence skills High-end content (details below) Cycle macros Some changes on summer season: x100 Exp Rates From the start, all characters have 24 slots buffs (you don't need Divinity books) All characters have from start buff book with all buffs. From Astarte, you can get book with buff profiles. Simplified system for getting Nobles Reworked TvT season system We have destroyed the stereotypes that x50 servers live for a couple of weeks. And our Union x50 server proves it (working for 3+ years with good online and clans fighting for Epic bosses and on Daily PvP) We have enough content that will allow you to maintain interest in the game all the time! And we are always working on improving the game and adding new interesting activities and content. Our Last (winter) season start from November 5 2022 and was merged with Union on March 28 2023 (5 month). High-end activities on start will be not available, we will add it gradually with time. High-end content: Hellbound (closed on server start) Spoiler Talent Tree system - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Steel Citadel - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Anomic Foundry and Elixirs - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Ancient Mansion, Cursed Town & Charms! - Lineage2Dex | Forum | Lineage 2 Classic | Interlude Beleth - Cursed Wizard - Lineage2Dex | Forum | Lineage 2 Classic | Interlude We will be glad to hear any comments and suggestions on our discord channel, join it we have very friendly community there  - Join discord  
    • DONT BUY GUYS!  100% SCAM OR BAN .      https://prnt.sc/TyXTohUii3nB     When I asked him for proof it's working he told he not gonna use giftcard for proof 😄 After that he called person monkey and block him. Guys dont risk with this guy - if there would be no scam or ban . He could use those giftcards by himself and make tons of money not selling for 15 $ lol. 
    • im looking for interlude pvp server, like inf-skills used to be So idk if anyone remembers l2 inf-skills, maybe? from c4 to interlude, mobs dropped AA, players dropped 20%? of their AA from inventory in pvp, dont remember pk..   there was npc to enchant items with AA, smth like 9-11 were very safe, 16/16+ almost impossible there was always pvp for good spots fog/mos/woa angels pvp events/town pvp event if u killed X people u get hero aura, you could use your hero weap    
  • 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