Page 1 of 1

Re: Auto Execute Admin Command

Posted: Sat Mar 27, 2010 11:13 am
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.

Re: Auto Execute Admin Command

Posted: Sat Mar 27, 2010 1:07 pm
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

Re: Auto Execute Admin Command

Posted: Thu Apr 29, 2010 3:02 pm
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.

Re: Auto Execute Admin Command

Posted: Fri Apr 30, 2010 2:55 am
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...

Re: Auto Execute Admin Command

Posted: Fri Apr 30, 2010 3:26 am
by NoX
an example with the town war event will be usefull please
//townwar_start
//townwar_end

Re: Auto Execute Admin Command

Posted: Fri Apr 30, 2010 4:14 am
by denser
better request help in thread of event..

Re: Auto Execute Admin Command

Posted: Fri Apr 30, 2010 1:47 pm
by NoX
I already did, but I only got a promise :S