Last active
July 26, 2021 19:29
-
-
Save Sobsz/24e7121968b352a587e79c376ab4575e to your computer and use it in GitHub Desktop.
Scuffed Saving System(tm)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// needs a zone where everyone can build, by default starting at 120,64,120 and ending at 121,64,wherever | |
// unlicense/0bsd/cc0/wtfpl/whatever | |
#sss_setusername | |
set sss_username {runArg1} | |
quit | |
#sss_checkload | |
ifnot sss_loaded msg you must load first | |
ifnot sss_loaded terminate | |
quit | |
#sss_load | |
set sss_startx 120 | |
set sss_datax 121 | |
set sss_starty 64 | |
set sss_startz 120 | |
msg &eScuffed Saving System(tm) is now looking for savefile... | |
set sss_curz {sss_startz} | |
cmd oss #sss_setusername|@p | |
msg &eyou are {sss_username} | |
call #sss_checkcur | |
quit | |
#sss_checkcur | |
msg {sss_startx} {sss_starty} {sss_curz} | |
setblockid sss_curblock {sss_startx} {sss_starty} {sss_curz} | |
if sss_curblock|=|171 cmd x {sss_startx} {sss_starty} {sss_curz} | |
ifnot sss_curblock|=|171 call #sss_new | |
quit | |
#sss_sign | |
msg {runArg1} | |
if runArg1|=|sss_username call #sss_found | |
ifnot runArg1|=|sss_username setadd sss_curz 1 | |
ifnot runArg1|=|sss_username call #sss_checkcur | |
quit | |
#sss_found | |
msg &efound savefile, loading... | |
cmd x {sss_datax} {sss_starty} {sss_curz} | |
msg &elook in the bottom right for your data | |
set sss_loaded true | |
quit | |
#sss_new | |
msg &ecouldn't find save file, making new | |
cmd mb sign /oss #sss_sign|@p repeatable | |
cmd x {sss_startx} {sss_starty} {sss_curz} | |
cmd mb sign /oss #sss_data|0 repeatable | |
cmd x {sss_datax} {sss_starty} {sss_curz} | |
call #sss_data|0 | |
msg &elook in the bottom right for your data | |
set sss_loaded true | |
quit | |
#sss_data | |
set sss_number {runArg1} | |
call #sss_numchange | |
quit | |
#sss_numchange | |
if sss_number|=|69 msg &enice | |
cpemsg bot1 &eyour number is &6{sss_number} | |
quit | |
#sss_save | |
call #sss_checkload | |
cmd mb sign /oss #sss_data|{sss_number} repeatable | |
cmd x {sss_datax} {sss_starty} {sss_curz} | |
msg &esaved! | |
cpemsg bot1 &eyour number is &6{sss_number} | |
quit | |
#sss_minus | |
call #sss_checkload | |
setsub sss_number 1 | |
call #sss_numchange | |
quit | |
#sss_plus | |
call #sss_checkload | |
setadd sss_number 1 | |
call #sss_numchange | |
quit | |
#sss_reload | |
resetdata packages * | |
cpemsg bot1 | |
msg &ereloaded! | |
quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment