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 ➜ SMAUG ➜ SMAUG coding ➜ Random VNUMS

Random VNUMS

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


Posted by AlaricX   (23 posts)  Bio
Date Sat 14 Dec 2002 05:06 AM (UTC)
Message
How could i get a working (existant) Vnum between 1 and MAX_VNUMS, be it room, object or mob (most importantly i am looking for ROOM vnums) my max vnums is the 2 billion one.
Top

Posted by AlaricX   (23 posts)  Bio
Date Reply #1 on Fri 27 Dec 2002 08:07 AM (UTC)
Message
I have gotten it to get random room vnums, but how would i find a random mob in the world (one that exists and is walking around in an area, etc). i have that, but when i do a get_char_world using the supermob as the first argument, it crashes later due to something about will_fall (i think it's the supermob)
Top

Posted by Chris L   USA  (57 posts)  Bio
Date Reply #2 on Thu 02 Jan 2003 12:23 AM (UTC)
Message
k well i think somethin around lines of

if ( (thing = get_room_index(number_range(1,MAX_VNUMS))) == NULL )
{
send_to_char( "Vnum does not exist.\n\r", ch );
return;
}

if for mobs just change to like get_mob_index etc
this way if the "thing"s vnum exists it will just stick with and if doesnt well.. yeah u get a lil msg :)
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,882 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.