On Mon, 20 May 1996, Ken kuhlman wrote: > I've been playing around with mobprogs, and can't seem to > figure out how to get act_trigger to work. For example getting > a fido to growl at someone who pokes it would go: > >act_prog p pokes you in the ribs. > growl $n > ~ > | Try this instead: >act_prog p pokes you in the ribs~ growl $n ~ | Note the ~ after ribs. This (like the ~ after growl) are very importiant to the reading of the MOBProgram information. Also, I have found that using the trigger >in_file_prog {file_name.prg}~ is a FAR more effective and more useable system (you can simply change file_name.prg and upload a new one to /usr/bin/circle/lib/world/prg and at reboot you have updated ALL of the mobs using the MOBProgram file_name.prg without having to re-work the .mob files (which are always bigger). Also by splitting the MOBProgram files away from the .mob files you are making it easier. For example you have 8 versions of a very similar MOB (let's say a goblin of some type) and you want them to share a similar trait (say if the opponent is level => 25 they wet themselves) so a single .prg file could look like: >act_prog p enters the room~ if isnpc($n) if level>=25 emote wets his lion cloth in fear. else emote nervously says "Begone fool! We are the powerful Goblins!" endif else glare $n endif ~ | Call it goblin.prg and add this to the bottom (right below the position and sex flags): >in_file_prog goblin.prg~ | If you had another one for the leader, his could look like: >in_file_prog goblin.prg~ >in_file_prog leader.prg~ | Making it a WHOLE lot easier to work with. (I got MOBPrograms to work, can you tell? ) Just a few suggestions is all. > When you poke the damn beast, though, it just sits there; the mp > handler function never gets called. > I'm running pl11 and grabbed the mobprogs off of ftp.circlemud.org. > While they're designed for pl8, they went in fairly cleanly and > from reviewing the patchfile I don't think the pl diff is the > problem. Has anyone gotten this part of mobprogs to work? Did you > have to add some things to act.social.c? > > Everytime I think I've figured it out, it gets away from me. Even > a backtrace of a successful act_trigger would be helpful. Happened to all of us on MOBPrograms. The docs I bet are the cause of most of the problems, and someone has (if memory serves correctly) modified them and sent new ones to the ftp site. David
This archive was generated by hypermail 2b30 : 12/18/00 PST