Thread: Evil Mprogs
View Single Post
Old 04-09-2003, 01:17 AM   #2
Quicksilver
New Member
 
Join Date: Apr 2002
Location: Toronto, ONT, Canada
Posts: 23
Quicksilver is on a distinguished road
Send a message via Yahoo to Quicksilver
Talking

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
Quicksilver is offline   Reply With Quote