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)
-   -   Evil Mprogs (http://www.topmudsites.com/forums/showthread.php?t=161)

Keljorian 04-08-2003 11:45 PM

if ispc $n
mpecho {WAn alien throws the cow suit off.{x
mpecho {W<{Rs{ra{Ry{W>{B An Alien {w'{WGLARBEN SHENARBEN!{w'{x
mpecho {W$n is teleported to the mother ship.{X
else
if isimmort $n
mpecho {WAn alien throws the cow suit off.{x
mpecho {W<{Rs{ra{Ry{W>{B An Alien {w'{WGLARBEN SHENARBEN!{w'{x
mpecho {W$n is teleported to the mother ship.{X
endif
endif


Trying to get that code to work for an mprog, any suggestions?

Quicksilver 04-09-2003 01:17 AM

You didn't say what codebase this is for. It doesn't look like Rom24 MPROG, but I'll give it a quick (pardon the pun) analysis.

Here's my synopsis of what you wrote (minus any formatting)

If player, then throw off suit, say phrase, transfer triggerer to Mother Ship.
Else
2nd if Immortal, then throw off suit, say phrase, transfer triggerer to Mother Ship.
endif
endif

This seems a bit redundant, as both conditionals sense for opposite states (player vs immortal) then perform the same action. If you wanted the Immortal sent somewhere different then the situation would have looked more like this:


if ispc $n
mpecho {WAn alien throws the cow suit off.{x
mpecho {W<{Rs{ra{Ry{W>{B An Alien {w'{WGLARBEN SHENARBEN!{w'{x
mpecho {W$n is teleported to the mother ship.{X
else
mpecho {WAn alien throws the cow suit off.{x
mpecho {W<{Rs{ra{Ry{W>{B An Alien {w'{WGLARBEN SHENARBEN!{w'{x
mpecho {W$n is teleported to the Bridge (or wherever...){X
endif

IF I've gottent his wrong and you wanted the same thing to happen for PLAYER classes and not to catch an npc/mob in this situation try the following:

if ispc $n
or isimmort $n
mpecho {WAn alien throws the cow suit off.{x
mpecho {W<{Rs{ra{Ry{W>{B An Alien {w'{WGLARBEN SHENARBEN!{w'{x
mpecho {W$n is teleported to the mother ship.{X
else
mpecho {WThe cow chews its cud.{x
mpecho {W<{Rs{ra{Ry{W>{B The Cow {w'{WMOOOOOOOOOOOOOOOOO!{w'{x
endif


(Not sure if your MPROGS allow multiline conditional if_checks. If they do, then you can combine your pc and immort check in the same section, since they share the same outcome, saving a few bits along the way.)
Please incluse your codebase next time if possible.

Hope this helps
--QS

jornel 04-09-2003 08:23 AM

You didn't say if the problem was in the prog or the trigger.

As a test of this, insert 1 line at the very top of your mpog:

[code]  mpe MOOO, it triggered. [/quote]


If you do whatever it is you do to trigger the prog, and still nothing happens, then it looks like your trigger is at fault.

In SMAUG, the trigger is the line you see immediately before your program when you type either:

    rpstat             (if its a room prog)
or  mpstat mobname (if its a mob)


Since you didn't say what codebase you are using, I can only offer one last general hint:

If you suspect the trigger, then test your same mprog using a different trigger like this:

[code]  rpedit add speech p bessie [/quote]

then input your mprog and save.

then just type
 say bessie

if THAT works, then you know your mprog was not evil, it was an evil trigger!

Keljorian 04-09-2003 12:48 PM

The code base is for RoT, sorry it was late and I forgot to tell you guys a few things I see.  Also the keyword is stampede which i have added to the mobprog when adding it to the mob.  So far I haven't gotten it to work properly and still can't figure out why.  If there's anything else you need to know about the mprog I can tell you.

Syrinx 04-10-2003 07:30 PM


Keljorian 04-11-2003 08:52 PM

I figured out why it wasn't echoing, I forgot to put mob infront of echo. It's old rot 1.4 code that is stubborn as all heck, but thanks for the help


All times are GMT -4. The time now is 04:36 PM.

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