View difference between Paste ID: bWEZKUAd and 3tmhTPw8
SHOW: | | - or go back to the newest paste.
1
--300,80,150,200
2
tfm.exec.setGameTime(3,true)
3
dp={}
4
roles={0,1}
5
maps={7489629}
6
data={}
7
text={}
8
lang={}
9
players={}
10
ids={
11
  0,
12
  0,
13
	0,
14
  0
15
}
16
alive=0
17
lang.en={
18
	menu="Menu",
19
  profile2="Profile",
20
  help2="Help",
21
  help="In #kidnapper the goal of the game is for protectors to catch the mouse with the bomb before the mouse gets to the hole. The mouse with the bomb can use attacks to shield off protectors.",
22
  wins="Total Wins",
23
  wins_Bomber="Wins As Kidnapper",
24
  wins_Protector="Wins As Protector",
25
  close="Close",
26
	health=100,
27
  bomber_Wins="Kidnapper Wins!",
28
  protector_Wins="Protectors Win!",
29
  powerups2="Powerups",
30
  powerup1="[Normal Attack]</J> Is activated by pressing space. Only works for Protectors when they are near the bomber.",
31
  powerup2="[Mega Jump]</J> Is activated by the down arrow.",
32
  mouseStolen="kidnapped the mouse!",
33
  buy="Buy",
34
  bought="Bought",
35
  shop="Shop",
36
	points="Points",
37
	notEnough="Not enough points!"
38
}
39
for _, s in next, {'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'AutoShaman', 'AutoNewGame'} do
40
    tfm.exec['disable' .. s]()
41
end
42
function Dp(name)
43
    name = name:sub(1,1):upper()..name:sub(2):lower()
44
    for i,dp in ipairs(dp) do
45
        if name==dp then
46
            return true
47
        end
48
    end
49
    return false
50
end
51
function stolen(n)
52
	data[n].p=player
53
	data[n].stolen="<R>"..data[n].p.."<J> "..text[n].mouseStolen
54
	tfm.exec.chatMessage(data[n].stolen,n)
55
end
56
function particles(x,y)
57
  tfm.exec.displayParticle(9,x,y+10,-0.4,0.1,0.2,0.3,nil)
58
  tfm.exec.displayParticle(9,x,y+10,-0.6,0.2,0.6,0.2,nil)
59
  tfm.exec.displayParticle(9,x,y+10,-0.8,0.3,0.8,0.1,nil)
60
  tfm.exec.displayParticle(9,x,y+10,0.4,0.4,-0.4,0.3,nil)
61
  tfm.exec.displayParticle(9,x,y+10,0.6,0.5,-0.6,0.2,nil)
62
  tfm.exec.displayParticle(9,x,y+10,0.8,0.6,-0.8,0.1,nil)
63
end
64
function bigJump(n,x,y)
65
  tfm.exec.movePlayer(n,0,0,false,0,-80,true)
66
  tfm.exec.displayParticle(3,x-5,y+10,-0.8,0,0,0,n)
67
  tfm.exec.displayParticle(3,x+5,y+10,0.8,0,0,0,n)
68
  tfm.exec.displayParticle(3,x-10,y+10,-1.7,0,0,0,n)
69
  tfm.exec.displayParticle(3,x+10,y+10,1.7,0,0,0,n)
70
  particles(x,y)
71
end
72
function identifyBomber(n)
73
  if data[n].role==0 then
74
  	tfm.exec.setNameColor(n,0x00FF00)
75
		tfm.exec.movePlayer(n,1023,432,false,0,50,false)
76
  elseif data[n].role==1 then
77
    tfm.exec.setNameColor(n,0xFF0000)
78
  end
79
end
80
function countAlive()
81
	alive=0
82
	for n,player in pairs(tfm.get.room.playerList) do
83
		if tfm.get.room.playerList[n].isDead==false then
84
			alive=alive+1
85
		end
86
  end
87
end
88
function removeWinner()
89
	ui.removeTextArea(20,nil)
90
  ui.removeTextArea(30,nil)
91
  ui.removeTextArea(40,nil)
92
  ui.removeTextArea(50,nil)
93
  ui.removeTextArea(60,nil)
94
  ui.removeTextArea(19,nil)
95
end
96
	
97
function win(n)
98
	if tfm.get.room.playerList[n].isDead==false and data[n].role==0 then
99
		data[n].wins=data[n].wins+1
100
		data[n].points=data[n].points+7
101
		data[n].wins_Protector=data[n].wins_Protector+1
102
	end
103
end
104
function insertName(n)
105
	table.insert(players,n)
106
end
107
function setLang(n)
108
	text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
109
end
110
function setData(n)
111
	data[n]=
112
  {
113
		wins=0,
114
    role=0,
115
    health=100,
116
		spawn=1,
117
    wins_Protector=0,
118
    wins_Bomber=0,
119
		p="",
120
		stolen="",
121
    shopItems={propellerMouse=0,greenMouse=0,lightningMouse=0,tigerMouse=0},
122
    buy1=text[n].buy,
123
		buy2=text[n].buy,
124
		buy3=text[n].buy,
125
		buy4=text[n].buy,
126
		using="1651b5bc86d.png",
127
		points=1220
128
  }
129
end
130
function chooseRole()
131
  for n,player in pairs(tfm.get.room.playerList) do
132
		data[n].role=0
133
	end
134
		player=players[math.random(#players)]
135
		data[player].role=1
136
		player=""..player
137
end
138
function bindKeyboard(n)
139
  for i=0,150 do
140
    tfm.exec.bindKeyboard(n,i,true,true)
141
  end
142
end
143
function showMenu(n)
144
	ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:menu2'>"..text[n].menu, n, 10, 30, 42, 20, 0x000001, 0xFFFFFF, 1, true)
145
end
146
function showMenu2(n)
147
	ui.addTextArea(0, "<p align='center'><font face='calibri'><a href='event:Menu'>"..text[n].menu.." </a>| <a href='event:Help'>"..text[n].help2.."</a> | <a href='event:Profile'>"..text[n].profile2.."</a> | <a href='event:Powerups'>"..text[n].powerups2.."</a> | <a href='event:Shop'>"..text[n].shop, n, 10, 30, 210, 20, 0x000001, 0xffffff, 1, true)
148
end
149
function removeImage(n)
150
	tfm.exec.removeImage(id1)
151
	tfm.exec.removeImage(id2)
152
	tfm.exec.removeImage(id3)
153
	tfm.exec.removeImage(id4)
154
end
155
function removeShop(n)
156
	for i=1000,10000 do
157
		ui.removeTextArea(i)
158
	end
159
end
160
function showHealth(n)
161
  ui.addTextArea(-3, "", n, 319, 27, 100, 18, 0xffffff, 0xffffff, 1, true)
162
	ui.addTextArea(-1, "", n, 319, 27, data[n].health, 18, 0x1aff00, 0x1aff00, 1, true)
163
	ui.addTextArea(-2, "<p align='center'><b><font color='#000000'>"..data[n].health.."%", n, 345, 27, 54, 18, 0x324650, 0x000000, 0, true)
164
end
165
function displayTab(n,info,subject)
166
	ui.addTextArea(2, "", n, 262, 72, 360, 290, 0x331f15, 0x331f15, 1, true)
167
	ui.addTextArea(3, "", n, 262, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
168
	ui.addTextArea(5, "", n, 295, 72, 290, 4, 0x6b4231, 0x6b4231, 1, true)
169
	ui.addTextArea(4, "", n, 618, 125, 4, 180, 0x6b4231, 0x6b4231, 1, true)
170
	ui.addTextArea(6, "", n, 295, 358, 295, 4, 0x6b4231, 0x6b4231, 1, true)
171
	ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>#KIDNAPPER - "..subject.."</b></font></font><font size='14'>\n\n"..info, n, 271, 80, 342, 270, 0x1b262b, 0x131c21, 1, true)
172
	ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 272, 330, 339, 20, 0x324650, 0x324650, 1, true)
173
end
174
function profile(n,info)
175
	ui.addTextArea(2, "", n, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
176
	ui.addTextArea(3, "", n, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
177
	ui.addTextArea(5, "", n, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
178
	ui.addTextArea(4, "", n, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
179
	ui.addTextArea(6, "", n, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
180
	ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>"..n.."</b></font></font></p><font size='14'>\n<font face='calibri'>\n"..info, n, 270, 82, 252, 270, 0x1b262b, 0x131c21, 1, true)
181
	ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 272, 330, 248, 20, 0x324650, 0x324650, 1, true)
182
end
183
function profile2(n,info,l)
184
	ui.addTextArea(2, "", l, 262, 72, 268, 290, 0x331f15, 0x331f15, 1, true)
185
	ui.addTextArea(3, "", l, 262, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
186
	ui.addTextArea(5, "", l, 295, 72, 198, 4, 0x6b4231, 0x6b4231, 1, true)
187
	ui.addTextArea(4, "", l, 526, 120, 4, 180, 0x6b4231, 0x6b4231, 1, true)
188
	ui.addTextArea(6, "", l, 295, 358, 198, 4, 0x6b4231, 0x6b4231, 1, true)
189
	ui.addTextArea(1, "<p align='center'><font face='calibri'><font size='17'><b>"..n.."</b></font></font></p><font size='14'>\n<font face='calibri'>\n"..info, l, 270, 82, 252, 270, 0x1b262b, 0x131c21, 1, true)
190
	ui.addTextArea(7, "<p align='center'><font size='13'><a href='event:close'>"..text[l].close.."</a></font>", l, 272, 330, 248, 20, 0x324650, 0x324650, 1, true)
191
end
192
function close(n)
193
	for i=1,7 do
194
  	ui.removeTextArea(i,n)
195
  end
196
end
197
function nearBomber(n,x,y,p)
198
	if ((tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x+100 and tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x) and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+50 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-50) and not (n==p) and data[p].health>0 and tfm.get.room.playerList[n].isFacingRight==true then
199
		tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
200
		data[p].health=data[p].health-12.5
201
		tfm.exec.displayParticle(1,x,y,0.2,0,0.2,0,nil)
202
		tfm.exec.displayParticle(1,x,y,0.4,0,0.4,0,nil)
203
		tfm.exec.displayParticle(1,x,y,0.6,0,0.6,0,nil)
204
		tfm.exec.displayParticle(1,x,y,0.8,0,0.8,0,nil)
205
		tfm.exec.displayParticle(1,x,y,1,0,1,0,nil)
206
		tfm.exec.displayParticle(1,x,y-10,0.2,0,0.2,0,nil)
207
		tfm.exec.displayParticle(1,x,y-10,0.4,0,0.4,0,nil)
208
		tfm.exec.displayParticle(1,x,y-10,0.6,0,0.6,0,nil)
209
		tfm.exec.displayParticle(1,x,y-10,0.8,0,0.8,0,nil)
210
		tfm.exec.displayParticle(1,x,y-10,1,0,1,0,nil)
211
		tfm.exec.displayParticle(1,x,y+10,0.2,0,0.2,0,nil)
212
		tfm.exec.displayParticle(1,x,y+10,0.4,0,0.4,0,nli)
213
		tfm.exec.displayParticle(1,x,y+10,0.6,0,0.6,0,nil)
214
		tfm.exec.displayParticle(1,x,y+10,0.8,0,0.8,0,nil)
215
		tfm.exec.displayParticle(1,x,y+10,1,0,1,0,nil)
216
	end
217
	if ((tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x-100 and tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x) and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+50 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-50) and not (n==p) and data[p].health>0 and tfm.get.room.playerList[n].isFacingRight==false then
218
		tfm.exec.movePlayer(p,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
219
		data[p].health=data[p].health-12.5
220
		tfm.exec.displayParticle(1,x,y,-0.2,0,-0.2,0,nil)
221
		tfm.exec.displayParticle(1,x,y,-0.4,0,-0.4,0,nil)
222
		tfm.exec.displayParticle(1,x,y,-0.6,0,-0.6,0,nil)
223
		tfm.exec.displayParticle(1,x,y,-0.8,0,-0.8,0,nil)
224
		tfm.exec.displayParticle(1,x,y,-1,0,-1,0,nil)
225
		tfm.exec.displayParticle(1,x,y-10,-0.2,0,-0.2,0,nil)
226
		tfm.exec.displayParticle(1,x,y-10,-0.4,0,-0.4,0,nil)
227
		tfm.exec.displayParticle(1,x,y-10,-0.6,0,-0.6,0,nil)
228
		tfm.exec.displayParticle(1,x,y-10,-0.8,0,-0.8,0,nil)
229
		tfm.exec.displayParticle(1,x,y-10,-1,0,-1,0,nil)
230
		tfm.exec.displayParticle(1,x,y+10,-0.2,0,-0.2,0,nil)
231
		tfm.exec.displayParticle(1,x,y+10,-0.4,0,-0.4,0,nli)
232
		tfm.exec.displayParticle(1,x,y+10,-0.6,0,-0.6,0,nil)
233
		tfm.exec.displayParticle(1,x,y+10,-0.8,0,-0.8,0,nil)
234
		tfm.exec.displayParticle(1,x,y+10,-1,0,-1,0,nil)
235
	end
236
  if data[p].health<1 then
237
    tfm.exec.killPlayer(p)
238
  end
239
end
240
operation={-110,110}
241
function nearProtector(n,p,x,y)
242
	if not (n==p) and data[p].health>0 and data[n].health>0 then
243
		tfm.exec.displayParticle(13,x,y,-0.2,0.1,-0.2,0.1,nil)
244
		tfm.exec.displayParticle(13,x,y,-0.4,0,-0.4,0,nil)
245
		tfm.exec.displayParticle(13,x,y,-0.6,0,-0.6,0,nil)
246
		tfm.exec.displayParticle(3,x,y,-0.8,0,-0.8,0,nil)
247
		tfm.exec.displayParticle(3,x,y,-8,0,-1,0,nil)
248
		tfm.exec.displayParticle(3,x,y-10,-0.2,0.1,-0.2,0.1,nil)
249
		tfm.exec.displayParticle(13,x,y-10,-0.4,0,-0.4,0,nil)
250
		tfm.exec.displayParticle(13,x,y-10,-0.6,0,-0.6,0,nil)
251
		tfm.exec.displayParticle(13,x,y-10,-0.8,0,-0.8,0,nil)
252
		tfm.exec.displayParticle(13,x,y-10,-1,0,-1,0,nil)
253
		tfm.exec.displayParticle(13,x,y+10,-0.2,0.1,-0.2,0.1,nil)
254
		tfm.exec.displayParticle(13,x,y+10,-0.4,0,-0.4,0,nli)
255
		tfm.exec.displayParticle(13,x,y+10,-0.6,0,-0.6,0,nil)
256
		tfm.exec.displayParticle(13,x,y+10,-0.8,-0.1,-0.8,-0.1,nil)
257
		tfm.exec.displayParticle(13,x,y+10,-1,0,-1,0,nil)
258
		tfm.exec.displayParticle(13,x,y,0.2,0,0.2,0,nil)
259
		tfm.exec.displayParticle(13,x,y,0.4,0,0.4,0,nil)
260
		tfm.exec.displayParticle(13,x,y,0.6,0,0.6,0,nil)
261
		tfm.exec.displayParticle(13,x,y,0.8,0,0.8,0,nil)
262
		tfm.exec.displayParticle(13,x,y,1,0,1,0,nil)
263
		tfm.exec.displayParticle(13,x,y-10,0.2,0.1,0.2,0.1,nil)
264
		tfm.exec.displayParticle(13,x,y-10,0.4,0,0.4,0,nil)
265
		tfm.exec.displayParticle(13,x,y-10,0.6,0,0.6,0,nil)
266
		tfm.exec.displayParticle(13,x,y-10,0.8,0,0.8,0,nil)
267
		tfm.exec.displayParticle(13,x,y-10,1,0,1,0,nil)
268
		tfm.exec.displayParticle(13,x,y+10,0.2,0,0.2,0,nil)
269
		tfm.exec.displayParticle(13,x,y+10,0.4,0,0.4,0,nli)
270
		tfm.exec.displayParticle(13,x,y+10,0.6,0,0.6,0,nil)
271
		tfm.exec.displayParticle(3,x,y+10,0.8,0,0.8,0,nil)
272
		tfm.exec.displayParticle(3,x,y+10,8,0,1,0,nil)
273
	end
274
	if (tfm.get.room.playerList[n].x<tfm.get.room.playerList[p].x+70 and tfm.get.room.playerList[n].x>tfm.get.room.playerList[p].x-70 and tfm.get.room.playerList[n].y<tfm.get.room.playerList[p].y+30 and tfm.get.room.playerList[n].y>tfm.get.room.playerList[p].y-30) and not (n==p) and data[p].health>0 and data[n].health>0 then
275
		data[n].health=data[n].health-12.5
276
		tfm.exec.movePlayer(n,0,0,false,operation[math.random(#operation)],operation[math.random(#operation)],true)
277
	end
278
		if data[n].health<1 then
279
    		tfm.exec.killPlayer(n)
280
  	end
281
end
282
283
for n,player in pairs(tfm.get.room.playerList) do
284
  bindKeyboard(n)
285
  setLang(n)
286
  insertName(n)
287
  setData(n)
288
  showMenu(n)
289
	table.insert(dp,n)
290
end
291
chooseRole()
292
for n,player in pairs(tfm.get.room.playerList) do
293
  identifyBomber(n)
294
end
295
function allInfo(n)
296
  bindKeyboard(n)
297
  setLang(n)
298
  insertName(n)
299
  setData(n)
300
  showMenu(n)
301
  identifyBomber(n)
302
	table.insert(dp,n)
303
end
304
function eventNewGame()
305
	players={}
306
	for n,player in pairs(tfm.get.room.playerList) do
307
		insertName(n)
308
	end
309
		chooseRole()
310
	countAlive()
311
  removeWinner()
312
	for n,player in pairs(tfm.get.room.playerList) do
313
		identifyBomber(n)
314
		data[n].health=100
315
		stolen(n)
316
	end
317
	id=tfm.exec.addImage(data[player].using,"$"..player, -40, -25)
318
end
319
function eventTextAreaCallback(txt, n, a)
320
	removeImage(n)
321
	if a=="Menu" then
322
  	showMenu(n)
323
  elseif a=="menu2" then
324
  	showMenu2(n)
325
  elseif a=="Help" then
326
  	displayTab(n,text[n].help,text[n].help2)
327
  elseif a=="close" then
328
  	close(n)
329
		removeImage(n)
330
		removeShop(n)
331
  elseif a=="Profile" then
332
  	profile(n,text[n].wins..": <J>"..data[n].wins.."\n\n</J>"..text[n].wins_Bomber..": <J>"..data[n].wins_Bomber.."\n\n</J>"..text[n].wins_Protector..": <J>"..data[n].wins_Protector.."</J>\n\n"..text[n].points..": <J>"..data[n].points)
333
  elseif a=="Powerups" then
334
    displayTab(n,"<J>"..text[n].powerup1.."\n\n<J>"..text[n].powerup2,text[n].powerups2)
335
  elseif a=="Shop" then
336
    shop(n)
337
	elseif a=="buy1" and data[n].points>=80 then
338
		data[n].buy1="</a><G>"..text[n].bought
339
		data[n].using="1651ca2b636.png"
340
		data[n].points=data[n].points-80
341
    shop(n)
342
	elseif a=="buy2" and data[n].points>=150 then
343
		data[n].buy2="</a><G>"..text[n].bought
344
		data[n].using="1651ca29934.png"
345
		data[n].points=data[n].points-150
346
    shop(n)
347
	elseif a=="buy1" and not (data[n].points>=80) then
348
		tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
349
  elseif a=="buy3" and data[n].points>=200 then
350
    data[n].buy3="</a><G>"..text[n].bought
351
    data[n].using="1651ca27c02.png"
352
		data[n].points=data[n].points-200
353
    shop(n)
354
	elseif a=="buy2" and not (data[n].points>=300) then
355
		tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
356
  elseif a=="buy4" and data[n].points>=300 then
357
    data[n].buy4="</a><G>"..text[n].bought
358
		data[n].points=data[n].points-300
359
    data[n].using="1651ca26129.png"
360
    shop(n)
361
	elseif a=="buy3" and not (data[n].points>=200) then
362
		tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
363
	elseif a=="buy4" and not (data[n].points>=150) then
364
		tfm.exec.chatMessage("<R>"..text[n].notEnough,n)
365
  end
366
end
367
function eventNewPlayer(n)
368
  allInfo(n)
369
end
370
function eventLoop(time,timeRemaining)
371
	for n,player in pairs(tfm.get.room.playerList) do
372
    data[n].spawn=data[n].spawn+0.5
373
		showHealth(n)
374
	end
375
	if timeRemaining<=0 then
376
    tfm.exec.newGame(maps[math.random(#maps)])
377
  end
378
end
379
380
function eventKeyboard(n, k, d, x, y)
381
	if k==32 and data[n].role==0 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
382
		nearBomber(n,x,y,player)
383
		data[n].spawn=-1
384
  elseif k==32 and data[n].role==1 and data[n].spawn>0 and tfm.get.room.playerList[n].isDead==false then
385
    data[n].spawn=-1.5
386
		player=player
387
		for n in pairs(tfm.get.room.playerList) do
388
      		nearProtector(n,player,tfm.get.room.playerList[player].x,tfm.get.room.playerList[player].y)
389
		end
390
  elseif k==3 and data[n].spawn>0 then
391
    data[n].spawn=-2
392
		player=player
393
    bigJump(n,x,y)
394
  elseif k==112 then
395
    
396
	end
397
end
398
function eventPlayerDied(n)
399
	for n,player in pairs(tfm.get.room.playerList) do
400
		win(n)
401
	end
402
	countAlive()
403
	data[n].health=0
404
	if data[n].role==1 then
405
		for n,player in pairs(tfm.get.room.playerList) do
406
        ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
407
        ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
408
        ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
409
      	ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
410
        ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
411
        ui.addTextArea(19, "<p align='center'><font size='20'><VP>"..text[n].protector_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
412
      	tfm.exec.setGameTime(5,true)
413
		end
414
	end
415
end
416
417
function eventMouse(playerName,x,y)
418
	print("<VP>X</VP><N>:</N><J> "..x.."</J><VP> Y</VP><N>:</N><J> "..y)
419
end
420
system.bindMouse("Fuzzyfirsdog#0000", true)
421
function eventPlayerGetCheese(n)
422
	if data[n].role==1 then
423
		data[n].wins=data[n].wins+1
424
		data[n].wins_Bomber=data[n].wins_Bomber+1
425
		data[n].points=data[n].points+10
426
		tfm.exec.setGameTime(10,true)
427
		for n,player in pairs(tfm.get.room.playerList) do
428
    		ui.addTextArea(20, "", n, 262, 172, 268, 66, 0x331f15, 0x331f15, 1, true)
429
    		ui.addTextArea(30, "", n, 262, 191, 4, 26, 0x6b4231, 0x6b4231, 1, true)
430
    		ui.addTextArea(50, "", n, 300, 172, 198, 4, 0x6b4231, 0x6b4231, 1, true)
431
    		ui.addTextArea(40, "", n, 526, 192, 4, 26, 0x6b4231, 0x6b4231, 1, true)
432
    		ui.addTextArea(60, "", n, 300, 234, 198, 4, 0x6b4231, 0x6b4231, 1, true)
433
    		ui.addTextArea(19, "<p align='center'><font size='20'><R>"..text[n].bomber_Wins, n, 270, 182, 252, 44, 0x1b262b, 0x131c21, 1, true)
434
			if not (data[n].role==1) then
435
				tfm.exec.killPlayer(n)
436
			end
437
		end
438
	end
439
end
440
system.disableChatCommandDisplay("p",true)
441
function eventChatCommand(l,c)
442
	if c=="p" then
443
		profile(l,text[l].wins..": <J>"..data[l].wins.."\n\n</J>"..text[l].wins_Bomber..": <J>"..data[l].wins_Bomber.."\n\n</J>"..text[l].wins_Protector..": <J>"..data[l].wins_Protector)
444
	end
445
	if c:sub(0,1)=="p" and Dp(c:sub(3))then
446
    n = c:sub(3,3):upper()..c:sub(4):lower()
447
  	profile2(n,text[l].wins..": <J>"..data[n].wins.."\n\n</J>"..text[l].wins_Bomber..": <J>"..data[n].wins_Bomber.."\n\n</J>"..text[l].wins_Protector..": <J>"..data[n].wins_Protector.."</J>\n\n"..text[l].points..": <J>"..data[n].points,l)
448
  end
449
end
450
function shop(n)
451
  ui.addTextArea(7000, "", n, 113, 58, 643, 260, 0x331f15, 0x331f15, 1, true)
452
  ui.addTextArea(5000, "", n, 296, 314, 198, 4, 0x6b4231, 0x6b4231, 1, true)
453
  ui.addTextArea(3000, "", n, 113, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
454
  ui.addTextArea(4000, "", n, 752, 111, 4, 151, 0x6b4231, 0x6b4231, 1, true)
455
  ui.addTextArea(6000, "", n, 296, 58, 198, 4, 0x6b4231, 0x6b4231, 1, true)
456
  ui.addTextArea(2000, "<p align='center'><font size='20'><VP>", n, 122, 68, 626, 240, 0x1b262b, 0x131c21, 1, true)
457
  ui.addTextArea(8000, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/80", n, 154, 94, 100, 100, 0x324650, 0x324650, 1, true)
458
  ui.addTextArea(9000, "<p align='center'><b><a href='event:buy1'>"..data[n].buy1, n, 153, 238, 100, 23, 0x324650, 0x12191c, 1, true)
459
  ui.addTextArea(1000, "<p align='center'><b><a href='event:buy2'>"..data[n].buy2, n, 309, 238, 100, 23, 0x324650, 0x12191c, 1, true)
460
  ui.addTextArea(1100, "<p align='center'><b><a href='event:buy3'>"..data[n].buy3, n, 468, 238, 100, 23, 0x324650, 0x12191c, 1, true)
461
  ui.addTextArea(1200, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/150", n, 617, 94, 100, 100, 0x324650, 0x324650, 1, true)
462
  ui.addTextArea(1300, "<p align='center'><b><a href='event:buy4'>"..data[n].buy4, n, 617, 238, 100, 23, 0x324650, 0x12191c, 1, true)
463
  ui.addTextArea(7700, "<p align='center'><font size='13'><a href='event:close'>"..text[n].close.."</a></font>", n, 125, 285, 620, 20, 0x324650, 0x324650, 1, true)
464
  ui.addTextArea(9200, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/300", n, 309, 94, 100, 100, 0x324650, 0x324650, 1, true)
465
  ui.addTextArea(9100, "\n\n\n\n\n\n<p align='center'>"..data[n].points.."/200", n, 468, 94, 100, 100, 0x324650, 0x324650, 1, true)
466
	id4=tfm.exec.addImage("1651ca2b636.png", "&1", 153, 115, n)
467
	id3=tfm.exec.addImage("1651ca29934.png", "&2", 312, 110, n)
468
	id2=tfm.exec.addImage("1651ca27c02.png", "&3", 467, 110, n)
469
	id1=tfm.exec.addImage("1651ca26129.png", "&4", 617, 110, n)
470
end