PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Question about commands 097

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion
Display posts from previous:   

Author Message
dkpat



Joined: 24 Jul 2007
Posts: 38

PostPosted: Sun Sep 30, 2007 11:50 pm    Post subject: Question about commands 097 Reply with quote

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?

Author Message
runtest



Joined: 05 Aug 2006
Posts: 98

PostPosted: Mon Oct 01, 2007 8:48 am    Post subject: Reply with quote

Is this with the official release package? I noticed it is very different to say the least.

Author Message
dkpat



Joined: 24 Jul 2007
Posts: 38

PostPosted: Mon Oct 01, 2007 2:19 pm    Post subject: Reply with quote

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.

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 173

PostPosted: Mon Oct 01, 2007 2:30 pm    Post subject: Reply with quote

Check out file config/cmds.cfg.

Author Message
dkpat



Joined: 24 Jul 2007
Posts: 38

PostPosted: Mon Oct 01, 2007 2:37 pm    Post subject: Reply with quote

that's part of what confuses me. it doesn't point to those individual directories. like the spellbook command is in the magery package.

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 173

PostPosted: Mon Oct 01, 2007 3:58 pm    Post subject: Reply with quote

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:

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.

Author Message
dkpat



Joined: 24 Jul 2007
Posts: 38

PostPosted: Mon Oct 01, 2007 10:30 pm    Post subject: Reply with quote

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

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty