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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
ms={}
----------------------
--Setup --
----------------------
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
function totable(t,match)
local cmd = {}
if not match then match = "[^%s]+" end
for word in string.gmatch(t, match) do
table.insert(cmd, word)
end
return cmd
end
ms.money=initArray(32)
ms.killf = initArray(32)
ms.t = initArray(32)
function ms.moneyshow(id)
parse('hudtxt2 '..id..' 1 "©255075000Kredyty: '..ms.money[id]..' " 13 200')
end
----------------------
-- Sklepy --
----------------------
function ms.shopa(id)
menu(id,"Rozne,Ammo|250,Pila|500,Gas|250,Wodka|200,Klucz|500,Pistolet Leczniczy|350,Wskrzeszenie|1250")
end
function ms.shopb(id)
menu(id,"Armory i bronie,Medic Armor|500,Heavy Armor|650,Super Armor|1500,Stealth Suit|1700,Five-seven|500,Deagle|500")
end
function ms.shopc(id)
menu(id,"Mikstury,Mikstura - 25HP|50,Mikstura - 50HP|75,Mikstura - 75HP|100,Szaman - 100HP|125")
end
function ms.shopw1(id)
menu(id,"Wingi 1 2 RD,Satan Wings - Dark Knight|500,Heaven Wings - Dark Wizard|500,Mistery Wings - Summoner|500,Dragon Wings - Blade Knight|1000,Archangel Wings - Soul Master|1000,Despair Wings - Bloody Summoner|1000")
end
function ms.shopw2(id)
menu(id,"Wingi 3 RD i Copy,Storm Wings - Blade Master|1500,Vortex Wings - Grand Master|1500,Violent Wind Wings - Dimension Master|1500,Cape Of Lord - Dark Lord|800,Mantle of Lord - Lord Emperor|1800")
end
function ms.shopall(id)
menu(id,"Wszystkie,Rozne,Armory i Bronie,Mikstury,Wingi 1 2 RD,Wingi 3 RD i Copy")
end
----------------------
-- Funkcje --
----------------------
addhook("menu","ms.buy")
function ms.buy(id,title,sel)
if title == "Rozne" then
if sel == 1 then
if ms.money[id] > 249 then
parse("equip "..id.." 61")
parse("equip "..id.." 62")
msg2(id,"©000255000Kupiles Ammo!@C")
ms.money[id]=ms.money[id]-250
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 2 then
if ms.money[id] > 499 then
parse("equip "..id.." 85")
msg2(id,"©000255000Kupiles Pile!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 3 then
if ms.money[id] > 249 then
parse("equip "..id.." 72")
msg2(id,"©000255000Kupiles Gas!@C")
ms.money[id]=ms.money[id]-150
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 4 then
if ms.money[id] > 249 then
parse("equip "..id.." 73")
msg2(id,"©000255000Kupiles Wodke!@C")
ms.money[id]=ms.money[id]-250
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 5 then
if ms.money[id] > 499 then
parse("equip "..id.." 74")
msg2(id,"©000255000Kupiles klucz!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000I sobie nie pobudujesz!@C")
end
end
if sel == 6 then
if ms.money[id] > 349 then
parse("equip "..id.." 2")
msg2(id,"©000255000Kupiles Pistolet Leczniczy!@C")
ms.money[id]=ms.money[id]-350
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 7 then
if ms.money[id] > 1249 then
if ms.killf[id] == 0 then
msg2(id,"©000255000Kupiles wskrzeszenie gdy zostaniesz zabity!@C")
ms.money[id]=ms.money[id]-1250
ms.moneyshow(id)
ms.killf[id] = 1
else
msg2(id,"©255000000Kupiles to juz!@C")
end
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
end
if title == "Armory i bronie" then
if sel == 1 then
if ms.money[id] > 499 then
parse("setarmor "..id.." 204")
msg2(id,"©000255000Kupiles Medic Armor!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 2 then
if ms.money[id] > 399 then
parse("setarmor "..id.." 203")
msg2(id,"©000255000Kupiles Heavy Armor!@C")
ms.money[id]=ms.money[id]-400
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 3 then
if ms.money[id] > 1499 then
parse("setarmor "..id.." 205")
msg2(id,"©000255000Kupiles Super Armor!@C")
ms.money[id]=ms.money[id]-1500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 4 then
if ms.money[id] > 1699 then
parse("setarmor "..id.." 206")
msg2(id,"©000255000Kupiles Stealth Suit!@C")
ms.money[id]=ms.money[id]-1700
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 5 then
if ms.money[id] > 499 then
parse("equip "..id.." 6")
msg2(id,"©000255000Kupiles Five-seven!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 6 then
if ms.money[id] > 499 then
parse("equip "..id.." 3")
msg2(id,"©000255000Kupiles Deagle@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
end
if title == "Mikstury" then
if sel == 1 then
if ms.money[id] > 49 then
parse("sethealth "..id.." "..player(id,"health")+25)
msg2(id,"©000255000Kupiles miksturke!@C")
ms.money[id]=ms.money[id]-50
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 2 then
if ms.money[id] > 74 then
parse("sethealth "..id.." "..player(id,"health")+50)
msg2(id,"©000255000Kupiles miksturke!@C")
ms.money[id]=ms.money[id]-75
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 3 then
if ms.money[id] > 99 then
parse("sethealth "..id.." "..player(id,"health")+75)
msg2(id,"©000255000Kupiles miksturke!@C")
ms.money[id]=ms.money[id]-100
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 4 then
if ms.money[id] > 124 then
parse("sethealth "..id.." "..player(id,"health")+100)
msg2(id,"©000255000Szaman wyleczyl twoje rany!!@C")
ms.money[id]=ms.money[id]-125
ms.moneyshow(id)
else
msg2(id,"©255000000Szaman nie wyleczy twoich ran!@C")
end
end
end
if title == "Wingi 1 2 RD" then
if sel == 1 then
if ms.money[id] > 499 then
parse("setmaxhealth "..id.." "..player(id,"maxhealth")+35)
parse("speedmod "..id.." "..5)
ms.image[ id] = image( "gfx/wings/diabel.bmp", 1, -1, id +100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 2 then
if ms.money[id] > 499 then
parse("setmaxhealth "..id.." "..player(id,"maxhealth")+15)
parse("speedmod "..id.." "..10)
ms.image[ id] = image( "gfx/wings/aniol.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 3 then
if ms.money[id] > 499 then
parse("setmaxhealth "..id.." "..player(id,"maxhealth")+20)
parse("speedmod "..id.." "..8)
ms.image[ id] = image( "gfx/wings/sum.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 4 then
if ms.money[id] > 999 then
parse("setmaxhealth "..id.." "..player(id,"maxhealth")+50)
parse("speedmod "..id.." "..15)
ms.image[ id] = image( "gfx/wings/diabel2.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-1000
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 5 then
if ms.money[id] > 999 then
parse("sethealth "..id.." "..player(id,"maxhealth")+30)
parse("speedmod "..id.." "..20)
ms.image[ id] = image( "gfx/wings/aniol2.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-1000
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 6 then
if ms.money[id] > 999 then
parse("sethealth "..id.." "..player(id,"maxhealth")+40)
parse("speedmod "..id.." "..25)
ms.image[ id] = image( "gfx/wings/sum2.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-1000
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
end
if title == "Wingi 3 RD i Copy" then
if sel == 1 then
if ms.money[id] > 1499 then
parse("sethealth "..id.." "..player(id,"maxhealth")+60)
parse("speedmod "..id.." "..25)
ms.image[ id] = image( "gfx/wings/diabel3.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-1500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 2 then
if ms.money[id] > 1499 then
parse("sethealth "..id.." "..player(id,"maxhealth")+40)
parse("speedmod "..id.." "..30)
ms.image[ id] = image( "gfx/wings/aniol3.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-1500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 3 then
if ms.money[id] > 1499 then
parse("sethealth "..id.." "..player(id,"maxhealth")+50)
parse("speedmod "..id.." "..35)
ms.image[ id] = image( "gfx/wings/sum3.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles skrzydla!@C")
ms.money[id]=ms.money[id]-1500
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 4 then
if ms.money[id] > 799 then
parse("setmaxhealth "..id.." "..player(id,"maxhealth")+60)
parse("speedmod "..id.." "..15)
ms.image[ id] = image( "gfx/wings/cape.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles Cape!@C")
ms.money[id]=ms.money[id]-800
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
if sel == 5 then
if ms.money[id] > 1799 then
parse("setmaxhealth "..id.." "..player(id,"maxhealth")+120)
parse("speedmod "..id.." "..25)
ms.image[ id] = image( "gfx/wings/cape2.bmp", 1, -1, id+100)
msg2(id,"©000255000Kupiles Cape!@C")
ms.money[id]=ms.money[id]-1800
ms.moneyshow(id)
else
msg2(id,"©255000000Nie masz kasy!@C")
end
end
end
if title == "Wszystkie" then
if sel == 1 then
ms.shopa(id)
elseif sel == 2 then
ms.shopb(id)
elseif sel == 3 then
ms.shopc(id)
elseif sel == 4 then
ms.shopw1(id)
elseif sel == 5 then
ms.shopw2(id)
end
end
end
addhook("serveraction","ms.action")
function ms.action(id,action)
if action == 2 then
ms.shopall(id)
end
end
addhook("spawn","ms.spawn")
function ms.spawn(id)
ms.moneyshow(id)
end
addhook("kill","ms.kill")
function ms.kill(id,victim)
if player(id,"team") == 2 then
if player(victim,"team") == 1 then
ms.money[id]=ms.money[id]+25
ms.moneyshow(id)
else
ms.money[id]=ms.money[id]-5
end
elseif player(id,"team") == 1 then
if player(victim,"team") == 2 then
ms.money[id]=ms.money[id]+100
ms.moneyshow(id)
else
ms.money[id]=ms.money[id]-5
end
end
end
addhook("join","ms.join")
function ms.join(id)
ms.killf[id]=0
ms.money[id]=500
end
addhook("parse","ms.parse")
function ms.parse(t)
txt = totable(t)
if txt[1] == "daj_kredyty" then
if txt[2] ~= nil then
if txt[3] ~= nil then
ms.money[tonumber(txt[2])]=ms.money[tonumber(txt[2])]+tonumber(txt[3])
msg2(tonumber(txt[2]),"©255000255Admin dal ci kredyty :P")
ms.moneyshow(tonumber(txt[2]))
return 1
else
print("©255000000Zapomniales o ilosci !")
return 1
end
else
print("©255000000Zapomniales o id !")
return 1
end
elseif txt[1] == "daj_kredyty_wszystkim" then
if txt[2] ~= nil then
for id = 1,32 do
if player(id,"exists") then
ms.money[id]=ms.money[id]+tonumber(txt[2])
ms.moneyshow(id)
msg("©255000255Admin dal kredyty wszystkim :P")
return 1
end
end
else
print("©255000000Zapomniales o ilosci !")
return 1
end
end
end
addhook("die","ms.die")
function ms.die(id)
if player(id,"team") == 2 then
if ms.killf[id]==1 then
ms.money[id]=ms.money[id]-100
ms.moneyshow(id)
ms.killf[id]=0
local px,py
px = player(id,"x")
py = player(id,"y")
parse('spawnplayer '..id..' '..px..' '..py)
end
end
end
addhook("hit","ms.heal")
function ms.heal(id,src,weapon)
if (weapon == 2) then
parse("sethealth "..id.." "..player(id,"health")+20)
return 1
end
end
addhook("say","spawn2")
function spawn2(id,txt,p)
if(txt=="!reset") then
parse("speedmod "..id.." 0")
parse("setmaxhealth "..id.." 100")
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
if (player(id,"team") == 2) then
imagecolor(id1,0,0,0)
elseif (player(id,"team") == 1) then
imagecolor(id1,0,0,0)
end
end
end