diff --git a/LuaScriptsLibExt/Readme_For_raocoin2.lua/example.lvl b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example.lvl new file mode 100644 index 000000000..f96ab4c21 --- /dev/null +++ b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example.lvl @@ -0,0 +1,5393 @@ +64 +0 +"Shop Test 2" +-200000 +-200600 +-200000 +-198144 +0 +16291944 +#FALSE# +#FALSE# +34 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +16291944 +#FALSE# +#FALSE# +0 +#FALSE# +#FALSE# +"" +-199980 +-200182 +24 +54 +0 +0 +0 +0 +-200000 +-200288 +32 +32 +169 +0 +#FALSE# +#FALSE# +"Default" +"" +"UndoBuys" +"" +-200000 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-200000 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-200000 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-200000 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199968 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199968 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199968 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199968 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199936 +-200128 +32 +32 +82 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199936 +-200096 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199936 +-200064 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199936 +-200032 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199904 +-200128 +32 +32 +294 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199904 +-200096 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199904 +-200064 +32 +32 +296 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199904 +-200032 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199872 +-200128 +32 +32 +80 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199872 +-200096 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199872 +-200064 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199872 +-200032 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199840 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199840 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199840 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199840 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199808 +-200128 +32 +32 +82 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199808 +-200096 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199808 +-200064 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199808 +-200032 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199776 +-200128 +32 +32 +294 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199776 +-200096 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199776 +-200064 +32 +32 +296 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199776 +-200032 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199744 +-200128 +32 +32 +80 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199744 +-200096 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199744 +-200064 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199744 +-200032 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199712 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199712 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199712 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199712 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199680 +-200128 +32 +32 +82 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199680 +-200096 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199680 +-200064 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199680 +-200032 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199648 +-200128 +32 +32 +294 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199648 +-200096 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199648 +-200064 +32 +32 +296 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199648 +-200032 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199616 +-200128 +32 +32 +80 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199616 +-200096 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199616 +-200064 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199616 +-200032 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199584 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199584 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199584 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199584 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199552 +-200128 +32 +32 +82 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199552 +-200096 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199552 +-200064 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199552 +-200032 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199520 +-200128 +32 +32 +294 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199520 +-200096 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199520 +-200064 +32 +32 +296 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199520 +-200032 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199488 +-200128 +32 +32 +80 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199488 +-200096 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199488 +-200064 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199488 +-200032 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199456 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199456 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199456 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199456 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199424 +-200128 +32 +32 +82 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199424 +-200096 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199424 +-200064 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199424 +-200032 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199392 +-200128 +32 +32 +294 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199392 +-200096 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199392 +-200064 +32 +32 +296 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199392 +-200032 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199360 +-200128 +32 +32 +80 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199360 +-200096 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199360 +-200064 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199360 +-200032 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199328 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199328 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199328 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199328 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199296 +-200128 +32 +32 +82 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199296 +-200096 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199296 +-200064 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199296 +-200032 +32 +32 +84 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199264 +-200128 +32 +32 +294 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199264 +-200096 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199264 +-200064 +32 +32 +296 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199264 +-200032 +32 +32 +295 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199232 +-200128 +32 +32 +80 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199232 +-200096 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199232 +-200064 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199232 +-200032 +32 +32 +83 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199200 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199200 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199200 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199200 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199168 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199168 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199168 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199168 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199136 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199136 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199136 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199136 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199104 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199104 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199104 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199104 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199072 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199072 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199072 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199072 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199040 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199040 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199040 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199040 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199008 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199008 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199008 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-199008 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198976 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198976 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198976 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198976 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198944 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198944 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198944 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198944 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198912 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198912 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198912 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198912 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198880 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198880 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198880 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198880 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198848 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198848 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198848 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198848 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198816 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198816 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198816 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198816 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198784 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198784 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198784 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198784 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198752 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198752 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198752 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198752 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198720 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198720 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198720 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198720 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198688 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198688 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198688 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198688 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198656 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198656 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198656 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198656 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198624 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198624 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198624 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198624 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198592 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198592 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198592 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198592 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198560 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198560 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198560 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198560 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198528 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198528 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198528 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198528 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198496 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198496 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198496 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198496 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198464 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198464 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198464 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198464 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198432 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198432 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198432 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198432 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198400 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198400 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198400 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198400 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198368 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198368 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198368 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198368 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198336 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198336 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198336 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198336 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198304 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198304 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198304 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198304 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198272 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198272 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198272 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198272 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198240 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198240 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198240 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198240 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198208 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198208 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198208 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198208 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198176 +-200128 +32 +32 +81 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198176 +-200096 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198176 +-200064 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +-198176 +-200032 +32 +32 +87 +0 +#FALSE# +#FALSE# +"Default" +"" +"" +"" +"next" +"next" +-199264 +-200160 +-1 +170 +#TRUE# +1 +1 +20 +"" +#FALSE# +#TRUE# +#FALSE# +"Shop_Hammer_Generator" +"" +"" +"" +"" +"" +-199904 +-200160 +-1 +9 +#TRUE# +1 +1 +20 +"" +#FALSE# +#TRUE# +#FALSE# +"Shop_Mushroom_Generator" +"" +"" +"" +"" +"" +-199392 +-200160 +-1 +169 +#TRUE# +1 +1 +20 +"" +#FALSE# +#FALSE# +#FALSE# +"Shop_Tanuki_Generator" +"" +"" +"" +"" +"" +-199520 +-200160 +-1 +34 +#TRUE# +1 +1 +20 +"" +#FALSE# +#TRUE# +#FALSE# +"Shop_Leaf_Generator" +"" +"" +"" +"" +"" +-199776 +-200160 +-1 +183 +#TRUE# +1 +1 +20 +"" +#FALSE# +#TRUE# +#FALSE# +"Shop_Fire_Generator" +"" +"" +"" +"" +"" +-199648 +-200160 +-1 +277 +#TRUE# +1 +1 +20 +"" +#FALSE# +#TRUE# +#FALSE# +"Shop_Ice_Generator" +"" +"" +"" +"" +"" +-198272 +-200178 +-1 +274 +#TRUE# +1 +1 +1 +"" +#FALSE# +#FALSE# +#FALSE# +"Default" +"" +"" +"" +"" +"" +-198240 +-200178 +-1 +274 +#TRUE# +1 +1 +1 +"" +#FALSE# +#FALSE# +#FALSE# +"Default" +"" +"" +"" +"" +"" +-198304 +-200178 +-1 +274 +#TRUE# +1 +1 +1 +"" +#FALSE# +#FALSE# +#FALSE# +"Default" +"" +"" +"" +"" +"" +-198208 +-200178 +-1 +274 +#TRUE# +1 +1 +1 +"" +#FALSE# +#FALSE# +#FALSE# +"Default" +"" +"" +"" +"" +"" +"next" +"next" +"next" +"Default" +#FALSE# +"Destroyed Blocks" +#TRUE# +"Spawned NPCs" +#FALSE# +"Shop_Mushroom_Generator" +#TRUE# +"Shop_Fire_Generator" +#TRUE# +"Shop_Ice_Generator" +#TRUE# +"Shop_Leaf_Generator" +#TRUE# +"Shop_Tanuki_Generator" +#TRUE# +"Shop_Hammer_Generator" +#TRUE# +"next" +"Level - Start" +"" +0 +0 +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"P Switch - Start" +"" +0 +0 +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"P Switch - End" +"" +0 +0 +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"BuyMushroom" +"" +0 +0 +"" +"Shop_Mushroom_Generator" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"BuyFire" +"" +0 +0 +"" +"Shop_Fire_Generator" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"UndoBuys" +"" +0 +0 +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"BuyIce" +"" +0 +0 +"" +"Shop_Ice_Generator" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"BuyLeaf" +"" +0 +0 +"" +"Shop_Leaf_Generator" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"BuyTanuki" +"" +0 +0 +"" +"Shop_Tanuki_Generator" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 +"BuyHammer" +"" +0 +0 +"" +"Shop_Hammer_Generator" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +"" +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +-1 +-1 +-1 +0 +0 +0 +"" +0 +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +#FALSE# +"" +0 +0 +0 +0 +0 diff --git a/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/block-169.gif b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/block-169.gif new file mode 100644 index 000000000..4560e3cb5 Binary files /dev/null and b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/block-169.gif differ diff --git a/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/coins.png b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/coins.png new file mode 100644 index 000000000..7be3fd70f Binary files /dev/null and b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/coins.png differ diff --git a/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/lunadll.lua b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/lunadll.lua new file mode 100644 index 000000000..8fa6343ce --- /dev/null +++ b/LuaScriptsLibExt/Readme_For_raocoin2.lua/example/lunadll.lua @@ -0,0 +1,37 @@ +raocoin = loadSharedAPI("raocoin2"); +rc = raocoin.registerCurrency(274, true, 472, 66); +coins = raocoin.registerMemCurrency(0x00B2C5A8,FIELD_WORD,true,false,0,0,"coins.png"); + +local shop = {} + +shop["mushroom"] = { npc = 9, item = rc:addItem(2,function() triggerEvent("BuyMushroom"); end,true), x = -199904, y=-200164}; +shop["fire"] = { npc = 183, item = rc:addItem(4,function() triggerEvent("BuyFire"); end,true), x = -199776, y=-200164}; +shop["ice"] = { npc = 277, item = rc:addItem(6,function() triggerEvent("BuyIce"); end,true), x = -199648, y=-200164}; +shop["leaf"] = { npc = 34, item = rc:addItem(10,function() triggerEvent("BuyLeaf"); end,true), x = -199520, y=-200164}; +shop["tanuki"] = { npc = 169, item = rc:addItem(20,function() triggerEvent("BuyTanuki"); end,true), x = -199392, y=-200164}; +shop["hammer"] = { npc = 170, item = rc:addItem(20,function() triggerEvent("BuyHammer"); end,true), x = -199264, y=-200164}; +shop["1up"] = { npc = 187, item = rc:addItem(1,function() spawnNPC(187,player.x,player.y,player.section); end,false), x = -199072, y=-200164}; +shop["3up"] = { npc = 188, item = rc:addItem(3,function() spawnNPC(188,player.x,player.y,player.section); end,false), x = -198944, y=-200164}; +shop["random"] = { npc = 287, item = rc:addItem(3,function() spawnNPC(287,player.x,player.y,player.section); end,false), x = -198816, y=-200164}; +shop["coins"] = { npc = 10, item = rc:addItem(1,function() for i = 1,25,1 do spawnNPC(10,player.x,player.y,player.section); end end,false), x = -198698, y=-200164}; +shop["random2"] = { npc = 287, item = coins:addItem(50,function() spawnNPC(287,player.x,player.y,player.section); end,false), x = -198442, y=-200164}; + +function onLoad() + for k,v in pairs(shop) do + v.item:placeToken(v.x,v.y,0,v.npc); + end +end + +function raocoin.onCollect(currency) + if(currency.id == 0x00B2C5A8) then + currency:save(); + end +end + +function onEvent(name) + if(name == "UndoBuys") then + for k,v in pairs(shop) do + v.item:undoBuy(); + end + end +end \ No newline at end of file diff --git a/LuaScriptsLibExt/hudoftime.lua b/LuaScriptsLibExt/hudoftime.lua new file mode 100644 index 000000000..84f318a4f --- /dev/null +++ b/LuaScriptsLibExt/hudoftime.lua @@ -0,0 +1,424 @@ +--************************************************************************************-- +--** '|| ||` '|| ||` '||'''|. .|'; |''||''| **-- +--** || || || || || || || || '' **-- +--** ||''|| || || || || .|''|, '||' || || '||),,(|, .|''|, **-- +--** || || || || || || || || || || || || || || ||..|| **-- +--** .|| ||. `|...|' .||...|' `|..|' .||. .||. .||. .|| ||. `|... **-- +--** **-- +--************************************************************************************-- +---------------------------------------------------------------------------------------- +--------------------------------Created by Hoeloe - 2015-------------------------------- +----------------------------Open-Source Zelda HUD Framework----------------------------- +---------------------------------For Super Mario Bros X--------------------------------- +----------------------------------------v1.0.1------------------------------------------ + +local zelda = {} + +Graphics.activateHud(false); + +zelda.HEART_FULL = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\heart_full.png"); +zelda.HEART_EMPT = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\heart_empty.png"); +zelda.RUPEE = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\rupee.png"); +zelda.SWORD = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\sword.png"); +zelda.BOMB = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\bomb.png"); +zelda.BTN_X = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\btn_X.png"); +zelda.BTN_S = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\btn_S.png"); +zelda.KEY = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\small_key.png"); +zelda.MAGIC_BG = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\magic_bg.png"); +zelda.MAGIC_BAR = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\magic_bar.png"); +zelda.NAVI = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\navi.png"); +zelda.TRIFORCE = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\stars.png"); +zelda.FAIRY = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\hudoftime\\lives.png"); + +zelda.hearts = 0; +zelda.maxhearts = 3; + +zelda.magic = 1; + +zelda.rupees = 0; +zelda.maxrupees = 99; + +zelda.keys = 0; + +zelda.buttons = {zelda.BTN_X, zelda.BTN_S}; + +local items = {}; +items[zelda.BTN_X] = zelda.SWORD; +items[zelda.BTN_S] = {zelda.BOMB,0}; + +zelda.triforce = 0; +zelda.maxtriforce = 999; + +zelda.fairy = 0; +zelda.maxfairy = 99; + +zelda.navi = false; + + +--Automatic data bindings. "Hearts" also allows for extra functionality in increasing the maximum heart cap. +zelda.auto_hearts = true; +zelda.auto_magic = true; +zelda.auto_rupees = true; +zelda.auto_keys = true; +zelda.auto_items = true; +zelda.auto_triforce = true; +zelda.auto_fairy = true; +zelda.auto_navi = true; + +--Automatically enables and disables the HUD based on whether the player is Link. +zelda.auto_enable = true; + +--Keep powerups when hurt and have more than one heart. +zelda.keep_powerups = true; + +--HUD show flags. +zelda.show_hearts = true; +zelda.show_magic = true; +zelda.show_rupees = true; +zelda.show_keys = true; +zelda.show_items = true; +zelda.show_triforce = true; +zelda.show_fairy = true; +zelda.show_navi = true; +zelda.show_score = true; + +zelda.show_HUD = true; + +function zelda.Enable() + zelda.show_HUD = true; + Graphics.activateHud(false); +end + +function zelda.Disable() + zelda.show_HUD = false; + Graphics.activateHud(true); +end + +local first = true; + +function zelda.onInitAPI() + registerEvent(zelda, "onLoop", "onLoop", true) --Register the loop event + registerEvent(zelda, "onHUDDraw", "onHUDDraw", true) --Register the HUD event +end + +function zelda.setItem(button,icon,count) + if(zelda.auto_items) then + return; + else + if(count == nil) then + items[button] = icon; + else + items[button] = {icon,count}; + end + end +end + +function zelda.getItem(button) + if(type(items[button]) == "table") then + return items[button][1]; + else + return items[button]; + end +end + +function zelda.getItemCount(button) + if(type(items[button]) == "table") then + return items[button][2]; + else + return -1; + end +end + +local powercache = PLAYER_BIG; + +local function UpdateEnabled() + if(player:mem(0xF0, FIELD_WORD) == 5) then + zelda.Enable(); + else + zelda.Disable(); + end +end + +local function UpdateHearts() + if(zelda.auto_hearts) then + if(first) then + zelda.hearts = player:mem(0x16, FIELD_WORD); + if(zelda.hearts >= 2) then + player:mem(0x16, FIELD_WORD, 2); + end + first = false; + end + + if(player:mem(0x16, FIELD_WORD) == 3) then + zelda.hearts = zelda.hearts + 1; + if(zelda.hearts > zelda.maxhearts) then + zelda.hearts = zelda.maxhearts; + end + powercache = player.powerup; + player:mem(0x16, FIELD_WORD,2); + end + + if(player:mem(0x16, FIELD_WORD) == 1) and (zelda.hearts > 1) then + zelda.hearts = zelda.hearts - 1; + end + + if(player:mem(0x16, FIELD_WORD) > zelda.hearts) then + zelda.hearts = player:mem(0x16, FIELD_WORD); + end + + if(player:mem(0x16, FIELD_WORD) == 0) then + zelda.hearts = 0; + end + + if (player.powerup == PLAYER_SMALL) and (zelda.hearts >= 2) then + if(zelda.keep_powerups) then + player.powerup = powercache; + else + player.powerup = PLAYER_BIG; + end + end + end +end + +local function UpdateMagic() + if(not wasfairy and player:mem(0x0C,FIELD_WORD) == -1) then + maxfairycount = player:mem(0x10,FIELD_WORD); + wasfairy = true; + elseif(wasfairy and player:mem(0x0C,FIELD_WORD) ~= -1) then + wasfairy = false; + end + + if(player:mem(0x0C,FIELD_WORD) == -1 and player:mem(0x10,FIELD_WORD) >= 0 and maxfairycount > 0) then + zelda.magic = player:mem(0x10,FIELD_WORD)/maxfairycount; + elseif(player:mem(0x0E,FIELD_WORD) == 1 and player:mem(0x4A,FIELD_WORD) ~= -1) then + zelda.magic = 0; + elseif(player:mem(0x4A,FIELD_WORD) == -1) then + zelda.magic = 1-(player:mem(0x4E,FIELD_WORD)/240); + else + zelda.magic = 1; + end +end + +local function UpdateRupees() + zelda.maxrupees = 99; + zelda.rupees = mem(0x00B2C5A8,FIELD_WORD); +end + +local function UpdateKeys() + if(player:mem(0x12,FIELD_WORD) == -1) then + zelda.keys = 1; + else + zelda.keys = 0; + end +end + +local function UpdateItems() + items[zelda.BTN_X] = zelda.SWORD; + items[zelda.BTN_S] = {zelda.BOMB,player:mem(0x08, FIELD_WORD)}; +end + +local function UpdateTriforce() + zelda.triforce = mem(0x00B251E0,FIELD_WORD); + zelda.maxtriforce = 999; +end + +local function UpdateFairy() + zelda.fairy = mem(0x00B2C5AC,FIELD_FLOAT); + zelda.maxfairy = 99; +end + +local function UpdateNavi() + zelda.navi = false; + for _,v in ipairs(NPC.getIntersecting(player.x,player.y,player.x+player.width,player.y+player.height)) do + if(v:mem(0x46,FIELD_WORD) == -1 --[[Friendly]] and (v:mem(0x4C,FIELD_DWORD) > 0 and v.msg.str ~= nil and v.msg.str ~= "") --[[Has message]]) then + zelda.navi = true; + break; + end + end +end + +function zelda.onLoop() + if(zelda.auto_hearts) then + UpdateHearts(); + end + + if(zelda.auto_magic) then + UpdateMagic(); + end + + if(zelda.auto_rupees) then + UpdateRupees(); + end + + if(zelda.auto_keys) then + UpdateKeys(); + end + + if(zelda.auto_items) then + UpdateItems(); + end + + if(zelda.auto_triforce) then + UpdateTriforce(); + end + + if(zelda.auto_fairy) then + UpdateFairy(); + end + + if(zelda.auto_navi) then + UpdateNavi(); + end +end + +local maxfairycount = 0; +local wasfairy = false; + +local function pad(n,d) + return string.format("%0"..d.."d",n); +end + +local function getDigits(n) + local c = 0; + while(n > 1) do + c = c + 1; + n = n/10; + end + return math.max(c,1); +end + +local function DrawHearts() + local maxy = 0; + for i=0,zelda.maxhearts-1,1 do + local g; + if(i<=zelda.hearts-1) then + g = zelda.HEART_FULL; + else + g = zelda.HEART_EMPT; + end + Graphics.drawImage(g, (i%10)*16 + 16, math.floor(i/10)*16 + 16); + maxy = math.floor(i/10)*16; + end + return maxy + 24; +end + +local function DrawMagic(y) + Graphics.drawImage(zelda.MAGIC_BG, 14, y); + + Graphics.glSetTextureRGBA(zelda.MAGIC_BAR, 0xFFFFFFFF); + local pts = {}; + pts[0] = 16; pts[1] = y; + pts[2] = 16+158*zelda.magic; pts[3] = y; + pts[4] = 16; pts[5] = y+16; + pts[6] = 16; pts[7] = y+16; + pts[8] = 16+158*zelda.magic; pts[9] = y; + pts[10] = 16+158*zelda.magic; pts[11] = y+16; + + Graphics.glDrawTriangles(pts, {0,0,0,1,1,0,1,0,0,1,1,1}, 6); + Graphics.glSetTextureRGBA(nil, 0xFFFFFFFF); +end + +local function DrawRupees() + Graphics.drawImage(zelda.RUPEE, 16, 600 - 32); + zelda.rupees = math.min(zelda.rupees,zelda.maxrupees); + local r = pad(zelda.rupees,getDigits(zelda.maxrupees)) + Text.print(r,36,600-32); +end + +local function DrawKeys() + for i=1,zelda.keys,1 do + Graphics.drawImage(zelda.KEY, 16*i, 600 - 32 - 24); + end +end + +local function DrawButton(x, button) + Graphics.drawImage(button, (800-16)-(32*x), 16); + + local item = zelda.getItem(button); + if(item ~= nil) then + local count = zelda.getItemCount(button); + if(count ~= nil) then + if(count ~= 0) then + Graphics.drawImage(item, (800-16)-(32*x), 16); + end + if(count > 0) then + Text.print(tostring(count),(800+8)-(32*x),40); + end + end + end +end + +local function DrawTriforce() + Graphics.drawImage(zelda.TRIFORCE, 800-32, 600-32); + zelda.triforce = math.min(zelda.triforce, zelda.maxtriforce); + local t = pad(zelda.triforce,getDigits(zelda.maxtriforce)); + Text.print(t,800-30-18*(#t),600-32); +end + +local function DrawFairy() + Graphics.drawImage(zelda.FAIRY, 800-32, 600-32-24); + zelda.fairy = math.min(zelda.fairy, zelda.maxfairy); + local t = pad(zelda.fairy,getDigits(zelda.maxfairy)); + Text.print(t,800-30-18*(#t),600-32-24); +end + +local function DrawNavi() + if(zelda.navi) then + Graphics.drawImage(zelda.NAVI, 800-16-32*(#zelda.buttons + 1), 16); + end +end + +local function DrawScore() + local p = mem(0x00B2C8E4,FIELD_DWORD); + Text.print(pad(p,6),800-24-96,600-32-48); +end + +function zelda.onHUDDraw() + if(zelda.auto_enable) then + UpdateEnabled(); + end + + if(not zelda.show_HUD) then return end; + + local maxy = 0; + + if(zelda.show_hearts) then + maxy = DrawHearts(); + end + + if(zelda.show_magic) then + DrawMagic(maxy+16); + end + + if(zelda.show_rupees) then + DrawRupees(); + end + + if(zelda.show_keys) then + DrawKeys(); + end + + if(zelda.show_items) then + for k,v in ipairs(zelda.buttons) do + DrawButton(#zelda.buttons-(k-1), v); + end + end + + if(zelda.show_triforce) then + DrawTriforce(); + end + + if(zelda.show_fairy) then + DrawFairy(); + end + + if(zelda.show_navi) then + DrawNavi(); + end + + if(zelda.show_score) then + DrawScore(); + end +end + +return zelda; \ No newline at end of file diff --git a/LuaScriptsLibExt/hudoftime/bomb.png b/LuaScriptsLibExt/hudoftime/bomb.png new file mode 100644 index 000000000..7f06c5027 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/bomb.png differ diff --git a/LuaScriptsLibExt/hudoftime/btn_S.png b/LuaScriptsLibExt/hudoftime/btn_S.png new file mode 100644 index 000000000..f7ba0935a Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/btn_S.png differ diff --git a/LuaScriptsLibExt/hudoftime/btn_X.png b/LuaScriptsLibExt/hudoftime/btn_X.png new file mode 100644 index 000000000..1e19d458b Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/btn_X.png differ diff --git a/LuaScriptsLibExt/hudoftime/heart_empty.png b/LuaScriptsLibExt/hudoftime/heart_empty.png new file mode 100644 index 000000000..5358a9630 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/heart_empty.png differ diff --git a/LuaScriptsLibExt/hudoftime/heart_full.png b/LuaScriptsLibExt/hudoftime/heart_full.png new file mode 100644 index 000000000..f8d5e174d Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/heart_full.png differ diff --git a/LuaScriptsLibExt/hudoftime/lives.png b/LuaScriptsLibExt/hudoftime/lives.png new file mode 100644 index 000000000..36365c017 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/lives.png differ diff --git a/LuaScriptsLibExt/hudoftime/magic_bar.png b/LuaScriptsLibExt/hudoftime/magic_bar.png new file mode 100644 index 000000000..567784491 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/magic_bar.png differ diff --git a/LuaScriptsLibExt/hudoftime/magic_bg.png b/LuaScriptsLibExt/hudoftime/magic_bg.png new file mode 100644 index 000000000..aa1a04af8 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/magic_bg.png differ diff --git a/LuaScriptsLibExt/hudoftime/navi.png b/LuaScriptsLibExt/hudoftime/navi.png new file mode 100644 index 000000000..8f6a6c1c0 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/navi.png differ diff --git a/LuaScriptsLibExt/hudoftime/rupee.png b/LuaScriptsLibExt/hudoftime/rupee.png new file mode 100644 index 000000000..ab0dabdd2 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/rupee.png differ diff --git a/LuaScriptsLibExt/hudoftime/small_key.png b/LuaScriptsLibExt/hudoftime/small_key.png new file mode 100644 index 000000000..4039e4282 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/small_key.png differ diff --git a/LuaScriptsLibExt/hudoftime/stars.png b/LuaScriptsLibExt/hudoftime/stars.png new file mode 100644 index 000000000..8455742a2 Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/stars.png differ diff --git a/LuaScriptsLibExt/hudoftime/sword.png b/LuaScriptsLibExt/hudoftime/sword.png new file mode 100644 index 000000000..a675411ad Binary files /dev/null and b/LuaScriptsLibExt/hudoftime/sword.png differ diff --git a/LuaScriptsLibExt/leveltimer.lua b/LuaScriptsLibExt/leveltimer.lua index 7e1a128dd..7dcc58636 100644 --- a/LuaScriptsLibExt/leveltimer.lua +++ b/LuaScriptsLibExt/leveltimer.lua @@ -1,114 +1,99 @@ -local __title = "Level Timer"; -local __version = "1.1.1.0"; -local __description = "A simple script to provide a level timer, a la Super Mario World and Super Mario Bros. 3."; -local __author = "Mike Santiago, edited by XNBlank"; -local __url = "http://mrmiketheripper.x10.mx/leveltimer" - +local __title = "Level Timer"; local __version = "1.1.1.1"; local __description = "A simple script to provide a level timer, a la Super Mario World and Super Mario Bros. 3."; local __author = "Mike Santiago, edited by XNBlank"; local __url = "http://mrmiketheripper.x10.mx/leveltimer" local lf_levelTimerApi = {} --instance -local secondsleft = 300; --The amount of seconds left. -local framecounter = 0; --Counts the amount of frames -local postWinFrameCounter = 0; --Counts frams since after the win -local player1 = Player(); --The player variable -local player2 = Player(2); -local beatLevel = false; -local getSeconds = false; -local takeTime = 0; -local playerkilled = false; --If the player was killed already so we don't kill him 21390840239 times -local passTime = true; --Whether or not to pass time, if false, time will stop. -local timerEnabled = true; --Whether or not the timer itself is actually enabled or not -local warnedPlayer = false; --Whether or not we've warned the player that time is running out -local resPath = getSMBXPath() .. "\\LuaScriptsLib\\leveltimer"; --res path -local uiImage = Graphics.loadImage(resPath .. "\\ui.png"); --ui thing - -lf_levelTimerApi.GUIPosition_NoStars = {x = 252, y = 50} -lf_levelTimerApi.GUIPosition_Stars = {x = 252, y = 66} - -function lf_levelTimerApi.onInitAPI() - timerEnabled = false; --user must start it - registerEvent(lf_levelTimerApi, "onLoop", "onLoopOverride"); -end - -function lf_levelTimerApi.onLoopOverride() - if(timerEnabled == true) then - timeelapsed = round(framecounter / 60, 0); - if(tonumber(mem(0x00B251E0, FIELD_DWORD)) > 0) and (beatLevel == false) then - Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_Stars.x, lf_levelTimerApi.GUIPosition_Stars.y, "", 2); - Text.print(tostring(secondsleft - timeelapsed), 1, lf_levelTimerApi.GUIPosition_Stars.x + 44, lf_levelTimerApi.GUIPosition_Stars.y + 1); - elseif (tonumber(mem(0x00B251E0, FIELD_DWORD)) == 0) and (beatLevel == false) then - Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_NoStars.x, lf_levelTimerApi.GUIPosition_NoStars.y, "", 2); - Text.print(tostring(secondsleft - timeelapsed), 1, lf_levelTimerApi.GUIPosition_NoStars.x + 44, lf_levelTimerApi.GUIPosition_NoStars.y + 1); - end - +local secondsleft = 300; --The amount of seconds left. local framecounter = 0; --Counts the amount of frames +local postWinFrameCounter = 0; --Counts frams since after the win +local player1 = Player(); --The player variable +local player2 = Player(2); +local beatLevel = false; +local getSeconds = false; +local takeTime = 0; +local playerkilled = false; --If the player was killed already so we don't kill him 21390840239 times +local passTime = true; --Whether or not to pass time, if false, time will stop. +local timerEnabled = true; --Whether or not the timer itself is actually enabled or not +local warnedPlayer = false; --Whether or not we've warned the player that time is running out +local resPath = getSMBXPath() .. "\\LuaScriptsLib\\leveltimer"; --res path +local uiImage = Graphics.loadImage(resPath .. "\\ui.png"); --ui thing + + +lf_levelTimerApi.GUIPosition_NoStars = {x = 252, y = 50} lf_levelTimerApi.GUIPosition_Stars = {x = 252, y = 66} + + +function lf_levelTimerApi.onInitAPI() timerEnabled = false; --user must start it + registerEvent(lf_levelTimerApi, "onLoop", "onLoopOverride"); +end + + +function lf_levelTimerApi.onLoopOverride() if(timerEnabled == true) then timeelapsed = round(framecounter / 60, 0); + if(tonumber(mem(0x00B251E0, FIELD_DWORD)) > 0) and (beatLevel == false) then + Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_Stars.x, lf_levelTimerApi.GUIPosition_Stars.y, "", 2); + Text.print(tostring(secondsleft - timeelapsed), 1, lf_levelTimerApi.GUIPosition_Stars.x + 44, lf_levelTimerApi.GUIPosition_Stars.y + 1); + elseif (tonumber(mem(0x00B251E0, FIELD_DWORD)) == 0) and (beatLevel == false) then + Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_NoStars.x, lf_levelTimerApi.GUIPosition_NoStars.y, "", 2); + Text.print(tostring(secondsleft - timeelapsed), 1, lf_levelTimerApi.GUIPosition_NoStars.x + 44, lf_levelTimerApi.GUIPosition_NoStars.y + 1); + end + --Text.print("Time to take..." .. tostring(takeTime), 0, 0); - --Text.print("Seconds left..." .. tostring(secondsleft - timeelapsed), 0, 15); - - - if (passTime == true) then - framecounter = framecounter + 1; - end - if(timeelapsed >= secondsleft) then - passTime = false; - if(beatLevel == false) then - if(playerkilled == false) then - player1:kill(); - if(player2 ~= nil) then - if(player2.isValid) then - player2:kill(); - end - end - playerkilled = true; - end - end - end - if((secondsleft - timeelapsed) <= 100) then - if(passTime == true) then - if(warnedPlayer == false) then - warnedPlayer = true; - playSFXSDL(resPath .. "\\warning.wav"); - --test = "-----WARNING!-----\n\nYou're running out of time!"; - --Text.showMessageBox(type(test)); - end - end - end - - if(Level.winState() > 0) then - - beatLevel = true; - passTime = false; - postWinFrameCounter = postWinFrameCounter + 1; - lf_levelTimerApi.doEndingStuffs(); - end - end -end - -local added = false; -local showTimeLeft = false; -local showPointCalc = false; -local showAddPoints = false; -local countPoints = false; - -function lf_levelTimerApi.doEndingStuffs() - local timeLeftDrawPoint = {x = 288, y = 150} - local pointCalculationDrawPoint = {x = 247, y = 170} - local addPointsDrawPoint = {x = 461, y = 70}; - local timeleft = secondsleft - timeelapsed; - - if(getSeconds == false) then - takeTime = secondsleft - timeelapsed; - getSeconds = true; - end - - local newPoints = tonumber(mem(0x00B2C8E4, FIELD_DWORD)) + (timeleft * 50); - - Text.print("COURSE CLEAR", 288, 150); - - if(tonumber(mem(0x00B251E0, FIELD_DWORD)) > 0) and (beatLevel == true) then - Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_Stars.x, lf_levelTimerApi.GUIPosition_Stars.y, "", 2); - Text.print(tostring(takeTime), 1, lf_levelTimerApi.GUIPosition_Stars.x + 44, lf_levelTimerApi.GUIPosition_Stars.y + 1); -elseif (tonumber(mem(0x00B251E0, FIELD_DWORD)) == 0) and (beatLevel == true) then - Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_NoStars.x, lf_levelTimerApi.GUIPosition_NoStars.y, "", 2); - Text.print(tostring(takeTime), 1, lf_levelTimerApi.GUIPosition_NoStars.x + 44, lf_levelTimerApi.GUIPosition_NoStars.y + 1); + --Text.print("Seconds left..." .. tostring(secondsleft - timeelapsed), 0, 15); if (passTime == true) then + framecounter = framecounter + 1; + end + + if(timeelapsed >= secondsleft) then passTime = false; + if(beatLevel == false) then + if(playerkilled == false) then + player1:kill(); + if(player2 ~= nil) then + if(player2.isValid) then + player2:kill(); + end + end + playerkilled = true; + end + end + end + if((secondsleft - timeelapsed) <= 100) then + if(passTime == true) then + if(warnedPlayer == false) then + warnedPlayer = true; + playSFXSDL(resPath .. "\\warning.wav"); + --test = "-----WARNING!-----\n\nYou're running out of time!"; + --Text.showMessageBox(type(test)); + end + end + end + + if(Level.winState() > 0) then + beatLevel = true; + passTime = false; + postWinFrameCounter = postWinFrameCounter + 1; + lf_levelTimerApi.doEndingStuffs(); + end + end +end + + +local added = false; local showTimeLeft = false; +local showPointCalc = false; +local showAddPoints = false; +local countPoints = false; + + +function lf_levelTimerApi.doEndingStuffs() local timeLeftDrawPoint = {x = 288, y = 150} + local pointCalculationDrawPoint = {x = 247, y = 170} + local addPointsDrawPoint = {x = 461, y = 70}; + local timeleft = secondsleft - timeelapsed; + + if(getSeconds == false) then + takeTime = secondsleft - timeelapsed; + getSeconds = true; + end + + local newPoints = tonumber(mem(0x00B2C8E4, FIELD_DWORD)) + (timeleft * 50); + Text.print("COURSE CLEAR", 288, 150); + if(tonumber(mem(0x00B251E0, FIELD_DWORD)) > 0) and (beatLevel == true) then + Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_Stars.x, lf_levelTimerApi.GUIPosition_Stars.y, "", 2); + Text.print(tostring(takeTime), 1, lf_levelTimerApi.GUIPosition_Stars.x + 44, lf_levelTimerApi.GUIPosition_Stars.y + 1); + elseif (tonumber(mem(0x00B251E0, FIELD_DWORD)) == 0) and (beatLevel == true) then Graphics.placeSprite(1, uiImage, lf_levelTimerApi.GUIPosition_NoStars.x, lf_levelTimerApi.GUIPosition_NoStars.y, "", 2); Text.print(tostring(takeTime), 1, lf_levelTimerApi.GUIPosition_NoStars.x + 44, lf_levelTimerApi.GUIPosition_NoStars.y + 1); end @@ -128,7 +113,7 @@ end if(added ~= true) then mem(0x00B2C8E4, FIELD_DWORD, newPoints); added = true; - showAddPoints = false; + showAddPoints = false; end end @@ -149,7 +134,7 @@ end if(showPointCalc) then - Text.print(tostring(timeleft) .. " x 50 = " .. tostring(timeleft * 50), pointCalculationDrawPoint.x, pointCalculationDrawPoint.y); + Text.print(tostring(timeleft) .. " x 50 = " .. tostring(timeleft * 50), pointCalculationDrawPoint.x, pointCalculationDrawPoint.y); end if(showAddPoints == true) then Text.print("+" .. tostring(timeleft * 50), 3, addPointsDrawPoint.x, addPointsDrawPoint.y); @@ -161,15 +146,11 @@ function lf_levelTimerApi.getSecondsLeft() return secondsleft; end -function lf_levelTimerApi.setSecondsLeft(to_set) - if (to_set > 999) then - secondsleft = 999; - elseif (to_set < 0) then - setSecondsLeft = 0; - else - secondsleft = to_set; - end -end +function lf_levelTimerApi.setSecondsLeft(to_set) if (to_set > 999) then secondsleft = 999; framecounter = 0; timeelapsed = 0; elseif (to_set < 0) then secondsleft = 0; timeelapsed = 0; + framecounter = 0; + else secondsleft = to_set; timeelapsed = 0; + framecounter = 0; + end end function lf_levelTimerApi.pauseTimer() passTime = false; @@ -190,4 +171,4 @@ function round(num, idp) return math.floor(num * mult + 0.5) / mult end -return lf_levelTimerApi; +return lf_levelTimerApi; \ No newline at end of file diff --git a/LuaScriptsLibExt/multipoints.lua b/LuaScriptsLibExt/multipoints.lua index a345ccd45..af92f26e4 100644 --- a/LuaScriptsLibExt/multipoints.lua +++ b/LuaScriptsLibExt/multipoints.lua @@ -1,7 +1,19 @@ ---multipoints.lua ---v3.0.0 ---Created by Hoeloe, 2015 ---With help from Rednaxela +----------------------------------------------- +----------------------------------------------- +--*******************************************-- +--* _ _ _ _ _ *-- +--* _____ _ _| | |_|_|___ ___|_|___| |_ ___ *-- +--*| | | | | _| | . | . | | | _|_ -|*-- +--*|_|_|_|___|_|_| |_| _|___|_|_|_|_| |___|*-- +--* |_| *-- +--*******************************************-- +----------------------------------------------- +----------------------------------------------- +-----------Created by Hoeloe - 2015------------ +-----------With help from Rednaxella----------- +--------Open-Source Checkpoint Library--------- +------------For Super Mario Bros X------------- +-------------------v3.0.4---------------------- local multipoints = {} local playerMP = { sec = 0, x = 0, y = 0, act = nil } @@ -16,6 +28,7 @@ multipoints.IMG_SIZE = { width = 32, height = 32 } local dataFile; local firstRun = true; +local preRun = true; function multipoints.onInitAPI() --register event handler @@ -27,6 +40,7 @@ function multipoints.onInitAPI() if(dataFile:get("MPCheck_ID") == nil) then multipoints.resetMidpoints(); end + preRun = true; firstRun = true; registerEvent(multipoints, "onLoop", "update", true) --Register the loop event @@ -73,6 +87,7 @@ local function getMP(i) dataFile:set("MPCheck_ID",tostring(i)); dataFile:save() + mem(0x00B250B0, FIELD_STRING, mem(0x00B2C618, FIELD_STRING)) multipoints.onCollected(multipoints.getCheckpoint(i), i) @@ -227,24 +242,38 @@ function multipoints.resetMidpoints() mem(0x00B250B0, FIELD_STRING, "") end -function multipoints.onLoad() +function multipoints.onLevelStart() end function multipoints.update() + if(preRun) then + preRun = false; + return; + end if(firstRun) then - local i = 0; - while(i > -1 and mpData[i] ~= nil) do - if(multipoints.getCheckpointID() == i) then - playerMP = {sec = mpData[i].sec, x = mpData[i].x, y = mpData[i].y, act = mpData[i].actions } - i = -1; - else - i = i + 1; + if(mpData ~= nil) then + local i = 0; + while(i > -1 and mpData[i] ~= nil) do + if(multipoints.getCheckpointID() == i) then + playerMP = {sec = mpData[i].sec, x = mpData[i].x, y = mpData[i].y, act = mpData[i].actions } + i = -1; + else + i = i + 1; + end + end + else + if(mpTrigs == nil) then + mpTrigs = {} + end + if(mpLuaTrigs == nil) then + mpLuaTrigs = {} end end if (multipoints.getCheckpointID() == nil) or (multipoints.getCheckpointID() < 0) then multipoints.resetMidpoints() firstRun = false; + multipoints.onLevelStart(); return end @@ -272,11 +301,13 @@ function multipoints.update() if(playerMP.act ~= nil) then playerMP.act(); end + wasMidpointed = true; else multipoints.resetMidpoints() end firstRun = false; + multipoints.onLevelStart(); end for k,v in pairs(mpLuaTrigs) do diff --git a/LuaScriptsLibExt/raocoin/arrow.png b/LuaScriptsLibExt/raocoin/arrow.png new file mode 100644 index 000000000..8880f0e59 Binary files /dev/null and b/LuaScriptsLibExt/raocoin/arrow.png differ diff --git a/LuaScriptsLibExt/raocoin/buy.ogg b/LuaScriptsLibExt/raocoin/buy.ogg new file mode 100644 index 000000000..3bd27c6e7 Binary files /dev/null and b/LuaScriptsLibExt/raocoin/buy.ogg differ diff --git a/LuaScriptsLibExt/raocoin/dragoncoin.png b/LuaScriptsLibExt/raocoin/dragoncoin.png new file mode 100644 index 000000000..03ffd7706 Binary files /dev/null and b/LuaScriptsLibExt/raocoin/dragoncoin.png differ diff --git a/LuaScriptsLibExt/raocoin/fail.ogg b/LuaScriptsLibExt/raocoin/fail.ogg new file mode 100644 index 000000000..453d131da Binary files /dev/null and b/LuaScriptsLibExt/raocoin/fail.ogg differ diff --git a/LuaScriptsLibExt/raocoin/token_p.png b/LuaScriptsLibExt/raocoin/token_p.png new file mode 100644 index 000000000..75d416f56 Binary files /dev/null and b/LuaScriptsLibExt/raocoin/token_p.png differ diff --git a/LuaScriptsLibExt/raocoin/token_t.png b/LuaScriptsLibExt/raocoin/token_t.png new file mode 100644 index 000000000..fe0556122 Binary files /dev/null and b/LuaScriptsLibExt/raocoin/token_t.png differ diff --git a/LuaScriptsLibExt/raocoin2.lua b/LuaScriptsLibExt/raocoin2.lua new file mode 100644 index 000000000..83bf13fa5 --- /dev/null +++ b/LuaScriptsLibExt/raocoin2.lua @@ -0,0 +1,524 @@ +-------------------------xxxxxxxxxxxx-------------------------- +---------------------xxxxxx xxxxxx---------------------- +-------------------xxxx xxxx-------------------- +-----------------xxxx xxxx------------------ +-----------------xx oooooo xx------------------ +---------------xxxx oo oo xxxx---------------- +---------------xx oooo oo xx---------------- +---------------xx oooo oo xx---------------- +---------------xx oooooooo oo xx---------------- +---------------xx oo oooooo oo xx---------------- +---------------xx oo oo xx---------------- +---------------xx oo oo oo xx---------------- +---------------xx oo oooo oo xx---------------- +---------------xx oo oooo oo xx---------------- +---------------xx oooooo oo xx---------------- +---------------xx oooo oo xx---------------- +---------------xx oo oo xx---------------- +---------------xx oo oo xx---------------- +---------------xx oo xx---------------- +---------------xxxx oo xxxx---------------- +-----------------xx oo xx------------------ +-----------------xxxx oo xxxx------------------ +-------------------xxxx xxxx-------------------- +---------------------xxxxxx xxxxxx---------------------- +-------------------------xxxxxxxxxxxx-------------------------- +--------------------------------------------------------------- +--__________ __ ________ -- +--\______ \_____ ____ ____ ____ |__| ____ \_____ \ -- +-- | _/\__ \ / _ \_/ ___\/ _ \| |/ \ / ____/ -- +-- | | \ / __ \( <_> ) \__( <_> ) | | \/ \ -- +-- |____|_ /(____ /\____/ \___ >____/|__|___| /\_______ \-- +-- \/ \/ \/ \/ \/-- +--------------------------------------------------------------- +--------------------Created by Hoeloe - 2015------------------- +-------------Open-Source Currency and Shop Library------------- +---------------------For Super Mario Bros X-------------------- +----------------------------v2.0.0----------------------------- +----------------------REQUIRES ENCRYPT.dll--------------------- +---------------------REQUIRES COLLIDERS.lua-------------------- +-----------------------REQUIRES PNPC.lua----------------------- + +local raocoin = {} +local encrypt = loadSharedAPI("encrypt"); +local colliders; +local pnpc; + +local currencies = {} +local currencyCache = {} +local memcurrencies = {} +local memcurrencyCache = {} + +local data = encrypt.Data(Data.DATA_WORLD, "raocoin", true); + +local currencyMT = {} + +function currencyMT.createMT(id,memtype) + local mt = {} + mt.__index = + function(tbl, key) + if(key == "refreshUI") then return currencyMT.refreshUI; + elseif(key == "save") then return currencyMT.save; + elseif(key == "get") then return currencyMT.get; + elseif(key == "set") then return currencyMT.set; + elseif(key == "addItem") then return raocoin.addItem; + elseif(key == "id") then return id; + elseif(key == "type") then return memtype; end + end + mt.__newindex = function(tbl, key, val) error("Attempted to write to a read-only field.",2); end + return mt; +end + +function currencyMT:refreshUI() + self.img = Graphics.loadImage(self.path); +end + +function currencyMT:save() + if(self.type == -1) then --npc currency + data:set("currency_"..self.id, data:get("currency_"..self.id)+currencyCache[self.id].value); + currencyCache[self.id].value = 0; + else --mem currency + data:set("memcurrency_"..self.id, self:get()); + end + data:save(); +end + +function currencyMT:get() + if(self.type == -1) then --npc currency + return data:get("currency_"..self.id) + currencyCache[self.id].value + else --mem currency + return mem(self.id,self.type); + end +end + +function currencyMT:set(value) + if(value < 0) then value = 0; end; + if(self.type == -1) then --npc currency + --data:set("currency_"..self.id, value); + currencyCache[self.id].value = value - data:get("currency_"..self.id); + else --mem currency + --data:set("memcurrency_"..self.id, value); + mem(self.id,self.type,value); + end + --self:save(); +end + +function raocoin.registerCurrency(npcID, showUI, UIx, UIy, imgPath) + showUI = showUI or (showUI == nil and false); + UIx = UIx or 0; + UIy = UIy or 0; + imgPath = imgPath or getSMBXPath().."\\LuaScriptsLib\\raocoin\\dragoncoin.png"; + + local c = { visible = showUI, img = Graphics.loadImage(imgPath), x = UIx, y = UIy, path = imgPath }; + setmetatable(c,currencyMT.createMT(npcID,-1)); + + c:refreshUI(); + + if(data:get("currency_"..npcID) == nil) then + data:set("currency_"..npcID, 0); + data:save(); + end + currencyCache[npcID] = { value = 0, lastCount = -1, count = -1 }; + + currencies[npcID] = c; + + return c; +end + + +function raocoin.registerMemCurrency(memaddress, memType, restore, showUI, UIx, UIy, imgPath) + restore = restore or (restore == nil and true); + showUI = showUI or (showUI == nil and false); + UIx = UIx or 0; + UIy = UIy or 0; + imgPath = imgPath or getSMBXPath().."\\LuaScriptsLib\\raocoin\\dragoncoin.png"; + + local c = { visible = showUI, img = Graphics.loadImage(imgPath), x = UIx, y = UIy, path = imgPath }; + setmetatable(c,currencyMT.createMT(memaddress,memType)); + + c:refreshUI(); + + if(data:get("memcurrency_"..memaddress) == nil) then + data:set("memcurrency_"..memaddress, 0); + data:save(); + elseif(restore) then + mem(memaddress,memType,data:get("memcurrency_"..memaddress)) + end + + memcurrencyCache[memaddress] = mem(memaddress,memType); + + memcurrencies[memaddress] = c; + + return c; +end + +function raocoin.getCurrency(npcID) + return currencies[npcID]; +end + +function raocoin.getMemCurrency(address) + return memcurrencies[address]; +end + + +local items = {}; +local tokens = {}; + +raocoin.IMG_TOKEN_T = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\raocoin\\token_t.png"); +raocoin.IMG_TOKEN_P = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\raocoin\\token_p.png"); +raocoin.IMG_ARROW = Graphics.loadImage(getSMBXPath().."\\LuaScriptsLib\\raocoin\\arrow.png"); + +local arrowalpha = 0; + +local itemCount = 0; + +local actionQueue = {}; + +raocoin.CODE_CANTAFFORD = 0; +raocoin.CODE_ALREADYBOUGHT = 1; + +local itemMT = {} + +function itemMT.createMT(id) + local mt = {} + mt.__index = + function(tbl, key) + if(key == "canAfford") then return itemMT.canAfford; + elseif(key == "showPrice") then return itemMT.showPrice; + elseif(key == "buy") then return itemMT.buy; + elseif(key == "forceGet") then return itemMT.forceGet; + elseif(key == "isBought") then return itemMT.isBought; + elseif(key == "undoBuy") then return itemMT.undoBuy; + elseif(key == "placeToken") then return itemMT.placeToken; + elseif(key == "removeToken") then return itemMT.removeToken; + elseif(key == "id") then return id; end + end + mt.__newindex = function(tbl, key, val) error("Attempted to write to a read-only field.",2); end + return mt; +end + +function itemMT:canAfford() + return self.currency:get() >= self.price; +end + +function itemMT:showPrice(x,y,screenSpace) + screenSpace = screenSpace or (screenSpace == nil); + + if(not screenSpace) then + x,y = raocoin.worldToScreen(x,y); + end + + local v = self.currency; + Graphics.placeSprite(1, v.img, x, y, "", 2); + local val = tostring(self.price); + Text.print(val, 1, x + 98-18*(string.len(val)), y); +end + +function itemMT:buy() + if(self:isBought()) then + raocoin.onBuyFail(self, raocoin.CODE_ALREADYBOUGHT); + return; + end + if(not self:canAfford()) then + raocoin.onBuyFail(self, raocoin.CODE_CANTAFFORD); + return; + end + + self.currency:set(self.currency:get()-self.price); + self.currency:save(); + + self:forceGet(); + raocoin.onBuy(self); +end + +function itemMT:forceGet() + if(self.permanent) then + data:set("item_"..self.id, 1); + data:save(); + end + + table.insert(actionQueue,self.actions); +end + +function itemMT:isBought() + return self.permanent and data:get("item_"..self.id) == 1; +end + +function itemMT:undoBuy() + if(not self:isBought()) then return; end + + if(self.permanent) then + data:set("item_"..self.id, 0); + data:save(); + end +end + +function itemMT:placeToken(x,y,section, npcid,text,image) + if(colliders == nil) then + colliders = loadSharedAPI("colliders"); + end + if(npcid ~= nil and pnpc == nil) then + pnpc = loadSharedAPI("pnpc"); + end + local t = {x=x,y=y,section=section,enableTimer = 0,hitbox=colliders.Box(x,y,32,32),npcID=npcid,npc=nil,npcRefreshCount=0,text=text,image=image}; + tokens[self] = t; +end + +function itemMT:removeToken() + if(tokens[self] ~= nil and tokens[self].npc ~= nil) then + tokens[self].npc:mem(0x40,FIELD_WORD,0xFFFF); + end + tokens[self] = nil; +end + +function raocoin.addItem(currency, price, actions, permanent, id) + permanent = permanent or (permanent == nil); + + if(id == nil) then + while(items[itemCount] ~= nil) do + itemCount = itemCount + 1; + end + id = itemCount; + elseif(items[id] ~= nil) then + --error("Item with ID already exists and will be overwritten!",2); --Not actually a problem, as it allows different items to share purchase across levels. + end + + local i = { currency = currency, price = price, permanent = permanent, actions = actions }; + setmetatable(i,itemMT.createMT(id)); + + if(permanent) then + local d = data:get("item_"..id); + if(d == nil) then + data:set("item_"..id, 0); + data:save(); + elseif(d == 1) then + table.insert(actionQueue,actions); + end + end + + items[id] = i; + itemCount = itemCount + 1; + + return i; +end + +local buyingCounter = 0; +local tryBuy = false; +local doBuyAnim = false; +local sourceY = 0; +local buyAction; + +function raocoin.inputupdate() + if(doBuyAnim) then + player.downKeyPressing = false; --Ensure animation lines up correctly + end +end + +function raocoin.update() + for _,v in pairs(actionQueue) do + v(); + end + + actionQueue = {}; + + for k,v in pairs(currencies) do + if(v.visible) then + Graphics.placeSprite(1, v.img, v.x, v.y, "", 2); + local val = tostring(v:get()); + Text.print(val, 1, v.x + 98-18*(string.len(val)), v.y); + end + + currencyCache[k].count = 0; + for _,_ in pairs(findnpcs(k,-1)) do + currencyCache[k].count = currencyCache[k].count + 1; + end + if(currencyCache[k].count < currencyCache[k].lastCount) then + currencyCache[k].value = currencyCache[k].value + currencyCache[k].lastCount - currencyCache[k].count; + raocoin.onCollect(v); + end + currencyCache[k].lastCount = currencyCache[k].count; + end + + for k,v in pairs(memcurrencies) do + if(v.visible) then + Graphics.placeSprite(1, v.img, v.x, v.y, "", 2); + local val = tostring(v:get()); + Text.print(val, 1, v.x + 98-18*(string.len(val)), v.y); + end + + if(memcurrencyCache[v.id] < mem(v.id,v.type)) then + raocoin.onCollect(v); + end + memcurrencyCache[v.id] = mem(v.id,v.type); + end + + + arrowalpha = arrowalpha+0.02; + if(arrowalpha > 1) then + arrowalpha = -1; + end + + if(player.downKeyPressing) then + if(buyingCounter == 0) then + buyingCounter = 15; + end + else + buyingCounter = 0; + end + + if(buyingCounter > 0) then + buyingCounter = buyingCounter - 1; + if(buyingCounter == 0) then + tryBuy = true; + end + end + + if(doBuyAnim) then + player:mem(0x122,FIELD_WORD,7); --Set state to "going through door" + player.y = sourceY+35-player.height; + if(player:mem(0x12A,FIELD_WORD) >= 16440) then --Warp timer counts from 16368 to 16444 by twos. 16440 is an acceptable buffer to ensure it doesn't try to warp, which will crash the game. + player:mem(0x122,FIELD_WORD,0); + player:mem(0x12A,FIELD_WORD,0); + doBuyAnim = false; + if(buyAction ~= nil) then + buyAction:buy(); + end + end + end + + for k,v in pairs(tokens) do + if(not k:isBought()) then + + --npc icon + if(v.npc == nil and v.npcID ~= nil and v.enableTimer <= 0) then + n = pnpc.wrap(spawnNPC(v.npcID,v.x,v.y-70-64,v.section)); + n:mem(0x46,FIELD_WORD,0xFFFF); + n:mem(0x48,FIELD_WORD,0xFFFF); + n:mem(0x12A,FIELD_WORD,100); + n.speedX = 0; + n.speedY = 0; + v.npc = n; + end + if(v.npc ~= nil) then + v.npc.x = v.npc:mem(0xA8,FIELD_DFLOAT); + v.npc.y = v.npc:mem(0xB0,FIELD_DFLOAT); + v.npc.speedX = 0; + v.npc.speedY = 0; + v.npc:mem(0x12A,FIELD_WORD,100); + if(v.npcRefreshCount == 0 and (v.npcID == 287 or v.npcID == 147)) then + v.npc:mem(0x40,FIELD_WORD,0xFFFF); + v.npc = nil; + v.npcRefreshCount = 10; + elseif(v.npcRefreshCount > 0) then + v.npcRefreshCount = v.npcRefreshCount - 1; + end + end + + --bmp icon + if(v.image ~= nil and v.enableTimer <= 0) then + Graphics.placeSprite(2,v.image,v.x,v.y-70-64,"",2); + end + + --text + if(v.text ~= nil and v.enableTimer <= 0) then + local x1,y1 = raocoin.worldToScreen(v.x,v.y-64); + Text.print(v.text,x1+8-string.len(v.text)*9,y1-26); + end + + local img = raocoin.IMG_TOKEN_T; + if(k.permanent) then + img = raocoin.IMG_TOKEN_P; + end + + if(v.enableTimer <= 0) then + Graphics.placeSprite(2,img,v.x,v.y-64,"",2); + k:showPrice(v.x-48,v.y-8-64,false); + + if(colliders.collide(player,v.hitbox)) then + Graphics.drawImageToScene(raocoin.IMG_ARROW,v.x,v.y-32,math.abs(arrowalpha)) + if(tryBuy) then + doBuyAnim = true; + player.speedX = 0; + player.speedY = 0; + player.x = v.x+4; + sourceY = v.y; + if(k:canAfford()) then + Audio.playSFX(getSMBXPath().."\\LuaScriptsLib\\raocoin\\buy.ogg"); + spawnEffect(132,v.x,v.y); + v.enableTimer = 50; + if(v.npc ~= nil) then + v.npc:mem(0x40,FIELD_WORD,0xFFFF); + v.npc = nil; + end + else + Audio.playSFX(getSMBXPath().."\\LuaScriptsLib\\raocoin\\fail.ogg"); + end + buyAction = k; + end + end + + elseif(player:mem(0x122,FIELD_WORD) == 0 or player:mem(0x122,FIELD_WORD) == 7 or player:mem(0x122,FIELD_WORD) == 500) then + v.enableTimer = v.enableTimer - 1; + end + end + end + + tryBuy = false; +end + +function raocoin.onInitAPI() + registerEvent(raocoin, "onLoop", "update", true) --Register the loop event + registerEvent(raocoin, "onInputUpdate", "inputupdate", true) --Register the input event +end + + +function raocoin.onCollect(currency) +end + +function raocoin.onBuy(item) +end + +--code: 0=can't afford, 1=already bought +function raocoin.onBuyFail(item,code) +end + + +function raocoin.getScreenBounds() + local h = (player:mem(0xD0, FIELD_DFLOAT)); + local b = { left = player.x-400+player.speedX, right = player.x+400+player.speedX, top = player.y-260+player.speedY, bottom = player.y+340+player.speedY }; + + local sect = Section(player.section); + local bounds = sect.boundary; + + if(b.left < bounds.left - 10) then + b.left = bounds.left - 10; + b.right = b.left + 800; + end + + if(b.right > bounds.right - 10) then + b.right = bounds.right - 10; + b.left = b.right - 800; + end + + if(b.top < bounds.top+40-h) then + b.top = bounds.top+40-h; + b.bottom = b.top + 600; + end + + if(b.bottom > bounds.bottom+40-h) then + b.bottom = bounds.bottom+40-h; + b.top = b.bottom - 600; + end + + return b; + +end + +function raocoin.worldToScreen(x,y) + local b = raocoin.getScreenBounds(); + local x1 = x-b.left; + local y1 = y-b.top-(player:mem(0xD0, FIELD_DFLOAT))+30; + return x1,y1; +end + +return raocoin; \ No newline at end of file diff --git a/LuaScriptsLibExt/rng.lua b/LuaScriptsLibExt/rng.lua new file mode 100644 index 000000000..b017149bc --- /dev/null +++ b/LuaScriptsLibExt/rng.lua @@ -0,0 +1,151 @@ +--------------------------------------- +--------***********************-------- +--------**______ _ _ _____ **-------- +--------**| ___ \ \ | | __ \**-------- +--------**| |_/ / \| | | \/**-------- +--------**| /| . ` | | __ **-------- +--------**| |\ \| |\ | |_\ \**-------- +--------**\_| \_\_| \_/\____/**-------- +--------** **-------- +--------***********************-------- +--------------------------------------- +--------Created by Hoeloe - 2015------- +--Open-Source Random Number Generator-- +--------For Super Mario Bros X--------- +---------------v1.0.1------------------ + +local rng = {}; + +local MAG_SEED = 817796519; +local quot = 977441620; +rng.seed = nil; + +--Generates the metatable for the rng. +local function genMT() + --Calculate max number (not constant across build platforms.) + local x = 1.0 + while x * 4 > x * 2 do + x = x * 2 + end + if x * 4 < x * 2 then + x = x * 2 + end + local d = x / 2 + while x + d ~= x do + if x + d > x and x + d + d ~= x + d then + x = x + d + end + d = d / 2 + end + x = math.floor(x); + + local mt = {}; + mt.__index = function(tbl,key) + if(key == "MAX") then + return x; + else + return rawget(tbl,key); + end + end + mt.__newindex = function(tbl,key,val) + if(key == "MAX") then + error("Attempted to set a read-only field. This is not allowed.",2); + elseif(key == "seed") then + rawset(tbl,key,val); + else + error("Write access to this object's fields is prohibited.",2); + end + end + + return mt; +end + +local function genRand() + --Initialise RNG + if(rng.seed == nil) then + rng.seed = math.floor(math.fmod(os.clock()*958134896,MAG_SEED)); + end + + --Generate PRN and the quotient for the next iteration + local s = math.abs((26147705 * rng.seed) + quot); + rng.seed = math.fmod(s, MAG_SEED); + quot = math.floor(s/MAG_SEED); + + --Normalise PRN + return rng.seed/(MAG_SEED-1); +end + +function rng.randomInt(a,b) + if(a == nil and b == nil) then + return math.floor(rng.random(1000000)+0.5); + elseif(a == nil and b ~= nil) then + return rng.randomInt(0,b); + elseif(a ~= nil and b == nil) then + return rng.randomInt(0,a); + else + if(a <= b) then + return math.floor(rng.random(a-0.5,b+0.5)+0.5); + else + return rng.randomInt(b,a); + end + end +end + +function rng.random(a,b) + if(b == nil) then + if(a == nil) then + return genRand(); + else + return a * genRand(); + end + else + if(a == b) then + return a; + elseif(a > b) then + return rng.random(b,a); + else + local range = b-a; + return range*genRand() + a; + end + end +end + +function rng.randomEntry(tbl) + local nt = {}; + for _,v in pairs(tbl) do + table.insert(nt,v); + end + local n = rng.randomInt(#nt - 1); + return nt[n+1]; +end + + +function rng.irandomEntry(tbl) + local n = rng.randomInt(table.getn(tbl) - 1); + return tbl[n+1]; +end + +function rng.randomChar(a,b) + if(b == nil and (a == nil or type(a) == 'boolean')) then + if(a == nil) then + local c = rng.randomChar("A","Z"); + local l = rng.randomChar("a","z"); + if(rng.randomInt(0,1) == 0) then return c else return l end; + elseif(a) then --Upper case + return rng.randomChar("A","Z"); + else --Lower case + return rng.randomChar("a","z"); + end + else + local s; + local f; + if(a == nil) then s = string.byte("A",1) else s = string.byte(a,1); end + if(b == nil) then f = s; s = string.byte("A",1); else f = string.byte(b,1); end + local n = rng.randomInt(s,f); + return string.char(n); + end +end + +setmetatable(rng,genMT()); + +return rng; \ No newline at end of file