Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Builders and Areas (http://www.topmudsites.com/forums/forumdisplay.php?f=8)
-   -   I need some prog help (http://www.topmudsites.com/forums/showthread.php?t=217)

Denday_TechMagi 06-10-2003 10:51 PM

Hi i need help with mprogs mainly.  The codebase the mud i work on is ROM 2.4  If anybody could help me out email me or reply to this on how i can get in touch with you . So i can get help with that  
that is my email

Denday TechMagi, Builder-Chrono Caedus

Tezcatlipoca 06-11-2003 01:14 AM


Denday_TechMagi 06-11-2003 01:20 AM

Ok, I need help doing Mprogs. I cant do them and my area(s) seem bleh... I never really understood the Mprogs or PROGS all together. So, what i am asking is help on doing Mprogs. The Codebase is ROM 2.4.

Denday

(P.S. Is this better)

Davairus 06-12-2003 06:46 AM

Mobprogs need vnums just like mobs and eq.  Here's how it works on mine.

[code]
edit mobprog create #
[/quote]

That makes your mobprog.  Put a vnum you have access to where the # is.  Remember this vnum, you'll use that number later.

[code]
name (whatever)
[/quote]

This names your mobprog, yeah.. useful for finding it again

[code]
code
[/quote]

Puts you in the mobprog editor.  This is the easy part to get to, I am sure you got this far.  Alright here's a quicky:

[code]
if rand 20
say Howdy.
else
say Loser.
endif
[/quote]

rand is a number from 1 to 100.  In this example, the mobprog has a 20% chance to say Howdy, and because of the else.. it has an 80% chance to say loser.  This if / else/ endif thing is the bread and butter of mobprogs.  "rand 20" could have been "ispc $n", "class $n thief".. and whatever else your coder has programmed for you.

[code]
edit mob XXXXX
[/quote]

edit one of your mobs.. to put the mobprog on him

[code]
addmprog # GREET 100
[/quote]

This adds the mobprog to the mob.  Simple!  The "GREET 100" part here means the mobprog has a 100% chance to happen when someone enters the room.  So, every time someone walks in, 20% of the time he'll say hi, and the rest he'll be calling people losers.

There's a lot of things you can substitute .. "rand 20" can be anything allowed.  Similarly the "GREET 100" can be other stuff..  "RANDOM 100"  means the mob has a 100% chance to do the mobprog every otherer tick, "FIGHT 100" means the mobprog has a 100% chance to do the mobprog every round of combat.. just play around.. see what you can come up with.  BTW, if you want the mob to cast a spell, you'll probably have to do "mob cast icicle" etc.

Oh and, make sure your mobs have infravision before you decide your mobprog won't work, I've found many rookie mobprog makers fall into that trap over and over, for like, a month.


All times are GMT -4. The time now is 03:55 PM.

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