Question about commands 097

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.
Locked
dkpat
Apprentice Poster
Posts: 55
Joined: Tue Jul 24, 2007 10:21 am

Question about commands 097

Post 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?
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

Is this with the official release package? I noticed it is very different to say the least.
dkpat
Apprentice Poster
Posts: 55
Joined: Tue Jul 24, 2007 10:21 am

Post 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.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

Check out file config/cmds.cfg.
dkpat
Apprentice Poster
Posts: 55
Joined: Tue Jul 24, 2007 10:21 am

Post 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.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post 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.
dkpat
Apprentice Poster
Posts: 55
Joined: Tue Jul 24, 2007 10:21 am

Post by dkpat »

ok.. now i understand it better. thank you.
Locked