Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Compiling the server ➜ Alignment based Races, Classes, Hometowns snippet?

Alignment based Races, Classes, Hometowns snippet?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by LunaticStriker   USA  (17 posts)  Bio
Date Tue 06 Sep 2005 01:31 AM (UTC)
Message
Does anyone have a snippet for alignment based races, classes, and hometowns for ROM 2.4b6?
Top

Posted by Jebikoje   (4 posts)  Bio
Date Reply #1 on Wed 14 Sep 2005 10:51 AM (UTC)
Message
Well, I don't have a snippet per se, but I can tell you the basic idea of making it work.. First off, us something like

ALIGN_G ALIGN_N ALIGN_E

Add this to your races in const.c.

Add something like this "sh_int align;" to your struct class_type to set align for specific classes.. And add it to your struct pc_race_type to set align for specific races.

Now in comm.c under CON_GET_ALIGNMENT, change that to meet the requirements for the ALIGN_G ALIGN_N ALIGN_E, and example of such would be something like this...

if ((pc_race_table[ch->race].align == ALIGN_G && class_table[ch->class].align == ALIGN_N)
|| (pc_race_table[ch->race].align == ALIGN_ANY && class_table[ch->class].align == ALIGN_GE)
|| (pc_race_table[ch->race].align == ALIGN_GE && class_table[ch->class].align == ALIGN_ANY))
{
write_to_buffer(d, "\n\r", 2);
write_to_buffer(d, "Alignment?\n\rgood or neutral?\n\r", 0);

Not sure how clear that will come out, I wrote in in textpad and then pasted it in here... Hope that gives you an idea to expand on.
Top

Posted by Jebikoje   (4 posts)  Bio
Date Reply #2 on Wed 14 Sep 2005 10:56 AM (UTC)
Message
Actually, sorry, those GE's don't belong there, not sure what happened, but this is what it should look like:


if ((pc_race_table[ch->race].align == ALIGN_G && class_table[ch->class].align == ALIGN_N)
|| (pc_race_table[ch->race].align == ALIGN_N && class_table[ch->class].align == ALIGN_G))
{
write_to_buffer(d, "\n\r", 2);
write_to_buffer(d, "Alignment?\n\rgood or neutral\n\r", 0);
}

There, that makes more sense. Sorry about that last post, but hope that helps.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,566 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.