-
Notifications
You must be signed in to change notification settings - Fork 142
/
script-to-first-level.lua
76 lines (69 loc) · 1.19 KB
/
script-to-first-level.lua
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
76
-- This script can be used to get to the first level on the left without having
-- to control Mario yourself.
memory = require 'memory'
network = require 'network'
actions = require 'actions'
util = require 'util'
counter = 0
do_actions = {
actions.ACTION_BUTTON_B,
-1,
actions.ACTION_BUTTON_B,
-1,
actions.ACTION_BUTTON_B,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
actions.ACTION_BUTTON_B,
-1,
actions.ACTION_BUTTON_UP,
-1,
-1,
actions.ACTION_BUTTON_LEFT,
-1,
-1,
actions.ACTION_BUTTON_B,
-1,
-1,
-1,
-1,
-1,
-1,
actions.ACTION_BUTTON_B,
-1
}
function on_paint()
if movie.currentframe() % 50 ~= 0 then
return
end
counter = counter + 1
if counter > #do_actions then
return
end
if counter == 1 then
util.setGameSpeedToVeryFast()
end
actions.endAllActions()
if do_actions[counter] ~= -1 then
actions.startAction(do_actions[counter])
end
if counter == #do_actions then
util.setGameSpeedToNormal()
end
end
actions.endAllActions()
gui.repaint()