The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

mreset random vnum max in area

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Building
View previous topic :: View next topic  
Author Message
ebp921



Joined: 23 Oct 2010
Posts: 1

PostPosted: Sat Oct 23, 2010 1:34 am    Post subject: mreset random vnum max in area Reply with quote

My question is instead of running around setting mresets in certain rooms. Is there anyway I can mreset a mob to load in random rooms in the area with a max amount of mobs for the area?

ex: mreset (random vnum) (mob per room) (max per area)


Back to top
View user's profile Send private message
Kalahn
Codebase Developer


Joined: 18 Jan 2003
Posts: 710
Location: New Zealand

PostPosted: Sat Oct 23, 2010 9:38 pm    Post subject: Reply with quote

Nothing comes to mind sorry.

- Kal


Back to top
View user's profile Send private message Visit poster's website
Daos



Joined: 29 Jan 2003
Posts: 1219
Location: United States

PostPosted: Mon Oct 25, 2010 7:33 am    Post subject: Reply with quote

Hi -

Regardless of where a mobile is reset within an area, it will wander (unless dont_wander ACT flag is toggled). However, if you really want something where mobiles are randomly loaded; my suggestion is to write up a mudprog to support said function.

Example:

1. Create a NPC with the act flag dont_water & unseen. This NPC will serve as your host for the mudprog.

2. Write the mudprog with code consisting of the 'if rand' condition. Type 'ifhelp rand' for more help on that.

3. Within the mudprog code, use the mp commands 'at <room vnum> mp mload <mob vnum>' - This will load the mobile in that specified room.

4. Add the mudprog to the NPC you created with the TICK or HOUR trigger.

Example code:

Dawn Output:
if rand 15
mp at 3000 mp mload 3000
end
endif

if rand 25
mp at 3001 mp mload 3001
end
endif

if rand 35
mp at 3002 mp mload 3002
end
endif

if rand 45
mp at 3002 mp mload 3002
end
endif


I think you get the idea. Moreover, if you want to be clever and delve into programming- you could create a new mp command extension to mload that supports a random location rather than the specified vnum. All you have to do is write up a condition that would load said mobile between the min_areavnum & the max_areavnum (this way it doesn't randomly load outside the area). Just a thought.



_________________
- Daos

http://www.dawnoftime.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bouchart



Joined: 25 Jul 2010
Posts: 22

PostPosted: Sun Dec 05, 2010 4:20 am    Post subject: Reply with quote

I had something of a workaround for this.

In an area I'd create a dummy room with no entrances, and an exit in every direction. Each exit would lead to a certain room within the area. When mobs loaded in the dummy room they would eventually wander into the area proper, so it looked random.

It isn't perfect but it could be close to what you could use.


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Building All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin