Re: Code it yourself.

From: brian (bb@optim.ism.net)
Date: 02/28/97


> Sorry guys! im a aprendice of muds!! i dont programing very well in mud 
> languaje and i dont speak very well the english so..
> Can them help me to work this code!?

  *confusion*   how can we give you coding ideas, if you can't code?

    it's like teaching a rabbit how to bath..

      it may seem like i'm coming down on you hard, i'm just trying to
explain that we can't help you work with the code, if you don't know how
to understand it..  c/c++ is like a complete foreign language in itself
that usually takes a few years of practice to understand it..   

> At 02:56 PM 2/27/97 -0500, you wrote:
> >Has anyone added support for Mobprogs to OasisOLC?  I've been toying with 
> >the idea of adding them, and would like to be able to add complete support.
> >Any pointers or the like would be appreciated.
> >
> >
> Yes.  I am just about to release a fixed up version in a week or so.


 personnally i think people are making a bigger deal out of this than it
really is..   it's just like adding anything else to OasisOLC, only it
manipulates the structure mobprogs in mob_index..    eg.

   instead of having the menu option manipulat a GET_CLASS(ch) it uses

MPROG* OLC_MOB_PROG;                     (put this with the other olc
					buffers in descriptor_data)

           (create alloc_mem for desc->OLC_MOB_PROG here )
OLC_MOB_PROG(d)->type = new_bitvector_type (eg. ACT_PROG)
OLC_MOB_PROG(d)->arglist = the argument listing (eg. wait for
                                  act("<argilst>") comes to that mob..)
OLC_MOB_PROG(d)->comlist  = command list for the mob to do..

then, in medit_save_to_memory:

OLC_MOB_PROG(d)->next = mob_index[mob_nr].mobprogs;
mob_index[mob_nr].mobprogs = OLC_MOB_PROG(d);

then, in medit_save_to_disk:

  int found = FALSE;

after it saves all the especs have it convert the ->type (eg. ACT_PROG) to
it's word format (eg. "act_prog")

  for (OLC_MOB_PROG(d) = mob_index[nr].mobprogs; OLC_MOB_PROG(d) != NULL;
                            OLC_MOB_PROG(d) = OLC_MOB_PROG(d)->next)
{
    fprintf( file, "%s %s~\n%s\n~\n", <converted ->type string>,
mob_index[nr].mob_progs->arglist, mob_index[nr].mob_progs->comlist);
    found = TRUE;
 }                                                    
      if (found)         fprintf(file, "|\n");


please note i may not have used the exact stock 'names' for some
variables..

-bb

> > I have heard of a few MUDS using an immortal system like in the
> > Highlander movies. How was this implemented? Thanks.
> 
> With code...
> 

   kill all the protection against gods hurting gods in your code..

in raw_kill   (if (GOD(victim) && GOD(killer)) 
		  LEVEL(GOD(victim)) = number(1,LVL_GOD-1);



> Howdy,
> 	Sorry to bug you. I am fairly new at coding this stuff and Made all the =
> changes you said to make but I don't understand the changes in Nic =
> Suzor's instructions.  I am mostly confused about what to do with all =
> that crap at the end of class.c.  Any help would be much appreciated.
> Thanks in advance!

   if your getting confused about '=' stuff i'd recommend a c class before
having us teach you..

> TITLE: The C Programming Language, First Edition
> AUTHOR: Kernigan, Brian W.
> CO-AUTHORS: Ritchie, Dennis M.
> SUBJECT: C Programming
> PUBLISHER: Prentice-Hall
> EDITION: 1978. pp 228
> ISBN: 0-13-110163-3
> 
> 	Enjoy...
> --

   i'm sure they make one in your primary language as well:)

> Ok I have added a skill but I just cannot find where I need to set the
> action statement... I mean it works in battle, but it doesnt say
> anything.... and I havent set anything either...  Like Bash says "you
> miss and topple over" or something... where can I edit these statements?

  in mud/lib/misc/messages, be sure you keep the format the same or you'll
screw the whole file up..

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



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