Who can edit this script?
This script have a bug but i dont repair this.
I newbie in script edit.
Yours.
Sorry my english is bad ;/.
LUA ERROR: maps/rp_austor_5.0.lua:7: attempt to call global 'wallet_checkremovemoney' (a nil value)
This bug only occurs when I want to buy items from NPCs on the map.
This is script:
Mehr
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
arnwpslist = { 64, 58, 2, 10, 30, 40, 35, 51, 50, 78, 69, 75, 73, 76, 89, 86 } aus_curmis = 1 ------------------------------------------ function aus_pay(id, money) 	return wallet_checkremovemoney(id, money) --msg2(id, "You've lost "..money.."$") end ------------------------------------------ addhook("usebutton","aus_usebutton") function aus_usebutton(id,x,y) 	if(x == 18 and y == 72) then -- arena -- 		menu(id,"Announcement,Prepare to fight,First blood,Multikill,Monsterkill,Unstoppable,Killing spree,Rampage,Humiliation,Leader") 	elseif(x == 20 and y == 74) then 		menu(id,"Items for arena,Medkit,Kevlar,Pistol(Glock),Shotgun(M3),Rifle(AK47),Machinegun(M249),Sniper rifle(AWP),Grenade,>>>") 	elseif(x == 16 and y == 75) then 		menu(id,"Arena,Leave the arena|$4000") 	elseif(x == 19 and y == 10) then -- hotels -- 		menu(id,"Hotel - Central,Room 1|300$,Room 2|300$,Room 3|300$,Room 4|300$") 	elseif(x == 379 and y == 139) then 		menu(id,"Hotel - Township,Room 1|200$,Room 2|200$,Room 3|200$,Room 4|200$") 	elseif(x == 101 and y == 15) then -- mission 1 -- 		aus_misn_event(1, false, id) 	elseif(x == 85 and y == 189) then -- mission 2 -- 		aus_misn_event(2, false, id) 	elseif(x == 11 and y == 154) then -- mission 3 -- 		aus_misn_event(3, false, id) 	elseif(x == 2 and y == 178) then -- mission 4 -- 		aus_misn_event(4, false, id) 	elseif(x == 192 and y == 194) then -- mission 5 -- 		aus_misn_event(5, false, id) 	elseif(x == 185 and y == 10) then -- mission 6 -- 		aus_misn_event(6, false, id) 	elseif(x == 8 and y == 190) then -- mission 7 -- 		aus_misn_event(7, false, id) 	elseif(x == 359 and y == 89) then -- mission 8 -- 		aus_misn_event(8, false, id) 	end 	 	-- boats -- 	for i = 1,6 do 		if(x == boat_info[i][1] and y == boat_info[i][2]) then 			aus_boatmenu(id, i) 			return 0 		end 	end 	 	-- shops -- 	for i = 1,num_shops do 		if(x == shp_info[i][1] and y == shp_info[i][2]) then 			aus_shopmenu(id, i) 			return 0 		end 	end	 	 end ------------------------------------------ addhook("trigger", "aus_trigger") function aus_trigger(trigger, source) 	 	if(trigger == "domisn") then 		aus_misn_event(aus_curmis, true, 0) 	end end ------------------------------------------ addhook("menu","aus_menu") function aus_menu(id,t,b) 	if(b > 0) then 		if(t == "Announcement") then 			parse("trigger aranc"..b) 		elseif(t == "Items for arena") then 			if(b == 9) then 				menu(id,"Items for arena(2),Knife,Claw,Machete,Snowball,Molotov,AirStrike,Satchel,Gutbomb") 			else 				parse("spawnitem "..arnwpslist[b].." 19 69") 				parse("spawnitem "..arnwpslist[b].." 19 76") 			end 		elseif(t == "Items for arena(2)") then 				parse("spawnitem "..arnwpslist[b+8].." 19 69") 				parse("spawnitem "..arnwpslist[b+8].." 19 76") 		elseif(t == "Arena") then 				if(b == 1 and aus_pay(id, 4000)) then 					parse("setpos "..id.." 848 2480") 				end 		end 		 		aus_boatmact(id, t, b) 		aus_hotelmact(id, t, b) 		aus_shopmact(id, t, b) 		 	end end ----------------------- -- Boats -- ----------------------- boat_info = { {100, 45, 1}, {100, 52, 1}, {101, 188, 2}, {190, 121, 3}, {179, 41, 4}, {308, 139, 5} } port_info = { {"Main city",	1, 95, 48 }, {"South village",	0, 99, 188 }, {"South island", 0, 190, 122 }, {"North island", 0, 179, 40 }, {"Eastern city", 0, 314, 139 } } boat_cost = { {0, 1400, 1190, 830, 2360}, {1400, 0, 1110, 1670, 2560}, {1190, 1110, 0, 820, 1250}, {830, 1670, 820, 0, 1670},	{2360, 2560, 1250, 1670, 0} } ----------------------- function aus_boatmenu(id, boat) 	menustr = "Boat"..(boat); 	for i = 1,5 do 		if(port_info[i][2] == 1 and boat_info[boat][3] ~= i) then 			menustr = menustr..","..port_info[i][1].."|"..boat_cost[boat_info[boat][3]][i].."$" 		else 			menustr = menustr..",("..port_info[i][1]..")" 		end 	end 	menu(id,menustr) 	 end ----------------------- function aus_boatmact(id,t,b) 	for i = 1,6 do 		if(t == ("Boat"..i) and entity(boat_info[i][1], boat_info[i][2], 'state') == false) then 			if(aus_pay(id, boat_cost[boat_info[i][3]][b]) == true) then 				parse("setpos "..id.." "..((port_info[b][3]*32)+16).." "..((port_info[b][4]*32)+16)) 				parse("trigger boat"..i.."h") 				return 			end 		end 	end 	 end ----------------------- --- Hotels --- ----------------------- hotel1_info = { {13, 10}, {13, 16}, {25, 10}, {25, 16} } hotel2_info = { {373, 133}, {379, 133}, {373, 145}, {379, 145} } function aus_hotelmact(id,t,b) 	if(t == "Hotel - Central" and aus_pay(id, 300) == true) then 		parse("setpos "..id.." "..((hotel1_info[b][1]*32)+16).." "..((hotel1_info[b][2]*32)+16)) 		parse("triggerposition 19 12") 	elseif(t == "Hotel - Township" and aus_pay(id, 200) == true) then 		parse("setpos "..id.." "..((hotel2_info[b][1]*32)+16).." "..((hotel2_info[b][2]*32)+16)) 		parse("triggerposition 377 139") 	end end ----------------------- --- Shops --- ----------------------- num_shops = 11 shp_info = { 	{ 29, 39, 7, 5 }, -- main city 	{ 29, 52, 7, 5 }, 	{ 45, 36, 9, 6 }, 	{ 73, 40, 8, 4.5 },	 	{ 64, 6, 9, 4 }, 	{ 32, 68, 4, 6 }, 	{ 183, 125, 7, 2 }, -- s island 	{ 323, 120, 7, 3.2 }, -- new city 	{ 338, 131, 8, 3.6 }, 	{ 345, 147, 9, 3 }, 	{ 370, 122, 8, 4 } } shp_items = { 	{ 1,	2,	3, 	4, 	5,	6,	62,	0,	0 }, 	{ 22,	34,	30, 39, 38, 11, 10,	0,	0 }, 	{ 32,	30,	31,	33, 36, 20, 51, 59, 61 }, 	{ 10,	20,	3,	34, 51, 57, 2,	61,	0 }, 	{ 21,	73,	50,	23, 38, 41, 39,	62,	61 }, 	{ 60,	57,	58,	41, 0,	0,	0,	0,	0 }, 	{ 3,	11, 20, 30, 38, 59, 61, 0,	0 }, 	{ 23,	89, 88,	41, 51, 59, 38, 0, 	0 }, 	{ 32,	69, 36, 30, 10, 3, 	24, 61, 0 }, 	{ 33,	41, 38, 31, 20, 2, 	1,	58, 62}, 	{ 31,	35, 6,	32, 37, 36, 59, 61, 0 } } ----------------------- function wrp_itemtype(id, param) 	if(param == "price") then 		if(id == 50) then return 500 end 		if(id == 88) then return 10000 end 	end 	return itemtype(id, param) end ----------------------- function aus_shopmenu(id, shp) 	menustr = "Shop"..(shp); 	for i = 1, shp_info[shp][3] do 		menustr = menustr..","..wrp_itemtype(shp_items[shp][i], "name").."|"..(wrp_itemtype(shp_items[shp][i], "price")*shp_info[shp][4]).."$" 	end 	menu(id,menustr) end ----------------------- function aus_shopmact(id,t,b) 	for i = 1, num_shops do 		if(t == ("Shop"..i) and aus_pay(id, (wrp_itemtype(shp_items[i][b], "price")*shp_info[i][4])) == true) then 			parse("spawnitem "..shp_items[i][b].." "..shp_info[i][1].." "..shp_info[i][2]) 			return 		end 	end end ---------------------------------------------- -- Missions -- ---------------------------------------------- function aus_SetMarker(x, y) 	local itemlist=item(0,"table") 	for _,ids in pairs(itemlist) do 		if(item(ids,"name") == "Red Flag") then 			parse("removeitem "..ids) 		end 	end 	if(x > 0) then parse("spawnitem 70 "..x.." "..y) end end ----------------------- function aus_misndone(id, moneyk) 	msg("©255128255MISSION COMPLETE@C") 	msg("©255128255Player "..player(id, "name").." got "..moneyk.." 000$@C") 	parse("triggerposition 10 10") 	mddstr = "spawnitem 68 "..player(id, "tilex").." "..player(id, "tiley") 	for i = 1, moneyk do parse(mddstr) end 	aus_curmis = aus_curmis + 1; 	 	-- add score 	parse("setscore "..id.." "..player(id, "score")+moneyk) end ----------------------- function aus_misn_init() 	parse("spawnitem 70 54 74") end aus_misn_init() ----------------------- function aus_misn_event(mis, start, id) 	 	if(mis == 1) then 		if(start == true) then 			aus_SetMarker(101, 14); 			parse("triggerposition 49 74") 			msg("©255128255Mission 1: Press the button@C") 			parse("triggerposition 101 15") 		else 			aus_misndone(id, 5) 			aus_SetMarker(54, 74); 			parse("triggerposition 101 15") 			parse("triggerposition 49 74") 		end 	elseif(mis == 2) then 		if(start == true) then 			aus_SetMarker(85, 189); 			parse("triggerposition 49 74") 			msg("©255128255Mission 2: Find the village@C") 			parse("trigger ms2d") 		else 			aus_misndone(id, 15) 			aus_SetMarker(83, 2); 			parse("triggerposition 80 3") 			parse("trigger ms2d") 			port_info[2][2] = 1; 			parse("trigger boat3") 			msg("©000255000New route is available in the sea ports") 		end 	elseif(mis == 3) then 		if(start == true) then 			aus_SetMarker(10, 157); 			parse("triggerposition 80 3") 			msg("©255128255Mission 3: Get keycard in the mine@C") 			parse("trigger ms3d") 		else 			aus_misndone(id, 20) 			aus_SetMarker(83, 2); 			parse("triggerposition 80 3") 			parse("trigger ms3d") 		end 	elseif(mis == 4) then 		if(start == true) then 			aus_SetMarker(6, 177); 			parse("triggerposition 80 3") 			parse("triggerposition 24 188") 			msg("©255128255Mission 4: Steal the map from military base@C") 		else 			aus_misndone(id, 30) 			aus_SetMarker(83, 2); 			parse("triggerposition 80 3") 			parse("trigger ms4d") 			port_info[3][2] = 1; 			msg("©000255000New route is available in the sea ports") 		end 	elseif(mis == 5) then 		if(start == true) then 			aus_SetMarker(192, 196); 			parse("triggerposition 80 3") 			msg("©255128255Mission 5: Find something in the cave@C") 			parse("trigger ms5d") 		else 			aus_misndone(id, 50) 			aus_SetMarker(12, 172); 			parse("trigger ms5d") 			parse("triggerposition 9 173") 			port_info[4][2] = 1; 			msg("©000255000New route is available in the sea ports") 		end 	elseif(mis == 6) then 		if(start == true) then 			aus_SetMarker(181, 21); 			parse("triggerposition 9 173") 			msg("©255128255Mission 6: Collect fuel@C") 			parse("trigger ms6d") 		else 			aus_misndone(id, 20) 			aus_SetMarker(12, 172); 			parse("triggerposition 9 173") 			parse("trigger ms6d") 		end 	elseif(mis == 7) then 		if(start == true) then 			aus_SetMarker(6, 190); 			parse("triggerposition 9 173") 			msg("©255128255Mission 7: Fly away@C") 			parse("trigger wbh2") 			parse("trigger wbh3") 		else 			aus_misndone(id, 20) 			aus_SetMarker(321, 167); 			port_info[5][2] = 1; 			msg("©000255000New route is available in the sea ports") 			parse("trigger wbh3") 			parse("trigger city2") 			parse("setpos "..id.." 11840 6080") 		end 	elseif(mis == 8) then 		if(start == true) then 			aus_SetMarker(361, 87); 			parse("triggerposition 323 165") 			msg("©255128255Mission 8: Open the bridge@C") 			parse("triggerposition 359 89") 		else 			aus_misndone(id, 25) 			aus_SetMarker(0, 0); 			parse("triggerposition 359 89") 			parse("trigger bg2") 			parse("trigger ms6c") 		end 	end end
3× editiert, zuletzt 16.03.14 15:56:56