1
// Someone cast an unlock spell
4
tmpy = 491 // The unique code for an unlock order
9
// Play the trap action
10
tmpargument = ACTIONKD
17
// Tell the players...
20
// Spawn the trap particle
33
// Someone is trying to open it
35
// Can they open the chest?
36
SetTargetToWhoeverBumped
50
tmpargument = ACTIONMG
54
// Check for disarm skill
56
tmpy = 8192 // 50% chance at 16 Dex
59
tmpx = rand & 8191 + targetdex
63
// Check if it was disarmed
67
// Give some experience
69
tmpdistance = EXPROLEPLAY
70
GiveExperienceToTarget
74
tmpargument = ACTIONMG
76
// The trap has been disarmed
92
// Give some experience
95
GiveExperienceToTarget
98
// Play the trap action
99
tmpargument = ACTIONKD
101
// The trap has been sprung
107
// Tell the players...
110
// Spawn the trap particle
121
// Wait before allowing a swap
128
// Make target crouch
129
tmpargument = ACTIONMG
135
// Say it's empty... Or check for false bottom
137
// Say the chest is empty...
140
// Content... 0 is normal chest, 2 is false bottom
142
tmpargument = tmpargument & 2
145
// It has a false bottom
148
// Character easily finds the false bottom
153
// Figure out what to drop... Opposite of first drop
155
tmpargument = tmpargument & 1
160
tmpargument = selfmoney
165
// No more false bottom
171
// Check wisdom until it is found
173
tmpy = rand & 4095 + 3584 // Need between 14 and 30 wisdom
175
// Character finds the false bottom
180
// Figure out what to drop... Opposite of first drop
182
tmpargument = tmpargument & 1
187
tmpargument = selfmoney
192
// No more false bottom
207
// Content... 0 is money, 1 is items
209
tmpargument = tmpargument & 1
216
tmpargument = selfmoney
221
// No money in a money chest...