Minetest Console for Windows users

Post Reply
User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Minetest Console for Windows users

by bosapara » Post

Image Minetest Console for Windows
___________________________________________________________________________________________________

Image Download | Github


Image

How to install? - Easy
1. Download and install AutoHotkey
2. Add external_cmd mod to your server
3. Download minetest.ahk and edit path at 'minetest.ahk' F:\minetest\worlds\myworld\message >> D:\myserver\worlds\test\message
4. Start server and minetest.ahk

bingo!

P.S. To close script use 'escape' button
Last edited by bosapara on Wed Jun 05, 2019 18:23, edited 2 times in total.

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: Minetest Console for Windows users

by rnd » Post

good. another way is to use 'custom web server' software to pass incoming message to minetest (easily written in any language c++, rust,.. or nodejs) using minetest http_api. I made an example using my 'basic_robot' mod - you can write text in browser like: "http://address/your command"
and this almost instantly shows up in game: https://github.com/ac-minetest/basic_ro ... ebcommands
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
sorcerykid
Member
Posts: 1462
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Minetest Console for Windows users

by sorcerykid » Post

I wonder if it might be possible to use IPC with a named pipe or a non-blocking socket on Linux to communicate with the Minetest mods. That would probably be the most seamless and efficient, since it doesn't require opening and closing temporary files (which works, but is kind of a kludge).

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

It doesn't work by me, how does it usually works
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: Minetest Console for Windows users

by bosapara » Post

Miniontoby wrote:It doesn't work by me, how does it usually works

How to install? - Easy
1. Download and install AutoHotkey
2. Add external_cmd mod to your server
3. Download minetest.ahk and edit path at 'minetest.ahk' F:\minetest\worlds\myworld\message >> D:\myserver\worlds\test\message (an example)
4. Start server and minetest.ahk

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

bosapara wrote:
Miniontoby wrote:It doesn't work by me, how does it usually works

How to install? - Easy
1. Download and install AutoHotkey
2. Add external_cmd mod to your server
3. Download minetest.ahk and edit path at 'minetest.ahk' F:\minetest\worlds\myworld\message >> D:\myserver\worlds\test\message (an example)
4. Start server and minetest.ahk
But that is the problem / that doesn't work (I had tested "/sd" and that doesn't work)
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: Minetest Console for Windows users

by bosapara » Post

Miniontoby wrote: But that is the problem / that doesn't work (I had tested "/sd" and that doesn't work)
Use /shutdown

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

It doesn't work. And where do I need to put external_cmd mod exactly?
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: Minetest Console for Windows users

by bosapara » Post

Miniontoby wrote:It doesn't work. And where do I need to put external_cmd mod exactly?
All works perfect, you do something wrong
"external_cmd" Install it as minetest mod

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

That does I had done. And in world.mt do I have set external_cmd to true.
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: Minetest Console for Windows users

by bosapara » Post

Miniontoby wrote:That does I had done. And in world.mt do I have set external_cmd to true.
if it still doesn't work, check again path folder to world of "minetest.ahk", also check disk letter - C, D, F etc

D:\minetest\worlds\myworld\message

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

I see that the program is does write to the file, but I'm hasn't checked of it is working in the server

It does work!!
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

And can you make that it can do every command in minetest ("/grant <player> <priv>", "/kill <player>")
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

arrangebizarre
New member
Posts: 1
Joined: Thu May 16, 2019 12:24

Re: Minetest Console for Windows users

by arrangebizarre » Post

Doesn't work on my Windows 10

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

arrangebizarre wrote:Doesn't work on my Windows 10
I do it on Windows 10 and it does work. If you need my code, I can send it to you
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: Minetest Console for Windows users

by bosapara » Post

Miniontoby, about "/grant" command - for me it works good. Just add "admin" name to minetest.conf and start server

If you need "/kill" command add this code to external cmd or as different mod

Code: Select all

minetest.register_chatcommand("kill", {
	description = "Kill [player] or you",
	param = "[player]",
--	privs = {hp = true},
	func = function(name, param)
		local target
		local targetname
		if param == "" then
			target = minetest.get_player_by_name(name)
		else
			target = minetest.get_player_by_name(param)
		end
		
		local admin = minetest.setting_get("name")
		if admin == nil then admin = "SERVER" end
		if name ~= admin then
			return
		end		
		
		
		if target then
			targetname = target:get_player_name()
			target:set_hp(0)
			minetest.chat_send_player(name, "Killed " .. targetname .. ".")
			if minetest.setting_getbool("enable_command_feedback") then
				minetest.chat_send_all(minetest.colorize("#7F7F7F", "[".. name ..": Killed ".. targetname ..".]"))
			end
			if math.random(1, 5) == 1 and minetest.setting_getbool("morecommands_enable_particles") then
				easter_egg(targetname)
			end
		else
			minetest.chat_send_player(name, minetest.colorize("#FF0000", "Player not found: " .. param))		
		end
	end
})

User avatar
bosapara
Member
Posts: 618
Joined: Fri Apr 07, 2017 08:49

Re: Minetest Console for Windows users

by bosapara » Post

arrangebizarre wrote:Doesn't work on my Windows 10
It doesn't metter what you use Win XP or Win 10, mod and script works the same.

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Minetest Console for Windows users

by Miniontoby » Post

arrangebizarre wrote:Doesn't work on my Windows 10
arrangebizarre, do you had done this in your PowerShell (Use [windows_key] + "X" and click on "Windows PowerShell") echo [message] > "<dir of Minetest>\worlds\<worldname>\message"
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests