1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-06-01 18:53:06 -07:00
mm/Lua/oneshot.lua

122 lines
2.6 KiB
Lua
Raw Normal View History

2015-03-08 09:52:19 -07:00
-- gimme gimme gimme
local a = require "addrs.init"
2015-03-08 09:52:19 -07:00
2015-03-20 17:39:55 -07:00
local iv
if version == "M JP10" or version == "M JP11" then
2015-05-01 09:59:16 -07:00
iv = require "data.item values early"
2015-03-20 17:39:55 -07:00
elseif oot then
2015-05-01 09:59:16 -07:00
iv = require "data.item values oot"
2015-03-20 17:39:55 -07:00
else
2015-05-01 09:59:16 -07:00
iv = require "data.item values"
2015-03-20 17:39:55 -07:00
end
local inv = a.inventory
local masks = a.masks
local quantities = a.quantities
local function set(f, v)
-- wrapper for addresses that *might* be undefined
if f then f(v) end
end
set(a.target_style, 1)
--set(buttons_enabled, 0)
--set(infinite_sword, 1)
set(a.owl_save, 1)
set(a.sot_count, 0)
set(a.target_style, 1)
set(a.bubble_timer, 0)
set(a.chateau_romani, 8)
a.hearts (16*20)
a.max_hearts (16*20)
a.doubled_hearts(20)
a.magic (0x60)
2015-03-26 06:56:27 -07:00
set(a.magic_max, 0x60)
2015-03-20 17:39:55 -07:00
a.rupees (500)
2015-03-23 01:54:35 -07:00
-- nuts, sticks, bombs, wallet, Scale, gauntlets, Bullets, quiver
-- ?????????nnnsssbbbwwSSSgggBBBqqq
a.upgrades(tonumber('00000000010101101110010011011011', 2))
2015-03-20 17:39:55 -07:00
if oot then
a.tunic_boots (0xFF) -- normally 0x77
a.sword_shield (0xF7) -- normally 0x77?
else
a.sword_shield (0x23)
a.owls_hit (0xFFFF)
a.map_visible (0xFFFF)
a.map_visited (0xFFFF)
2015-03-23 01:54:35 -07:00
a.banked_rupees (5000)
2015-03-20 17:39:55 -07:00
2015-03-26 07:18:20 -07:00
a.lottery_numbers[1](1*0x10000 + 2*0x100 + 3)
a.lottery_numbers[2](4*0x10000 + 5*0x100 + 6)
a.lottery_numbers[3](7*0x10000 + 8*0x100 + 9)
2015-03-26 07:12:56 -07:00
a.spider_mask_order[1](0)
a.spider_mask_order[2](0)
a.spider_mask_order[3](0)
a.spider_mask_order[4](0)
a.spider_mask_order[5](0)
2015-03-26 07:16:11 -07:00
a.spider_mask_order[6](0)
2015-03-26 07:12:56 -07:00
a.bombers_code[1](1)
a.bombers_code[2](2)
a.bombers_code[3](3)
a.bombers_code[4](4)
a.bombers_code[5](5)
2015-03-20 17:39:55 -07:00
a.items_wft(7)
a.items_sht(7)
a.items_gbt(7)
a.items_stt(7)
a.keys_wft(69)
a.keys_sht(69)
a.keys_gbt(69)
a.keys_stt(69)
a.fairies_wft(69)
a.fairies_sht(69)
a.fairies_gbt(69)
a.fairies_stt(69)
2015-03-08 09:52:19 -07:00
end
2015-03-20 17:39:55 -07:00
set(a.has_magic, 1)
set(a.has_normal_magic, 1)
set(a.has_double_magic, 1)
a.quest_items (0x00FFFFFF)
--a.slulltula_count_wf(69)
--a.slulltula_count_gb(69)
--inv.b_button (0x4F) -- don't really need this
for k, f in pairs(inv) do
if iv[k] then f(iv[k]) end
end
if iv.longshot then
inv.hookshot(iv.longshot)
end
inv.bottle_1 (iv.bottle )
inv.bottle_2 (iv.fairy )
inv.bottle_3 (iv.bugs )
inv.bottle_4 (iv.fish )
set(inv.bottle_5, iv.milk )
set(inv.bottle_6, iv.chateau_romani)
--set(a.event_1, 0x05)
--set(a.event_2, 0x0B)
--set(a.event_3, 0x11)
if masks then
for k, f in pairs(masks) do
f(iv[k])
end
end
for k, f in pairs(quantities) do
f(69)
end