Objects' Val1 and Char_to_Room

From: Julian Buckley (s348266@student.uq.edu.au)
Date: 02/15/99


Heya,


I was constructing a portalling system tonight, and I struck a small
hiccup with the following.  The system works via a spec_proc in that I
"enter portal" and I get teleported to the room specified by whatever I
portalled to using "cast 'portal' <whereever or whoever>".

I customised it a bit more, and made it so I could have pre-set numbers
via OLC.  I store this value in the second valx spot (Val1).

I'm having trouble "going to" the room specified in Val1.  What I'm after
I guess is how to teleport according to the exact value specified in the
.obj file.  At the moment, if I set it to "3", it takes me to Room #99, or
the vnum of 3 in the wld setup (other rooms before this are Room #0, #1,
and #3).  Setting "2" takes me to Room #3, setting "1" takes to Room #1,
etc...

The code is as follows:
char_to_room(ch, (room_rnum) portal->obj_flags.value[1]);


How can this be changed so that setting the .obj file to "3" will mean
going to Room #3?  And likewise, how can a check be made such that if the
room indeed does not exist, then report whatever sprintf?  i.e. does a
function exist already that does this?


Thanks in advance,
-Caniffe

-----------------------------------------------------------------
 Julian Buckley, 3rd Year Computer Systems Engineering
 Dept. Computer Science and Electrical Engineering, Univ. of Qld
 E-Mail: s348266@student.uq.edu.au
 Web Page: http://student.uq.edu.au/~s348266/index.html
-----------------------------------------------------------------


     +------------------------------------------------------------+
     | 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