• LuaServer
    467 replies, posted
[QUOTE=jrj996;30954772]I'll probably do it soon, along with some tuts. But Genesis, how do you do console commands? My shit keeps breaking, is it because I forgot the Command:SetReturn and if so where the hell do I place it? D: Notch was supposed to add lua support about 2 years ago but now that someone else made it he'll probably steal it and take credit just like pistons, herp.[/QUOTE] He never took credit for pistons [editline]7th July 2011[/editline] also lol 2 years ago
[QUOTE=jrj996;30954772]I'll probably do it soon, along with some tuts. But Genesis, how do you do console commands? My shit keeps breaking, is it because I forgot the Command:SetReturn and if so where the hell do I place it? D: Notch was supposed to add lua support about 2 years ago but now that someone else made it he'll probably steal it and take credit just like pistons, herp.[/QUOTE] Notch didn't even make the pistons, Jeb did.
Is anyone else getting spammed with 'gametick' errors?
[QUOTE=jrj996;30954772]I'll probably do it soon, along with some tuts. But Genesis, how do you do console commands? My shit keeps breaking, is it because I forgot the Command:SetReturn and if so where the hell do I place it? D: Notch was supposed to add lua support about 2 years ago but now that someone else made it he'll probably steal it and take credit just like pistons, herp.[/QUOTE] You can tell when a command is from the console because the username will be CONSOLE (exactly like that).
Is the "ability to color individual parts of text" feature unimplemented or just not working? [b]Edit:[/b] Nevermind. Just saw that in the ThingsInTheNextVersion page. Also, I think OnPlayerDisconnect is getting called twice.
[QUOTE=Saccn;30961161]Is the "ability to color individual parts of text" feature unimplemented or just not working? [B]Edit:[/B] Nevermind. Just saw that in the ThingsInTheNextVersion page. Also, I think OnPlayerDisconnect is getting called twice.[/QUOTE] Ive noticed that occassionally too. It shall be fixed in the next version.
What's the difference between SetStorming() and SetRaining()? Both of them seem to be doing the same thing.
[QUOTE=Saccn;30961298]What's the difference between SetStorming() and SetRaining()? Both of them seem to be doing the same thing.[/QUOTE] Raining means no thunder no lightning. Storming means thunder and lightning. [editline]7th July 2011[/editline] [QUOTE=ruarai;30935832] My code: (In main.lua) [code] function OnPlayerChat(Chat) PrintToChat("How dare thou chat whilst I kill you.", "#all") end[/code] I hope I supplied enough info[/QUOTE] If you have nothing else than that in your main.lua then of course its going to give you errors when running. Even if there is nothing inside the functions they still need to be in the lua file otherwise it will return an error because it cant find the functions.
Trying to kill the player with Kill() seems to be doing only 2 hearts damage. [b]Edit:[/b] Nevermind. I was using it on GetPlayerEntity( Command:GetUser() ) not Command:GetUser(). [b]Edit:[/b] Actually, that broke everything.
[QUOTE=Genesis999;30961322]Raining means no thunder no lightning. Storming means thunder and lightning.[/QUOTE] Are you aware there's a game tick error? Also, I appreciate you adding those property files, I got the variables like money and stuff saving under them by doing [lua]SetVar(Player:GetUsername().."_Money") [/lua] That should stop massive file amounts, right? [editline]7th July 2011[/editline] -snip-
[QUOTE=jrj996;30961388]Are you aware there's a game tick error? Also, I appreciate you adding those property files, I got the variables like money and stuff saving under them by doing SetVar(Player:GetUsername().."_Money") That should stop massive file amounts, right? [editline]7th July 2011[/editline] -snip-[/QUOTE] Make sure somewhere in your lua file you have a function that looks like this: [code] function GameTick(arg) end [/code] Otherwise youll get the gametick spam [editline]7th July 2011[/editline] [QUOTE=Saccn;30961374]Trying to kill the player with Kill() seems to be doing only 2 hearts damage.[/QUOTE] For some reason the default minecraft codes kill function that my kill function was calling only does 4 damage. Changed it so that it will work in the next vers. Ill probably be repackaging and uploading the next vers sometime tonight.
Gametick is still broken, idk what's going on... D:
Could somebody explain what "rawentity" is? [b]Edit:[/b] Figured it out.
He does.
[QUOTE=ruarai;30961656]You should supply a working lua file at the start[/QUOTE] Now that you brought it to my attention i went and updated the script that comes with to work with the latest version. [editline]7th July 2011[/editline] [QUOTE=jrj996;30961701]He does.[/QUOTE] Actually it was a bit outdated.
Is there a way to get CreateExplosion to damage the player too?
[QUOTE=Saccn;30961757]Is there a way to get CreateExplosion to damage the player too?[/QUOTE] Well it depends on how your calling it but if its on command you could always get the PlayerEntity of the commands user and then AddHealth(-10) or something. eg. [code] GetPlayerEntity(Command:GetUser()):AddHealth(-10) [/code] of course that will only work if the explosion is made by a player typing a command. [editline]7th July 2011[/editline] Ive updated the mod. Hopefully fixed the OnPlayerDisconnect being called more than once. Added different colours in a single chat line using 0^ to 15^ being replaced with colour codes. Added a RemoveColours() function to the ChatClass. Added a Player:Kick() function Added a Player:Ban() function
[QUOTE=ruarai;30961872]What are the min and max of the difficulty level?[/QUOTE] 0 - 3 0 is Peaceful 1 is Easy 2 is Normal 3 is Hard
[QUOTE=ruarai;30961872]What are the min and max of the difficulty level?[/QUOTE] 0 = Peaceful 1 = Easy 2 = Normal 3 = Hard [b]Edit:[/b] Ninja'd
[QUOTE=Saccn;30961895]0 = Peaceful 1 = Easy 2 = Normal 3 = Hard [B]Edit:[/B] Ninja'd[/QUOTE] Ninja'd like a boss. :P
OnPlayerDisconnect still seems to be getting called twice.
How different are the client and server? Would it be feasible to create a single-player lua environment without much modification?
[QUOTE=ruarai;30962006]I wish there was some error reporting in this. I keep getting stuck. I've seen a few other programs with lua implemented into them, I'm hoping you can too.[/QUOTE] As to that im looking at improving that. As to the OnPlayerDisconnect calling twice ive uploaded a new version that fixes that. Just that. Stupid code. :P
[QUOTE=Bletotum;30961975]How different are the client and server? Would it be feasible to create a single-player lua environment without much modification?[/QUOTE] I eventually plan on a client mod as well. Im just getting the server nice and pretty first.
Nice job with this, but it feels a bit weird to have every single function be global. Would look nicer if they were in libraries. Just saying. [QUOTE=ruarai;30962006]I wish there was some error reporting in this. I keep getting stuck. I've seen a few other programs with lua implemented into them, I'm hoping you can too.[/QUOTE] Wouldn't it be possible to pcall your entire code and print the errors to chat?
Rewrote the calling function In the next version if there is something wrong with your code as well as printing out Error at WhateverFunction it will also print out a line giving you the line that it failed on and an error message.
Ban() doesn't seem to be working. [lua] if Command:GetCommand() == "/ban" then local target = GetPlayerEntity( Command:GetArgument( 1 ) ) target:Ban( "Banned." ) Command:SetReturn( 255 ) end [/lua] Shouldn't that work? It worked with Kick(). [editline]7th July 2011[/editline] It seems to add the "reason" to the banned players list.
[QUOTE=Saccn;30962861]Ban() doesn't seem to be working. if Command:GetCommand() == "/ban" then local target = GetPlayerEntity( Command:GetArgument( 1 ) ) target:Ban( "Banned." ) Command:SetReturn( 255 )end Shouldn't that work? It worked with Kick(). [editline]7th July 2011[/editline] It seems to add the "reason" to the banned players list.[/QUOTE] My bad. Seems when i wrote that function i misunderstood what the string was doing that i was passing in.
Uhm could someone tell me how to host a minecraft server using the jar file and not the exe? The instructions on Notch's site don't help at all.
[QUOTE=Divran;30962999]Uhm could someone tell me how to host a minecraft server using the jar file and not the exe? The instructions on Notch's site don't help at all.[/QUOTE] What OS you running?
Sorry, you need to Log In to post a reply to this thread.