Auto Execute Admin Command

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Sirpaypi
Posts: 108
Joined: Mon May 18, 2009 11:51 pm
Location: Moяocco.

Re: Auto Execute Admin Command

Post by Sirpaypi »

dark5 wrote:Hi people,
I have a problem, I want a way that the server automatically execute a Admin command.
type //reload config or //townwar_start or //townwar_end etc....

help me please
:roll: explain more !
If you mean live changes in the server use reload commands but only in dev server cause it will ruin your server if LIVE.
Saying that Java is nice because it works on all OSes is like saying that anal sex is nice because it works on all genders.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Auto Execute Admin Command

Post by jurchiks »

I don't think it needs any more explanation, he wants to schedule a command to run when needed, automatically, not manually...
I'd like to know that too, just for knowledge
Last edited by jurchiks on Sun Mar 28, 2010 12:29 pm, edited 1 time in total.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Aka Gambit
Posts: 16
Joined: Mon Oct 19, 2009 8:33 pm

Re: Auto Execute Admin Command

Post by Aka Gambit »

I am not sure if that is possible, however I may be wrong.

But from what I understand, you need to have the correct access level to execute those commands, so even if you made some script that calls them, it would not work because it needs to be linked to the "triggering character" to get that character's access level and make sure they have sufficient rights to use that command.

If its a script then there is no "triggering character" unless linked by an NPC, and then you' d have to stand by it.

Now I may be wrong in this. But from my understanding, it would be impossible to do.

However (and don't quote me on this as I am still learning) you could make a new handler that is linked to a specific admin command (For example "//start_auto_command_set") and then write a script that would call those admin commands you want, and then have it save the "triggering character" reference to use for each admin command called when it is asked for. Then make another one to stop them and link it to another admin command (For example "//stop_auto_command_set").
You could also write your own script that will do the same thing each command you wish to use does, and then just have an admin command to call them or another scrip that calls them.

I am just speed ballin it here though so I am not 100% positive on all this. Hopefully someone more knowledgeable
will be of more assistance.

Hope I have helped a little or I at least gave others an idea to help you. Good luck.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Auto Execute Admin Command

Post by denser »

for schedule -you have to copy necessary command to cron folder and convert in py...or make possible to execute java there.

then add globaltask...


or look at santa event and there is threadpool manager...
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
NoX
Posts: 189
Joined: Mon Oct 05, 2009 4:31 am

Re: Auto Execute Admin Command

Post by NoX »

an example with the town war event will be usefull please
//townwar_start
//townwar_end
lj2Black Hands : have something en mente + look around + copy +paste + try to improve it :S without knowlege -.-

Image
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Auto Execute Admin Command

Post by denser »

better request help in thread of event..
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
NoX
Posts: 189
Joined: Mon Oct 05, 2009 4:31 am

Re: Auto Execute Admin Command

Post by NoX »

I already did, but I only got a promise :S
lj2Black Hands : have something en mente + look around + copy +paste + try to improve it :S without knowlege -.-

Image
Post Reply