Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Running the server ➜ Problem with MUD progs

Problem with MUD progs

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #15 on Sun 08 Apr 2001 01:26 AM (UTC)
Message
Hmm - it seems I had the syntax a bit wrong. Try:


if isfight($i) == 21009


This will allow the check, however there is a problem.

This test, I think, checks to see if the nominated mob is fighting the nominated person.

However if you put the test on the invisible mob, then it won't be fighting anyone, also you won't know which person to check against.

I tried:


if numfighting($i) > 0


But you have a similar problem. Also, it seems that random checks are not performed during a fight.

There must be a way around it, does anyone else know of a method?


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Larthos   (8 posts)  Bio
Date Reply #16 on Fri 13 Apr 2001 01:11 PM (UTC)
Message
Now, looking at your program, I can see a lotta little things that simply wont work out. First off, random is not supposed to trigger in a FIGHT because simply put, if it did, this could cause problems. You need to use a FIGHT program, mpedit add fight 100, works kinda like a random program, triggers 100% of the time, each round in the fight. Now, obviously the player is still fighting, and the mob sits down(as was observerd in your program). What would probably be better to do is, mpforce $n sit, sit. Or, even better, make a transfer room, this would be an empty room vnums, you could even use vnum 1, and add into your program, mptrans $n 1, mptrans $n. And, as an added precaution, add onto that something like, sit, then add a check for later, say on a greet, stand, so that your mob actually stands up.

Could also do something like, mpinvis, mppeace all. And then the fight wont continue(provided the mob is a higher level than the player) because the player can't see the mobile, I think.

Or, you could trans the MOB and the PLAYER to seprate rooms, and back, then add a secretive flag to your mobile *chuckle*

Also, someone mentioned something about pausing in mprogs, that would be "mpsleep" or "mppause" and it is not stock smaug, what it does it delays the program for X rounds, and there is a working snippet somewhere.

Also, I realise I covered some stuff Nick went over.... but hey, you seemed a bit lost Nick :P *chuckle*

-Larthos the SUPER builder :P
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #17 on Fri 13 Apr 2001 09:30 PM (UTC)
Message
I appreciate advice from the experts - MUD progs are not something I do every day. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nivek   (15 posts)  Bio
Date Reply #18 on Sun 15 Apr 2001 06:00 PM (UTC)
Message
Kris,
I would highly suggest reading Herne's building
guide. It is a little old now, but will give you the
basics of mobprogs, etc.... He is one of our better builders for Realms of Despair and wrote this guide in 1997, I just visited the link to make sure it is uptodate and it has a nice interface too it now, so he may have updated some of the stuff since 1997.
Here it is:

http://webhome.idirect.com/~helspawn/smaug.html
Top

Posted by Kris   USA  (198 posts)  Bio
Date Reply #19 on Wed 18 Apr 2001 01:29 AM (UTC)
Message
One thing: I want my pet to have some mob progs going on (i.e. a rand_prog that makes it meow occasionally). However, the fact that it's a pet and thus under a charm-type spell disables the mobprog. Where in the source code would I be able to disable that, so that being under a charm effect doesn't negate a mob prog?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #20 on Wed 18 Apr 2001 10:45 PM (UTC)
Message
Near the start of mprog_driver in mud_prog.c the relevant lines are:


  if IS_AFFECTED( mob, AFF_CHARM )
    return;

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Kris   USA  (198 posts)  Bio
Date Reply #21 on Thu 19 Apr 2001 06:58 AM (UTC)
Message
I tried disabling those two lines, but the mob progs still won't activate if the mob is charmed. Was I supposed to alter them in some other way?
Top

Posted by Larthos   (8 posts)  Bio
Date Reply #22 on Thu 19 Apr 2001 05:41 PM (UTC)
Message
Just a thought from the early thing about random programs in fights, well, you can make a fight program "random" by using the IF RAND ifcheck, and make a big fight program.

Somethng like this:

if rand(50)
mpecho $I launches into a series of attacks
mpechoat $n $I jabs you with $l weapon
mpechoaround $n $I jabs $n with $l weapon
mpdamage $n 6
mpechoat $n $I slams into you with $l body
mpechoaround $n $I slams into $s with $l body
mpdamage $n 4
mpechoat $n $I whips the end of his Tar Bandol across your cheek
mpechoaround $n $I whips the end of $l Tar Bandol across $n's cheek
mpdamage $n 7
mpechoat $n $I lifts up off the ground, and brings $l hooves down on your feet
mpechoaround $n $I lifts up over $n, and comes down on $n's feet
mpdamage $n 10
else
if rand(25)
mpechoat $n $I lunges at you with $l Tar Bandol!
mpecoaround $n %I lunges at $n with $I's Tar Bandol!
mpdamage $n 25
else
if rand(1)
mpechoat $n $I screams in furry!
mpechoat $n $I hooks you with $l Tar Bandol....
mpechoat $n $I swings around and gives you a massive kick in the ribs.
mpechoat $n The force of the blow knocks you out...
mpechoaround $n $I screams in furry!
mpechoaround $n $I hooks $n with $l Tar Bandol....
mpechoaround $n $I swings around and gives $n a mighty kick into $s ribs.
mpechoaround $n $n is knocked out from the might blow from $I.
mpechoaround $n $I carts $n off to the local jail.
mptrans $n 5441
mpat $n mpechoat $n You wake up as a bucket of water is splashed across your face.
endif
endif
endif


Will not trigger all the nifty stuff at once, and it will be used at a fight 100, using rand in it, regulates what attacks my guard will use to hurt players. I hope someone finds this handy :P

-Larthos
Top

Posted by Kris   USA  (198 posts)  Bio
Date Reply #23 on Wed 25 Apr 2001 05:20 PM (UTC)
Message
Ok first off, I removed that reference like Nick suggested, but mob progs on charmed mobs, like pets, still won't work. He suggested that I look for another mention of that ifcheck, but I could find none. Could someone please help me on this??
Second, I'm having some problems with a roomprog. I made a board in Shanbar Square, and added a quill pen to that room. I at first thought a copy would reset there if someone took it (I don't want players hoarding the pen to keep other players from posting, but I like having to use the pen because it adds a bit of realism to it). When it didn't, I decided to just have a rand_prog 99 room program use the ovnumhere(vnum) ifcheck, and if ovnumhere(vnum of pen) == 0, then rpoload(vnum of pen). It still didn't work. After much debugging, I found that my ifcheck was indeed firing, but the rpoload command wasn't doing a bloody thing. I tried using mpoload for the room prog, but also no effect. I tried getting creative with rpforce, rpat, etc, but none of those seem to do anything, either! Am I using these wrong or something? I could very easily do this with a mobprog, but these room progs are either extremely buggy or I'm going about this entirely the wrong way! Could someone please tell me what I need to do with this? Thanks :)
Top

Posted by Kris   USA  (198 posts)  Bio
Date Reply #24 on Thu 03 May 2001 11:00 PM (UTC)
Message
I was just wondering if anyone has had a chance to read the previous post on this subject. I am still totally stumped on this, and would really appreciate some help, if someone has any ideas what may be the problem. If not, perhaps if you could refer me to someone who would be able to help, that'd be good too. Thanks =)
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


63,602 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.