Help with Item Assembly Snippet

Posted by TehL33TJim on Tue 26 Jun 2007 03:07 AM — 13 posts, 38,973 views.

#0
So I grabbed the Item Assembly snippet from AKDMud.com, [its by Zarius, if that matters].

I did everything the instructions tell me, except for the very last part, which it really doesn't.

It says:
Then its just the entries in TABLES.C and Make clean and compile.

What exactly am I to put in tables.c?
USA #1
Put the two entries for the do_ command, and the one in mud.h. If you're unsure, you can follow examples in that file (such as do_look).
#2
Where exactly should I put them though? I can't seem to find do_look in tables.c...using the search tool on CPad [which is what I've been using to change code].

I just need a little bit of hand-holding for this...
Amended on Tue 26 Jun 2007 02:29 PM by TehL33TJim
USA #3
Are you using FUSS? If so, I don't think you need to deal with tables.c, just mud.h.
#4
Yeah, I'm using FUSS. I did everything except for anything in Tables.C, yet when I try to use the command "connect" it gives me the usual "Huh?"...

Must I Cedit it?
USA #5
Yeah, you need to use cedit in the MUD.
#6
Uugghh, man...I love how none of this was in the instructions for it.

I was told to put some code in act_obj.c, but it didn't specify, so I put it all at the very bottom, would that effect it? [if you want to see what it was, I'll gladly post it]

Also...could you tell me what all to do with cedit? I never done anything like this before and have no clue what to do with cedit.

I really appreciate this help Zeno.
USA #7
There should be a helpfile on cedit. You just need to create a new command called connect.

If what you added to act_obj.c was a new function, then yes that's fine.
#8
Wow, apparently all I had to do was make the command. I thought I would have to link it or something, I don't know.

Thanks much Zeno!
USA #9
hey just in case you didn't already, make sure to set the level on your new command down so your players can use it too. when you create a new command it defaults the commands level to your immortal characters level.
#10
Alright now I'm in trouble again...

In the instructions, it tells me:

In MUD.H find:
----------------------------------------------------------------------------
ITEM_MATCH, ITEM_TRAP, ITEM_MAP, ITEM_PORTAL, ITEM_PAPER,
ITEM_TINDER, ITEM_LOCKPICK, ITEM_SPIKE, ITEM_DISEASE, ITEM_OIL, ITEM_FUEL,
ITEM_EMPTY1, ITEM_EMPTY2, ITEM_MISSILE_WEAPON, ITEM_PROJECTILE, ITEM_QUIVER,

Change to:
ITEM_MATCH, ITEM_TRAP, ITEM_MAP, ITEM_PORTAL, ITEM_PAPER,
ITEM_TINDER, ITEM_LOCKPICK, ITEM_SPIKE, ITEM_DISEASE, ITEM_OIL, ITEM_FUEL,
ITEM_PIECE, ITEM_EMPTY2, ITEM_MISSILE_WEAPON, ITEM_PROJECTILE, ITEM_QUIVER,
^^^^^^^^^^ - modify ITEM_EMPTY1 to ITEM_PIECE



Which I have, I changed ITEM_EMPTY1 to ITEM_PIECE
Next it tells me:

in DB.C find:
------------------------
case ITEM_DRINK_CON:
case ITEM_KEY:
case ITEM_KEYRING:

under that add:

case ITEM_PIECE:

Which I have also done. I did a make clean and then make, everyone compiled beautifully. Then I started up the MUD, everything started up clean. I logged on, "ocreate 1201 bottom half sword", then "oset 1201 type piece" and I it tells me that its not a valid item type. So I tried all sorts of combinations of piece; piece, PIECE, item_piece, ITEM_PIECE, etc, and none of them work. What am I missing now?
USA #11
Is that all it said to do? There is more. You need to add the new string in that itemtype array, although I can't remember where it is offhand (build.c perhaps).
#12
Yeah, build.c had it, awesome. Seriously Zeno, you rule much. Very much appreciated the help.