Tide sucking you out program sample

For builders to discuss and ask building questions.
Post Reply
User avatar
Rhytania
Sword Grand Master
Sword Grand Master
Posts: 320
Joined: Mon Aug 04, 2003 1:46 pm
Location: Forests of Cormanthor

Tide sucking you out program sample

Post by Rhytania » Tue Nov 18, 2003 5:39 pm

Hi all,

I need an example of the simulated tide program that sucks you out from the beaches into the ocean
Thanks,

PS Almost done with my area, been slowly but surely working on it.
User avatar
Rhytania
Sword Grand Master
Sword Grand Master
Posts: 320
Joined: Mon Aug 04, 2003 1:46 pm
Location: Forests of Cormanthor

Post by Rhytania » Tue Nov 18, 2003 7:52 pm

Sharni,
this is great, thanks. Now for a second question. lets say I have 10 rooms that I wish to string these rand progs across, effectively simulating an undercurrent, are there any known problems with this ie:
rooms A - J each room has a 50% chance of sucking you in and dumping you to the next room the chain is started and the destination will be Room Q00 (ocean). I dont know if this has been tried before thats why I ask.
Thanks for the help,
;)
-Rhy
User avatar
Rhytania
Sword Grand Master
Sword Grand Master
Posts: 320
Joined: Mon Aug 04, 2003 1:46 pm
Location: Forests of Cormanthor

Post by Rhytania » Tue Nov 18, 2003 10:05 pm

a death trap...now who would do something like that :twisted:
User avatar
Rhytania
Sword Grand Master
Sword Grand Master
Posts: 320
Joined: Mon Aug 04, 2003 1:46 pm
Location: Forests of Cormanthor

Tides

Post by Rhytania » Wed Nov 19, 2003 2:02 pm

Ok heres what I came up with:

Code: Select all

>rand_prog 50~ 
if time() == 8 
  mpecho The waters quickly sweep past your body.
  mpecho The current begins to pull at your body. 
  mpechoat $r You struggle with the rip-tide and are pulled under. 
  mpechoaround $r $r is pulled under by the rip tide. 
  mptransfer $r QQ00 
  mpat QQ00 mpforce $r look 
if time() == 16 
  mpecho The waters quickly sweep past your body.
  mpecho The current begins to pull at your body. 
  mpechoat $r You struggle with the rip tide and are pulled under. 
  mpechoaround $r $r is pulled under by the rip tide. 
  mptransfer $r QQ00 
  mpat QQ00 mpforce $r look 
if time() == 24 
  mpecho The waters quickly sweep past your body.
  mpecho The current begins to pull at your body. 
  mpechoat $r You struggle with the rip tide and are pulled under. 
  mpechoaround $r $r is pulled under by the rip tide. 
  mptransfer $r QQ00 
  mpat QQ00 mpforce $r look  
endif 
~
The prog is set to trigger on an 8 hour cycle and lasts for about an hour, when the tides are strongest. I havent replaced the room vnums yet because I wanted to make sure the code was correct before I inserted it into my area. Also I wasnt sure if midnight read as 24 or as 00 so I just put it at 24 and will change if I am wrong.
Thanks,
-Rhy
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 » Wed Nov 19, 2003 5:33 pm

After the mpat QQ00 mpforce $r look, I would add line like

Code: Select all

mpat QQ00 mpechoaround $r Someone is pulled in by the strong currents.
to warn the other characters already in the room that someone has come in.
Post Reply