3) If you try this stuff and it still does not work, open up CMD, cd into the folder, and type run.bat
Then send me error messages.
Or better yet type
run.bat > .\error.txt
and send him the error.txt ^^
Rollback Post to RevisionRollBack
War does not determine who is right - only who is left. - Bertrand Russell fCraft.net Freebuild Official - Official server of the fCraft custom server software
I'm using 2.7 and have the .jar file in the directory. I tried running it a few times, but it always spits this error at me. Any idea what I'm doing wrong?
Traceback (most recent call last):
File "C:\Users\John\Desktop\SMP Server\observer.py", line 7, in <module>
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 672, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 882, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
OP list should be fetched from file each time you're checking for OPs (so it's up to date)
OPs should be able to OP other people.
!ban for the obvious.
It can't find minecraft_server.jar
Make sure that you have the .jar NOT the .exe in the same folder as the script.
You can get the .jar at minecraft.net
@zuriki
!ban is already in the script
There is the !op command
It can't find minecraft_server.jar
Make sure that you have the .jar NOT the .exe in the same folder as the script.
You can get the .jar at minecraft.net
@zuriki
!ban is already in the script
There is the !op command
I do have it in the same folder, the minecraft_server.jar, along with everything else from the download, and the generated world folder.
nevermind, got it working, just had to change
classpath to C:\Program Files\Java\jre6\bin
path to C:\Program Files\Java\jre6\bin
It can't find minecraft_server.jar
Make sure that you have the .jar NOT the .exe in the same folder as the script.
You can get the .jar at minecraft.net
@zuriki
!ban is already in the script
There is the !op command
This script is nice will run it on my server from now on.
Also is there anyway to make it impossible for players to get specific items like when they get it in their inventory it get erased or forced drop. Because I want to ban "ID 259 Flint_and_steel" because griefers use it as the ultimate weapon to lag servers to death by burning everything.
Inventories are client-side at the moment (that's also why they are not saved between logins). Griefers get items through editing their own client's memory with i.e. Cheat Engine. Nothing you can do about it server-side until inventories are server-side too.
Rollback Post to RevisionRollBack
War does not determine who is right - only who is left. - Bertrand Russell fCraft.net Freebuild Official - Official server of the fCraft custom server software
Hope you don't mind... I added a starter pack, too.
New code:
def SP(proc, target):
time.sleep(0.5)
a = 0
while a <= 7:
proc.stdin.write('give %s 50\n' % (target))
a= a+1
else:
proc.stdin.write('give %s 273\n' % (target))
proc.stdin.write('give %s 274\n' % (target))
proc.stdin.write('give %s 275\n' % (target))
b = 0
while b <= 3:
proc.stdin.write('give %s 17\n' % (target))
b= b+1
Update old one:
if('logged' in words) and ('in' in words):
newplayer = words[words.index('logged')-2].strip()
if(newplayer in banlist):
kick(p, '#MASTER', newplayer)
p.stdin.write('say BAN NOTICE: Player ' + newplayer + ' is banned!\n')
time.sleep(0.1)
p.stderr.readline()
else:
playerlist.append(newplayer)
SP(p,newplayer)
Rollback Post to RevisionRollBack
Quote from NuclearDemon »
There are 10 kinds of people who understand binary.
Those who do.
And those that don't.
Quote from HeadHunter67 »
"I'd like to sssssssspeak to you about Jeeesssussssss...."
Quote from Theonlydoh2 »
Rain, rain, go away,
THAT'S WHAT ALL THE HATERS SAY.
You could use a COUNT or similar command (no idea what u call em in Python.) from the !who list or something like that. One time I had a crazy disconnect and it said I disconnected 10 times.
The Meaning of Life, the Universe, and Everything.
Join Date:
6/8/2010
Posts:
251
Member Details
Well, I'm grateful that someone was actually able to make one of these! It's very nice, functional, and works beautifully!
I was thinking about making something along this line, using AutoIT and the exe version of the server... But for some reason it can't detect the text in the console, so I gave up on that quickly. lol
If I might make 1 suggestion... Putting the amount of items, before the item dec code seems a little odd. Wouldn't it make more sense to do something like !# ItemDecCode HowManyYouWant
Maybe there's a reason u did it the reverse way, either way works, I guess.
I would also say that !# is an odd combination, maybe !item or !give or !make. Although it is nice and short the way it is, and it confuses the hell out of players that don't know what I'm doing.
Again, thanks for making this script! The !ban feature should do WONDERS for servers that have griefer problems, no more repeated reconnects just for childish insults, and revenge reconnects burning everything down when your not around. =D
The Meaning of Life, the Universe, and Everything.
Join Date:
6/8/2010
Posts:
251
Member Details
Quote from marstrash »
I run your script on linux, so it starts the server but how can I stop it gracefully (as I cannot type the "stop" command in the console).
I'd also like to know if there's a way to "stop gracefully". I have the same issue in Windows, it wont let me type "stop" in the console. =/ Which is kind of important to protect saves, when you're closing it, right?
It can't find minecraft_server.jar
Make sure that you have the .jar NOT the .exe in the same folder as the script.
You can get the .jar at minecraft.net
@zuriki
!ban is already in the script
There is the !op command
I do have it in the same folder, the minecraft_server.jar, along with everything else from the download, and the generated world folder.
nevermind, got it working, just had to change
classpath to C:\Program Files\Java\jre6\bin
path to C:\Program Files\Java\jre6\bin
Im getting this error, and im about ready to kill someone, everything is where its supposed to be, the minecraft_server.jar is there....
File "C:\Users\Tuner\Desktop\observer\observer.py", line 7, in <module>
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 672, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 882, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Or better yet type
run.bat > .\error.txt
and send him the error.txt ^^
fCraft.net Freebuild Official - Official server of the fCraft custom server software
And with that, good night!
Traceback (most recent call last):
File "C:\Users\John\Desktop\SMP Server\observer.py", line 7, in <module>
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 672, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 882, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
OP list should be fetched from file each time you're checking for OPs (so it's up to date)
OPs should be able to OP other people.
!ban for the obvious.
Make sure that you have the .jar NOT the .exe in the same folder as the script.
You can get the .jar at minecraft.net
@zuriki
!ban is already in the script
There is the !op command
I do have it in the same folder, the minecraft_server.jar, along with everything else from the download, and the generated world folder.
nevermind, got it working, just had to change
classpath to C:\Program Files\Java\jre6\bin
path to C:\Program Files\Java\jre6\bin
At the time of writing it, it was valid.
Inventories are client-side at the moment (that's also why they are not saved between logins). Griefers get items through editing their own client's memory with i.e. Cheat Engine. Nothing you can do about it server-side until inventories are server-side too.
fCraft.net Freebuild Official - Official server of the fCraft custom server software
New code:
Update old one:
I had the same error as Aexo when trying to start the server did what he said and now it works fine. Thanks Aexo :smile.gif:
Nothing to do with script, if anything, the client would have made the server faster.
I was thinking about making something along this line, using AutoIT and the exe version of the server... But for some reason it can't detect the text in the console, so I gave up on that quickly. lol
If I might make 1 suggestion... Putting the amount of items, before the item dec code seems a little odd. Wouldn't it make more sense to do something like !# ItemDecCode HowManyYouWant
Maybe there's a reason u did it the reverse way, either way works, I guess.
I would also say that !# is an odd combination, maybe !item or !give or !make. Although it is nice and short the way it is, and it confuses the hell out of players that don't know what I'm doing.
Again, thanks for making this script! The !ban feature should do WONDERS for servers that have griefer problems, no more repeated reconnects just for childish insults, and revenge reconnects burning everything down when your not around. =D
I'd also like to know if there's a way to "stop gracefully". I have the same issue in Windows, it wont let me type "stop" in the console. =/ Which is kind of important to protect saves, when you're closing it, right?
Where exactly did you change this?Nevermind
steam : soundcloud : facebook
File "C:\Users\Tuner\Desktop\observer\observer.py", line 7, in <module>
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 672, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 882, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
:/