Request for a new room flag

For builders to discuss and ask building questions.
Post Reply
Velsavius
Sword Novice
Sword Novice
Posts: 45
Joined: Tue Apr 19, 2005 9:43 am
Location: Northlands?? then Waterdeep
Contact:

Request for a new room flag

Post by Velsavius » Tue Sep 20, 2005 9:26 am

ROOM_SLOW... ROOM_WEB
The idea behind this room would be that if traversing a seriously cluttered or hard to navigate room for whatever reason this FLAG stops a PC from travelling any faster than speed type crawl, yet would allow certain mobs to travel at regular walk speeds, thus stopping PC's from running away as easily.
My reasoning is that I have an area that PC's are having to physically cut their way through
(you know like in the movies ....machetes in deepest darkest Africa)

ROOM_MUD or ROOM_QSAND
could be also made having the same attributes as the previous example but allowing levitate or fly to disregard the slow affect.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Tue Sep 20, 2005 11:18 am

Why not instead create an object, maybe something like:

short: the cobwebs
long: Cobwebs extend from ceiling to floor, preventing you from advancing.

On the cobwebs, you would have intercept progs on east, south, north, west, up, and down that, if level($n) < 53, prevent $n from moving. Another intercept_prog on cut (for example) would echo that $n cuts away the cobwebs and mppurge $o (remove the object).

Obviously, it could also work for other things, like thick plants in a jungle-like environment for example. You might even require $n to wield a machete in this case.
Image
User avatar
Ellian
Sword Master
Sword Master
Posts: 180
Joined: Mon Jan 05, 2004 4:31 am
Location: Waterdeep - Temple of Beauty
Contact:

Post by Ellian » Tue Sep 20, 2005 3:15 pm

The cobwebs item could work something like entangling spells in the game:

Code: Select all

>intercept_prog east~
if rand(25)
  mpechoat $n {30}You find your arm has become entangled in sticky cobwebs and you can't pull away!
  mpmadd $n currmove -20 (ish?)
else
  if rand(33)
    mpechoat $n {30}You step in something sticky on your way out and cannot pull your foot free!
    mpmadd $n currmove -20
  else
    if rand(50)
      mpechoat $n {30}You walk into some hanging webbing and entangle yourself terribly!
      mpmadd $n currmove -20
    else
      mpechoat $n {70}You make your way carefully through the webbing.
      unintercept
    endif
  endif
endif
~
You have a twenty five percent chance of excaping the webbing every time you try to move in a direction. Of course some PCs might just spam a certain direction and get through as fast as possible. Would there be any way to lag them?

Jayson
Velsavius
Sword Novice
Sword Novice
Posts: 45
Joined: Tue Apr 19, 2005 9:43 am
Location: Northlands?? then Waterdeep
Contact:

Post by Velsavius » Thu Sep 22, 2005 8:58 am

I like both of the options yet some reservations are;
With Dalvyns example of cutting the webs the object (web) is purged, and I believe (correct me if I'm wrong but would remain gone until the next reset) thus allowing all PC's to walk through the area with no restrictions.
Ellians example while not allowing the webs to be cut which leaves the obstacle there permanently can be overridden as stated by spamming your way through.
If perhaps you could purge the object as you cut it only to have it re-appear once you leave the screen would be an option I guess, am sure it's possible, will just have a go at working it out :)
Thankyou both for your ideas and help
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Thu Sep 22, 2005 10:08 am

I can't think of any good way to make it so that only the first character can go through, and not the other characters who are following him. When you follow someone (when you are grouped), you don't issue any command that can be intercepted: you automatically follow the leader. So, this configuration (a group of characters) cannot really be disassociated: if the leader passes, the other members of the group can pass as well.

If what you want is making it so that the webbing "regenerates" immediately, as soon as $n has left the room, you can simply add a leave_prog in all your rooms that goes something like:

Code: Select all

if ovnumhere(webbing_vnum) == 0
  mpoload webbing_vnum
endif
Note that it might create duplicates at area reset though: if a webbing in a room is destroyed, then put back in by the room program, another webbing will be loaded at area reset.

The solution to this problem is to have the initial webbings loaded not at area repop but by a mob or another program. The best solution might depend on how your area is constructed: if there is an entrance through which all characters must pass to reach your area, you can simply have an invisible mob in that room (let's say its vnum is rstart) with a program like:

Code: Select all

>greet_prog 100~
goto room1
if ovnumhere(webbing_vnum) == 0
  mpoload webbing_vnum
endif
goto room2
if ovnumhere(webbing_vnum) == 0
  mpoload webbing_vnum
endif
...
goto rstart
Obviously, that still leaves a problem open: if someone logs off while inside the area, it won't be filled with webbings at repop. To make sure that webbings are placed in all the rooms at repop, you could decide to create a mob with a high enough rand_prog that makes him put webbings everywhere then disappear.

Code: Select all

>rand_prog 60~
goto room1
if ovnumhere(webbing_vnum) == 0
  mpoload webbing_vnum
endif
goto room2
if ovnumhere(webbing_vnum) == 0
  mpoload webbing_vnum
endif
...
goto 3
Obviously, the mob will be back after each repop, so the if ovnumhere checks are needed: you can't just have it load webbings in all rooms without first checking if there's already one in there.

Does that solve the problem?
Image
Kirkus
Sword Grand Master
Sword Grand Master
Posts: 449
Joined: Mon Aug 04, 2003 8:08 pm
Location: Zhentil Keep
Contact:

Post by Kirkus » Thu Sep 22, 2005 5:54 pm

could the webbing only be loaded when a pc enters the room?
I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Thu Sep 22, 2005 8:06 pm

Kirkus wrote:could the webbing only be loaded when a pc enters the room?
Yes, but then the entering PC would not see it immediately, unless you also add an mpechoat in the greet_prog.
Image
Tyr
Sword Grand Master
Sword Grand Master
Posts: 502
Joined: Sat Aug 09, 2003 2:56 am
Location: House of the Triad
Contact:

Post by Tyr » Fri Sep 23, 2005 2:52 pm

Code could be added so that movement commands are intercepted not just on the mover but also executed against anyone following the mover.

Tyr
Image
Post Reply