The dungeon project source 1.0.0

Here is the dragons speak source for the dream I am working on in Furcadia.
This is an initial overview of the project and I don't have much to say about it.  The comments in the code should help a little bit.  Also you can check out my youtube video that goes along with this post https://youtu.be/HCdPdxzOoxk.  This is a very early look at what the overall project is going to be.  I will be posting updates that I make to the different parts of the code as I finish them.

(0:0) When everything is starting up,
    (5:112) make summoned furres arrive at the start of the Dream.

 



**** Furre Entry Code ******************************************************************************

(0:9) When a furre arrives in the dream,
            (5:15) move the triggering furre to (15,47), or to someplace nearby if it's occupied
    (5:200) emit message {You wake up your head throbbing, you can't quite remember how you got here} to the triggering furre.
    (5:200) emit message {Looking around you see a door, a sword, and what apears to be a ghost.  Maybe you should grab the sword.} to the triggering furre.

********************************************************************************************************************
*------------------------------------------------------------------------------------------------------------------*
****Interactable Stationary NPCs************************************************************************************

*Lost Spirit
(0:19) When someone uses item 58,
 (1:58) and they are facing toward item 254,
    (5:200) emit message {You swing your sword wildly at the Ghost} to the triggering furre.
    (5:200) emit message {The Ghost looks at you with a confused expression.  Umm... I am a ghost that really is not going to work on me.  Looks like you know how to use that though.} to the triggering furre.
 


*******************************************************************************************************
*-----------------------------------------------------------------------------------------------------*
****Player Handler ************************************************************************************

**Look In Front
(0:71) 1
  (1:13) and they are facing northeast (up and right),
    (5:350) set variable %playerFacing to the X,Y position the triggering furre (moved from/is standing at).

    (5:352) move the position in variable %playerFacing northeast (up and right) 1 step(s).

(0:71) 1
  (1:14) and they are facing southeast (down and right),
    (5:350) set variable %playerFacing to the X,Y position the triggering furre (moved from/is standing at).

    (5:353) move the position in variable %playerFacing southeast (down and right) 1 step(s).


(0:71) 1
 (1:15) and they are facing southwest (down and left),
    (5:350) set variable %playerFacing to the X,Y position the triggering furre (moved from/is standing at).

    (5:354) move the position in variable %playerFacing southwest (down and left) 1 step(s).


(0:71) 1
  (1:16) and they are facing northwest (up and left),
    (5:350) set variable %playerFacing to the X,Y position the triggering furre (moved from/is standing at).

     (5:355) move the position in variable %playerFacing northwest (up and left) 1 step(s).



**Attacking

*basic weapon
(0:19) When someone uses item 58,
 (1:58) and they are facing toward item 175,
    (5:200) emit message {You swing your sword wildly and the Black Knight crumbles to dust} to the triggering furre.
    (5:41) place item 0 at (%playerFacing).
    (5:151) set location (%playerFacing) to overlay effect 110.
    (5:304) take variable %monCount and subtract 1 from it.


**See through Walls

*In area around player south wall becomes clear




(0:27) When someone moves into any space in regions 1 through 100,
    (5:320) set variable %regionIn to the region number (%playerPos) is part of.
    (5:134) hide all walls in region %regionIn from everybody.
    (5:135) show walls in region 0 to everyone that can see there.
(0:27) When someone moves into any space in regions 1 through 100,
 (1:183) and the position they moved to isn't in region %regionOut,
    (5:135) show walls in region %regionOut to everyone that can see there.
(0:27) When someone moves into any space in regions 1 through 100,
 (1:85) and the triggering furre (moved from/is standing in) region %regionIn,
    (5:301) copy the value of variable %regionIn into variable %regionOut.



(0,71) 1




 (1:207) and variable %regionOut is not equal to variable %regionIn,
    (5:135) show walls in region %regionOut to everyone that can see there.




******************************************************************************************************
*----------------------------------------------------------------------------------------------------*
**** Enemy Handler ***********************************************************************************

**notes------------------------------------------------------------------------------------------------
*  Using three instances for a given region.   Each region can have three different monsters spawning
*with different rarities.  Check what region the player and set the handlers item info to the monster
*types.
**-----------------------------------------------------------------------------------------------------
(0:71) When someone stays in the same square for 1 seconds,
    (5:350) set variable %playerPos to the X,Y position the triggering furre (moved from/is standing at).
    (5:312) set variable %whichWay  to the total of rolling 1 dice with 4 sides plus 0.

*Find objects in range
    (5:531) set variable %npcPos to the X,Y position of a random spot where the item is 175 that is onscreen for the triggering furre.
    (5:301) copy the value of variable %npcPos into variable %npcNewPos.
    (5:301) copy the value of variable %npcPos into variable %npcChase.
*Range Check
    (5:305) take variable %npcChase.y and subtract variable %playerPos.y from it.
    (5:305) take variable %npcChase.x and subtract variable %playerPos.x from it.


(0:71) 1
 (1:201) and variable %npcChase.y is more than -1,
 (1:202) and variable %npcChase.y is less than 6,
 (1:201) and variable %npcChase.x is more than -1,
 (1:202) and variable %npcChase.x is less than 6,
    (5:300) set variable %whichWay to the value 4.
*-or
(0:71) 1
 (1:201) and variable %npcChase.y is more than -6,
 (1:202) and variable %npcChase.y is less than 0,
 (1:201) and variable %npcChase.x is more than 0,
 (1:202) and variable %npcChase.x is less than 6,
    (5:300) set variable %whichWay to the value 3.

*-or
(0:71) 1
 (1:201) and variable %npcChase.y is more than -6,
 (1:202) and variable %npcChase.y is less than 0,
 (1:201) and variable %npcChase.x is more than -6,
 (1:202) and variable %npcChase.x is less than 0,
    (5:300) set variable %whichWay to the value 2.

*-or
(0:71) 1
 (1:201) and variable %npcChase.y is more than 0,
 (1:202) and variable %npcChase.y is less than 6,
 (1:201) and variable %npcChase.x is more than -6,
 (1:202) and variable %npcChase.x is less than 0,
    (5:300) set variable %whichWay to the value 1.

*Next to
(0:71) 1
 (1:200) and variable %npcChase.y is equal to 1,
 (1:200) and variable %npcChase.x is equal to 0,
    (5:300) set variable %whichWay to the value 4.

(0:71) 1
 (1:200) and variable %npcChase.y is equal to -1,
 (1:200) and variable %npcChase.x is equal to 0,
    (5:300) set variable %whichWay to the value 3.

(0:71) 1
 (1:200) and variable %npcChase.y is equal to 1,
 (1:200) and variable %npcChase.x is equal to -2,
    (5:300) set variable %whichWay to the value 1.

(0:71) 1
 (1:200) and variable %npcChase.y is equal to -1,
 (1:200) and variable %npcChase.x is equal to -2,
    (5:300) set variable %whichWay to the value 2.

*Preload Move

(0:71) 1
(1:200) and variable %whichWay is equal to variable 1,
    (5:352) move the position in variable %npcNewPos northeast (up and right) 1 step(s).
(0:71) 1
(1:200) and variable %whichWay is equal to variable 2,
    (5:353) move the position in variable %npcNewPos southeast (down and right) 1 step(s).
(0:71) 1
(1:200) and variable %whichWay is equal to variable 3,
    (5:354) move the position in variable %npcNewPos southwest (down and left) 1 step(s).
(0:71) 1
(1:200) and variable %whichWay is equal to variable 4,
    (5:355) move the position in variable %npcNewPos northwest (up and left) 1 step(s).

*Move or Attack
(0:71) 1
(1:1013) and position (%npcPos) is object type 175
(1:1013) and position (%npcNewPos) is object type 0
 (1:1012) and position (%npcNewPos) is not floor 161,
 (1:1101) and there's no furre at (%npcNewPos),
(5:41) place object type 0 at (%npcPos)
(5:41) placd object type 175 at (%npcNewPos)
*-or
(0:71) 1
 (1:1100) and there's a furre at (%npcNewPos),
 (1:1013) and position (%npcPos) is object type 175
    (5:200) emit message {Black Knight Kicked you in the shin} to the triggering furre.



**Repeat if Idle

(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


*****************************************************************************************************


*****************************************************************************************************
*---------------------------------------------------------------------------------------------------*
****Monster Spawner**********************************************************************************

(0:100) When 10 seconds have passed, offset by 0,
 (1:202) and variable %monCount is less than 35,
*find a spawners location on the map
  (3:1) everywhere on the whole map,
   (4:3) only where an item 1337 is,
    (5:532) set variable %spawnPos to the X,Y position of a random spot where the item is 1337 somewhere in the Dream.
    (5:353) move the position in variable %spawnPos southeast (down and right) 2 step(s).
    (5:312) set variable %whichMon to the total of rolling 1 dice with 4 sides plus 0.

*--------------------------------------------------------Copy Between for each monster you wish to be spawinging
*Create effect and spawn a monster
(0:100) When 10 seconds have passed, offset by 1,
 (1:1013) and position (%spawnPos) is item 0,
 (1:1101) and there's no furre at (%spawnPos),
 (1:207) and variable %whichMon is not equal to variable 5,
    (5:302) take variable %monCount and add 1 to it.
    (5:151) set location (%spawnPos) to overlay effect 106.
    (5:41) place item 175 at (%spawnPos).

(0:100) When 10 seconds have passed, offset by 1,
 (1:1013) and position (%spawnPos) is item 0,
 (1:1101) and there's no furre at (%spawnPos),
 (1:200) and variable %whichMon is equal to 5,
    (5:302) take variable %monCount and add 1 to it.
    (5:151) set location (%spawnPos) to overlay effect 106.
    (5:41) place item 1315 at (%spawnPos).
*--------------------------------------------------------
*Cleanup effect
(0:100) When 10 seconds have passed, offset by 3,
    (5:151) set location (%spawnPos) to overlay effect 0.



*********************************************************************************************************************
*-------------------------------------------------------------------------------------------------------------------*
******Effect Sweeper*************************************************************************************************

(0:100) When 3 seconds have passed, offset by 0,
    (5:153) change effect 110 to effect 0.

Comments

Popular Posts