Files

> > CS2D > Lua Scripts > Yet another simple class
Files overviewCS2D overviewLua Scripts overview

English Yet another simple class >

16 comments2 kb, 474 Downloads

old Yet another simple class

Kisses
User Off Offline

I wrote this script out of boredom. It's very simple class script aimed for beginners. Very well commented.


Example of usage
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
dofile("sys/lua/wrapper.lua")
dofile("sys/lua/yasc.lua")

yasc.add("Assault", function(id)
	setmaxhealth(id, 75)
	sethealth(id, 75)
	equip(id, 54)
	equip(id, 30)
	setweapon(id, 30)
	speedmod(id, 5)
end)

yasc.add("Engineer", function(id)
	equip(id, 74)
	equip(id, 24)
	setweapon(id, 24)
	speedmod(id, 0)
end)

yasc.add("Defender", function(id)
	setmaxhealth(id, 150)
	sethealth(id, 150)
	equip(id, 40)
	setweapon(id, 40)
	speedmod(id, -5)
end)
Approved by Sparty

Download Download

2 kb, 474 Downloads

Comments

16 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Talented Doge
User Off Offline

god defender only 150 hp @_@
I like it!

old

AlcatrazZ
BANNED Off Offline

not bad
I like it!

old suck

redown123
User Off Offline

that to me suckwhen im use that script no class!

old

BcY
Reviewer Off Offline

oh.really great
I like it!

old

Avo
User Off Offline

I don't need it, too, but nice comments for newbies.
I like it!

old

Infinite Rain
Reviewer Off Offline

Nice! Hardcoded script lol.
Very nice for beginners
I like it!

old

Happy Killer
BANNED Off Offline

I don't need this...
×

old

FrozerBlue
User Off Offline

okay i download and see

old

Mechanolith
User Off Offline

It doesn't change anything by downloading or not.
You got a preview on the description.

old

omg
User Off Offline

frozer, u obviously dont know much about coding
also, uve been registered for 1 day. i hardly think u deserve to critique much
I like it!

old

FrozerBlue
User Off Offline

classes.lua :S you see you lua/samples file

Stolen

old

omg
User Off Offline

oh i like the main script; adding classes is very easy
I like it!

old

Kisses
User Off Offline

@user omg:
Only the example script uses some of its functions like setmaxhealth() and equip(). I find it more stylish than using parse("setmaxhealth " .. id .. " 75").
edited 1×, last 14.06.12 06:28:34 pm

old

omg
User Off Offline

why do u use dofile("sys/lua/wrapper.lua")?
I like it!
To the start Previous 1 Next To the start