Forum

> > CS2D > Scripts > Class script--request
Forums overviewCS2D overview Scripts overviewLog in to reply

English Class script--request

4 replies
To the start Previous 1 Next To the start

old Class script--request

DX
User Off Offline

Quote
Can someone make me up Class script with two different teams and the bot selects the class randomly, I tried editing classes.lua but it always fails can you guys build it for me

old Re: Class script--request

Bowlinghead
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- your generic class code 
--[[
	...
]]--
amountOfClasses = 12

addhook("spawn","mySpawn")
function mySpawn(id)
	if (player(id,"bot")) then
		rand = math.random(1, amountOfClasses);	
		if (rand == 1) then
			-- corresponding stats to the first class
			parse("speedmod "..id.." 100")
			return 50, 70; 
		elseif (rand== 2) then
		-- corr. stats to the second class
		elseif (rand==3) then
		-...		
		end
	end

end
Happy copy& pasting
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview