-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPower Blade.lua
More file actions
75 lines (58 loc) · 1.8 KB
/
Power Blade.lua
File metadata and controls
75 lines (58 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
dofile("KLib/KLib.lua")
Address =
{
Health = 0x04AB,
Armor = 0x009C,
Lives = 0x0027,
Items =
{
Grenades = 0x005A,
Cheeseburgers = 0x005B
},
Weapon =
{
CurrentPower = 0x005C,
MaxPower = 0x008A,
Type = 0x005D,
Range = 0x005E,
Amount = 0x0099
},
Time = 0x0095,
Palette = 0x002A
}
WeaponTypes =
{
[0] = "Blue",
"Blue +",
"Red"
}
memory.usememorydomain("RAM")
function CreateMenu()
KLib.Menu.Color(KLib.Color.White, KLib.Color.Make(0, 0, 0, 192))
KLib.Menu.Page("Power Blade\r")
KLib.Menu.Field("Health", Address.Health, "byte", 0, 16)
KLib.Menu.Field("Armor", Address.Armor, "byte", 0, 3)
KLib.Menu.Field("Lives", Address.Lives, "byte", 0, 9)
KLib.Menu.Separator()
KLib.Menu.Text("Items", KLib.Color.Green, true)
KLib.Menu.Field("Grenades", Address.Items.Grenades, "byte", 0, 9)
KLib.Menu.Field("Cheeseburgers", Address.Items.Cheeseburgers, "byte", 0, 9)
KLib.Menu.Separator()
KLib.Menu.Text("Weapon", KLib.Color.Orange, true)
KLib.Menu.Field("Current Power", Address.Weapon.CurrentPower, "byte", 0, 16)
KLib.Menu.Field("Max Power", Address.Weapon.MaxPower, "byte", 0, 16)
KLib.Menu.Enum("Type", Address.Weapon.Type, "byte", WeaponTypes)
KLib.Menu.Field("Range", Address.Weapon.Range, "byte", 0, 3)
KLib.Menu.Field("Amount", Address.Weapon.Amount, "byte", 0, 3)
KLib.Menu.Separator()
KLib.Menu.Text("Misc", KLib.Color.Yellow, true)
KLib.Menu.Field("$Time (1st)", Address.Time, "byte")
KLib.Menu.Field("$Time (2nd)", Address.Time + 1, "byte")
KLib.Menu.Field("Palette", Address.Palette, "byte")
end
CreateMenu()
while true do
KLib.Update()
emu.frameadvance()
KLib.PostUpdate()
end