English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 240 241 242 ... 338 339 Next To the start
26.08.10 12:31:49 pm
Up
Soja1997
User
Offline Off
i from poland and I do not understand you very ;(;(
i use translate i must got script
26.08.10 02:18:47 pm
Up
Tenaika
User
Offline Off
Ah, fixed my script now. Thanks Jermuk. cookie
Nothing to see here, move along.
26.08.10 04:09:30 pm
Up
Evool
User
Offline Off
Fehuziom has written:
@Evool:

Code:
1
2
3
4
5
6
7
8
9
addhook("usebutton","use")
function use(id,x,y)

     if (x==X POSITION) and (y==Y POSITION) then
          if player(id,"usgn")==USGN PLAYER then
               parse("trigger DOOR NAME")
          end
     end
end


I dont test this you must write only x and y position , usgn , and door name...


It doesnt work What is bad? I tried all. Please help me, that script is very important for me and my clan.
26.08.10 04:49:04 pm
Up
Fehu
User
Offline Off
Evool has written:
Fehuziom has written:
@Evool:

Code:
1
2
3
4
5
6
7
8
9
addhook("usebutton","use")
function use(id,x,y)

     if (x==X POSITION) and (y==Y POSITION) then
          if player(id,"usgn")==USGN PLAYER then
               parse("trigger DOOR NAME")
          end
     end
end


I dont test this you must write only x and y position , usgn , and door name...


It doesnt work What is bad? I tried all. Please help me, that script is very important for me and my clan.

show me error, i in phone already...
IMG:http://www.flashflashrevolution.com/profile/newsiggy/Fehu/stardust/0/0-1-2-3-4-5.png
26.08.10 05:54:08 pm
Up
Tenaika
User
Offline Off
Alright, got a new problem...
"attempt to index global 'agility' (a number value)".

Part of the code:
Code:
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
if sample==nil then sample={} end
sample.sur={}

function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end

agility=initArray(1000)
health=initArray(1000)
crafting=initArray(1000)
agility = 0
health = 0
crafting = 0

addhook("serveraction","actions")
addhook("menu", "menus")
function actions(id,sact)
     if(sact == 2) then
          menu(id, "Skills Menu, +1 ROFLPWN, +1 Agility, +1 Health, +1 Crafting")
     end
end

function menus(id, title, button)
     if (title=="Skills Menu") then
          if(button==1) then
          end
          if(button==2) then
               if (points[id]>=1) then
                    agility[id]=agility[id]+1
                    points[id]=points[id]-1
               else
               msg2(id,"You don't have enough Skill Points!")
               end
          end
          if(button==3) then
          end
          if(button==4) then
          end
     end
end

addhook("join","updatehud")
function updatehud(id)
     for id=1,32 do
          if player(id,"exists") then
               parse('hudtxt2 '..id..' 1 "©255255255Skills Points:  '..points[id]..'" 17 210')
          end
     end
end

addhook("spawn","start")
function start(id)
     for id=1,32 do
          if player(id,"exists") then
               points[id]=points[id]+3
               updatehud(id)
          end
     end
end


Please note that I am novice at Lua.
Thanks for the help in advance!
Nothing to see here, move along.
26.08.10 06:03:54 pm
Up
YellowBanana
BANNED
Offline Off
agility=initArray(1000)
health=initArray(1000)
crafting=initArray(1000)
agility = 0
health = 0
crafting = 0

all i'm saying..
26.08.10 06:21:25 pm
Up
Tenaika
User
Offline Off
Quote:
Please note that I am novice at Lua.

Haha, that didn't help a bit.
Nothing to see here, move along.
26.08.10 06:47:40 pm
Up
RyceR
User
Offline Off
How to make it:
If i say words "lol" i have on me emoticon(file - gfx/emotes/lol.png") like in weiwen script.
IMG:http://img704.imageshack.us/img704/4043/userbargimp.png
26.08.10 06:58:12 pm
Up
Evool
User
Offline Off
Fehuziom, sorry, script work! Its my bug...

Admin/mod comment:

pl removed. english and german only please. other languages are not tolerated in any way! /DC
26.08.10 07:44:36 pm
Up
DeNizAnT
User
Offline Off
Hi all,
I want a lua script,just look the pictures i want point A,B,C and D.IMG:http://pic1.resimupload.com/r6/resim_256567573.jpg
IMG:http://pic1.resimupload.com/r9/resim_996900720.jpg


Sorry for my bad English
26.08.10 10:20:29 pm
Up
Vectarrio
User
Offline Off
What is minimum amount for cs2d cmd effect ?
If i set 0 or 1, it still does many!
26.08.10 10:23:32 pm
Up
Soja1997
User
Offline Off
vectar can you give me this script with objectkill
26.08.10 10:31:34 pm
Up
Vectarrio
User
Offline Off
Soja1997 has written:
vectar can you give me this script with objectkill

What script? With boss?
26.08.10 10:39:20 pm
Up
Soja1997
User
Offline Off
yea
26.08.10 11:18:43 pm
Up
Vectarrio
User
Offline Off
ok.
Dynwall name: bosskilled
npc name: bosscreate, don't spawn in the start

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("trigger","npccreated")
addhook("objectkill","npckilled")

function npccreated(name)
     local ot
     if name=="bosscreate" then
          ot=object(0,"table")
          bossid=#ot
     end
end

function npckilled(id)
     if id==bossid then
          parse("trigger \"bosskilled\"")
     end
end
26.08.10 11:30:33 pm
Up
murilogc
User
Offline Off
@beckerchen has written:
so you want that the player (if hes a medic / hotelowner ) gets telepotet to a point medics/hotelowners?
Then i need the xtile and the ytyle for the special places. MEDIC 456 346 HOTEL 784 235.


@beckerchen has written:
You Don't want a command !goshop ??


no , because have 6 shops , but shop owners , win 5k and one weapon if 5 , 5 min , and msg YOU WIN ONE WEAPON and shopowners , can drop armors , if txt !droparmor .




@beckerchen as written:
how long should a day go? ~5minutes?

YES
26.08.10 11:37:25 pm
Up
archmage
User
Offline Off
I have a question about Lua (without CS2D). What does # do at the beginning of a file?
We must secure the existence of our people and a future for white children. 14/88
26.08.10 11:56:11 pm
Up
Vectarrio
User
Offline Off
count of all parts of table after "#"
27.08.10 12:03:56 am
Up
archmage
User
Offline Off
No I know that, but I mean at the first line of a file it does something else.
We must secure the existence of our people and a future for white children. 14/88
27.08.10 02:07:46 am
Up
RAVENOUS
BANNED
Offline Off
hey there, I got a problem with this code, somehow it's not working, I can't understand it...

Code:
1
2
3
4
5
6
7
8
addhook("say","say_commands")
function say_commands(id,txt)
          if(!kick==string.sub(txt,1,5))then
          tt=tonumber(string.sub(txt,6,7))
               parse("kick "tt)
          end
     end
end


Would be great if someone could help me.

In fact, the Error is at line 3 - he doesn't expect "!"...
edited 1×, last 27.08.10 12:52:50 pm
"A work of art is the unique result of a unique temperament." - Oscar Wilde
To the start Previous 1 2 ... 240 241 242 ... 338 339 Next To the start