Home ] Up ] 

DSPK V02.00 Furcadia

* // If you have any questions about the usage of some of these routines, feel free
* // contact me, I am usually lurking in ADM's Dream Makers Guild.
* // this is a bunch of DS that I use in various dreams when building them, it's handy to have.
* // begin startup code
(0:0) When everything is starting up,
    (5:300) set variable %debugreset to the value 0.

(0:100) When 1 seconds have passed, offset by 0,
 (1:200) and variable %debugreset is equal to 0.
    (5:300) set variable %debugreset to the value 1.
    (5:300) set variable %debugflagmake.x to the value 0.
    (5:300) set variable %debugflagmake.y to the value 0.
    (5:300) set variable %debugflagsafety.x to the value 0.
    (5:300) set variable %debugflagsafety.y to the value 2.
* // end startup code

* // begin lock code
* // this is used to lock all usage to dream owner
(0:31) When a furre says {make item enable},
 (1:11) and the triggering furre has got shared control (or is the dream owner),
    (5:41) place object type 0 at (%debugflagmake).

(0:31) When a furre says {stop that},
 (1:11) and the triggering furre has got shared control (or is the dream owner),
    (5:41) place object type 65 at (%debugflagmake).
* // end lock code

* // begin make item
* // this creates an object of the specified item directly in front the triggerer
* // bug note: fails at the map edges.
(0:32) When a furre says something with {makeitem} in it,
    (5:314) set variable %debugobj to the number the triggering furre just said.
    (5:350) set variable %debugwhere to the X,Y position the triggering furre (moved from/is standing at).

(0:32) When a furre says something with {makeitem} in it,
 (1:13) and the triggering furre is facing northeast (up and right),
    (5:352) move the position in variable %debugwhere northeast (up and right) 1 step(s).

(0:32) When a furre says something with {makeitem} in it,
 (1:14) and the triggering furre is facing southeast (down and right),
    (5:353) move the position in variable %debugwhere southeast (down and right) 1 step(s).

(0:32) When a furre says something with {makeitem} in it,
 (1:15) and the triggering furre is facing southwest (down and left),
    (5:354) move the position in variable %debugwhere southwest (down and left) 1 step(s).

(0:32) When a furre says something with {makeitem} in it,
 (1:16) and the triggering furre is facing northwest (up and left),
    (5:355) move the position in variable %debugwhere northwest (up and left) 1 step(s).

(0:32) When a furre says something with {makeitem} in it,
 (1:1014) and position (%debugflagmake) is not object type 65,
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:41) place object type %debugobj at (%debugwhere).
    (5:200) emit message {Placed %debugobj at %debugwhere.x, %debugwhere.y } to whoever set off the trigger.

(0:32) When a furre says something with {makeitem} in it,
 (1:10) and the triggering furre is the dream owner,
 (1:1013) and position (%debugflagmake) is object type 65,
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:41) place object type %debugobj at (%debugwhere).
    (5:200) emit message {Placed %debugobj at %debugwhere.x, %debugwhere.y } to whoever set off the trigger.
* // end make item

* // begin make floor
* // this creates the specified floor directly under the triggerer
(0:32) When a furre says something with {makefloor} in it,
    (5:314) set variable %debugfloor to the number the triggering furre just said.
    (5:350) set variable %debugwhere to the X,Y position the triggering furre (moved from/is standing at).

(0:32) When a furre says something with {makefloor} in it,
 (1:1014) and position (%debugflagmake) is not object type 65,
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:40) set the floor to type %debugfloor at (%debugwhere).
    (5:200) emit message {Placed %debugfloor at %debugwhere.x, %debugwhere.y } to whoever set off the trigger.

(0:32) When a furre says something with {makefloor} in it,
 (1:10) and the triggering furre is the dream owner,
 (1:1013) and position (%debugflagmake) is object type 65,
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:40) set the floor to type %debugfloor at (%debugwhere).
    (5:200) emit message {Placed %debugfloor at %debugwhere.x, %debugwhere.y } to whoever set off the trigger.
* // end make floor

* // begin locators
* // locates the X,Y of the triggering furre
(0:31) When a furre says {where},
    (5:350) set variable %debugwhere to the X,Y position the triggering furre (moved from/is standing at).
    (5:200) emit message {You are %debugwhere.x, %debugwhere.y } to whoever set off the trigger.

* // gets the floor under the triggerer
(0:31) When a furre says {get tile},
    (5:350) set variable %debugwhere to the X,Y position the triggering furre (moved from/is standing at).
    (5:380) set variable %debugfloor to the floor type at (%debugwhere).
    (5:200) emit message {Found %debugfloor at %debugwhere.x, %debugwhere.y } to whoever set off the trigger.

* // gets the object under the triggerer
(0:31) When a furre says {get object},
    (5:350) set variable %debugwhere to the X,Y position the triggering furre (moved from/is standing at).
    (5:381) set variable %debugobj to the object type at (%debugwhere).
    (5:200) emit message {Found %debugobj at %debugwhere.x, %debugwhere.y } to whoever set off the trigger.

* // plays a specified sound to everyone on the map
(0:32) When a furre says {play sound},
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:314) set variable %debugsound to the number the triggering furre just said.
    (5:12) play sound %debugsound to everyone on the map.
    (5:200) emit message {Played sound %debugsound } to whoever set off the trigger.
* // end generic locators

* // begin target locator
* // this gets the object directly in front the triggerer
* // bug note: fails at the map edges.
(0:3) When a furre says {get front},
    (5:350) set variable %debuggetfront to the X,Y position the triggering furre (moved from/is standing at).

(0:31) When a furre says {get front},
 (1:13) and the triggering furre is facing northeast (up and right),
    (5:352) move the position in variable %debuggetfront northeast (up and right) 1 step(s).

(0:31) When a furre says {get front},
 (1:14) and the triggering furre is facing southeast (down and right),
    (5:353) move the position in variable %debuggetfront southeast (down and right) 1 step(s).

(0:31) When a furre says {get front},
 (1:15) and the triggering furre is facing southwest (down and left),
    (5:354) move the position in variable %debuggetfront southwest (down and left) 1 step(s).

(0:31) When a furre says {get front},
 (1:16) and the triggering furre is facing northwest (up and left),
    (5:355) move the position in variable %debuggetfront northwest (up and left) 1 step(s).

(0:31) When a furre says {get front},
    (5:380) set variable %debugfloor to the floor type at (%debuggetfront).
    (5:381) set variable %debugobject to the object type at (%debuggetfront).
    (5:200) emit message {At location %debuggetfront.x, %debuggetfront.y } to whoever set off the trigger.
    (5:200) emit message {We have object %debugobject } to whoever set off the trigger.
    (5:200) emit message {and floor %debugfloor } to whoever set off the trigger.
* // end target locator

* // begin view distant object
* // this fetchs the object and floor at a distant location
* // this code uses Ralen's compact location variable system
* // it takes advantage of the fact that maps have no ODD X values, so if the math
* // produces a remainder, that's part of the Y value.
* // 10,10 = 1010
* // 10101 = 10,101
(0:32) When a furre says something with {view square} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:314) set variable %debuggetfront to the number the triggering furre just said.
    (5:308) divide variable %debuggetfront by 200 and put the remainder in variable %debuggetfront.y.
    (5:306) multiply variable %debuggetfront.x by 2.
    (5:380) set variable %debugfloor to the floor type at (%debuggetfront).
    (5:381) set variable %debugobject to the object type at (%debuggetfront).
    (5:200) emit message {At location %debuggetfront.x, %debuggetfront.y } to whoever set off the trigger.
    (5:200) emit message {We have object %debugobject } to whoever set off the trigger.
    (5:200) emit message {and floor %debugfloor } to whoever set off the trigger.
* // end view distant object

* // begin memory square
(0:32) When a furre says something with {remember} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
    (5:314) set variable %debugelement to the number the triggering furre just said.
    (5:350) set variable %debugwhere to the X,Y position the triggering furre (moved from/is standing at).

(0:32) When a furre says something with {remember} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
 (1:202) and variable %debugelement is less than 11.
 (1:201) and variable %debugelement is greater than 0.
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:311) use variable %debugremindx[10] as an array, and set element %debugelement of it to %debugwhere.x.
    (5:311) use variable %debugremindy[10] as an array, and set element %debugelement of it to %debugwhere.y.

(0:32) When a furre says something with {remind me} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
    (5:314) set variable %debugelement to the number the triggering furre just said.

(0:32) When a furre says something with {remind me} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
 (1:202) and variable %debugelement is less than 11.
 (1:201) and variable %debugelement is greater than 0.
 (1:1013) and position (%debugflagsafety) is object type 0,
    (5:310) use variable %debugremindx[10] as an array, and copy element %debugelement of it into variable %debugwhere.x.
    (5:310) use variable %debugremindy[10] as an array, and copy element %debugelement of it into variable %debugwhere.y.
    (5:200) emit message {Memory %debugelement is %debugwhere.x, %debugwhere.y } to whoever set off the trigger.
* // end memory square

* // begin dynamic teleport system
* // this is used when you don't want to litter your code with a bunch of
* // keyworded locations, this allows one to teleport ANYWHERE on the map.
* // this code uses Ralen's compact location variable system
* // it takes advantage of the fact that maps have no ODD X values, so if the math
* // produces a remainder, that's part of the Y value.
* // 10,10 = 1010
* // 10101 = 10,101
(0:32) When a furre says something with {teleport} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
    (5:314) set variable %debugtelewhere to the number the triggering furre just said.
    (5:308) divide variable %debugtelewhere by 200 and put the remainder in variable %debugtelewhere.y
    (5:306) multiply variable %debugtelewhere.x by 2.

(0:32) When a furre says something with {teleport} in it,
 (1:11) and the triggering furre has got shared control (or is the dream owner),
 (1:201) and variable %debugtelewhere.x is greater than 10.
 (1:202) and variable %debugtelewhere.x is less than 190.
 (1:201) and variable %debugtelewhere.y is greater than 10.
 (1:202) and variable %debugtelewhere.y is less than #190.
    (5:15) move the triggering furre to (%debugtelewhere), or to someplace nearby if it's occupied.
* // end dynamic teleport system

 

*Endtriggers* 8888 *Endtriggers*