Forum

> > CS2D > Scripts > Barbed wire
Forums overviewCS2D overview Scripts overviewLog in to reply

English Barbed wire

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

old Re: Barbed wire

DannyDeth
User Off Offline

Quote
He wants to be teleported backwards after walking into barbed wire, ie turning the barbed wire into a wall.

old Re: Barbed wire

Dynamite07
User Off Offline

Quote
Like tibia mod when you go to water you are teleported back but with barbed wire. You can try the script of tibia and change tile id for what you want. Place dynWall with Floor+Tile and under the dynWall put the tile what teleport you back and you can put barbed wire in your tile and change Tile/Frame# to barbed wire.

old Re: Barbed wire

Alistaire
User Off Offline

Quote
It's actually bloody easy.

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
function array(v)
	local a = {}
	for k = 1, 32 do
		a[k] = v
	end
	return a;
end

plr = {}
plr.x = array(0)
plr.y = array(0)

addhook('move', '_moveFunc')

function _moveFunc(id, x, y)
	local tilex = math.floor(x / 32)
	local tiley = math.floor(y / 32)
	if entity(tilex, tiley, 'exists') then
		if entity(x, y, 'type') == 1 then
			parse('setpos '..id..' '..plr.x[id]..' '..plr.y[id])
		end
	end
	plr.x[id] = x
	plr.y[id] = y
end
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview