making all newbies nutrol

Posted by Lloyd graham on Fri 22 Oct 2004 11:58 PM — 7 posts, 26,155 views.

Canada #0
Ok I have been trying to edit my code so that all newbies are neutral but I don’t know what IM doing wrong but I need help

What I have done ( I know it is very wrong lol )


Nanny_Fun(HANDLE_CON_GET_ALIGNMENT)
{
CharData *ch = CH(d);

ch->alignment = 0;


d->connected = CON_GET_TIMEZONE;
return;
}


The old NANY

Nanny_Fun(HANDLE_CON_GET_ALIGNMENT)
{
CharData *ch = CH(d);

switch (toupper(argument[0]))
{
case 'G':
d_println(d, "{cYou are now {Wgood{c.{x");
ch->alignment = 750;
break;
case 'N':
d_println(d, "{cYou are now {Yneutral{c.{x");
ch->alignment = 0;
break;
case 'E':
d_println(d, "{cYou are now {Revil{c.{x");
ch->alignment = -750;
break;
default:
d_println(d, "{cThat's not a valid alignment.{x");
d_println(d,
"{cWhich alignment ({WG{c)ood/({WN{c)eutral/({WE{c)vil? {x");
return;
}

send_deity_info(d);
d_println(d, "{cWhat deity would you like to worship?{x");
d->connected = CON_GET_DEITY;
return;
}

If you could just give me a hint I would be happy because IM stumped
Canada #1
To help you with whats wrong, you need to tell us whats actually happening, since that looks "ok", but maybe not what you wanted.
Canada #2
Ok what is happening is that it compiles, but when you make a new chare it ether will sending info to the new char just before you go to get your alignment, or it will create but when you use the score command the mud will crash and the new char will be lost. it seems that it isn’t actually setting the player to a alignment of neutral.
Canada #3
Oh, that looks like it may have to do with the fact that you are not setting the characters Deity, as you are skipping that step. Maybe include this:
send_deity_info(d);
d_println(d, "{cWhat deity would you like to worship?{x");
d->connected = CON_GET_DEITY;
return;
Instead of
d->connected = CON_GET_TIMEZONE;
return;
}
Canada #4
Yep looks like that was the problem so seems I need to get rid of the whole deity thing at the same time I was hoping to take smaller steps doing it all one at a time lol but this will do

PS thanx I was totally looking in the wrong place
USA #5
You could set a mprog at the starting room to mset their align to 0...
Australia Forum Administrator #6
These posts are really relevant to "compiling SMAUG", so I have moved them. You will get a better response if you post to the correct part of the forum.