Re: [CODE][NEWBIE]Race/Clan Wars at the touch of a button?

From: Peter Ajamian (pajamian@cheapsam.com)
Date: 12/15/99


John Bowman wrote:
>
>         I'm a first time poster long time reader. Anyhoo..
>
>         This may be a clear as mud explanation of what I want, because
> I'm not real sure how to explain it.  I'm wondering if its feasible or
> even possible to have something that an implementor can adjust to reflect
> the "political" situation on the mud.  i.e. if in your story line one race
> is having difficulties with another and things get too tense and war breaks
> out between them and they (the mobs) are prone to attack this enemy on sight
> and then after a day or so real time set it back to normal, then later have
> war break out between another set of races etc.
>
>         Is something like this only possible by manually changing it every
> time you want something like this to happen or is it even too complex to
> even give something like this too much thought?

Ceartainly it's possible, and not too difficult either.  A simple way to
implement something like this would be to have it rotate through
different war scenarios you set up in advance (I'll leave setting up and
implementing the scenarios to you).  Let's say you want to activate a
new scenario each week, all you have to do is create a #define for each
scenario as follows...

#define WAR_NO_WAR    0
#define WAR_HUM_ELF   1
#define WAR_HUM_TROLL 2
#define WAR_ELF_TROLL 3

#define NUM_OF_WARS   4

Then you have a macro which you can always call to determine which races
are at war...

#define GET_CURRENT_WAR ((time(NULL) / (7 * SECS_PER_REAL_DAY)) %
NUM_OF_WARS)

The nice thing about this method is that you don't have to save any
state that the MUD is in, and the current war will remain unchanged over
any number of reboots.  If OTOH, you want to introduce a ceartain amount
of randomness into which war is currently going on (either for selection
of war or duration), then you will have to save some settings to a file
and have the MUD reload them when it boots, otherwise you will find that
you are in a different war after a reboot than you were before.

>         I'm also tryin to figure out how to do submenus.

YOu need to add a CON_ state for each menu you want to add and add a
switch in the nanny function.  Then you can throw a player to any given
menu by displaying the menu and setting the player's CON_ state.

> i.e.:
>
> Choose a class:
>
> [C]leric
> [M]agic-User
> [T]hief
> [W]arrior
>
> Your choice: C
>
> What type of cleric:
>
> [P]riest
> [M]onk
> [W]ar-Priest
>
> etc.   You choose something and depending on what you choose it pops up with
> another
> menu and in my case there will be another menu after that.  I'm using
> circle30bpl16.
> Any help would be very much appreaciated!
> Thanks!

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST