Forum

> > CS2D > Scripts > Anti-Bot score farm
Forums overviewCS2D overview Scripts overviewLog in to reply

English Anti-Bot score farm

4 replies
To the start Previous 1 Next To the start

old Anti-Bot score farm

Casper-
User Off Offline

Quote
I've been trying that when you kill a bot, you don't get the score for killing that bot. So, that the usgn rank wouldn't be full of bot-spawn killer users and such.

This was my try. I honestly don't know what I'm doing here.

1
2
3
4
5
6
7
8
addhook("kill","noBotScoreFarm")
function noBotScoreFarm(killer,victim,weapon,x,y,killoid,assistant)
	local scoreSet = player(id,"score") - 1
	if player(id,"bot") == true then
	parse("setscore "..id.." "..scoreSet.." ")
	msg("works")
	end
end

I feel like I need to call the 'victim' parameter but don't know how to detect if its a bot or not.

old Re: Anti-Bot score farm

Yunu
User Off Offline

Quote
The id value is nil in your script. Change victim to id on line 2 or use my script:
1
2
3
4
5
6
addhook("kill","kill_hook")
function kill_hook(killer, victim, weapon, x, y, object, assistant)
	if player(victim,"bot") then 
		parse("setscore "..killer.." "..(player(killer,"score") - 1))
	end
end

old Re: Anti-Bot score farm

T-69
User Off Offline

Quote
Hehe, you're too late. Many people have already played the awesome "grinder" map.

old Re: Anti-Bot score farm

Casper-
User Off Offline

Quote
After I've found some motivation to do this and time, here it is.
This time with customkill "X"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
addhook("spawn","isBotSpawn")	
function isBotSpawn(id)

	if player(id,"bot") == true then
	parse ("setmoney "..id.." 16000")
	parse ("speedmod "..id.." -5")
	parse ("setarmor "..id.." 0")
	parse ("setmaxhealth "..id.." 250")
	parse ("equip "..id.." 4")
	parse ("equip "..id.." 24")
	end
end

addhook("hit","ifBotHealth")
function ifBotHealth(id)

	if player(id,"bot") == true then
	if player(id,"health") < 175 then
	parse("customkill 0 X "..id.." ")
	end
	end
end

I've set their hp to 250 so they don't die accidentally by a player.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview