1 - the command do_mpmakecitizen doesn't work, I had to comment the line on tables.c.
2 - the same with the command do_mprevokecitizen.
3 - the function do_makehometown have an "if(!IS_IMMORTAL(ch)...". This condition doesn't work and my immortals always are considered mortals.
4 - the hometowns are in the file hometowns.dat inside system folder. When I create a hometown directly in the file, only the first one is listed in the MUD. When I create a new hometown inside the MUD, it erases all the towns, except the first one and read the two towns. Horever, if I restart the MUD, it will read only the first one again!
And, at least, the pager option.
Inside nanny function, I found these lines:
xSET_BIT( ch->act, PLR_AUTOGOLD );
xSET_BIT( ch->act, PLR_AUTOEXIT );
So I added this:
xSET_BIT( ch->act, PCFLAG_PAGERON );
It doesn't work. Anyone know why?
Thanks Zeno, but answer me if it isn't a stupid question: how do I "cedit" it? If it is to write in commands.dat, I've done that already. If not, where do I put those things?
Ooooow Now I saw!
DECLARE_DO_FUN(do_mp_revokecitizen);
it have an underline after "mp".
Horever, I erased the underline. It is in the function's name too!
The same for both functions.
The file from internet is with this error, maybe this topic may be usefull in the future.
Thanks Zeno!
Now, let's see the other problems!
The MUD still doesn't read the full file hometowns.dat.
Any ideas?
Sure!
Imagine that we followed all the directions on the read-me file. Then we changed that underline we talked about and the immortal's condition to the makehometown's command.
Then, executing the smaug.exe, using an immortal inside the mud we use the createnation's command.
This nation will be Tolkien's "Shire". In the nation's folder is now a new file called Shire.nation, and "nations.lst" have a new line pointing to it.
Everything works fine until here.
So we use <makehometown bree>.
The file hometowns.dat becomes this:
#HOMETOWN
Name Bree~
Recall -1
Vnum 1
Citizens -1
Description None~
End
#END
Then we do <hometown> command in the mud. It returns this (ow, I used dots ".", but just because it doesn't work fine with spaces " " in the forum):
Hometown................Nation...............Citizens
_____________________________________________________
Bree.....................None....................-1
For more information use 'hometowns <name>'
Everything is ok.
So, we shutdown the MUD. Start it again and use <hometown> command again. It returns the same.
So we use <makehometown hobbiton>. The file becomes this:
#HOMETOWN
Name Bree~
Recall -1
Vnum 1
Citizens -1
Nation 0
Description None~
End
#HOMETOWN
Name Hobbiton~
Recall -1
Vnum 1
Citizens -1
Description None~
End
#END
Inside the MUD:
<1802hp 104m 110mv> homet
Hometown................Nation...............Citizens
_____________________________________________________
Bree.....................None....................-1
Hobbiton.................None....................-1
For more information use 'hometowns <name>'
Now, shutdown the MUD, restart it again.
Use the <hometown> command again!
<1802hp 104m 110mv> homet
Hometown................Nation...............Citizens
_____________________________________________________
Bree.....................None....................-1
For more information use 'hometowns <name>'
Where is Hobbiton?
Opening the hometowns.dat, there is hobbiton!
Horever, imagine that I try again, with a new hometown:
<makehometown buckland>
then the file will become this:
#HOMETOWN
Name Bree~
Recall -1
Vnum 1
Citizens -1
Nation 0
Description None~
End
#HOMETOWN
Name Buckland~
Recall -1
Vnum 1
Citizens -1
Description None~
End
#END
Everything will work the same way. If I restart the MUD, Buckland will be ignored.
From that format, it seems to me that there shouldn't be more than one #HOMETOWN in the file. The number of #END's doesn't match the number of #HOMETOWN's.
Note that all snippets are not perfect and may need some tweaking to get it working correctly.
Do you suggest I use more #END lines and try to make the code understand it?
I believe it works just as commands.dat:
#COMMAND
Name '~
Code do_say
Position 106
Level 0
Log 0
End
#COMMAND
Name ,~
Code do_emote
Position 106
Level 0
Log 0
End
(...)
Note that there's only one #END line, there in the bottom of file, so it doesn't match the #COMMAND lines.
Well, it doesn't work correctly.. this is sad, I must change everything.
It is extremely hard to understand what is wrong by only looking at data files. Who knows what it could be? It could be the data file format, it could be the loading code, it could be the saving code, it could be something else... the only way to know for sure is to look at the code. I suggest that you start by reading the code to read in the hometown files, and make sure that it expects the same format that you have in your data files.