Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Outta Couriosity (http://www.topmudsites.com/forums/showthread.php?t=475)

Keljorian 05-02-2002 12:34 AM

I am a head builder don't know a thing about code. But I was wondering how hard it would be to have a mob pop up randomly in random areas, that is aggresive and based against the stats of the character.

Keljorian

Sidmouth 05-02-2002 01:01 AM


kaylus1 05-02-2002 06:01 AM

As mentioned depending on the mud type you are running, this could be anywhere from easy to moderate. With Diku-Derivs alot of them have *progs which allow you to use a generic scripting language. I know in Circle, DGScripts has a trigger suited quite nice:

Reset
Description: This trigger is called each time the zone of the room it is attached to is reset.
Argument: Not used.
Numeric Argument: The chance this trigger will run when it is checked.
Return value: Not used.
Variables: None.


If you are planning on using other than a Diku-Deriv then it can be easy too.. in an LPC based mud it's quite simple, just a nested switch in the create() of your room. Abermud and Mordor would probably have to be hardcoded (unless you have pDirt abermud)..

Kaylus@Solice

SoEnSo 05-02-2002 07:36 AM

On a note for ROM, if it was rom, my personal preferance would be to build 1 rprog(if it has rprogs) and then when the area is complete, get the coder to throw it into the db.c, so it fills each of those rooms in the area with it(or make a command that would span the rprog throughout the area)

just my thoughts, as thats how i would do it.

Caxandra 05-02-2002 08:47 AM

I've seen a much simpler way of doing this.. not entirely random, but close.

Create a room, in this room add only one way exits/portals to differing sections of your game.  Have the mob reset in this room, and when he starts to wander, he'll use one of those exits to leave, thereby appearing in several different areas.

Hrm. This doesn't solve the stats of the character though. Sorry, I should have more caffiene before posting.


All times are GMT -4. The time now is 06:23 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022