Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---Episode Settings---
- local powerupGuard= API.load("powerupGuard");
- function onStart()
- end
- local coyotetime= API.load("coyotetime");
- local cp = require("customPowerups")
- cp.registerItemTier(957, true)
- cp.registerPowerup("ap_superball")
- local ShopSystem = require("ShopSystem")
- local AnotherCurrency = require("anothercurrency")
- local wtp = require("whatsThatPowerup")
- extra = require("extraNPCProperties")
- local peachSpinjump = require("peachSpinjump")
- local GP = require("GroundPound")
- GP.applyDefaultSettings()
- local swooperSuit = cp.addPowerup("Swooper Suit", "powerups/swooperSuit", 965)
- local chuckSuit = cp.addPowerup("Chuck Suit", "powerups/chuckSuit", 959)
- local jumpingLui = cp.addPowerup("Jumping Lui", "powerups/jumpingLui", 961)
- cp.transformWhenSmall(961, 9)
- local goldFlower = cp.addPowerup("Gold Flower", "powerups/goldFlower", 968)
- local goldBall = require("AI/goldFireBall")
- goldBall.addBlockTransformation(90, 33)
- goldBall.addBlockTransformation(188, 88)
- goldBall.addBlockTransformation(115, 33)
- goldBall.whitelistBlock(115)
- tj = require("TripleJump") -- gotta load the library
- Player.setCostume(CHARACTER_MARIO, "SMW-Mario")
- Player.setCostume(CHARACTER_LUIGI, "SMW-Luigi")
- tj.register(CHARACTER_LUIGI,{1,2,3,2,1,2,3,2},{15,13,15,13})
- local sunshineSpinJump = require("sunshineSpinJump")
- local smwPause = require("smwPause")
- local luigiHitsBlocksNormally = require("luigiHitsBlocksNormally")
- local inventory = require("simpleInventory")
- --Peach, Toad, and Link don't have Whip form sprites, so this blacklists them just so it doesn't look weird in-game
- --If you have sprites for them, feel free to add them into the powerups folder and remove these blacklist lines.
- --cp.blacklistCharacter(CHARACTER_PEACH, superWhip.name)
- --cp.blacklistCharacter(CHARACTER_TOAD, superWhip.name)
- --cp.blacklistCharacter(CHARACTER_LINK, superWhip.name)
- ---Character Settings---
- function onTick()
- if player.character == 4 then
- for k,v in ipairs(NPC.get(34)) do
- v:transform(14)
- end
- for k,v in ipairs(NPC.get(169)) do
- v:transform(264)
- end
- end
- if player.character == 3 then
- for k,v in ipairs(NPC.get(34)) do
- v:transform(14)
- end
- for k,v in ipairs(NPC.get(169)) do
- v:transform(264)
- end
- for k,v in ipairs(NPC.get(291)) do
- v:transform(436)
- end
- end
- if player.character == 2 then
- for k,v in ipairs(NPC.get(171)) do
- v:transform(291)
- end
- end
- if player.character == 1 then
- for k,v in ipairs(NPC.get(171)) do
- v:transform(970)
- end
- end
- end
- local aw = require("anotherwalljump")
- aw.registerAllPlayersDefault()
- -- Loading Libraries --
- local anothercurrency = require("anothercurrency")
- local ShopSystem = require("ShopSystem")
- local textplus = require("textplus")
- local hudoverride = require("hudoverride")
- -- Images --
- local shopItems = Graphics.loadImageResolved("ShopSystem/shopItems.png")
- local coinsIcon = Graphics.loadImageResolved("ShopSystem/coinImage.png")
- -- anothercurrency stuff --
- coinCounter = anothercurrency.registerCurrency("coins", true)
- coinCounter:registerLimit(9999, function() end)
- local myCurrency = anothercurrency.registerCurrency("Raven Coins", false)
- myCurrency:registerCoin(274, 1)
- -- shopsystem stuff --
- local myShop = ShopSystem.create{music = "(MUSIC)/Friend Intro 12.ogg"}
- local miscShop = ShopSystem.create{music = "(MUSIC)/Friend Intro 12.ogg"}
- local bootShop = ShopSystem.create{music = "(MUSIC)/Friend Intro 12.ogg"}
- local animalShop = ShopSystem.create{}
- -- variable currency stuff --
- local simpleVar = 0
- local simpleVar2 = 0
- local function handleVarCurrency(shopItem)
- if simpleVar >= shopItem.price then
- simpleVar = simpleVar - shopItem.price
- end
- end
- local function handleVarCurrency2(shopItem)
- if simpleVar2 >= shopItem.price then
- simpleVar2 = simpleVar2 - shopItem.price
- end
- end
- -----------------------------
- local mushroom = myShop:RegisterItem{NPCid = 9, image = shopItems, price = 10, amount = 5, name = "Mushroom", sourceX = 0, sourceY = 0, sourceWidth = 32, sourceHeight = 32, currency = coinCounter}
- local fire = myShop:RegisterItem{NPCid = 14, image = shopItems, price = 20, amount = 5, name = "Fire Flower", description = "It feels warm.", sourceX = 0, sourceY = 32, sourceWidth = 32, sourceHeight = 32, currency = coinCounter}
- local ice = myShop:RegisterItem{NPCid = 264, image = shopItems, price = 30, amount = 5, name = "Ice Flower", sourceX = 0, sourceY = 160, sourceWidth = 32, sourceHeight = 32, currency = coinCounter, description = "It feels cold."}
- local watch = myShop:RegisterItem{NPCid = 248, image = shopItems, price = 35, amount = 5, name = "Pocket Watch", sourceX = 0, sourceY = 64, sourceWidth = 32, sourceHeight = 32, currency = coinCounter, description = "<wave 2>Ivan Gilbert Recommends</wave>"}
- local up = myShop:RegisterItem{NPCid = 90, image = shopItems, price = 50, amount = 5, name = "1-Up Mushroom", sourceX = 0, sourceY = 192, sourceWidth = 32, sourceHeight = 32, currency = coinCounter, description = "An Extra Life - Only works on playable Characters."}
- local threeup = myShop:RegisterItem{NPCid = 188, image = shopItems, price = 175, amount = 3, name = "3-Up Moon", sourceX = 0, sourceY = 224, sourceWidth = 32, sourceHeight = 32, currency = coinCounter, description = "Three Extra Lives Are Better Then One."}
- local turnip = myShop:RegisterItem{NPCid = 140, image = shopItems, price = 15, amount = 3, name = "Turnip", sourceX = 128, sourceY = 160, sourceWidth = 32, sourceHeight = 32, currency = coinCounter, description = "A Vegetable With a Face On It. Nothing To See Here."}
- local shell = myShop:RegisterItem{NPCid = 113, image = shopItems, price = 35, amount = 5, name = "Koopa Shell", sourceX = 128, sourceY = 128, sourceWidth = 32, sourceHeight = 32, currency = coinCounter, description = "<tremble 2>Is This Even Legal?!</tremble>"}
- local questitem = myShop:RegisterItem{NPCid = 278, image = shopItems, closeAfterPurchase = true, price = 2500, amount = 1, name = "Propeller Box", sourceX = 0, sourceY = 96, sourceWidth = 32, sourceHeight = 44, currency = coinCounter, description = "Actual Item Appearence may differ according to region."}
- mushroom.description = "A Simple Mushroom."
- local item1 = miscShop:RegisterItem{NPCid = 1, price = 10, amount = 5, currency = coinCounter, useReserve = true}
- local item2 = miscShop:RegisterItem{NPCid = 2, price = 20, amount = 5, currency = coinCounter, useReserve = true}
- local item3 = miscShop:RegisterItem{NPCid = 3, price = 30, amount = 5, currency = coinCounter, useReserve = true}
- local item4 = miscShop:RegisterItem{NPCid = 4, price = 50, amount = 5, currency = coinCounter, useReserve = true}
- local item5 = miscShop:RegisterItem{NPCid = 5, price = 50, amount = 5, currency = coinCounter, useReserve = true}
- local item6 = miscShop:RegisterItem{NPCid = 6, price = 30, amount = 5, currency = coinCounter, useReserve = true}
- local item7 = miscShop:RegisterItem{NPCid = 7, price = 10, amount = 5, currency = coinCounter, useReserve = true}
- local item8 = miscShop:RegisterItem{NPCid = 8, price = 20, amount = 5, currency = coinCounter, useReserve = true}
- local item9 = miscShop:RegisterItem{NPCid = 9, price = 30, amount = 5, currency = coinCounter, useReserve = true}
- local item10 = miscShop:RegisterItem{NPCid = 10, price = 50, amount = 5, currency = coinCounter}
- local item11 = miscShop:RegisterItem{NPCid = 11, price = 50, amount = 5, currency = coinCounter}
- local item12 = miscShop:RegisterItem{NPCid = 12, price = 30, amount = 5, currency = coinCounter}
- local item13 = miscShop:RegisterItem{NPCid = 13, price = 10, amount = 5, currency = coinCounter}
- local item14 = miscShop:RegisterItem{NPCid = 14, price = 20, amount = 5, currency = coinCounter}
- local item15 = miscShop:RegisterItem{NPCid = 15, price = 30, amount = 5, currency = coinCounter}
- local item16 = miscShop:RegisterItem{NPCid = 16, price = 50, amount = 5, currency = coinCounter}
- local item17 = miscShop:RegisterItem{NPCid = 17, price = 50, amount = 5, currency = coinCounter}
- local item18 = miscShop:RegisterItem{NPCid = 50, price = 30, amount = 5, currency = coinCounter}
- local item19 = miscShop:RegisterItem{NPCid = 19, price = 50, amount = 5, currency = coinCounter}
- local item20 = miscShop:RegisterItem{NPCid = 21, price = 50, amount = 5, currency = coinCounter}
- local item21 = miscShop:RegisterItem{NPCid = 22, price = 30, amount = 5, currency = coinCounter}
- local item22 = miscShop:RegisterItem{NPCid = 23, price = 10, amount = 5, currency = coinCounter}
- local item23 = miscShop:RegisterItem{NPCid = 24, price = 20, amount = 5, currency = coinCounter}
- local item24 = miscShop:RegisterItem{NPCid = 25, price = 30, amount = 5, currency = coinCounter}
- local item25 = miscShop:RegisterItem{NPCid = 26, price = 50, amount = 5, currency = coinCounter}
- local item26 = miscShop:RegisterItem{NPCid = 27, price = 50, amount = 5, currency = coinCounter}
- local item27 = miscShop:RegisterItem{NPCid = 28, price = 30, amount = 5, currency = coinCounter}
- local item28 = miscShop:RegisterItem{NPCid = 31, price = 50, amount = 5, currency = coinCounter}
- local item29 = miscShop:RegisterItem{NPCid = 32, price = 30, amount = 5, currency = coinCounter}
- local item30 = miscShop:RegisterItem{NPCid = 33, price = 10, amount = 5, currency = coinCounter}
- local item31 = miscShop:RegisterItem{NPCid = 34, price = 20, amount = 5, currency = coinCounter}
- local item32 = miscShop:RegisterItem{NPCid = 35, price = 30, amount = 5, currency = coinCounter}
- local item33 = miscShop:RegisterItem{NPCid = 36, price = 50, amount = 5, currency = coinCounter}
- local item34 = miscShop:RegisterItem{NPCid = 37, price = 50, amount = 5, currency = coinCounter}
- local item35 = miscShop:RegisterItem{NPCid = 38, price = 30, amount = 5, currency = coinCounter}
- local item36 = miscShop:RegisterItem{NPCid = 41, price = 50, amount = 5, currency = coinCounter}
- local item37 = miscShop:RegisterItem{NPCid = 42, price = 30, amount = 5, currency = coinCounter}
- local item38 = miscShop:RegisterItem{NPCid = 43, price = 10, amount = 5, currency = coinCounter}
- local item39 = miscShop:RegisterItem{NPCid = 44, price = 20, amount = 5, currency = coinCounter}
- local item40 = miscShop:RegisterItem{NPCid = 45, price = 30, amount = 5, currency = coinCounter}
- local item41 = miscShop:RegisterItem{NPCid = 46, price = 50, amount = 5, currency = coinCounter}
- local item42 = miscShop:RegisterItem{NPCid = 47, price = 50, amount = 5, currency = coinCounter}
- local item43 = miscShop:RegisterItem{NPCid = 48, price = 30, amount = 5, currency = coinCounter}
- local item44 = miscShop:RegisterItem{NPCid = 51, price = 50, amount = 5, currency = coinCounter}
- local item45 = miscShop:RegisterItem{NPCid = 52, price = 30, amount = 5, currency = coinCounter}
- local item46 = miscShop:RegisterItem{NPCid = 53, price = 10, amount = 5, currency = coinCounter}
- local item47 = miscShop:RegisterItem{NPCid = 54, price = 20, amount = 5, currency = coinCounter}
- local item48 = miscShop:RegisterItem{NPCid = 55, price = 30, amount = 5, currency = coinCounter}
- local item49 = miscShop:RegisterItem{NPCid = 56, price = 50, amount = 5, currency = coinCounter}
- local item50 = miscShop:RegisterItem{NPCid = 57, price = 50, amount = 5, currency = coinCounter}
- local item51 = miscShop:RegisterItem{NPCid = 58, price = 30, amount = 5, currency = coinCounter}
- local item52 = bootShop:RegisterItem{NPCid = 35, price = 50, amount = 5, currency = coinCounter}
- local item53 = bootShop:RegisterItem{NPCid = 191, price = 50, amount = 5, currency = coinCounter}
- local item54 = bootShop:RegisterItem{NPCid = 193, price = 30, amount = 5, currency = coinCounter}
- local item55 = animalShop:RegisterItem{NPCid = 95, price = 50, amount = 5, currency = coinCounter}
- local item56 = animalShop:RegisterItem{NPCid = 98, price = 30, amount = 5, currency = coinCounter}
- local item57 = animalShop:RegisterItem{NPCid = 99, price = 10, amount = 5, currency = coinCounter}
- local item58 = animalShop:RegisterItem{NPCid = 100, price = 20, amount = 5, currency = coinCounter}
- local item59 = animalShop:RegisterItem{NPCid = 148, price = 30, amount = 5, currency = coinCounter}
- local item60 = animalShop:RegisterItem{NPCid = 149, price = 50, amount = 5, currency = coinCounter}
- local item61 = animalShop:RegisterItem{NPCid = 150, price = 50, amount = 5, currency = coinCounter}
- local item62 = animalShop:RegisterItem{NPCid = 228, price = 30, amount = 5, currency = coinCounter}
- local function newHUD()
- hudoverride.offsets.coins.value.y = -50 -- move the coin counter's position up by 50 pixels so that it is offscreen and not visible
- Text.printWP(string.format("%04d",coinCounter:getMoney()),1,538,27,5) -- print the new coin counter
- end
- Graphics.addHUDElement(newHUD) -- register our render function in the default hud
- function onDraw()
- if ShopSystem.activeShop.id ~= nil then -- detect if ANY shop is currently open
- Graphics.drawBox{texture = coinsIcon, x = ShopSystem.movement.sidePanels.position + 22, y = 292, priority = ShopSystem.leastPriority + 0.65}
- textplus.print{x = ShopSystem.movement.sidePanels.position + 58, y = 300, text = string.format("%04d", coinCounter:getMoney()), font = ShopSystem.font, priority = ShopSystem.leastPriority + 0.65}
- end
- myCurrency:draw()
- end
- function onEvent(eventName)
- if eventName == "hellostranger" then
- myShop:open()
- elseif eventName == "test2" then
- miscShop:open()
- elseif eventName == "test3" then
- bootShop:open()
- elseif eventName == "test4" then
- animalShop:open()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement