Ranking
Original Post
Basic example...
Go to the data folder then to scripts.

Make a new text file called "first_script.lua".

Add this:

function test()
		run_cmd("echo Stop clicking us! It hurts!")
end
add_hook("player_select","clicky",test)
Save. Open up Toribash and go to the "scripts" section in the menu and choose "first_script"

Click uke and tori!

Edit: made this injury type counter...

function test()
			player_info = get_player_info(1)
			run_cmd("echo injury: " .. player_info.injury)
end
add_hook("enter_freeze", "clicky", test)
An idea here, is someone could make some if statements, and if your score is X - display a message.
don't unban, he has hard coded userid bypasses everywhere.
Re: Basic example...
Hah, pretty nice. Y'know, I kinda want to try this .lua stuff. Do you think you, SSJokker, or anyone else experienced in .lua stuff would be interested in making a tutorial?
JESUS TAP DANCING CHRIST
Re: Basic example...
Originally Posted by sorrow
What we need now is people from garys mod all of them are prety epic at lua.

True that ^_^
don't unban, he has hard coded userid bypasses everywhere.
Re: Basic example...
what i need is a registration code, i can't use the scripts because I'm not registered. When I do become registered, I'm gonna have a shot at this. ;)
Re: Basic example...
Originally Posted by veb
Originally Posted by sorrow
What we need now is people from garys mod all of them are prety epic at lua.

True that ^_^

Word. Garry's Mod got me into Lua.

I'll be making a tutorial today.

Also, I can make a better script, if I can play with rectangle alpha's. If I can, on every good hit (bigger than x), you get one of those anime-style flashy screens. Maybe a tremble too. It's easy once you get the hang of it.

*posts bot*
Originally Posted by veb View Post
Go to the data folder then to scripts.

made this injury type counter...

function test()
			player_info = get_player_info(1)
			run_cmd("echo injury: " .. player_info.injury)
end
add_hook("enter_freeze", "clicky", test)

What are we supposed to do with this script after we run it in Toribash?
R.I.P. Billy Mays
Originally Posted by Person View Post
What are we supposed to do with this script after we run it in Toribash?



...See what it does?

It displays injuries in the chat area. Not that much to it.
I don't see anything happening in the chat area. I must be doing something wrong.
R.I.P. Billy Mays
Originally Posted by Person View Post
I don't see anything happening in the chat area. I must be doing something wrong.

Are you sure you loaded the script, then hit single-player and played with Uke?