Forum

> > CS2D > Scripts > 2 very easy scripts
Forums overviewCS2D overview Scripts overviewLog in to reply

English 2 very easy scripts

18 replies
To the start Previous 1 Next To the start

old 2 very easy scripts

REMOVED
BANNED Off Offline

Quote
I'm making a map and i need 2 scripts.
1:TT can't attack CT and TT can't attack TT ,but they are'nt god
2:When breakable block is destroyed with name S12 set all player's pos to xxx

old Re: 2 very easy scripts

KagamineLen
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook('Map', '_EasyScript')
parse (ct, DontAttack_T)
parse (T, DontAttack_ct)

return 99999999
end

addhook('when', 's12')
if variable=s12 == dead
the parse('setpos all xxx xxx')

return 99999999
end
end
end

Lol lua script

old Re: 2 very easy scripts

EnderCrypt
User Off Offline

Quote
so failed script... cant be more weird, really...


ArthurSmith please stop posting lots of trash scripts everywhere

old Re: 2 very easy scripts

loldlold123
User Off Offline

Quote
user KagamineLen has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook('Map', '_EasyScript')
parse (ct, DontAttack_T)
parse (T, DontAttack_ct)

return 99999999
end

addhook('when', 's12')
if variable=s12 == dead
the parse('setpos all xxx xxx')

return 99999999
end
end
end

Lol lua script

--->>>EPİC FAİL<<<---
1
2
3
4
5
6
7
addhook("hit","hhhit")

function hhhit(id,src)
if (player(id,"team")==1 or player(id,"team")==2) and player(src,"team")==1 then
return 1
end
end
(its for cant attack thing,2. thing coming in 5minute...i'll edit when its finished)

1
2
3
4
5
6
7
8
9
addhook("break","headhunter")

function headhunter(x,y)
if ((x==x and y==y) or (x==x and y==y)) then --breakable position you dont need name,you can use or for more breakable teleport
for _,id in ipairs(player(0,"table")) do
parse("setpos "..id.." x y")
end
end 
end
Sory i was confused right hook break
if you need more help, - Email address (only visible with login) -
edited 6×, last 11.08.11 10:49:16 pm

old Re: 2 very easy scripts

REMOVED
BANNED Off Offline

Quote
LUA ERROR: maps/coop_levels.lua:1: ')' expected near 'hhhit'


LUA ERROR: Cannot add 'headhunter' to hook 'breakable' (hook does not exist)!

old Re: 2 very easy scripts

Necr0
User Off Offline

Quote
omg, no its:
Quote
break(x,y)                              on breaking a breakable entity
-x: breakable x (tiles)
-y: breakable y (tiles)

old Re: 2 very easy scripts

REMOVED
BANNED Off Offline

Quote
Breakable works ,but that first:
LUA ERROR: maps/testmap.lua:6: '=' expected near 'end'


P.S: Can i make from them one script or make more breakable teleport?

old Re: 2 very easy scripts

Homam
User Off Offline

Quote
HeaDHunTeR_Tr Code has written
return1

Are you sure this works? I mean, you should have put it like thiz;
1
return 1
But, well, I don't know if return1 works..

old Re: 2 very easy scripts

Flacko
User Off Offline

Quote
user Homam has written
HeaDHunTeR_Tr Code has written
return1

Are you sure this works? I mean, you should have put it like thiz;
1
return 1
But, well, I don't know if return1 works..


Of course return1 won't work.
Lua actually thinks that return1 is an identifier in this case.

old Re: 2 very easy scripts

loldlold123
User Off Offline

Quote
user loldlold123 has written
user KagamineLen has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook('Map', '_EasyScript')
parse (ct, DontAttack_T)
parse (T, DontAttack_ct)

return 99999999
end

addhook('when', 's12')
if variable=s12 == dead
the parse('setpos all xxx xxx')

return 99999999
end
end
end

Lol lua script

--->>>EPİC FAİL<<<---
1
2
3
4
5
6
7
addhook("hit","hhhit")

function hhhit(id,src)
if (player(id,"team")==1 or player(id,"team")==2) and player(src,"team")==1 then
return 1
end
end
(its for cant attack thing,2. thing coming in 5minute...i'll edit when its finished)

1
2
3
4
5
6
7
8
9
addhook("break","headhunter")

function headhunter(x,y)
if ((x==x and y==y) or (x==x and y==y)) then --breakable position you dont need name,you can use or for more breakable teleport
for _,id in ipairs(player(0,"table")) do
parse("setpos "..id.." x y")
end
end 
end
Sory i was confused right hook break
if you need more help, - Email address (only visible with login) -


i edit return 1 and add more break teleport

old Re: 2 very easy scripts

REMOVED
BANNED Off Offline

Quote
HeaDHunTeR_Tr has written
addhook("hit","hhhit")

function hhhit(id,src)
if (player(id,"team")==1 or player(id,"team")==2) and player(src,"team")==1 then
return 1
end
end


Don't works

Can you make that?
1 breakable 1 teleport
edited 1×, last 11.08.11 11:24:58 pm

old Re: 2 very easy scripts

Apache uwu
User Off Offline

Quote
lol

Okay so all players are invincible...and when you break the object 's12' (Breakable) in the map editor it should teleport everyone to a certain location? Seriously your English couldn't be any worse.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
addhook("hit","_hit")
addhook("break","_break")

breakable={}

for tmpx=0,map("xsize") do
	for tmpy=0,map("ysize") do
		if entity(tmpx,tmpy,"name")=="s12" then
			breakable[tmpx..tmpy]=true

function _hit()
--doesn't matter ignore all damage
return 1
end

function _break(x,y)
	if breakable[tmpx..tmpy]~=nil then
		for _,id in player(0,"tableliving") do
			parse("setpos "..id.." 100 100")
		end
		breakable[tmpx..tmpy]=nil
	end
end

old Re: 2 very easy scripts

REMOVED
BANNED Off Offline

Quote
I have that CT and TT lua,but HeaDHunTeR_Tr
can you make 1 teleport for 1 breakable? I want do 20+ breakables.

old Re: 2 very easy scripts

EngiN33R
Moderator Off Offline

Quote
user KagamineLen has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook('Map', '_EasyScript')
parse (ct, DontAttack_T)
parse (T, DontAttack_ct)

return 99999999
end

addhook('when', 's12')
if variable=s12 == dead
the parse('setpos all xxx xxx')

return 99999999
end
end
end

Lol lua script

You should be banned for either:
1. Honest stupidity
2. Deliberate spamming

@topic
From the most unreadable and uncomprehendable description of what is needed I with great difficulty have deducted that you'd like all the players to be invulnerable and when a breakable 's12' is destroyed all the players should be teleported to a position on the map, which is in my mind very similar to what TC thought. So his script should exhaustively satisfy your needs.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview