The depths DS vPA.0.2

DSPK V04.00 Furcadia
(0:0) When everything is starting up,
    (5:300) set variable %step to the value 0.
   
   



(0:9) When a furre arrives in the dream,
    (5:302) take variable %inDream and add 1 to it.
    (5:302) take variable %inSafe and add 1 to it.
            (5:15) move the triggering furre to (68,57), or to someplace nearby if it's occupied.
    (5:200) emit message {This is the very early test of a procederal generation engine for a dungeon diving game I am working on.  Find the ladder down to enter another random layout.} to the triggering furre.
    (5:200) emit message {The auto teleport is currently broken pending an update.  Say teleport to enter each new itteration of dungeon.  I will try to get an update out sometime mid week.} to the triggering furre.
(5:200) emit message {For more information on this project visit my blog here. Updates Saturdays} to the triggering furre.





(5:50) set countdown timer 1 to go off in 1 seconds.
(5:50) set countdown timer 2 to go off in 1 seconds.
(5:50) set countdown timer 3 to go off in 1 seconds.
(5:50) set countdown timer 4 to go off in 1 seconds.
(5:50) set countdown timer 5 to go off in 1 seconds.
(5:50) set countdown timer 6 to go off in 1 seconds.
(5:50) set countdown timer 7 to go off in 1 seconds.
(5:50) set countdown timer 8 to go off in 1 seconds.
s(5:50) set countdown timer 9 to go off in 1 seconds.
(5:50) set countdown timer 10 to go off in 1 seconds.

(0:38) When someone says or emotes something with {step} in it,

    (5:200) emit message {%step} to the triggering furre.
    (5:200) emit message {%checkR} to the triggering furre.
    (5:200) emit message {%direction} to the triggering furre.
    (5:200) emit message {%hallCount,%halls} to the triggering furre.

(0:10) When someone leaves the Dream,
 (1:85) and the triggering furre (moved from/is standing in) region 0,
    (5:304) take variable %inSafe and subtract 1 from it.

(0:10) When someone leaves the Dream,
    (5:304) take variable %inDream and subtract 1 from it.


(0:49) When any countdown timer goes off,
   (4:30) only in region 1,
    (5:1) set the floor to 161.


**SECTION**  Build Halls
*spoken Reload - clear map of all previous information


(0:3) When someone moves into item 1135,
    (5:901) popup a Yes/No dialog with request number 1 and message {Once you go to the safe room you can't go back. Proceed?} for the triggering furre.


(0:86) When someone clicks Yes for request number 1,
    (5:15) move the triggering furre to (18,28), or to someplace nearby if it's occupied.
    (5:302) take variable %inSafe and add 1 to it.




(0:86) When someone clicks Yes for request number 1,
 (1:203) and variable %inSafe is equal to variable %inDream,
    (5:5) change item 2400 to item 0.
   (5:5) change item 2401 to item 0.
   (4:1) only where the floor is 500,
    (5:120) make this/these location(s) part of region 5.
    (5:5) change item 1143 to item 0.
    (5:5) change item 1135 to item 0.
   
    (5:1) set the floor to 161.
    (5:300) set variable %step to the value 0.
  (5:300) set variable %hallCount to the value 0.
    (5:300) set variable %roomCount to the value 0.
 
(0:32) When someone says something with {teleport} in it,
 (1:117) and the triggering furre (didn't move from/isn't standing at) floor 500,
   (4:2) only where the floor is not 500,
(5:15) move the triggering furre to (%start), or to someplace nearby if it's occupied.

 







*set up the paramaters for current dungeon.  Number of hallways and number of rooms. Fetch start position.
(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 0,
    (5:312) set variable %halls to the total of rolling 1 dice with 1 sides plus 14.
    (5:312) set variable %rooms to the total of rolling 1 dice with 2 sides plus 1.
    (5:532) set variable %start to the X,Y position of a random spot where the item is 40 somewhere in the Dream.
 

    (5:300) set variable %step to the value 1.





*if to many attempts made move place item to a hall and try again.
(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 1,
 (1:200) and variable %attempt is equal to 2,
    (5:5) change item 40 to item 0.
    (5:300) set variable %attempt to the value 0.
   (4:1) only where the floor is 500,
    (5:512) set variable %newPath to the X,Y position of a random spot where the floor is 500 somewhere in the Dream.
    (5:41) place item 40 at (%newPath).
    (5:300) set variable %step to the value 0.


*if all halls are laid start building rooms

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 1,
 (1:203) and variable %hallCount is equal to variable %halls,
    (5:300) set variable %step to the value 6.


*choose direction and distance for halway.
(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 1,
 (1:202) and variable %attempt is less than 2,

 (1:205) and variable %hallCount is less than variable %halls,
    (5:312) set variable %length to the total of rolling 1 dice with 3 sides plus 8.
    (5:312) set variable %direction to the total of rolling 1 dice with 4 sides plus 0.



    (5:301) copy the value of variable %start into variable %check.
    (5:301) copy the value of variable %start into variable %rightLane.
    (5:301) copy the value of variable %start into variable %leftLane.

    (5:300) set variable %checkR to the value 1.
    (5:300) set variable %checkF to the value 1.

    (5:300) set variable %step to the value 2.

*preload paramaters for checks and adjacent lanes depending on direction roll.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 2,
 (1:200) and variable %direction is equal to 1,
    (5:352) move the position in variable %check northeast (up and right) %length step(s).
    (5:355) move the position in variable %leftLane northwest (up and left) 1 step(s).
    (5:353) move the position in variable %rightLane southeast (down and right) 1 step(s).

    (5:320) set variable %checkR to the region number (%check) is part of.
    (5:380) set variable %checkF to the floor type at (%check).
    (5:300) set variable %step to the value 3.



(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 2,
 (1:200) and variable %direction is equal to 2,
(5:353) move the position in variable %check southeast (down and right) %length step(s).
    (5:352) move the position in variable %leftLane northeast (up and right) 1 step(s).
    (5:354) move the position in variable %rightLane southwest (down and left) 1 step(s).

    (5:320) set variable %checkR to the region number (%check) is part of.
    (5:380) set variable %checkF to the floor type at (%check).

  (5:300) set variable %step to the value 3.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 2,
 (1:200) and variable %direction is equal to 3,
    (5:354) move the position in variable %check southwest (down and left) %length step(s).
    (5:353) move the position in variable %leftLane southeast (down and right) 1 step(s).
    (5:355) move the position in variable %rightLane northwest (up and left) 1 step(s).

    (5:320) set variable %checkR to the region number (%check) is part of.
    (5:380) set variable %checkF to the floor type at (%check).

  (5:300) set variable %step to the value 3.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 2,
 (1:200) and variable %direction is equal to 4,
    (5:355) move the position in variable %check northwest (up and left) %length step(s).
    (5:354) move the position in variable %leftLane southwest (down and left) 1 step(s).
    (5:352) move the position in variable %rightLane northeast (up and right) 1 step(s).

    (5:320) set variable %checkR to the region number (%check) is part of.
    (5:380) set variable %checkF to the floor type at (%check).

  (5:300) set variable %step to the value 3.


*check to make sure that the path will be made in an acceptable area.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 3,
 (1:200) and variable %checkR is equal to 1,
    (5:302) take variable %attempt and add 1 to it.

    (5:300) set variable %step to the value 1.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 3,
 (1:200) and variable %checkF is equal to 500,
    (5:302) take variable %attempt and add 1 to it.

    (5:300) set variable %step to the value 1.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 3,
 (1:200) and variable %checkR is equal to 5,
 (1:200) and variable %checkF is equal to 161,
    (5:300) set variable %step to the value 4.


*placemarkers at start and finish of each hallway for possible room placement

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 4,
    (5:121) make location (%check) part of region 2.
    (5:41) place item 1324 at (%check).
    (5:121) make location (%start) part of region 2.
    (5:41) place item 0 at (%start).
    (5:300) set variable %step to the value 5.




*placefloors in the length and direction of the hallway one itteration for each lane ending with the the middle lane increasing the count and step.

*going northeast

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 1,
  (3:16) in a line starting at (%leftLane) and going 1 more spaces southwest.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 1,
  (3:14) in a line starting at (%leftLane) and going %length more spaces northeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 1,
  (3:16) in a line starting at (%start) and going 1 more spaces southwest.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 1,
  (3:16) in a line starting at (%rightLane) and going 1 more spaces southwest.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 1,
  (3:14) in a line starting at (%rightLane) and going %length more spaces northeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 1,
  (3:14) in a line starting at (%start) and going %length more spaces northeast.
    (5:1) set the floor to 500.
    (5:352) move the position in variable %start northeast (up and right) %length step(s).
    (5:302) take variable %hallCount and add 1 to it.
    (5:300) set variable %step to the value 1.




*going southeast

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 2,
  (3:17) in a line starting at (%leftLane) and going 1 more spaces northwest.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 2,
  (3:15) in a line starting at (%leftLane) and going %length more spaces southeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 2,
  (3:17) in a line starting at (%start) and going 1 more spaces northwest.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 2,
  (3:17) in a line starting at (%rightLane) and going 1 more spaces northwest.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 2,
  (3:15) in a line starting at (%rightLane) and going %length more spaces southeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 2,
  (3:15) in a line starting at (%start) and going %length more spaces southeast.
    (5:1) set the floor to 500.
    (5:353) move the position in variable %start southeast (down and right) %length step(s).
    (5:302) take variable %hallCount and add 1 to it.
    (5:300) set variable %step to the value 1.



*going southwest


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 3,
  (3:14) in a line starting at (%leftLane) and going 1 more spaces northeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 3,
  (3:16) in a line starting at (%leftLane) and going %length more spaces southwest.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 3,
  (3:14) in a line starting at (%start) and going 1 more spaces northeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 3,
  (3:14) in a line starting at (%rightLane) and going 1 more spaces northeast.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 3,
  (3:16) in a line starting at (%rightLane) and going %length more spaces southwest.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 3,
  (3:16) in a line starting at (%start) and going %length more spaces southwest.
    (5:1) set the floor to 500.
    (5:354) move the position in variable %start southwest (down and left) %length step(s).
    (5:302) take variable %hallCount and add 1 to it.
    (5:300) set variable %step to the value 1.



*going northwest

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 4,
  (3:15) in a line starting at (%leftLane) and going 1 more spaces southeast.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 4,
  (3:17) in a line starting at (%leftLane) and going %length more spaces northwest.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 4,
  (3:15) in a line starting at (%start) and going 1 more spaces southeast.
    (5:1) set the floor to 500.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 4,
  (3:15) in a line starting at (%rightLane) and going 1 more spaces southeast.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 4,
  (3:17) in a line starting at (%rightLane) and going %length more spaces northwest.
    (5:1) set the floor to 500.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 5,
 (1:200) and variable %direction is equal to 4,
  (3:17) in a line starting at (%start) and going %length more spaces northwest.
    (5:1) set the floor to 500.
    (5:355) move the position in variable %start northwest (up and left) %length step(s).
    (5:302) take variable %hallCount and add 1 to it.
    (5:300) set variable %step to the value 1.



**SECTION**  Entrance and Exit


*Put the entrance at the location of the building guide item and the exit at the end of a random hall
*replace end hall regions with standard hall regions for laying the floor.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 6,
  (3:30) in region 2,
    (5:532) set variable %placeStart to the X,Y position of a random spot where the item is 1324 somewhere in the Dream.
    (5:300) set variable %step to the value 7.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 7,
    (5:41) place item 1143 at (%placeStart).
   
    (5:300) set variable %inSafe to the value 0.
 (5:300) set variable %step to the value 8.


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 8,
  (3:30) in region 2,
    (5:532) set variable %placeStart to the X,Y position of a random spot where the item is 1324 somewhere in the Dream.
    (5:300) set variable %step to the value 9.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 9,
    (5:41) place item 1135 at (%placeStart).
 (5:300) set variable %step to the value 10.

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 10,
    (5:5) change item 1324 to item 0.
    (5:300) set variable %step to the value 11.


**SECTION**  Build Rooms

*preload room paramaters

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 11,
 (1:205) and variable %roomCount is less than variable %rooms,
  (3:30) in region 2,
   (4:1) only where the floor is 500,
    (5:512) set variable %roomCenter to the X,Y position of a random spot where the floor is 500 somewhere in the Dream.
    (5:312) set variable %radius to the total of rolling  2 dice with 2 sides plus 1.
    (5:306) multiply variable %radius by 2.

    (5:121) make location (%roomCenter) part of region 5.

    (5:301) copy the value of variable %roomCenter into variable %roomTop.
    (5:301) copy the value of variable %roomCenter into variable %roomBottom.


    (5:305) take variable %roomTop.y and subtract variable %radius from it.
    (5:303) take variable %roomBottom.y and add variable %radius to it.
 
    (5:300) set variable %step to the value 12.


*In the Diamond that is the room lay the floor

(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 12,
  (3:3) within the diamond (%roomTop) - (%roomBottom),
    (5:1) set the floor to 500.
    (5:302) take variable %roomCount and add 1 to it.
    (5:300) set variable %step to the value 11.

*move furres to start


(0:49) When any countdown timer goes off,
 (1:200) and variable %step is equal to 11,
 (1:203) and variable %roomCount is equal to variable %rooms,
(3:30) in region 5,
(4:1) only where the floor is 161,
    (5:4) place item 2400.










**SECTION**  New Clock
(0:49) When any countdown timer goes o

(5:50) set countdown timer 1 to go off in 1 seconds.
(5:50) set countdown timer 2 to go off in 1 seconds.
(5:50) set countdown timer 3 to go off in 1 seconds.
(5:50) set countdown timer 4 to go off in 1 seconds.
(5:50) set countdown timer 5 to go off in 1 seconds.
(5:50) set countdown timer 6 to go off in 1 seconds.
(5:50) set countdown timer 7 to go off in 1 seconds.
(5:50) set countdown timer 8 to go off in 1 seconds.
s(5:50) set countdown timer 9 to go off in 1 seconds.
(5:50) set countdown timer 10 to go off in 1 seconds.







**SECTION**  Vision

*Set Vision Area paramaters.  A that starts where furre is and goes two spaces down to the bottom of the diamond.

(0:71) When someone stays in the same square for 1 seconds,
    (5:350) set variable %visionTop to the X,Y position the triggering furre (moved from/is standing at).
    (5:301) copy the value of variable %visionTop into variable %visionBottom.

    (5:304) take variable %visionTop.y and subtract 2 from it.
    (5:302) take variable %visionBottom.y and add 4 to it.


*remove dungeon walls in the specified area.

(0:71) When someone stays in the same square for 1 seconds,
  (3:3) within the diamond (%visionTop) - (%visionBottom),
    (5:5) change item 2400 to item 2401.

*for smoother processing do the same thing for a moving furre
(0:1) Whenever someone moves,
    (5:350) set variable %visionTop to the X,Y position the triggering furre (moved from/is standing at).
    (5:301) copy the value of variable %visionTop into variable %visionBottom.

    (5:304) take variable %visionTop.y and subtract 2 from it.
    (5:302) take variable %visionBottom.y and add 4 to it.

(0:1) Whenever someone moves,
  (3:3) within the diamond (%visionTop) - (%visionBottom),
    (5:5) change item 2400 to item 2401.


*idle repeater - move to clock later

(0:71) When a furre stays in the same square for 1 seconds,
(3:7) where the triggering furre is currently at,
(5:19) move any furre pressent 0 steps forward (in the drection they are facing) if there is nobody there already
*Endtriggers* 8888 *Endtriggers*

Comments

Popular Posts