Does redstone work with LuaCraft?
I imagine this is just minecraft with Lua bindings, but most other custom server softwares don't have redstone!
[QUOTE=DylanWilson;35634321]Does redstone work with LuaCraft?
I imagine this is just minecraft with Lua bindings, but most other custom server softwares don't have redstone![/QUOTE]
This is a modification on the vanilla minecraft server. Everything that works in vanilla minecraft works in LuaCraft.
[QUOTE=thomasfn;35634747]This is a modification on the vanilla minecraft server. Everything that works in vanilla minecraft works in LuaCraft.[/QUOTE]
Danke sir!
also, you guys should update this:
[url]http://www.minecraftwiki.net/wiki/Custom_servers/LuaCraft[/url]
looking over this makes it look like some failed minecraft classic plugin, even the referenced links are old
[QUOTE=DylanWilson;35635836]Danke sir!
also, you guys should update this:
[url]http://www.minecraftwiki.net/wiki/Custom_servers/LuaCraft[/url]
looking over this makes it look like some failed minecraft classic plugin, even the referenced links are old[/QUOTE]
Updated that, found no place to put the client though. The MCWiki is a damn mess :x
Neat !
By the way is it just me or a majority of hooks are broken ?
Something simple like this :
[QUOTE]hook.Add("entity.attackedentity", "OnAttacked", function(ent, victim, damage, damagetype)
if ent == LocalPlayer() then
victim:AddVelocity(Vector(0,0,10))
end
end)[/QUOTE]
dosen't work anymore...
[QUOTE=Fleskhjerta;35825154]Neat !
By the way is it just me or a majority of hooks are broken ?[/QUOTE]
Did you try to debug with print? I know that Velocity acts weird.. I'll check it out.
Velocity works fine...
I already tried : LocalPlayer():AddVelocity(Vector(0,0,10))
I flew into the air as excepted.
console.command hook dosen't work anymore
player.startsneak also dosen't work
and many more hooks...
The con command hook was changed to client.command to match server.command.
We really need to do some something about documenting hooks.
I took a look at the client.command hook, but it seems it dosen't supports arguments.
It returns a plain text of what you wrote in the console.
[img]http://puu.sh/t9tZ[/img]
Changed the hook to provide the arguments table and the raw string.
[QUOTE=BlackAwps;35841817][img]http://puu.sh/t9tZ[/img]
Changed the hook to provide the arguments table and the raw string.[/QUOTE]
Ninjerr
Anywho:
Added !(not), !=, <<, >>, |, ||, &, and &&.
More glua like!
[img]http://gyazo.breakpointservers.com/edb92bc32407c58f8d4436dd8b796edc.png[/img]
so whats the deal with console commands serverside, did you guys change how they work?
No
Just a question, is there anyway to detect whenever you are aiming at the specified block/entity/mob ?
Please update the wiki guys, Can't wait to use the new input. hooks
[QUOTE=BlackAwps;35851643]No[/QUOTE]
I was thinking of networking the console commands like how its done in source, so on the server there would be a player argument. Would it be worth it?
[QUOTE=ruarai;35859535]I cant find anything on the wiki and its starting to get annoying. How do I print text? I found that out by opening the ESP addon. How do I change the font though?[/QUOTE]
You would have to make your own font PNG if you wanted to have a different looking font and create it via surface.CreateFont( "/path/to.png" )
I did some in-code documentation so hopefully we will be able to reorganize and update the wiki soon.
Anyway, while playing with some friends on a server I made a pretty bad xray and figured it would help if I added some threading capabilities and this is what I came up with..
[media]http://www.youtube.com/watch?v=9SEzi8LQyfk[/media]
And the code behind it..
[lua]concommand.Add( "scan", function( cmd, args )
local size = args[1] or 64
local thread = Thread( function()
local block
local pos = LocalPlayer():GetPos()
local startTime = SysTime()
Info( "Scanning.." )
local scanningVecs = Vectors( pos + Vector( 1, 1, 0.25 ) * size, pos + Vector( -1, -1, -1 ) * size )
Warning( string.format( "Looping through %i blocks!", #scanningVecs ) )
for i = 1, #scanningVecs do
currentScanPos = scanningVecs[ i ]
block = Block( currentScanPos, LocalPlayer():GetWorld() )
if block:GetID() == 56 then
table.insert( foundBlocks, { vec = currentScanPos, col = Color( 0, 162, 232, 150 ) } )
end
end
Info( string.format( "Scan complete.. (%f seconds)", SysTime() - startTime ) )
Warning( string.format( "Found %i blocks of diamond!", #foundBlocks ) )
end )
thread:Start()
end )[/lua]
Best part is, since we are using a simulated Lua in java, we don't have to worry about fucking up a stack because there is none.
I like this, but im requesting more information (and tutorials) on the wiki. I'm currently experimenting with this, and sometimes i don't even i know what i do wrong.
3D font rendering, woo :D
[img]http://img.luastoned.com/luacraft_3d_v3.png[/img]
[QUOTE=LuaStoned;35875654]3D font rendering, woo :D
[img]http://img.luastoned.com/luacraft_3d_v3.png[/img][/QUOTE]
Are you going to add the ability to register new block and item types? If there was some kind of gmod-sent-like API for adding new block and item types (both client & serverside, the lua script would need to be shared - this reminds me, do you have gmod-style server -> client script downloading yet?), I would start using this right away.
[QUOTE=thomasfn;35876813]Are you going to add the ability to register new block and item types? If there was some kind of gmod-sent-like API for adding new block and item types (both client & serverside, the lua script would need to be shared - this reminds me, do you have gmod-style server -> client script downloading yet?), I would start using this right away.[/QUOTE]
I am hoping to get custom Items/Blocks ready soon. There are quite a few things to take care of (custom rendering, etc) so it's not too easy for us.
Server->client net functions are done already, but we still have to add something like AddResource (that will work for any files, .lua will get exectued on the client)
Not wishing to be a one-track record here, but any chance of having multiworld support soonish?
I looked into it before and it looks like it would be pretty easy. It would require doing a lot of small edits to a lot of different things. I'll look into again tomorrow, since it is something I would like to see myself.
[editline]9th May 2012[/editline]
Hahaha, I take that back. I could probably add multi-world support in a matter of minutes. :v:
The code has really gotten a lot cleaner and organized since notch stopped working on it.
how do timers even work, can i get a sample at least because im stuck.
Hint: wikipage about timers has an phperror.
[QUOTE=vandooz;35888066]how do timers even work, can i get a sample at least because im stuck.
Hint: wikipage about timers has an phperror.[/QUOTE]
I don't see a PHP error [url]http://wiki.luacraft.com/LuaClient/timer.lua[/url]
[lua]-- use once
timer.Simple(2, function()
print("2 seconds elapsed!")
end)
-- use 5 times
timer.Create("5 times", 1, 5, function()
print("5 times timer..")
end)[/lua]
[QUOTE=LuaStoned;35888100]I don't see a PHP error [url]http://wiki.luacraft.com/LuaClient/timer.lua[/url]
[lua]-- use once
timer.Simple(2, function()
print("2 seconds elapsed!")
end)
-- use 5 times
timer.Create("5 times", 1, 5, function()
print("5 times timer..")
end)[/lua][/QUOTE]
Thanks, but i meant this page: [url]http://wiki.luacraft.com/Timer[/url]
And a infinite timer loop?
I can see this becoming grealty famous, and the lot of Addons created in Lua Scripting by Awesome Modders here in Facepunch.. This is awesome..
[QUOTE=vandooz;35888294]...
And a infinite timer loop?[/QUOTE]
[lua]timer.Create("abc", 2, 0, function() print("Endless..") end)[/lua]
Just replace the repetitions with 0
[QUOTE=LuaStoned;35889721][lua]timer.Create("abc", 2, 0, function() print("Endless..") end)[/lua]
Just replace the repetitions with 0[/QUOTE]
Thanks, last question of today: is there a function to check around a radius of an entity/block/player? if not take it as an request.
Sorry, you need to Log In to post a reply to this thread.