Difference between Skills & Commands in SWR

Posted by Marowi on Sun 11 Apr 2004 01:15 PM — 4 posts, 16,168 views.

#0
I have no idea of the difference between a skill and a command. I THOUGHT that commands showed up when you typed 'commands' (do_commands) and skills showed up with 'prac' or 'slist', and that commands were defined in tables.c and mud.h, and skills were only in the skills.dat file... it would seem not, however.

Just a few skills found in tables.c are:

if ( skill == do_jail ) return "do_jail";
but no 'do_kick'
if ( skill == do_makespice ) return "do_makespice";

Now when you cedit these...

cedit jail
Command not found.

cedit kick
Command not found.

Command: makespice
Level: 1
Position: 5
Log: 0
Code: do_makespice

And on 'prac'...

jail 100%
kick 100%
but no makespice

And on 'commands'...

[ 1] makespice
but no kick
and no jail

And on 'slookup'...

slookup makespice
No such skill, spell, proficiency or tongue.

Sn: 104 Slot: 0 Skill: 'kick '
Saves: none
Type: Skill Target: offensive Minpos: 7 Mana: 0 Beats: 8
Flags: 0 Guild: 0 Code: do_kick
Dammsg: kick
Wearoff: !Kick!
Teachers: 32012 32011 412
guild: Combat Align: 0 lvl: 6

Sn: 103 Slot: 0 Skill: 'jail '
Saves: none
Type: Skill Target: ignore Minpos: 8 Mana: 0 Beats: 12
Flags: 0 Guild: 6 Code: do_jail
Dammsg:
Wearoff: !!
Teachers: 408
guild: Leadership Align: 0 lvl: 25


Makespice and jail have a table listing, but kick doesn't.
Makespice has a cedit, but jail and kick don't.
Jail and kick are on 'prac', but makespice isn't.
Makespice are on 'commands', but jail and kick aren't.
Jail and kick have an slookup, but makespice doesn't.

I'm really quite confused, as I thought all three were definately skills. Where's the differences?

Thanks, in advance.
Marowi
Australia Forum Administrator #1
You must have a different version to me, I have do_kick:


    if ( skill == do_kick )             return "do_kick";
    if ( skill == do_kill )             return "do_kill";
    if ( skill == do_languages )        return "do_languages";

#2
Umm.. yeah.. just checked and kick IS in tables.c - still doesn't explain the rest of it.. Anyone else got any ideas?
Australia Forum Administrator #3
I can't find makespice either, so it is a bit hard to answer these questions. However the brief answer would be that skills are in skills.dat file and commands in commands.dat file (in the system folder).

Both skills and commands would normally have a "command handler" in the source code, eg.


void do_kick( CHAR_DATA *ch, char *argument )
  {
  // blah blah - code for kicking
  }

void do_look( CHAR_DATA *ch, char *argument )
  {
  // code for looking
  }