forked from dungeons-of-moria/icmoria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GDB_commands
163 lines (143 loc) · 3.86 KB
/
GDB_commands
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
##############################################################
define rerun
run -f ss
end
document rerun
do this: run -f ss
end
##############################################################
define wizon
set wizard2 = 1
set wizard1 = 1
end
document wizon
turn wizard2 and wizard1 on
end
##############################################################
define wizoff
set wizard2 = 0
set wizard1 = 0
end
document wizoff
turn wizard2 and wizard1 off
end
##############################################################
define curloc
printf "player location: [%d][%d]\n", char_row, char_col
end
define ploc
curloc
end
document curloc
print char_row and char_col
end
document ploc
print char_row and char_col
end
##############################################################
define curpos
pcave char_row char_col
end
define ppos
curpos
end
document curpos
print information about players current position using pcave
end
document ppos
print information about players current position using pcave
end
##############################################################
define pcave
printf "cave[%d][%d] = \n", $arg0, $arg1
print cave[$arg0][$arg1]
if cave[$arg0][$arg1].tptr != 0
printf "\nt_list[%d] = \n", cave[$arg0][$arg1].tptr
print t_list[cave[$arg0][$arg1].tptr]
else
printf "\n No treasure.\n"
end
if cave[$arg0][$arg1].cptr != 0
if cave[$arg0][$arg1].cptr != 1
printf "\nm_list[%d] = \n", cave[$arg0][$arg1].cptr
print m_list[cave[$arg0][$arg1].cptr]
printf "\nc_list[%d] = \n", m_list[cave[$arg0][$arg1].cptr].mptr
print c_list[m_list[cave[$arg0][$arg1].cptr].mptr]
else
printf "\n Player is here.\n"
end
else
printf "\n No monster.\n"
end
end
##############################
document pcave
print information about what is at cave[arg0][arg1]
end
##############################################################
define l100
set py.misc.lev = 100
end
##############################
document l100
set py.misc.lev = 100
end
##############################################################
define pt
print t_list[$arg0]
end
document pt
print t_list[arg0]
end
##############################################################
define ppas1
print (unsigned char)password1[0]
print (unsigned char)password1[1]
print (unsigned char)password1[2]
print (unsigned char)password1[3]
print (unsigned char)password1[4]
print (unsigned char)password1[5]
print (unsigned char)password1[6]
print (unsigned char)password1[7]
print (unsigned char)password1[8]
print (unsigned char)password1[9]
print (unsigned char)password1[10]
print (unsigned char)password1[11]
print (unsigned char)password1[12]
end
##############################
document ppas1
Helps figure out how to set wdata. Set wdata[0][0] to a seed
and set the rest of the array to 0. Start the game, and then
run ppas1. It will show what to xor the password against to
fill in wdata correctly.
end
##############################################################
define ppas2
print (unsigned char)password2[0]
print (unsigned char)password2[1]
print (unsigned char)password2[2]
print (unsigned char)password2[3]
print (unsigned char)password2[4]
print (unsigned char)password2[5]
print (unsigned char)password2[6]
print (unsigned char)password2[7]
print (unsigned char)password2[8]
print (unsigned char)password2[9]
print (unsigned char)password2[10]
print (unsigned char)password2[11]
print (unsigned char)password2[12]
end
##############################
document ppas2
Helps figure out how to set wdata. Set wdata[1][0] to a seed
and set the rest of the array to 0. Start the game, and then
run ppas2. It will show what to xor the password against to
fill in wdata correctly.
end
##############################################################
##############################
##############################################################
##############################
##############################################################
##############################################################