Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MinimumCoins = false
- MaximumCoins = true
- MinCoinGoal = 40
- MaxCoinGoal = 10
- MidRingCoins = 0
- function firedeath()
- memory.writebyte(0x7000AC, 40)
- memory.writebyte(0x7001B0, 40)
- memory.writebyte(0x7001D2, 34)
- memory.writebyte(0x002140, 07)
- yoshiisdead = false
- die = 0
- end
- lastframecoins = memory.readbyte(0x7E037B)
- collectedcoins = 0
- gui.opacity(0.8)
- if MinimumCoins == true then
- function mincoincheck()
- gui.text(5,10,collectedcoins)
- gui.text(15,10,"/")
- gui.text(22,10,MinCoinGoal)
- if gamemode == 16 and collectedcoins <= MinCoinGoal then
- firedeath()
- end
- end
- else
- function mincoincheck()
- end
- end
- if MaximumCoins == true then
- function maxcoincheck()
- gui.text(5,20,collectedcoins)
- gui.text(15,20,"/")
- gui.text(22,20,MaxCoinGoal)
- if collectedcoins > MaxCoinGoal and memory.readbyte(0x7001AE) == 0 then
- firedeath()
- collectedcoins = 0
- end
- end
- else
- function maxcoincheck()
- end
- end
- function coincounter()
- savering = memory.readbyte(0x7E0B65)
- gamemode = memory.readbyte(0x7E0118)
- if memory.readbyte(0x7E037B) ~= lastframecoins then
- collectedcoins = collectedcoins + 1
- end
- if savering == 1 then
- MidRingCoins = collectedcoins
- end
- if gamemode == 61 or gamemode == 34 then
- collectedcoins = 0
- end
- if gamemode == 53 then
- collectedcoins = MidRingCoins
- end
- mincoincheck()
- maxcoincheck()
- lastframecoins = memory.readbyte(0x7E037B)
- end
- while true do
- coincounter()
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement