Minetest Console for Windows users

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

Minetest Console for Windows users

by bosapara » Sat Dec 22, 2018 19:56

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: 221
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: Minetest Console for Windows users

by rnd » Sun Dec 23, 2018 18:56

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_robot/tree/master/scripts/http/webcommands
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT
 

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

Re: Minetest Console for Windows users

by sorcerykid » Fri Dec 28, 2018 21:18

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: 196
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: Minetest Console for Windows users

by Miniontoby » Mon May 20, 2019 17:33

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"
 

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

Re: Minetest Console for Windows users

by bosapara » Mon May 20, 2019 17:52

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: 196
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: Minetest Console for Windows users

by Miniontoby » Mon May 20, 2019 17:56

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"
 

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

Re: Minetest Console for Windows users

by bosapara » Mon May 20, 2019 18:33

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: 196
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: Minetest Console for Windows users

by Miniontoby » Mon May 20, 2019 18:48

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"
 

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

Re: Minetest Console for Windows users

by bosapara » Mon May 20, 2019 19:07

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: 196
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: Minetest Console for Windows users

by Miniontoby » Tue May 21, 2019 06:16

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"
 

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

Re: Minetest Console for Windows users

by bosapara » Tue May 21, 2019 07:21

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: 196
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: Minetest Console for Windows users

by Miniontoby » Tue May 21, 2019 08:52

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"
 

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

Re: Minetest Console for Windows users

by Miniontoby » Tue May 21, 2019 09:11

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"
 

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

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

Re: Minetest Console for Windows users

by Miniontoby » Tue May 21, 2019 11:53

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"
 

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

Re: Minetest Console for Windows users

by bosapara » Tue May 21, 2019 12:12

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: 528
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara

Re: Minetest Console for Windows users

by bosapara » Tue May 21, 2019 12:15

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: 196
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

Re: Minetest Console for Windows users

by Miniontoby » Tue May 21, 2019 16:31

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"
 


Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 3 guests