Page 1 of 1

Question about commands 097

Posted: Sun Sep 30, 2007 7:50 pm
by dkpat
my question is how exactly are the commands that are individual package folders work? I mean like in the magery skill package. the seer command .spellbook is there. how does POL know that that is where that command is?

Posted: Mon Oct 01, 2007 4:48 am
by runtest
Is this with the official release package? I noticed it is very different to say the least.

Posted: Mon Oct 01, 2007 10:19 am
by dkpat
yes it is the official release... it is much better organized, in my opinion, than it was before. but i'm asking how does it know where the command is? i just don't understand that.

Posted: Mon Oct 01, 2007 10:30 am
by ncrsn
Check out file config/cmds.cfg.

Posted: Mon Oct 01, 2007 10:37 am
by dkpat
that's part of what confuses me. it doesn't point to those individual directories. like the spellbook command is in the magery package.

Posted: Mon Oct 01, 2007 11:58 am
by ncrsn
POL scans through enabled packets on startup and checks if there are usable command scripts.
http://docs.polserver.com/pol096/scripttypes.php -> TextCommandScript wrote: Where Does It Live?
The 'program' in a .src file, in a command level subdir of a package or /scripts/textcmd

To Define
Place the script in a command level subdir or /scripts/textcmd, or a package after defining the command level path in cmds.cfg.
Check your cmds.cfg. You probably have something like this in there:

Code: Select all

CmdLevel Player
{
    ----
}

CmdLevel Dev
{
    ----
    Alias    God
}
So, let's say you have package TEST, with enabled 1 in pkg.cfg; if you have a command script test.ecl in directory TEST/textcmd/God/, developer should be able to use it in game. If folder God is renamed to Dev, command would still work (after a boot, that is).

Answer to your question is thus: POL knows .spellbook because of its location.

--

And if so happens that I'm wrong and facts I told happen to be not so valid, correct me.

Posted: Mon Oct 01, 2007 6:30 pm
by dkpat
ok.. now i understand it better. thank you.