Re: Cases in Spec_procedures (partly answered my own question)

From: James Smith, Director (discover@ee.ualberta.ca)
Date: 07/14/96


Subject: Re: Cases in Spec_procedures (partly answered my own question)

After staring long enough, I kinda figured it out... the letters and numbers
used in the case statements are found first in the static character strings:
like static char bedroom_path[]="s3304o1c1S."

now, this is fine for characters like King Welmar who wander around and
perform automated actions in various rooms.  What about characters like
Peter the Captain of the Guards or Jerry the Gambler who have no static
character string?  They have numbered cases,
 ie: (for SPECIAL(peter)) found in the King's Castle Special Procedures

if(!(number(0,3))&&(ch_guard = find_guard(ch)))
        switch (number(0, 5)){
        case0:
                act(.....
                .....
                break;
        case1:
        ....
       ...blah blah blah...


thanks!

-James
*****************************************************
Discover E Science Camp
Rm 5-1 Mech Eng. 
University of Alberta
Edmonton, AB, T6G 2G8

(403) 433-4471

Our *NEW* MUD: telnet vaav.carleton.ca 4000

discover@gpu.srv.ualberta.ca
http://www.ualberta.ca/~discover/homepage.html
*****************************************************



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