Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2140 141 142338 339 Next To the start

old Re: Lua Scripts/Questions/Help

silnik
User Off Offline

Quote
Hello. I have a problem with the script. How to make the fellows made up the barbed wire.
I like to do guy lifted the mines on each cell?

old Re: Lua Scripts/Questions/Help

silnik
User Off Offline

Quote
Do u played a Pacman Modded server?

In this server is a Barbed Wire Guy and Darkness
How to make this Barbed Wire Guy and Darkness

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
yea of cource i play that server , you want the script who run on that server .. ok its so Hard to understand i mean very very hard to me . you can ask these Guyes (PRO with lua script):
>DC
>Leegao
>Blazzingxx
>Flacko
>TKD
and many others .

old Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Quote
there is a script to build unlimited laser mines by Linux Guy
if you want it mines not laser mines i think you have only to change the id of the weapon.
here is the script :Click here

old Re: Lua Scripts/Questions/Help

KimKat
GAME BANNED Off Offline

Quote
Starkkz has written
(Post here.)
"wtf player(id,"51") is not value.
you see on sys/lua/info.txt

and here is it.."
If think you saw it wrong mate, I think you mean this line where the number is highlighted on and no that is not a player id it's the weapon id.
Spoiler >
Even though I'm pretty poor on lua scripting knowledge I at least know this.

old Re: Lua Scripts/Questions/Help

DoP3
User Off Offline

Quote
TicTac has written
Who can tell me script when player step on tile and he got equiped? with ak47 or something ?

i v got real bad scripting skillz but ill giv ei t a try:
1
2
3
4
addhook(walk.equipwalk)
 function(walk.equipwalk)
  if(player id ) walk tile([u]position x y[/u])
    parse (equip player id [u]87 78 98[/u])
i know its totally wrong but its just a try, can anyone correct me?or help me with this
?

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
TicTac has written
Who can tell me script when player step on tile and he got equiped? with ak47 or something ?


Ok, I made one example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
_parses = {[[equip]],[[setweapon]],[[sv_msg2]]}

_weapon = 45

_your_x = 14
_your_y = 14

local function blazz_parse(cmd,p1,p2,p3)
	local p, n
	p = [[ ]] ; n = [[ ]]
	if p1 then p = p..p1..n end
	if p2 then p = p..p2..n end
	if p3 then p = p..p3..n end
	parse(cmd..n..p)
end

addhook([[movetile]],[[p_tile_equip]])
function p_tile_equip(p_,_x,_y)
	if (_x == _your_x and _y == _your_y) then
		blazz_parse(_parses[1],p_,_weapon)
		blazz_parse(_parses[2],p_,_weapon)
		blazz_parse(_parses[3],p_,[[You Get Laser For Being In Secret Spot!@C]])
	end
end
edited 3×, last 20.01.10 06:04:19 pm

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
You could use this to accept a variable number of arguments:
1
2
3
4
5
6
7
local function blazz_parse(cmd,...)
	local p = " "
	for i,v in ipairs(arg) do
		p = p..v.." "
	end
	parse(cmd..p)
end

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
Yes, Indeed. Thanks.
I'm using similar stuff on CSH config functions parses. I should show details soon.
Some of thanks goes for Leegao.

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
-GaS- has written
TicTac has written
Who can tell me script when player step on tile and he got equiped? with ak47 or something ?

i v got real bad scripting skillz but ill giv ei t a try:
1
2
3
4
addhook(walk.equipwalk)
 function(walk.equipwalk)
  if(player id ) walk tile([u]position x y[/u])
    parse (equip player id [u]87 78 98[/u])
i know its totally wrong but its just a try, can anyone correct me?or help me with this
?


item 98 does not exist.
Click Here to see the weapons.

1
2
3
4
5
6
7
8
9
10
xpos = [b]type here the position "X" where the player walk.[/b]
ypos = [b]type here the position "Y" where the player walk.[/b]

addhook("movetile","equipwalk")
function equipwalk(id,x,y)
	if (x==xpos and y==ypos) then
		parse("equip "..id.." 87")
		parse("equip "..id.." 78")
	end
end

old Re: Lua Scripts/Questions/Help

BrunoRZ
User Off Offline

Quote
Starkkz has written
addhook("use","weaponshop")
function use(id,event,data,x,y)
if (event==100) then
if (x==trigger 10) and (y==trigger 10) then
if player(id,"money")>=400 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..player(id,"money")-400)
else
msg2(id,"Insuficcient funds!@C")
end
end
end



This script gives error, > ')' expected near 10

How should i fix it ??
edited 1×, last 20.01.10 11:13:36 pm

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
BrunoRZ has written
Starkkz has written
addhook("use","weaponshop")
function use(id,event,data,x,y)
if (event==100) then
if (x==trigger 10) and (y==trigger 10) then
if player(id,"money")>=400 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..player(id,"money")-400)
else
msg2(id,"©255000000Tá faltano grana!@C")
end
end
end



This script gives error, > ')' expected near 10

How should i fix it ??
     ')' expec


do NOT put trigger 10 only put the value.
use notepad++ it help you

here is fixed.

Spoiler >

old THANKS TO ALL OF YOU

BrunoRZ
User Off Offline

Quote
IT WORKED :DDD

how you guyz read, its a weapon shop, i want put more weapons then HE
so, to do another trigger, just change X and Y ??
(i can change the money loss, and the equip too right?)
To the start Previous 1 2140 141 142338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview