create a folder minetest/data/mods/, named 'commands'. In that folder create a file named init.lua, in that file paste the code from the forum. Next to that file create a file named depends.txt, which contains the word default.TubbzChain wrote:where do i place the command thing at so it works?
Extra commands(alpha 0.1)
ty XD ive been trying to figure it out for a while and i just was able to check the fourm again to see if anyone answered my question, thanks thoughbgsmithjr wrote:create a folder minetest/data/mods/, named 'commands'. In that folder create a file named init.lua, in that file paste the code from the forum. Next to that file create a file named depends.txt, which contains the word default.TubbzChain wrote:where do i place the command thing at so it works?
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
this is for latest github && this still works great btwbgsmithjr wrote:I am sorry, when running a server from a windows pc, and connecting with a linux client. The player respawn on death crashes the server. And the modified script crashes the server on startup from windows.
hello, am program. do language in rust. make computer do. okay i go now.
- Element
- Member
- Posts: 269
- Joined: Tue Jun 11, 2013 00:27
- IRC: Elementwing4962
- In-game: Elementwing4962
- Location: New York
- Contact:
where do i put this code
jordan4ibanez wrote:Here's spawn & /afk command:Replace x=0 y=0 z=0 with your spawn quardsCode: Select all
spawn = {x = 47, y = 7.5, z = -40.5} minetest.register_on_chat_message(function(name, message, playername, player) local cmd = "/spawn" if message:sub(0, #cmd) == cmd then if message == '/spawn' then local player = minetest.env:get_player_by_name(name) minetest.chat_send_player(player:get_player_name(), "Teleporting to spawn...") player:setpos(spawn) return true --deds to sfan5 end end local cmd ="/afk" if message:sub(0, #cmd) == cmd then if message == '/afk' then local player = minetest.env:get_player_by_name(name) minetest.chat_send_all(name.." is AFK! ") return true --deds to sfan5 end end end) --Deds to Kahrl minetest.register_on_newplayer(function(player) player:setpos(spawn) return true end) --Deds to Kahrl minetest.register_on_respawnplayer(function(player, pos) player:setpos(spawn) return true end)
Features:
-/spawn command (returns you to spawn)
-puts new players in the spawn
-puts players into spawn on death
-/afk command (prints playername is AFK!)
To do:
-Merge Randomproof's awesome code
-Make Admins ..that can set spawn(randomproof)
-Make /afk print "PLAYER is no longer AFK!" if player moves or if /afk is sent again
-Add a death notice using (minetest.register_on_dieplayer) ..so use (player, "has died!")
-When death notice is made then have the possibility of death information..if a player is in lava ..then print (player, "burned to death") or (player, "hit the ground too hard!")
-/jail command
-/setjail command
-/unjail command
Jail command would work better than in minecraft's bukkit server..basically /setjail would work like /setspawn would
/jail "player" would send a person into an unbreakable (hopefully) area which if they move ..they are sent back to the exact place where /setjail was sent this would also remove all their items ..and /unjail "player" would release the player back into the spawn
Join Me And My Team - thornfyregaming-mc.noip.me:25565
My Server Is 1.7.9
My Server Is 1.7.9
https://dl.dropboxusercontent.com/u/654 ... mmands.zipElement wrote:both dont work
Works like a charm.
Use:
/afk
/spawn
- LuxAtheris
- Member
- Posts: 169
- Joined: Fri Oct 25, 2013 00:54
- Location: Aether
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
The guy who made this is banned you know!
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
-
- Member
- Posts: 13
- Joined: Thu Dec 19, 2013 18:16
- GitHub: AnFiadhChu
- IRC: AnFiadhChu
- In-game: AnFiadhChu
- Location: South Africa
Done:sfan5 wrote:Good IdeaUtilisatrice wrote:Script work 100%.
But maybe you should do a command indicating that the player no longer have afk.
Exemple :
/afk => Utilisatrice is now afk.
When i type /afk again => Utilisatrice do not have afk.
spawn = {x = 50, y = 1, z = 92}
minetest.register_on_chat_message(function(name, message, playername, player)
local cmd = "/spawn"
if message:sub(0, #cmd) == cmd then
if message == '/spawn' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_player(player:get_player_name(), "Teleporting to spawn...")
player:setpos(spawn)
return true --deds to sfan5
end
end
local cmd ="/afk"
if message:sub(0, #cmd) == cmd then
if message == '/afk' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is AFK! ")
return true --deds to sfan5
end
end
local cmd ="/not afk"
if message:sub(0, #cmd) == cmd then
if message == '/not afk' then
local player = minetest.env:get_player_by_name(name)
minetest.chat_send_all(name.." is NOT AFK! ")
return true --added by AnFiadhChu
end
end
end)
--Deds to Kahrl
minetest.register_on_newplayer(function(player)
player:setpos(spawn)
return true
end)
--Deds to Kahrl
minetest.register_on_respawnplayer(function(player, pos)
player:setpos(spawn)
return true
end)
Last edited by AnFiadhChu on Thu Dec 19, 2013 18:20, edited 1 time in total.
Who is online
Users browsing this forum: Bing [Bot] and 20 guests