Re: [NEWBIE] [SPEC-PROCS] Bomb Procedure

From: Pat O'Laughlin (polaughlin@STARIX.NET)
Date: 07/30/98

   I got it working sort of.  But I cant figure out how I would get it to wait a
few seconds before it explodes... can someone help me?


baktor wrote:

> Pat O'Laughlin wrote:
> >
> >     I thought that a neat little feature could be bombs.  I tried
> > creating a bomb using a spec_proc but I never actually got it working.
> > All I want it to do is: character drops a bomb, waits a few seconds,
> > then the bomb explodes doing lots of damage on the room that its in.
> > Has anyone done this before or can someone whip up something really
> > quick for me?
> >
> This has flame written all over it, the last sentence just don't help.
> BUT, i feel like give some basic guidance, not only for you, but to see
> if I'm correct in how to do this as I'd like to keep myself up to par,
> even on the little things.
> Here is what [I] would do: (maybe not with a spec proc)
> 1.  create an object that is the bomb.
> 2.  make a skill/whatever that will "light" the bomb so that it will
> "explode".  I'd make a skill, as that's my way.
> 3.  The skill will take the bomb from the player, and set it in the
> current room, grep/search to find how to do this.
> 4.  skill/whatever I would think should set the obj-timer much like the
> corpse code does, only with a lesser number so it doesn't last as long.
> 5.  this way so far lets the object be picked back up and so forth, set
> flags appropriately if you wish it to be hidden, !get or whatever
> 6.  in point_update (where the corpses are removed from game?)
>         search for the corpse stuff and basically copy it.  Modify it so that
> it checks for if it's an object....if it's a bomb (i'd use vnum) and if
> the obj timer is 0 yet...
>         if timer is not 0, timer--
>         if timer IS 0, extract object (give good messages to ppl that bomb just
> exploded right next to them if they are in room, maybe give similar
> message to those around this room)
>         do a loop through the players in the room and
>         roll a dice() to get how much damage each person takes, you may
>         wish to take something from fight procedures for this, or somewhat, I'd
> do a flat out dice about 2x earthquake size....forget armor, it's a bomb
> :P
>         once dice is rolled, give appropriate message that shrapnel hit them,
> then take current hp and subtract the result of the dice or calculated
> damage
>         check if they are still alive, kill them off if they arn't.
>         loop to next player now i think
>         may or may not wish to do this to mobs, same basic idea though
> Heh, this is a basic flow of what you need to do to make it work. I
> won't actually do it for you, but it should work half decently if you
> know how to dig a bit in the code....everything you need is in the code
> already, I may have missed a few things, but you can repost once YOU
> have code in and stuff, much easier to point out stuff when you see the
> code they are having problems with.  I suggest a skill for doing bombs,
> but that's me as i said, you can do this however.  To make a skill you
> basically look around a bit, I'm sure you can put 2 and 2 together.
> heh, anybody else who reads this, comment on stuff i missed, I'm sure
> it's there, comment, and you'll help not only him get started, but me
> with sharpening my concepts and stuff up a bit.
> Monk of Radark and Master of Pain,
> Baktor Silvanti

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST