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 2120 121 122338 339 Next To the start

old Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Quote
zastana has written
hey blazingxx could u, make another script? new script? warcraft new script? please u rock dude, but if u wanna make the warcraft script u wanna make some skins look like the player at warcraft. please make it!!!

I'm making other mod right now.

As Starkkz said, there is already WC mod by MiroslavR.

old How to add NPC's in scripts??

cendol94
User Off Offline

Quote
I already finished my HALF-LIFE2 map and a suitable script
but it lacks of enemies.I would like to add npc's inside,where maybe it represent civil protection or somethin.
Any ideas?

old Re: Lua Scripts/Questions/Help

lol93
User Off Offline

Quote
hi guys i have downloaded lua for the second time, when i wass scaning it says: Fake alerd.AKUA name of file: LuaForWindows_v5.1.3-30.exe
this isnt a virus?but why is my virus scaner saying iits a virus(norman)?

old Re: Lua Scripts/Questions/Help

lol93
User Off Offline

Quote
what u meen? i wanne make lua script can u make lua whit cs2d o.o?
i know u dont need to download lua for a server, but if i wanne make a script then i need lua

old Re: Lua Scripts/Questions/Help

DaveRodec
BANNED Off Offline

Quote
cendol94 has written
I already finished my HALF-LIFE2 map and a suitable script
but it lacks of enemies.I would like to add npc's inside,where maybe it represent civil protection or somethin.
Any ideas?


add bots, freeze them with speedmod -50.
and check if they are bots with player(id,"bot")

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
lol93 has written
what u meen? i wanne make lua script can u make lua whit cs2d o.o?
i know u dont need to download lua for a server, but if i wanne make a script then i need lua


You don't.
Lua is a scripting language and it's compiled into Lua bytecode when CS2D executes your script.
You only need the Lua binaries if you are going to make a C/C++ project that uses the lua libraries.

old Re: Lua Scripts/Questions/Help

CarbonLord
User Off Offline

Quote
Hi, i have got a little question. Can you do a script for me, that when you'll destroy random turret, you earning 50exp, and when youll destroy TT turret you earning 100 exp?
And i please for experience script. I lost it.

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
Here is Level and Experience Function.
Quote
mod.level = initArray(32)
mod.exp = initArray(32)

addhook("kill","lvl")
function lvl(id,victim,weapon,y,x)
mod.exp[id]=mod.exp[id]+250 -- get 250 exp after kill enemy
     if (mod.exp[id]>=5000) then -- after get 5000 exp, player will lvl up
          mod.level[id]=mod.level[id]+1 -- +1 player level
          mod.exp[id] = 0 -- Reset experience
          msg2(id,"©000255000Level Up!@C") -- Level Up Message
          parse('sv_sound \"Level Up Sound\"')
     end
-- Here add HUDTXT To update level text.
end

old Re: Lua Scripts/Questions/Help

cendol94
User Off Offline

Quote
Starkkz has written
download npc mod by mat5b.


Thanks dude!I succesfully add some civil protection inside!
BUT,i got another problem,How to give certain player with certain type of weapon.I mean,A ZOMBIE should give a claw,and A MAD POLICE should hold a gun.Anyone can suggest me anything?Im noob in scripting.

old Re: Lua Scripts/Questions/Help

CmDark
User Off Offline

Quote
This is taking a while ~
anyone wanna help with my lua script instead of the map
edited 1×, last 19.12.09 09:36:51 pm

old Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Quote
cendol94 has written
Thanks dude!I succesfully add some civil protection inside!
BUT,i got another problem,How to give certain player with certain type of weapon.I mean,A ZOMBIE should give a claw,and A MAD POLICE should hold a gun.Anyone can suggest me anything?Im noob in scripting.

place an NPC with a claw,another one with gun... etc
(you'd have to create the NPC images)

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Editorman has written
Does anybody knows what is the hook and function that makes the player Explode when he/she dies?


Use the die hook and make an explosion in the x and y coordinates where the player died.

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
Here is
1
2
3
4
addhook("die","dies")
function dies(id,killer,weapon,x,y)
parse("explosion "..x.." "..y.." <size> <damage> "..id)
end

old Re: Lua Scripts/Questions/Help

cendol94
User Off Offline

Quote
[ENTITY]
- entity(tileX,tileY,"value")     Return a value of an entity:
                    exists, typename, type, name,
                    trigger, state, int0, int1, int2,
                    int3, int4, int5, int6, int7,
                    int8, int9, str0, str1, str2,
                    str3, str4, str5, str6, str7,
                    str8, str9
                    (int0-9 and str0-9 are used
                    for entity settings and are
                    different for each entity type)


Anyone could help me with this code,
HOW to use it.I understand everything,BUT the prob is at the "value" thingy.
To the start Previous 1 2120 121 122338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview