Forum

> > CS2D > Scripts > PCS Construction 3on3 tournament-Request for US
Forums overviewCS2D overview Scripts overviewLog in to reply

English PCS Construction 3on3 tournament-Request for US

30 replies
Page
To the start Previous 1 2 Next To the start

old Re: PCS Construction 3on3 tournament-Request for US

Rainoth
Moderator Off Offline

Quote
End of semester, lots of work. Finished all my programs now so I'll get back to helping you. No worries.

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
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 02:32:41 am

old Re: PCS Construction 3on3 tournament-Request for US

Andrez
User Off Offline

Quote
@user 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

old Re: PCS Construction 3on3 tournament-Request for US

Rainoth
Moderator Off Offline

Quote
1. Nothing you wrote on the thread's first post told me that you want it the way you want it right now.
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.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview