Forum
Scripts
PCS Construction 3on3 tournament-Request for US
PCS Construction 3on3 tournament-Request for US
30 repliesIm in a hurry, how's it going? @
Rainoth:17.12?
@
Rainoth: edited 2×, last 17.12.16 09:43:34 pm
Hmmm, now that I think about it, there's not that much left, maybe someone else can help you. Don't worry, I'll still do the scripts if nobody does them but maybe, just maybe, someone will.
I'll post the code I was working on for kill_counters if anyone wants to work on it.
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
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
kill_counter = {
	players = {},
	counters = {0,0},
	rewards = {
	[1] = function(id) kill_counter.players[id].stats.spd = 10 end,
	[3] = function(id) kill_counter.insert(id, 30,76) end,
	[5] = function(id) kill_counter.insert(id, 60,73}) end
	}
}
function kill_counter.insert(id, seconds, item)
	for k,v in pairs (kill_counter.players[id].rechargables) do
		if v[2]~= item then
			table.insert(kill_counter.players[id].rechargables,{seconds,item})
		end
	end
end
addhook("startround","kill_counter.startround")
function kill_counter.startround(mode) -- reset stuff
	for k,v in pairs (player(0,"tableliving")) do
		kill_counter.players[k] = {
		items = {},
		stats = {hp = 100,ap = 0,spd = 0},
		rechargables = {},
		duration = 0
		}
	end
	kill_counter.counters = {0,0}
end
addhook("kill","kill_counter.kill")
function kill_counter.kill(killer)
	kill_counter.counters[player(killer,"team")] = kill_counter.counters[player(killer,"team")] + 1
	kill_counter.reward(player(killer,"team"))
end
function kill_counter.reward(team)
	for k,v in pairs (kill_counter.rewards) do
		if kill_counter.counters[team] >= k then -- if team has more kills than what's required for reward
			for _,id in pairs (player(0,"team"..team)) do
				kill_counter.rewards[k]()
			end
		end
	end
end
addhook("second","kill_counter.second")
function kill_counter.second()
	for _,id in pairs (player(0,"table")) do
		if kill_counter.players[id].rechargables[1] then
			kill_counter.players[id].duration = kill_counter.players[id].duration + 1
			for k,v in pairs (kill_counter.players[id].rechargables) do
				if kill_counter.players[id].duration % v[1] == 0 then
					parse("equip "..id.." "..v[2])
				end
			end
		end
	end
end	
addhook("spawn","kill_counter.spawn")
function kill_counter.spawn(id)
	parse("setmaxhealth "..id.." "..kill_counter.players[id].stats.hp)
	parse("sethealth "..id.." "..kill_counter.players[id].stats.hp)
	parse("setarmor "..id.." "..kill_counter.players[id].stats.ap)
	parse("speedmod "..id.." "..kill_counter.players[id].stats.spd)
	if kill_counter.players[id].items[1] then
		for _,v in pairs (kill_counter.players[id].items) do
			parse("equip "..id.." "..v)
		end
	end
end
edited 2×, last 18.12.16 01:32:41 am
can you bring me something to pack it and bring it to server admin? otherwise i dont think he'd understand all this very well ahha
Thank you so much for your work!! @
Rainoth: -PCS
No problem. Good luck with running your tournament.
even if it doesnt bring bonuses it would be nice to see the kills per team
Rainoth: Hey it's unplayable, there's a huge problem with timer... because when you restart.. (for any reason) it starts the timer.. when you restart again it freezes it... forever
so it works but it needs quick fix... some new commands.
To start the tournament.. it should be
!startround1
to start round 2... or something like that(althought it should be automatic... there might be problems so time of round 1 ye should be frozen )
Also how come there's always fow? it's supposed to be fow 0 and sometimes(like each for 2 min each 5 min) it's got fow to make it more fun/diverse.. anyways dont worry about this because i probably asked somehow for this.
or ff each 15 secs? should be like each 3 min
!startround2 (start decreasing it)
!restarttimer
Thanks a lot!
I'd appreciate the roles tho.. but attacker should have that gas grenade each 30 secs
2. All the scripts were either in test state or untested. That's why I asked you to test every single one of them and you gave a green flag on every one of them. So the way I understood it was that you tested those scripts and they were fine.
You can change variables if you have a problem with how long diversifiers take.
Try to ask others if you can. I'm currently in my exam period so when I'm not studying, I'm doing my own stuff. I'll see what I can do but I can no longer promise anything.
Rainoth: I will wait for that fix because otherwise we cant start the tournament, thank you for everything i really appreciate it.!
Andrez: I suggest to use timeline, which will show the current stage of the game. 


Offline