|
|||||||
This is a discussion on "Evil Mprogs" in the Top Mud Sites MUD Builders and Areas forum : 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?... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Member
Join Date: Apr 2002
Location: Aberdeen MD
Posts: 56
![]() |
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? |
|
|
|
|
|
#2 |
|
New Member
|
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 |
|
|
|
|
|
#3 |
|
Member
Join Date: Sep 2002
Location: Canada
Posts: 73
![]() |
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! |
|
|
|
|
|
#4 |
|
Member
Join Date: Apr 2002
Location: Aberdeen MD
Posts: 56
![]() |
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.
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2003
Posts: 6
![]() |
It's useful to tell folks exactly what you're getting from the mprog. For example, if you're getting the pechos, then that's a start. If you're not getting anything at all, it's likely that either your trigger is faulty or something is wrong with your mprog prior to the first pecho.
A couple useful checks to use anytime you're having mprog problems: 1) check and make sure your mob can see the PC entering (use a grall or if the mob is going to transfer someone or do some other action TO them, not just in the room, make sure they have appropriate flags to see all PCs you'd want them to see) 2) Put in a first line that echos or says, "MPROG TRIGGERED!" or something like that. That clarifies when the trigger is bad vs. other problems. 3) Put in a say or echo after each important action if you still can't get it to work. That way you can see exactly when the prog stopped working. 4) Check your if checks. Make sure you have the syntax exactly right. That's where a lot of folks go wrong. Finally, if you're trying to transfer the PC, you might want to actually put in a command to transfer. Syrinx |
|
|
|
|
|
#6 |
|
Member
Join Date: Apr 2002
Location: Aberdeen MD
Posts: 56
![]() |
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
|
|
|
|
![]() |
| Thread Tools | |
Evil Mprogs - Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mprogs/oprogs | Enzo | MUD Builders and Areas | 2 | 10-11-2004 08:34 AM |
| Evil fest is on! | Hephos | Advertising for Players | 0 | 05-18-2004 03:50 AM |
| Mprogs | Enzo | MUD Builders and Areas | 0 | 08-20-2003 06:39 PM |
| Good vs. Evil | Chapel | Roleplaying and Storytelling | 15 | 06-14-2002 11:18 PM |
| How evil is evil? | Chapel | Roleplaying and Storytelling | 17 | 05-26-2002 12:48 PM |
|
|