All pastes #755691 Raw Edit

Farrier

public text v1 · immutable
#755691 ·published 2007-10-30 20:56 UTC
rendered paste body
DSPK V03.00 Furcadia
* Setting up Variables. Can't show buttons here - no furres are in the map yet!
(0:0) When everything is starting up,
            (5:399) clear all variables to zero.
* OK, constants are a waste of lines, but I'm lazy.
* You ask me, its worth six lines to not have to remember the numbers.
            (5:300) set variable %CREDITS_OFFSET to the value 27.
            (5:300) set variable %DEX_OFFSET to the value 28.
            (5:300) set variable %STR_OFFSET to the value 39.
            (5:300) set variable %INT_OFFSET to the value 50.
            (5:300) set variable %STA_OFFSET to the value 61.
            (5:300) set variable %WIS_OFFSET to the value 72.

* Removing Everything
(0:31) When a furre says {remove},
            (5:630) forget all PhoenixSpeak info about the triggering furre.
            (5:633) forget all PhoenixSpeak info about this dream.
            (5:399) clear all variables to zero.

* Two blocks merged as an OR clause to save lines.
(0:31) When a furre says {remove},
* OR
(0:80) When a furre clicks DragonSpeak Button 6,
   (1:600) and the PhoenixSpeak info {credits} about the triggering furre is equal to 0,
            (5:181) hide the triggering furre's DragonSpeak Button 1.
            (5:181) hide the triggering furre's DragonSpeak Button 2.
            (5:181) hide the triggering furre's DragonSpeak Button 3.
            (5:181) hide the triggering furre's DragonSpeak Button 4.
            (5:181) hide the triggering furre's DragonSpeak Button 5.
            (5:181) hide the triggering furre's DragonSpeak Button 11.
            (5:181) hide the triggering furre's DragonSpeak Button 12.
            (5:181) hide the triggering furre's DragonSpeak Button 13.
            (5:181) hide the triggering furre's DragonSpeak Button 14.
            (5:181) hide the triggering furre's DragonSpeak Button 15.
            (5:181) hide the triggering furre's DragonSpeak Button %DEX_BUTTON.
            (5:181) hide the triggering furre's DragonSpeak Button %STR_BUTTON.
            (5:181) hide the triggering furre's DragonSpeak Button %INT_BUTTON.
            (5:181) hide the triggering furre's DragonSpeak Button %STA_BUTTON.
            (5:181) hide the triggering furre's DragonSpeak Button %WIS_BUTTON.

* Arriving in the dream 
(0:9) When a furre arrives in the dream,
            (5:180) show the triggering furre's DragonSpeak Button 7.
            (5:180) show the triggering furre's DragonSpeak Button 9.

* Existing user
(0:9) When a furre arrives in the dream,
   (1:601) and the PhoenixSpeak info {account} about the triggering furre is not equal to 0,
            (5:200) emit message {A voice echo's through the air, "<i>Welcome back, young one! I see that your travel fares well. Please feel free to stay at our Inn</i>"} to the triggering furre.
            (5:15) move the triggering furre to (14,42), or to someplace nearby if it's occupied.

* No account
(0:9) When a furre arrives in the dream,
   (1:600) and the PhoenixSpeak info {account} about the triggering furre is equal to 0,
            (5:15) move the triggering furre to (16,9), or to someplace nearby if it's occupied.
            (5:200) emit message {A voice echo's throguh the wind, "Welcome, [FURRE], to the Kingdom of Ascaries! I am Lady Mirianda, your Guide! I see you are fairly new, so let's get you started." [Hit the <b>Start</b> button on the screen]} to the triggering furre.
            (5:180) show the triggering furre's DragonSpeak Button 1.
            (5:180) show the triggering furre's DragonSpeak Button 2.
            (5:180) show the triggering furre's DragonSpeak Button 3.
            (5:180) show the triggering furre's DragonSpeak Button 6.
            (5:180) show the triggering furre's DragonSpeak Button 8.

* Creating Account
(0:80) When a furre clicks DragonSpeak Button 8,
   (1:600) and the PhoenixSpeak info {account} about the triggering furre is equal to 0,
            (5:600) memorize that the PhoenixSpeak info {account} about the triggering furre will now be 1.
            (5:600) memorize that the PhoenixSpeak info {dexterity} about the triggering furre will now be 0.
            (5:600) memorize that the PhoenixSpeak info {strength} about the triggering furre will now be 0.
            (5:600) memorize that the PhoenixSpeak info {intel} about the triggering furre will now be 0.
            (5:600) memorize that the PhoenixSpeak info {stamina} about the triggering furre will now be 0.
            (5:600) memorize that the PhoenixSpeak info {wisdom} about the triggering furre will now be 0.
            (5:600) memorize that the PhoenixSpeak info {credits} about the triggering furre will now be 10.
            (5:600) memorize that the PhoenixSpeak info {maxcredits} about the triggering furre will now be 10.
            (5:200) emit message {Your account with this dream has been successfuly created with the stats and level given below.} to the triggering furre.
            (5:200) emit message {Please add your stats above by following the screen.} to the triggering furre.
            (5:181) hide the triggering furre's DragonSpeak Button 3.
            (5:181) hide the triggering furre's DragonSpeak Button 8.
            (5:180) show the triggering furre's DragonSpeak Button 4.
            (5:180) show the triggering furre's DragonSpeak Button 5.
            (5:180) show the triggering furre's DragonSpeak Button 11.
            (5:180) show the triggering furre's DragonSpeak Button 12.
            (5:180) show the triggering furre's DragonSpeak Button 13.
            (5:180) show the triggering furre's DragonSpeak Button 14.
            (5:180) show the triggering furre's DragonSpeak Button 15.
            (5:180) show the triggering furre's DragonSpeak Button 16.
            (5:180) show the triggering furre's DragonSpeak Button 17.
            (5:300) set variable %DEX_BUTTON to the value %DEX_OFFSET.
            (5:300) set variable %STR_BUTTON to the value %STR_OFFSET.
            (5:300) set variable %INT_BUTTON to the value %INT_OFFSET.
            (5:300) set variable %STA_BUTTON to the value %STA_OFFSET.
            (5:300) set variable %WIS_BUTTON to the value %WIS_OFFSET.
            (5:180) show the triggering furre's DragonSpeak Button %DEX_BUTTON.
            (5:180) show the triggering furre's DragonSpeak Button %STR_BUTTON.
            (5:180) show the triggering furre's DragonSpeak Button %INT_BUTTON.
            (5:180) show the triggering furre's DragonSpeak Button %STA_BUTTON.
            (5:180) show the triggering furre's DragonSpeak Button %WIS_BUTTON.


* Finishing Character Design
(0:80) When a furre clicks DragonSpeak Button 6,
   (1:601) and the PhoenixSpeak info {credits} about the triggering furre is not equal to 0,
            (5:200) emit message {You still have Unused credits.} to the triggering furre.
            (5:610) remember the PhoenixSpeak info {credits} about the triggering furre, and put it in variable %credit .
            (5:200) emit message {You have %credit Credits that need to be spent. Just click one of the 5 stat distribute buttons on the screen.} to the triggering furre.
(0:80) When a furre clicks DragonSpeak Button 6,
   (1:600) and the PhoenixSpeak info {credits} about the triggering furre is equal to 0,
            (5:181) hide the triggering furre's DragonSpeak Button 6.
            (5:15) move the triggering furre to (14,42), or to someplace nearby if it's occupied.

(0:80) When a furre clicks DragonSpeak Button 6,
   (1:600) and the PhoenixSpeak info {credits} about the triggering furre is equal to 0,
* OR
(0:80) When a furre clicks DragonSpeak Button 7,
* OR
(0:80) When a furre clicks DragonSpeak Button 8,
   (1:600) and the PhoenixSpeak info {account} about the triggering furre is equal to 0,
            (5:610) remember the PhoenixSpeak info {account} about the triggering furre, and put it in variable %level .
            (5:610) remember the PhoenixSpeak info {dexterity} about the triggering furre, and put it in variable %dext .
            (5:610) remember the PhoenixSpeak info {intel} about the triggering furre, and put it in variable %intel .
            (5:610) remember the PhoenixSpeak info {strength} about the triggering furre, and put it in variable %strength .
            (5:610) remember the PhoenixSpeak info {stamina} about the triggering furre, and put it in variable %stam .
            (5:610) remember the PhoenixSpeak info {wisdom} about the triggering furre, and put it in variable %wis .
            (5:200) emit message {<b>Info for Character [FURRE]</b>} to the triggering furre.
            (5:200) emit message {[!]Level:         %level } to the triggering furre.
            (5:200) emit message {[!]Dexterity:     %dext } to the triggering furre.
            (5:200) emit message {[!]Intelligence:  %intel} to the triggering furre.
            (5:200) emit message {[!]Strength:      %strength } to the triggering furre.
            (5:200) emit message {[!]Stamina:       %stam } to the triggering furre.
            (5:200) emit message {[!]Wisdom:        %wis } to the triggering furre.

* Checking Other's stats
*   Checking if fur is not in front
(0:80) When a furre clicks DragonSpeak Button 9,
            (5:350) set variable %checkone to the X,Y position the triggering furre (moved from/is standing at).
            (5:350) set variable %checktwo to the X,Y position the triggering furre (moved from/is standing at).
(0:80) When a furre clicks DragonSpeak Button 9,
   (1:13) and the triggering furre is facing northeast (up and right),
            (5:352) move the position in variable %checkone northeast (up and right) 1 step(s).
(0:80) When a furre clicks DragonSpeak Button 9,
   (1:14) and the triggering furre is facing southeast (down and right),
            (5:353) move the position in variable %checkone southeast (down and right) 1 step(s).
(0:80) When a furre clicks DragonSpeak Button 9,
   (1:15) and the triggering furre is facing southwest (down and left),
            (5:354) move the position in variable %checkone southwest (down and left) 1 step(s).
(0:80) When a furre clicks DragonSpeak Button 9,
   (1:16) and the triggering furre is facing northwest (up and left),
            (5:355) move the position in variable %checkone northwest (up and left) 1 step(s).

(0:80) When a furre clicks DragonSpeak Button 9,
* Pro tip: for .x .y variables, you can just use the variable in brackets, rather than the pair.
   (1:1101) and there's no furre at (%checkone),
            (5:200) emit message {[Furre], there is no one at ( %checkone.x , %checkone.y )} to the triggering furre.
* This block could be merged with the above stat listing, but would save only
* 5 lines, and would make for some horrible code. Not worth it.
(0:80) When a furre clicks DragonSpeak Button 9,
   (1:1100) and there's a furre at (%checkone),
            (5:51) make any furre standing at (%checkone) become the new triggering furre.
            (5:201) emit message {<b>[FURRE]'s STATS</b>} to any furre present.
            (5:610) remember the PhoenixSpeak info {account} about the triggering furre, and put it in variable %templevel .
            (5:610) remember the PhoenixSpeak info {dexterity} about the triggering furre, and put it in variable %tempdext .
            (5:610) remember the PhoenixSpeak info {strength} about the triggering furre, and put it in variable %tempstrength .
            (5:610) remember the PhoenixSpeak info {intel} about the triggering furre, and put it in variable %tempintel .
            (5:610) remember the PhoenixSpeak info {stamina} about the triggering furre, and put it in variable %tempstam .
            (5:610) remember the PhoenixSpeak info {wisdom} about the triggering furre, and put it in variable %tempwis .
            (5:51) make any furre standing at (%checktwo) become the new triggering furre.
            (5:200) emit message {[!]Level:            %templevel } to the triggering furre.
            (5:200) emit message {[!]Dexterity:        %tempdext } to the triggering furre.
            (5:200) emit message {[!]Strength:         %tempstrength } to the triggering furre.
            (5:200) emit message {[!]Intelligence:     %tempintel } to the triggering furre.
            (5:200) emit message {[!]Stamina:          %tempstam } to the triggering furre.
            (5:200) emit message {[!]Wisdom:           %tempwis } to the triggering furre.

***********
* Hit button
***********
(0:81) When a furre clicks any DragonSpeak Button,
            (5:184) set variable %CLICKED to the number of the DragonSpeak Button they just pressed.

***********
* No more credits
***********
(0:81) When a furre clicks any DragonSpeak Button,
   (1:201) and variable %CLICKED is greater than 10,
   (1:202) and variable %CLICKED is less than 16,
   (1:600) and the PhoenixSpeak info {credits} about the triggering furre is equal to 0,
            (5:200) emit message {You have 0 Credits, [FURRE]. Hit <b>Done</b> if you are finished.} to the triggering furre.
            (5:300) set variable %CLICKED to the value 0.

***********
* Can spend credits
***********
(0:80) When a furre clicks DragonSpeak Button 11,
            (5:300) set variable %BUTTON to the value %DEX_OFFSET.
            (5:610) remember the PhoenixSpeak info {dexterity} about the triggering furre, and put it in variable %STAT.

(0:80) When a furre clicks DragonSpeak Button 12,
            (5:300) set variable %BUTTON to the value %STR_OFFSET.
            (5:610) remember the PhoenixSpeak info {strength} about the triggering furre, and put it in variable %STAT.

(0:80) When a furre clicks DragonSpeak Button 13,
            (5:300) set variable %BUTTON to the value %INT_OFFSET.
            (5:610) remember the PhoenixSpeak info {intelligence} about the triggering furre, and put it in variable %STAT.

(0:80) When a furre clicks DragonSpeak Button 14,
            (5:300) set variable %BUTTON to the value %STA_OFFSET.
            (5:610) remember the PhoenixSpeak info {stamina} about the triggering furre, and put it in variable %STAT.

(0:80) When a furre clicks DragonSpeak Button 15,
            (5:300) set variable %BUTTON to the value %WIS_OFFSET.
            (5:610) remember the PhoenixSpeak info {wisdom} about the triggering furre, and put it in variable %STAT.

***********
* Stat maxed out (Can't actually happen, so wasting 6 lines. Nevermind.)
***********
(0:81) When a furre clicks any DragonSpeak Button,
   (1:201) and variable %CLICKED is greater than 10,
   (1:202) and variable %CLICKED is less than 16,
   (1:201) and variable %CLICKED is greater than 9,
            (5:200) emit message {You cannot raise that stat any farther. Try another stat.} to the triggering furre.
            (5:300) set variable %CLICKED to the value 0.

***********
* Can raise stat
***********
(0:81) When a furre clicks any DragonSpeak Button,
   (1:201) and variable %CLICKED is greater than 10,
   (1:202) and variable %CLICKED is less than 16,
   (1:602) and the PhoenixSpeak info {credits} about the triggering furre is greater than 0,
            (5:610) remember the PhoenixSpeak info {credits} about the triggering furre, and put it in variable %CREDITS.
* +1 to stat
            (5:302) take variable %BUTTON and add %STAT to it.
            (5:181) hide the triggering furre's DragonSpeak Button %BUTTON.
            (5:302) take variable %BUTTON and add 1 to it.
            (5:180) show the triggering furre's DragonSpeak Button %BUTTON.
            (5:302) take variable %STAT and add 1 to it.
* -1 from credits. Subtracting %CREDITS from %BUTTON too, as the numbers are backwards.
            (5:300) set variable %BUTTON to the value %CREDITS_OFFSET.
            (5:304) take variable %BUTTON and subtract %CREDITS from it.
            (5:181) hide the triggering furre's DragonSpeak Button %BUTTON.
            (5:302) take variable %BUTTON and add 1 to it. * Adding to subtract - numbers are backwards.
            (5:180) show the triggering furre's DragonSpeak Button %BUTTON.
            (5:304) take variable %CREDITS and subtract 1 from it.
* Save the credits to PS (should we be changing maxcredits?)
            (5:600) memorize that the PhoenixSpeak info {credits} about the triggering furre will now be %CREDITS.
            (5:600) memorize that the PhoenixSpeak info {maxcredits} about the triggering furre will now be %CREDITS.

***********
* Save stats
***********
(0:80) When a furre clicks DragonSpeak Button 11,
            (5:200) emit message {You've added 1 C to your Dexterity.} to the triggering furre.
            (5:600) memorize that the PhoenixSpeak info {dexterity} about the triggering furre will now be %STAT.
            (5:300) set variable %DEX_BUTTON to the value %BUTTON.

(0:80) When a furre clicks DragonSpeak Button 12,
            (5:200) emit message {You've added 1 C to your Strength.} to the triggering furre.
            (5:600) memorize that the PhoenixSpeak info {strength} about the triggering furre will now be %STAT.
            (5:300) set variable %STR_BUTTON to the value %BUTTON.

(0:80) When a furre clicks DragonSpeak Button 13,
            (5:200) emit message {You've added 1 C to your Intelligence.} to the triggering furre.
            (5:600) memorize that the PhoenixSpeak info {intelligence} about the triggering furre will now be %STAT.
            (5:300) set variable %INT_BUTTON to the value %BUTTON.

(0:80) When a furre clicks DragonSpeak Button 14,
            (5:200) emit message {You've added 1 C to your Stamina.} to the triggering furre.
            (5:600) memorize that the PhoenixSpeak info {stamina} about the triggering furre will now be %STAT.
            (5:300) set variable %STA_BUTTON to the value %BUTTON.

(0:80) When a furre clicks DragonSpeak Button 15,
            (5:200) emit message {You've added 1 C to your Wisdom.} to the triggering furre.
            (5:600) memorize that the PhoenixSpeak info {wisdom} about the triggering furre will now be %STAT.
            (5:300) set variable %WIS_BUTTON to the value %BUTTON.

*Endtriggers* 8888 *Endtriggers*