mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-09 06:17:37 +01:00
Merge pull request #14 from Panquesito7/master
Support for beerchat/chat2
This commit is contained in:
commit
b5a4320c2e
56
README.md
56
README.md
@ -1,53 +1,58 @@
|
|||||||
# Teleport Request
|
# Teleport Request
|
||||||
|
A mod that allows players to send a teleport request.
|
||||||
[The Pixel Shadow](https://minetest.tv/) Minetest game servers have switched from "teleport" to "teleport request" via the *teleport-request* mod. This mod makes it so players must send a request to another player in order to teleport to them. Before they will be allowed to do so, the player must accept the request. This prevents malicious users from teleporting to players' private areas without their permission. It also enhances the overall privacy of our services since if denied teleport, a player must instead travel to the area and "use the front door" so to speak... which might be a locked iron door.
|
**(See "How to use" below for more information.)**
|
||||||
|
|
||||||
## Privileges:
|
## Privileges:
|
||||||
Each command needs a privilege. These are the following privileges:
|
Each command needs a privilege. These are the following privileges:
|
||||||
- **tp** is requiered in order to use all commands.
|
- **tp** is requiered in order to use all commands.
|
||||||
- **tp_tpc** is requiered in order to use "/tpc"
|
- **tp_tpc** is requiered in order to use `/tpc`
|
||||||
- **tp_tpc** is requiered in order to use "/tpe"
|
- **tp_tpc** is requiered in order to use `/tpe`
|
||||||
- **tp_tpc** is requiered in order to use "/tpj"
|
- **tp_tpc** is requiered in order to use `/tpj`
|
||||||
- **interact** is also requiered to use all commands.
|
- **interact** is also requiered to use all commands.
|
||||||
**tp_admin** overrides everything: e.g. you can teleport to players even when they haven't decided to accept, or not. You can also teleport him/her to you.
|
**tp_admin** overrides everything: e.g. you can teleport to players even when they haven't decided to accept, or not. You can also teleport him/her to you (this happens only when `enable_immediate_teleport` is enabled on `config.lua`).
|
||||||
Players can also teleport to coordinates, however, if the area is protected, the teleport will be denied.
|
Players can also teleport to coordinates, however, if the area is protected, the teleport will be denied.
|
||||||
|
|
||||||
## How to use:
|
## How to use:
|
||||||
Each command does a function. "**Example Usage**" is an example of how to use the command.
|
Each command does a function. "**Example Usage**" is an example of how to use the command.
|
||||||
Note there must be 2 players in order to make the commands to work: a player must send a request to another player (**see https://wiki.minetest.net/Server or see https://wiki.minetest.net/Setting_up_a_server for more information**).
|
Note there must be 2 players in order to make the commands to work: a player must send a request to another player (**see https://wiki.minetest.net/Server or see https://wiki.minetest.net/Setting_up_a_server for more information**).
|
||||||
|
There are two methods of sending a request:
|
||||||
|
1. A request which teleports you to the specified player (command `/tpr <player>`).
|
||||||
|
2. A request which teleports the specified player to you (command `/tphr <player>`).
|
||||||
|
|
||||||
|
To accept a request some sent you, you must use `/tpy`.
|
||||||
These are the following commands available in-game:
|
These are the following commands available in-game:
|
||||||
|
|
||||||
``` /tpr [playername] ```
|
``` /tpr [playername] ```
|
||||||
- **Name:** Teleport Request
|
- **Name:** Teleport Request
|
||||||
- **Description:** Requests permission to teleport to another player, where [playername] is their exact name.
|
- **Description:** Requests permission to teleport to another player, where [playername] is their exact name.
|
||||||
- **Required Privileges:** "interact", "tp"
|
- **Required Privileges:** `interact, tp`
|
||||||
- **Example Usage:** */tpr RobbieF* - requests permission from RobbieF to teleport to them.
|
- **Example Usage:** */tpr RobbieF* - requests permission from RobbieF to teleport to them.
|
||||||
- **Notes:** Usernames are case-sensitive. If you have "tp_admin" privilege, you will immediately teleport to the specificed player.
|
- **Notes:** Usernames are case-sensitive. If you have "tp_admin" privilege, you will immediately teleport to the specificed player (does not apply if `enable_immediate_teleport` setting is disabled, enabled by default).
|
||||||
|
|
||||||
``` /tphr [playername] ```
|
``` /tphr [playername] ```
|
||||||
- **Name:** Teleport Here Request
|
- **Name:** Teleport Here Request
|
||||||
- **Description:** Request permission to teleport another player to you.
|
- **Description:** Request permission to teleport another player to you.
|
||||||
- **Required Privileges:** "interact", "tp"
|
- **Required Privileges:** `interact, tp`
|
||||||
- **Example Usage:** /tphr RobbieF - requests RobbieF to teleport to you.
|
- **Example Usage:** /tphr RobbieF - requests RobbieF to teleport to you.
|
||||||
- **Notes:** Usernames are case-sensitive. If you have "tp_admin" privilege, RobbieF will teleport to you immediately.
|
- **Notes:** Usernames are case-sensitive. If you have "tp_admin" privilege, RobbieF will teleport to you immediately (does not apply if `enable_immediate_teleport` setting is disabled, enabled by default).
|
||||||
|
|
||||||
``` /tpc [x,y,z] ```
|
``` /tpc [x,y,z] ```
|
||||||
- **Name:** Teleport to Coordinates
|
- **Name:** Teleport to Coordinates
|
||||||
- **Description:** Teleport to coordinates.
|
- **Description:** Teleport to coordinates.
|
||||||
- **Required Privileges:** "interact", "tp_tpc", "tp"
|
- **Required Privileges:** `interact, tp_tpc, tp`
|
||||||
- **Notes:** Honors area protection: if the area is protected, it must be owned by you in order to teleport to it, or you must have "areas" privilege in order to teleport to those coordinates (this does not apply if "areas" mod is not detected).
|
- **Notes:** Honors area protection: if the area is protected, it must be owned by you in order to teleport to it, or you must have "areas" privilege in order to teleport to those coordinates (this works only when [areas](https://github.com/minetest-mods/areas) is installed).
|
||||||
|
|
||||||
``` /tpj [axis] [distance] ```
|
``` /tpj [axis] [distance] ```
|
||||||
- **Name:** Teleport Jump
|
- **Name:** Teleport Jump
|
||||||
- **Description:** Teleport a specified distance along a single specified axis.
|
- **Description:** Teleport a specified distance along a single specified axis.
|
||||||
- **Required Privilege:** "interact", "tp", "tp_tpc"
|
- **Required Privilege:** `interact", tp, tp_tpc`
|
||||||
- **Available Options for *axis*:** x, y, z
|
- **Available Options for *axis*:** x, y, z
|
||||||
- **Example Usage:** '/tpj y 10' - teleport 10 nodes into the air.
|
- **Example Usage:** '/tpj y 10' - teleport 10 nodes into the air.
|
||||||
|
|
||||||
``` /tpe ```
|
``` /tpe ```
|
||||||
- **Name:** Teleport Evade
|
- **Name:** Teleport Evade
|
||||||
- **Description:** In a sticky situation? Evade your enemy by teleporting to several nearby coordinates in random pattern. There's no knowing where you'll end up.
|
- **Description:** In a sticky situation? Evade your enemy by teleporting to several nearby coordinates in random pattern. There's no knowing where you'll end up.
|
||||||
- **Required Privileges:** "interact", "tp_tpc", "tp"
|
- **Required Privileges:** `interact, tp_tpc, tp`
|
||||||
- **Example Usage:** '/tpe' - teleports you to a random number of random coordinates in an evasive pattern.
|
- **Example Usage:** '/tpe' - teleports you to a random number of random coordinates in an evasive pattern.
|
||||||
|
|
||||||
``` /tpy ```
|
``` /tpy ```
|
||||||
@ -61,6 +66,8 @@ There are no dependencies.
|
|||||||
However, optional dependencies are:
|
However, optional dependencies are:
|
||||||
- [areas](https://github.com/minetest-mods/areas)
|
- [areas](https://github.com/minetest-mods/areas)
|
||||||
- [intllib](https://github.com/minetest-mods/intllib)
|
- [intllib](https://github.com/minetest-mods/intllib)
|
||||||
|
- [beerchat](https://github.com/pandorabox-io/beerchat)
|
||||||
|
- [chat2](https://github.com/minetest-mods/chat2)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
This mod requieres MT/MTG 5.0.0+ to run.
|
This mod requieres MT/MTG 5.0.0+ to run.
|
||||||
@ -71,7 +78,7 @@ Report bugs or suggest ideas by [creating an issue](https://github.com/ChaosWorm
|
|||||||
If you know how to fix an issue, or want something to be added, consider opening a [pull request](https://github.com/ChaosWormz/teleport-request/compare).
|
If you know how to fix an issue, or want something to be added, consider opening a [pull request](https://github.com/ChaosWormz/teleport-request/compare).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
LGPL-2.1 for code, CC-BY-SA-4.0 for [media](https://github.com/ChaosWormz/teleport-request/blob/master/sounds/LICENSE.txt) and [textures](https://github.com/ChaosWormz/teleport-request/blob/master/textures/LICENSE.txt) (click [here](https://github.com/ChaosWormz/teleport-request/blob/master/LICENSE.md) for more information).
|
[LGPL-2.1](https://github.com/ChaosWormz/teleport-request/blob/master/LICENSE.md) for everything.
|
||||||
|
|
||||||
## Contributors:
|
## Contributors:
|
||||||
- [RobbieF](https://minetest.tv) | [GitHub](https://github.com/Cat5TV)
|
- [RobbieF](https://minetest.tv) | [GitHub](https://github.com/Cat5TV)
|
||||||
@ -80,10 +87,27 @@ LGPL-2.1 for code, CC-BY-SA-4.0 for [media](https://github.com/ChaosWormz/telepo
|
|||||||
- [ChaosWormz](https://github.com/ChaosWormz)
|
- [ChaosWormz](https://github.com/ChaosWormz)
|
||||||
- [Panquesito7](https://github.com/Panquesito7)
|
- [Panquesito7](https://github.com/Panquesito7)
|
||||||
- [coil0](https://github.com/coil0)
|
- [coil0](https://github.com/coil0)
|
||||||
|
- [Zeno-](https://github.com/Zeno-)
|
||||||
|
- [indriApollo](https://github.com/indriApollo)
|
||||||
|
- [Billy-S](https://github.com/Billy-S)
|
||||||
- Traxie21, the original creator of this mod (however, he/she does not have a GitHub account anymore).
|
- Traxie21, the original creator of this mod (however, he/she does not have a GitHub account anymore).
|
||||||
|
|
||||||
All those who contributed to the original mod (please see `init.lua`).
|
All those who contributed to the original mod (please see `init.lua`).
|
||||||
|
|
||||||
|
## Configuring the mod
|
||||||
|
Open your `minetest.conf` located in your Minetest directory.
|
||||||
|
Set the values of the settings you'd like to.
|
||||||
|
|
||||||
|
Available options are:
|
||||||
|
```
|
||||||
|
tp.timeout_delay = 60
|
||||||
|
tp.enable_immediate_teleport = true
|
||||||
|
tp_enable_tpp_command = false
|
||||||
|
```
|
||||||
|
Those values are the default values of the mod.
|
||||||
|
You can also go to your Minetest, Settings tab, All settings, Mods, and you'll find `tpr` there.
|
||||||
|
Or another way to do it, is changing the values in `settingstypes.txt`.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
- Unzip the archive, rename the folder to tpr and
|
- Unzip the archive, rename the folder to tpr and
|
||||||
place it in ..minetest/mods/
|
place it in ..minetest/mods/
|
||||||
@ -104,3 +128,5 @@ https://wiki.minetest.net/Installing_Mods
|
|||||||
- Create a better sound effect for teleport and apply it to all teleport methods (not just /tpc)
|
- Create a better sound effect for teleport and apply it to all teleport methods (not just /tpc)
|
||||||
- Rewrite to place all chat commands into one single command much like how /teleport works.
|
- Rewrite to place all chat commands into one single command much like how /teleport works.
|
||||||
- Make evade respect land: no teleporting inside land, but instead make sure player is standing on surface or in water.
|
- Make evade respect land: no teleporting inside land, but instead make sure player is standing on surface or in water.
|
||||||
|
|
||||||
|
If you think something else should be added to this list, [submit an issue](https://github.com/ChaosWormz/teleport-request/issues/new).
|
||||||
|
13
config.lua
13
config.lua
@ -24,22 +24,23 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
|
|||||||
local S, NS = dofile(MP.."/intllib.lua")
|
local S, NS = dofile(MP.."/intllib.lua")
|
||||||
|
|
||||||
-- Timeout delay and mod version.
|
-- Timeout delay and mod version.
|
||||||
timeout_delay = 60
|
tp.timeout_delay = tonumber(minetest.settings:get("tp.timeout_delay")) or 60
|
||||||
version = "1.5"
|
tp.version = "1.5"
|
||||||
|
|
||||||
-- Enable teleporting immediately to the player with "tp_admin" privilege.
|
-- Enable teleporting immediately to the specified player for those with "tp_admin" privilege.
|
||||||
enable_immediate_teleport = true
|
tp.enable_immediate_teleport = minetest.settings:get_bool("tp.enable_immediate_teleport")
|
||||||
|
|
||||||
local chatmsg, source, target, name2, target_coords, pos
|
local chatmsg, source, target, name2, target_coords, pos
|
||||||
|
|
||||||
-- Set the values of the positions of your places, players will be able to teleport to them (no matter if it is protected, or not).
|
-- Set the values of the positions of your places, players will be able to teleport to them (no matter if it is protected, or not).
|
||||||
available_places = {
|
-- You must activate "enable_tpp_command" in order to make this to work.
|
||||||
|
tp.available_places = {
|
||||||
spawn = {x = 0, y = 0, z = 0}, -- Set coordinates of spawn here.
|
spawn = {x = 0, y = 0, z = 0}, -- Set coordinates of spawn here.
|
||||||
shop = {x = 0, y = 0, z = 0}, -- Set coordinates of the shop here.
|
shop = {x = 0, y = 0, z = 0}, -- Set coordinates of the shop here.
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Enable tpp command
|
-- Enable tpp command
|
||||||
enable_tpp_command = false
|
tp.enable_tpp_command = minetest.settings:get_bool("tp.enable_tpp_command")
|
||||||
|
|
||||||
-- Register privileges
|
-- Register privileges
|
||||||
minetest.register_privilege("tp", {
|
minetest.register_privilege("tp", {
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
areas?
|
|
||||||
intllib?
|
|
324
init.lua
324
init.lua
@ -22,12 +22,14 @@ Originally made by Traxie21 and released with the WTFPL license.
|
|||||||
Forum link: https://forum.minetest.net/viewtopic.php?id=4457
|
Forum link: https://forum.minetest.net/viewtopic.php?id=4457
|
||||||
|
|
||||||
Updates by Zeno, Panquesito7 and ChaosWormz.
|
Updates by Zeno, Panquesito7 and ChaosWormz.
|
||||||
License: LGPL-2.1 for code, CC-BY-SA-4.0 for media and textures.
|
License: LGPL-2.1 for everything.
|
||||||
|
|
||||||
Optional dependencies: areas, intllib
|
Optional dependencies: areas, intllib
|
||||||
New release by RobbieF under new mod: tps_teleport - http://blog.minetest.tv/teleport-request/
|
New release by RobbieF under new mod: tps_teleport - http://blog.minetest.tv/teleport-request/
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
tp = {}
|
||||||
|
|
||||||
-- Load support for intllib.
|
-- Load support for intllib.
|
||||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||||
local S, NS = dofile(MP.."/intllib.lua")
|
local S, NS = dofile(MP.."/intllib.lua")
|
||||||
@ -35,43 +37,43 @@ local S, NS = dofile(MP.."/intllib.lua")
|
|||||||
-- Load configuration.
|
-- Load configuration.
|
||||||
dofile(MP.."/config.lua")
|
dofile(MP.."/config.lua")
|
||||||
|
|
||||||
local tpr_list = {}
|
tp.tpr_list = {}
|
||||||
local tphr_list = {}
|
tp.tphr_list = {}
|
||||||
|
|
||||||
local map_size = 30912
|
local map_size = 30912
|
||||||
local function can_teleport(to)
|
function tp.can_teleport(to)
|
||||||
return to.x < map_size and to.x > -map_size and to.y < map_size and to.y > -map_size and to.z < map_size and to.z > -map_size
|
return to.x < map_size and to.x > -map_size and to.y < map_size and to.y > -map_size and to.z < map_size and to.z > -map_size
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Teleport player to a player (used in "/tpr" and in "/tphr" command).
|
-- Teleport player to a player (used in "/tpr" and in "/tphr" command).
|
||||||
function tpr_teleport_player()
|
function tp.tpr_teleport_player()
|
||||||
local target_coords = source:get_pos()
|
local target_coords = source:get_pos()
|
||||||
local target_sound = target:get_pos()
|
local target_sound = target:get_pos()
|
||||||
target:set_pos(find_free_position_near(target_coords))
|
target:set_pos(tp.find_free_position_near(target_coords))
|
||||||
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, max_hear_distance = 10})
|
||||||
minetest.sound_play("whoosh", {pos = target_sound, gain = 0.5, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = target_sound, gain = 0.5, max_hear_distance = 10})
|
||||||
--parti2(target_coords)
|
--tp.parti2(target_coords)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TPC & TPJ
|
-- TPC & TPJ
|
||||||
function tpc_teleport_player(player)
|
function tp.tpc_teleport_player(player)
|
||||||
local pname = minetest.get_player_by_name(player)
|
local pname = minetest.get_player_by_name(player)
|
||||||
minetest.sound_play("whoosh", {pos = pname:get_pos(), gain = 0.5, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = pname:get_pos(), gain = 0.5, max_hear_distance = 10})
|
||||||
pname:set_pos(find_free_position_near(target_coords))
|
pname:set_pos(tp.find_free_position_near(target_coords))
|
||||||
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = target_coords, gain = 0.5, max_hear_distance = 10})
|
||||||
--parti2(target_coords)
|
--tp.parti2(target_coords)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TPP
|
-- TPP
|
||||||
function tpp_teleport_player(player)
|
function tp.tpp_teleport_player(player)
|
||||||
local pname = minetest.get_player_by_name(player)
|
local pname = minetest.get_player_by_name(player)
|
||||||
minetest.sound_play("whoosh", {pos = pname:get_pos(), gain = 0.5, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = pname:get_pos(), gain = 0.5, max_hear_distance = 10})
|
||||||
pname:set_pos(find_free_position_near(pos))
|
pname:set_pos(tp.find_free_position_near(pos))
|
||||||
minetest.sound_play("whoosh", {pos = pos, gain = 0.5, max_hear_distance = 10})
|
minetest.sound_play("whoosh", {pos = pos, gain = 0.5, max_hear_distance = 10})
|
||||||
--parti2(target_coords)
|
--tp.parti2(target_coords)
|
||||||
end
|
end
|
||||||
|
|
||||||
function find_free_position_near(pos)
|
function tp.find_free_position_near(pos)
|
||||||
local tries = {
|
local tries = {
|
||||||
{x=1,y=0,z=0},
|
{x=1,y=0,z=0},
|
||||||
{x=-1,y=0,z=0},
|
{x=-1,y=0,z=0},
|
||||||
@ -87,7 +89,7 @@ function find_free_position_near(pos)
|
|||||||
return pos, false
|
return pos, false
|
||||||
end
|
end
|
||||||
|
|
||||||
function parti(pos)
|
function tp.parti(pos)
|
||||||
minetest.add_particlespawner(50, 0.4,
|
minetest.add_particlespawner(50, 0.4,
|
||||||
{x=pos.x + 0.5, y=pos.y, z=pos.z + 0.5}, {x=pos.x - 0.5, y=pos.y, z=pos.z - 0.5},
|
{x=pos.x + 0.5, y=pos.y, z=pos.z + 0.5}, {x=pos.x - 0.5, y=pos.y, z=pos.z - 0.5},
|
||||||
{x=0, y=5, z=0}, {x=0, y=0, z=0},
|
{x=0, y=5, z=0}, {x=0, y=0, z=0},
|
||||||
@ -98,7 +100,7 @@ function parti(pos)
|
|||||||
"tps_portal_parti.png")
|
"tps_portal_parti.png")
|
||||||
end
|
end
|
||||||
|
|
||||||
function parti2(pos)
|
function tp.parti2(pos)
|
||||||
minetest.add_particlespawner(50, 0.4,
|
minetest.add_particlespawner(50, 0.4,
|
||||||
{x=pos.x + 0.5, y=pos.y + 10, z=pos.z + 0.5}, {x=pos.x - 0.5, y=pos.y, z=pos.z - 0.5},
|
{x=pos.x + 0.5, y=pos.y + 10, z=pos.z + 0.5}, {x=pos.x - 0.5, y=pos.y, z=pos.z - 0.5},
|
||||||
{x=0, y=-5, z=0}, {x=0, y=0, z=0},
|
{x=0, y=-5, z=0}, {x=0, y=0, z=0},
|
||||||
@ -110,117 +112,179 @@ function parti2(pos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Teleport Request System
|
-- Teleport Request System
|
||||||
function clear_tpr_list(name)
|
function tp.clear_tpr_list(name)
|
||||||
if tpr_list[name] then
|
if tp.tpr_list[name] then
|
||||||
tpr_list[name] = nil
|
tp.tpr_list[name] = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function clear_tphr_list(name)
|
function tp.clear_tphr_list(name)
|
||||||
if tphr_list[name] then
|
if tp.tphr_list[name] then
|
||||||
tphr_list[name] = nil
|
tp.tphr_list[name] = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Clear requests when the player leaves
|
-- Clear requests when the player leaves
|
||||||
minetest.register_on_leaveplayer(function(name)
|
minetest.register_on_leaveplayer(function(name)
|
||||||
if tpr_list[name] then
|
if tp.tpr_list[name] then
|
||||||
tpr_list[name] = nil
|
tp.tpr_list[name] = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if tphr_list[name] then
|
if tp.tphr_list[name] then
|
||||||
tphr_list[name] = nil
|
tp.tphr_list[name] = nil
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function tpr_send(sender, receiver)
|
function tp.tpr_send(sender, receiver)
|
||||||
if minetest.check_player_privs(sender, {tp_admin = true}) and enable_immediate_teleport then
|
-- Compatibility with beerchat (UNTESTED)
|
||||||
|
if minetest.get_modpath("beerchat") and not minetest.check_player_privs(sender, {tp_admin = true}) then
|
||||||
|
if minetest.get_player_by_name(sender):get_attribute("beerchat:muted:" .. sender) then
|
||||||
|
minetest.chat_send_player(sender, S("You are not allowed to send requests because you're muted."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("You are not allowed to send requests because you're muted."), 0xFFFFFF)
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if minetest.check_player_privs(sender, {tp_admin = true}) and tp.enable_immediate_teleport then
|
||||||
if receiver == "" then
|
if receiver == "" then
|
||||||
minetest.chat_send_player(sender, S("Usage: /tpr <Player name>"))
|
minetest.chat_send_player(sender, S("Usage: /tpr <Player name>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Usage: /tpr <Player name>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not minetest.get_player_by_name(receiver) then
|
if not minetest.get_player_by_name(receiver) then
|
||||||
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
tpr_list[receiver] = sender
|
tp.tpr_list[receiver] = sender
|
||||||
tpr_accept(receiver)
|
tp.tpr_accept(receiver)
|
||||||
minetest.chat_send_player(sender, S("You are teleporting to @1.", receiver))
|
minetest.chat_send_player(sender, S("You are teleporting to @1.", receiver))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("You are teleporting to @1.", receiver), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if receiver == "" then
|
if receiver == "" then
|
||||||
minetest.chat_send_player(sender, S("Usage: /tpr <Player name>"))
|
minetest.chat_send_player(sender, S("Usage: /tpr <Player name>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Usage: /tpr <Player name>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.get_player_by_name(receiver) then
|
if not minetest.get_player_by_name(receiver) then
|
||||||
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online."))
|
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(receiver), S("@1 is requesting to teleport to you. /tpy to accept", sender), 0xFFFFFF)
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay), 0xFFFFFF)
|
||||||
|
end
|
||||||
minetest.chat_send_player(receiver, S("@1 is requesting to teleport to you. /tpy to accept", sender))
|
minetest.chat_send_player(receiver, S("@1 is requesting to teleport to you. /tpy to accept", sender))
|
||||||
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", timeout_delay))
|
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", timeout_delay))
|
||||||
|
|
||||||
-- Write name values to list and clear old values.
|
-- Write name values to list and clear old values.
|
||||||
tpr_list[receiver] = sender
|
tp.tpr_list[receiver] = sender
|
||||||
-- Teleport timeout delay
|
-- Teleport timeout delay
|
||||||
minetest.after(timeout_delay, function(name)
|
minetest.after(tp.timeout_delay, function(name)
|
||||||
if tpr_list[name] then
|
if tp.tpr_list[name] then
|
||||||
tpr_list[name] = nil
|
tp.tpr_list[name] = nil
|
||||||
minetest.chat_send_player(sender, S("Request timed-out."))
|
minetest.chat_send_player(sender, S("Request timed-out."))
|
||||||
minetest.chat_send_player(receiver, S("Request timed-out."))
|
minetest.chat_send_player(receiver, S("Request timed-out."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Request timed-out."), 0xFFFFFF)
|
||||||
|
chat2.send_message(minetest.get_player_by_name(receiver), S("Request timed-out."), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end, receiver)
|
end, receiver)
|
||||||
end
|
end
|
||||||
|
|
||||||
function tphr_send(sender, receiver)
|
function tp.tphr_send(sender, receiver)
|
||||||
if minetest.check_player_privs(sender, {tp_admin = true}) and enable_immediate_teleport then
|
-- Compatibility with beerchat (UNTESTED)
|
||||||
|
if minetest.get_modpath("beerchat") and not minetest.check_player_privs(sender, {tp_admin = true}) then
|
||||||
|
if minetest.get_player_by_name(sender):get_attribute("beerchat:muted:" .. sender) then
|
||||||
|
minetest.chat_send_player(sender, S("You are not allowed to send requests because you're muted."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("You are not allowed to send requests because you're muted."), 0xFFFFFF)
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if minetest.check_player_privs(sender, {tp_admin = true}) and tp.enable_immediate_teleport then
|
||||||
if receiver == "" then
|
if receiver == "" then
|
||||||
minetest.chat_send_player(sender, S("Usage: /tphr <Player name>"))
|
minetest.chat_send_player(sender, S("Usage: /tphr <Player name>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Usage. /tphr <Player name>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not minetest.get_player_by_name(receiver) then
|
if not minetest.get_player_by_name(receiver) then
|
||||||
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
tphr_list[receiver] = sender
|
tp.tphr_list[receiver] = sender
|
||||||
tpr_accept(receiver)
|
tp.tpr_accept(receiver)
|
||||||
minetest.chat_send_player(sender, S("@1 is teleporting to you.", receiver))
|
minetest.chat_send_player(sender, S("@1 is teleporting to you.", receiver))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("@1 is teleporting to you.", receiver), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if receiver == "" then
|
if receiver == "" then
|
||||||
minetest.chat_send_player(sender, S("Usage: /tphr <Player name>"))
|
minetest.chat_send_player(sender, S("Usage: /tphr <Player name>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Usage. /tphr <Player name>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.get_player_by_name(receiver) then
|
if not minetest.get_player_by_name(receiver) then
|
||||||
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online."))
|
minetest.chat_send_player(sender, S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(receiver), S("@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny", sender), 0xFFFFFF)
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Teleport request sent! It will timeout in @1 seconds", tp.timeout_delay), 0xFFFFFF)
|
||||||
|
end
|
||||||
minetest.chat_send_player(receiver, S("@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny", sender))
|
minetest.chat_send_player(receiver, S("@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny", sender))
|
||||||
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", timeout_delay))
|
minetest.chat_send_player(sender, S("Teleport request sent! It will timeout in @1 seconds", timeout_delay))
|
||||||
|
|
||||||
-- Write name values to list and clear old values.
|
-- Write name values to list and clear old values.
|
||||||
tphr_list[receiver] = sender
|
tp.tphr_list[receiver] = sender
|
||||||
-- Teleport timeout delay
|
-- Teleport timeout delay
|
||||||
minetest.after(timeout_delay, function(name)
|
minetest.after(tp.timeout_delay, function(name)
|
||||||
if tphr_list[name] then
|
if tp.tphr_list[name] then
|
||||||
tphr_list[name] = nil
|
tp.tphr_list[name] = nil
|
||||||
minetest.chat_send_player(sender, S("Request timed-out."))
|
minetest.chat_send_player(sender, S("Request timed-out."))
|
||||||
minetest.chat_send_player(receiver, S("Request timed-out."))
|
minetest.chat_send_player(receiver, S("Request timed-out."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(sender), S("Request timed-out"), 0xFFFFFF)
|
||||||
|
chat2.send_message(minetest.get_player_by_name(receiver), S("Request timed-out"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end, receiver)
|
end, receiver)
|
||||||
end
|
end
|
||||||
|
|
||||||
function tpc_send(player, coordinates)
|
function tp.tpc_send(player, coordinates)
|
||||||
|
|
||||||
local posx,posy,posz = string.match(coordinates, "^(-?%d+), (-?%d+), (-?%d+)$")
|
local posx,posy,posz = string.match(coordinates, "^(-?%d+), (-?%d+), (-?%d+)$")
|
||||||
local pname = minetest.get_player_by_name(player)
|
local pname = minetest.get_player_by_name(player)
|
||||||
@ -233,22 +297,31 @@ function tpc_send(player, coordinates)
|
|||||||
|
|
||||||
if posx==nil or posy==nil or posz==nil or string.len(posx) > 6 or string.len(posy) > 6 or string.len(posz) > 6 then
|
if posx==nil or posy==nil or posz==nil or string.len(posx) > 6 or string.len(posy) > 6 or string.len(posz) > 6 then
|
||||||
minetest.chat_send_player(player, S("Usage: /tpc <x, y, z>"))
|
minetest.chat_send_player(player, S("Usage: /tpc <x, y, z>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Usage: /tpc <x, y, z>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
target_coords = {x=posx, y=posy, z=posz}
|
target_coords = {x=posx, y=posy, z=posz}
|
||||||
|
|
||||||
if can_teleport(target_coords) == false then
|
if tp.can_teleport(target_coords) == false then
|
||||||
minetest.chat_send_player(player, S("You cannot teleport to a location outside the map!"))
|
minetest.chat_send_player(player, S("You cannot teleport to a location outside the map!"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("You cannot teleport to a location outside the map!"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If the area is protected, reject the user's request to teleport to these coordinates
|
-- If the area is protected, reject the user's request to teleport to these coordinates
|
||||||
-- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission.
|
-- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission.
|
||||||
-- Admin user (priv "tp_admin") overrides all protection
|
-- Admin user (priv "tp_admin") overrides all protection
|
||||||
if minetest.check_player_privs(pname, {tp_admin=true}) then
|
if minetest.check_player_privs(pname, {tp_admin = true}) then
|
||||||
tpc_teleport_player(player)
|
tp.tpc_teleport_player(player)
|
||||||
minetest.chat_send_player(player, S("Teleporting to: @1, @2, @3", posx, posy, posz))
|
minetest.chat_send_player(player, S("Teleporting to: @1, @2, @3", posx, posy, posz))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Teleporting to: @1, @2, @3", posx, posy, posz), 0xFFFFFF)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if minetest.check_player_privs(pname, {tp_tpc = true}) then
|
if minetest.check_player_privs(pname, {tp_tpc = true}) then
|
||||||
local protected = minetest.is_protected(target_coords,pname)
|
local protected = minetest.is_protected(target_coords,pname)
|
||||||
@ -256,56 +329,79 @@ function tpc_send(player, coordinates)
|
|||||||
if not areas:canInteract(target_coords, player) then
|
if not areas:canInteract(target_coords, player) then
|
||||||
local owners = areas:getNodeOwners(target_coords)
|
local owners = areas:getNodeOwners(target_coords)
|
||||||
minetest.chat_send_player(player, S("Error: @1 is protected by @2.", minetest.pos_to_string(target_coords), table.concat(owners, ", ")))
|
minetest.chat_send_player(player, S("Error: @1 is protected by @2.", minetest.pos_to_string(target_coords), table.concat(owners, ", ")))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Error: @1 is protected by @2.", minetest.pos_to_string(target_coords), table.concat(owners, ", ")), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
tpc_teleport_player(player)
|
tp.tpc_teleport_player(player)
|
||||||
minetest.chat_send_player(player, S("Teleporting to: @1, @2, @3", posx, posy, posz))
|
minetest.chat_send_player(player, S("Teleporting to: @1, @2, @3", posx, posy, posz))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Teleporting to: @1, @2, @3", posx, posy, posz), 0xFFFFFF)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player, S("Error: You do not have permission to teleport to coordinates."))
|
minetest.chat_send_player(player, S("Error: You do not have permission to teleport to those coordinates."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Error: You do not have permission to teleport to those coordinates."), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function tpr_deny(name)
|
function tp.tpr_deny(name)
|
||||||
if tpr_list[name] then
|
if tp.tpr_list[name] then
|
||||||
name2 = tpr_list[name]
|
name2 = tp.tpr_list[name]
|
||||||
minetest.chat_send_player(name2, S("Teleport request denied."))
|
minetest.chat_send_player(name2, S("Teleport request denied."))
|
||||||
minetest.chat_send_player(name, S("You denied the request @1 sent you.", name2))
|
minetest.chat_send_player(name, S("You denied the request @1 sent you.", name2))
|
||||||
tpr_list[name] = nil
|
if minetest.get_modpath("chat2") then
|
||||||
elseif tphr_list[name] then
|
chat2.send_message(minetest.get_player_by_name(name2), S("Teleport request denied."), 0xFFFFFF)
|
||||||
name2 = tphr_list[name]
|
chat2.send_message(minetest.get_player_by_name(name), S("You denied the request @1 sent you.", name2), 0xFFFFFF)
|
||||||
|
end
|
||||||
|
tp.tpr_list[name] = nil
|
||||||
|
elseif tp.tphr_list[name] then
|
||||||
|
name2 = tp.tphr_list[name]
|
||||||
minetest.chat_send_player(name2, S("Teleport request denied."))
|
minetest.chat_send_player(name2, S("Teleport request denied."))
|
||||||
minetest.chat_send_player(name, S("You denied the request @1 sent you.", name2))
|
minetest.chat_send_player(name, S("You denied the request @1 sent you.", name2))
|
||||||
tphr_list[name] = nil
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(name2), S("Teleport request denied."), 0xFFFFFF)
|
||||||
|
chat2.send_message(minetest.get_player_by_name(name), S("You denied the request @1 sent you.", name2), 0xFFFFFF)
|
||||||
|
end
|
||||||
|
tp.tphr_list[name] = nil
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(name, S("Usage: /tpn allows you to deny teleport requests sent to you by other players."))
|
minetest.chat_send_player(name, S("Usage: /tpn allows you to deny teleport requests sent to you by other players."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(name), S("Usage: /tpn allows you to deny teleport requests sent to you by other players."), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Teleport Accept Systems
|
-- Teleport Accept Systems
|
||||||
function tpr_accept(name, param)
|
function tp.tpr_accept(name, param)
|
||||||
-- Check to prevent constant teleporting.
|
-- Check to prevent constant teleporting.
|
||||||
if not tpr_list[name]
|
if not tp.tpr_list[name]
|
||||||
and not tphr_list[name] then
|
and not tp.tphr_list[name]
|
||||||
minetest.chat_send_player(name, S("Usage: /tpy allows you to accept teleport requests sent to you by other players"))
|
minetest.chat_send_player(name, S("Usage: /tpy allows you to accept teleport requests sent to you by other players"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(name), S("Usage: /tpy allows you to accept teleport requests sent to you by other players"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if tpr_list[name] then
|
if tp.tpr_list[name] then
|
||||||
name2 = tpr_list[name]
|
name2 = tp.tpr_list[name]
|
||||||
source = minetest.get_player_by_name(name)
|
source = minetest.get_player_by_name(name)
|
||||||
target = minetest.get_player_by_name(name2)
|
target = minetest.get_player_by_name(name2)
|
||||||
chatmsg = S("@1 is teleporting to you.", name2)
|
chatmsg = S("@1 is teleporting to you.", name2)
|
||||||
tpr_list[name] = nil
|
tp.tpr_list[name] = nil
|
||||||
elseif tphr_list[name] then
|
elseif tp.tphr_list[name] then
|
||||||
name2 = tphr_list[name]
|
name2 = tp.tphr_list[name]
|
||||||
source = minetest.get_player_by_name(name2)
|
source = minetest.get_player_by_name(name2)
|
||||||
target = minetest.get_player_by_name(name)
|
target = minetest.get_player_by_name(name)
|
||||||
chatmsg = S("You are teleporting to @1.", name2)
|
chatmsg = S("You are teleporting to @1.", name2)
|
||||||
tphr_list[name] = nil
|
tp.tphr_list[name] = nil
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -313,27 +409,36 @@ function tpr_accept(name, param)
|
|||||||
-- Could happen if either player disconnects (or timeout); if so just abort
|
-- Could happen if either player disconnects (or timeout); if so just abort
|
||||||
if not source
|
if not source
|
||||||
or not target then
|
or not target then
|
||||||
minetest.chat_send_player(name, S("@1 just disconnected/left (by timeout).", name2))
|
minetest.chat_send_player(name, S("@1 doesn't exist, or just disconnected/left (by timeout).", name2))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
tp.tpr_teleport_player()
|
||||||
minetest.chat_send_player(name2, S("Request Accepted!"))
|
minetest.chat_send_player(name2, S("Request Accepted!"))
|
||||||
minetest.chat_send_player(name, chatmsg)
|
minetest.chat_send_player(name, chatmsg)
|
||||||
tpr_teleport_player()
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(name2), S("Request Accepted!"), 0xFFFFFF)
|
||||||
|
chat2.send_message(minetest.get_player_by_name(name), chatmsg, 0xFFFFFF)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Teleport Jump - Relative Position Teleportation by number of nodes
|
-- Teleport Jump - Relative Position Teleportation by number of nodes
|
||||||
function tpj(player, param)
|
function tp.tpj(player, param)
|
||||||
local pname = minetest.get_player_by_name(player)
|
local pname = minetest.get_player_by_name(player)
|
||||||
|
|
||||||
if param == "" then
|
if param == "" then
|
||||||
minetest.chat_send_player(player, S("Usage: <x|y|z> <Number>"))
|
minetest.chat_send_player(player, S("Usage: <x|y|z> <number>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Usage: <x|y|z> <number>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local args = param:split(" ") -- look into this. Can it crash if the player does not have two parameters?
|
local args = param:split(" ") -- look into this. Can it crash if the player does not have two parameters?
|
||||||
if #args < 2 then
|
if #args < 2 then
|
||||||
minetest.chat_send_player(player, S("Usage: <x|y|z> <Number>"))
|
minetest.chat_send_player(player, S("Usage: <x|y|z> <number>"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Usage: <x|y|z> <number>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -350,18 +455,27 @@ function tpj(player, param)
|
|||||||
elseif args[1] == "z" then
|
elseif args[1] == "z" then
|
||||||
target_coords["z"] = target_coords["z"] + tonumber(args[2])
|
target_coords["z"] = target_coords["z"] + tonumber(args[2])
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player, S("Not a valid axis. Valid options are X, Y or Z."))
|
minetest.chat_send_player(player, S("Not a valid axis. Valid options are X, Y or Z"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Not a valid axis. Valid options are X, Y or Z"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if can_teleport(target_coords) == false then
|
if tp.can_teleport(target_coords) == false then
|
||||||
minetest.chat_send_player(player, S("You cannot teleport to a location outside the map!"))
|
minetest.chat_send_player(player, S("You cannot teleport to a location outside the map!"))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("You cannot teleport to a location outside the map!"), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
tpc_teleport_player(player)
|
tp.tpc_teleport_player(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Evade
|
-- Evade
|
||||||
function tpe(player)
|
function tp.tpe(player)
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("EVADE!"), 0xFFFFFF)
|
||||||
|
end
|
||||||
minetest.chat_send_player(player, S("EVADE!"))
|
minetest.chat_send_player(player, S("EVADE!"))
|
||||||
local mindistance = 15
|
local mindistance = 15
|
||||||
local maxdistance = 50
|
local maxdistance = 50
|
||||||
@ -380,7 +494,7 @@ function tpe(player)
|
|||||||
distance = isnegative .. math.random(mindistance,maxdistance) -- the distance to jump
|
distance = isnegative .. math.random(mindistance,maxdistance) -- the distance to jump
|
||||||
axis = options[math.random(3)]
|
axis = options[math.random(3)]
|
||||||
local command = axis .. " " .. distance
|
local command = axis .. " " .. distance
|
||||||
tpj(player, command)
|
tp.tpj(player, command)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
iteration = iteration + 0.5
|
iteration = iteration + 0.5
|
||||||
@ -388,35 +502,49 @@ function tpe(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Register chatcommands
|
-- Register chatcommands
|
||||||
if enable_tpp_command then
|
if tp.enable_tpp_command then
|
||||||
minetest.register_chatcommand("tpp", {
|
minetest.register_chatcommand("tpp", {
|
||||||
description = S("Teleport to a place (i.e., spawn, shop)."),
|
description = S("Teleport to a place (i.e., spawn, shop)."),
|
||||||
params = S("<place> | leave empty to see available places"),
|
params = S("<place> | leave empty to see available places"),
|
||||||
privs = {},
|
privs = {},
|
||||||
func = function(player, param)
|
func = function(player, param)
|
||||||
local pname = minetest.get_player_by_name(player)
|
local pname = minetest.get_player_by_name(player)
|
||||||
param = param:lower()
|
|
||||||
|
|
||||||
-- Show the available places to the player (taken from shivajiva101's POI mod, thanks!).
|
-- Show the available places to the player (taken from shivajiva101's POI mod, thanks!).
|
||||||
if param == "" then
|
if param == "" then
|
||||||
local places = {}
|
local places = {}
|
||||||
if not available_places then available_places = {} end
|
if not tp.available_places then tp.available_places = {} end
|
||||||
for key, value in pairs(available_places) do
|
for key, value in pairs(tp.available_places) do
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), key, 0xFFFFFF)
|
||||||
|
end
|
||||||
table.insert(places, key)
|
table.insert(places, key)
|
||||||
end
|
end
|
||||||
if #places == 0 then
|
if #places == 0 then
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("There are no places yet."), 0xFFFFFF)
|
||||||
|
end
|
||||||
return true, S("There are no places yet.")
|
return true, S("There are no places yet.")
|
||||||
end
|
end
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Usage: /tpp <place>"), 0xFFFFFF)
|
||||||
|
end
|
||||||
table.insert(places, S("Usage: /tpp <place>"))
|
table.insert(places, S("Usage: /tpp <place>"))
|
||||||
return true, table.concat(places, "\n")
|
return true, table.concat(places, "\n")
|
||||||
-- Teleport player to the specified place (taken from shivajiva101's POI mod, thanks!).
|
-- Teleport player to the specified place (taken from shivajiva101's POI mod, thanks!).
|
||||||
elseif available_places[param] then
|
elseif tp.available_places[param] then
|
||||||
pos = {x = available_places[param].x, y = available_places[param].y, z = available_places[param].z}
|
pos = {x = tp.available_places[param].x, y = tp.available_places[param].y, z = tp.available_places[param].z}
|
||||||
tpp_teleport_player(player)
|
tp.tpp_teleport_player(player)
|
||||||
minetest.chat_send_player(player, S("Teleporting to @1.", param))
|
minetest.chat_send_player(player, S("Teleporting to @1.", param))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("Teleporting to @1.", param), 0xFFFFFF)
|
||||||
|
end
|
||||||
-- Check if the place exists.
|
-- Check if the place exists.
|
||||||
elseif not available_places[param] then
|
elseif not tp.available_places[param] then
|
||||||
minetest.chat_send_player(player, S("There is no place by that name. Keep in mind this is case-sensitive."))
|
minetest.chat_send_player(player, S("There is no place by that name. Keep in mind this is case-sensitive."))
|
||||||
|
if minetest.get_modpath("chat2") then
|
||||||
|
chat2.send_message(minetest.get_player_by_name(player), S("There is no place by that name. Keep in mind this is case-sensitive."), 0xFFFFFF)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@ -427,49 +555,49 @@ minetest.register_chatcommand("tpr", {
|
|||||||
description = S("Request teleport to another player"),
|
description = S("Request teleport to another player"),
|
||||||
params = S("<playername> | leave playername empty to see help message"),
|
params = S("<playername> | leave playername empty to see help message"),
|
||||||
privs = {interact = true, tp = true},
|
privs = {interact = true, tp = true},
|
||||||
func = tpr_send
|
func = tp.tpr_send
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("tphr", {
|
minetest.register_chatcommand("tphr", {
|
||||||
description = S("Request player to teleport to you"),
|
description = S("Request player to teleport to you"),
|
||||||
params = S("<playername> | leave playername empty to see help message"),
|
params = S("<playername> | leave playername empty to see help message"),
|
||||||
privs = {interact = true, tp = true},
|
privs = {interact = true, tp = true},
|
||||||
func = tphr_send
|
func = tp.tphr_send
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("tpc", {
|
minetest.register_chatcommand("tpc", {
|
||||||
description = S("Teleport to coordinates"),
|
description = S("Teleport to coordinates"),
|
||||||
params = S("<coordinates> | leave coordinates empty to see help message"),
|
params = S("<coordinates> | leave coordinates empty to see help message"),
|
||||||
privs = {interact = true, tp_tpc = true, tp = true},
|
privs = {interact = true, tp_tpc = true, tp = true},
|
||||||
func = tpc_send
|
func = tp.tpc_send
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("tpj", {
|
minetest.register_chatcommand("tpj", {
|
||||||
description = S("Teleport to relative position"),
|
description = S("Teleport to relative position"),
|
||||||
params = S("<axis> <distance> | leave empty to see help message"),
|
params = S("<axis> <distance> | leave empty to see help message"),
|
||||||
privs = {interact = true, tp_tpc = true, tp = true},
|
privs = {interact = true, tp_tpc = true, tp = true},
|
||||||
func = tpj
|
func = tp.tpj
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("tpe", {
|
minetest.register_chatcommand("tpe", {
|
||||||
description = S("Evade Enemy"),
|
description = S("Evade Enemy"),
|
||||||
privs = {interact = true, tp_tpc = true, tp = true},
|
privs = {interact = true, tp_tpc = true, tp = true},
|
||||||
func = tpe
|
func = tp.tpe
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("tpy", {
|
minetest.register_chatcommand("tpy", {
|
||||||
description = S("Accept teleport requests from another player"),
|
description = S("Accept teleport requests from another player"),
|
||||||
privs = {interact = true, tp = true},
|
privs = {interact = true, tp = true},
|
||||||
func = tpr_accept
|
func = tp.tpr_accept
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("tpn", {
|
minetest.register_chatcommand("tpn", {
|
||||||
description = S("Deny teleport requests from another player"),
|
description = S("Deny teleport requests from another player"),
|
||||||
privs = {interact = true, tp = true},
|
privs = {interact = true, tp = true},
|
||||||
func = tpr_deny
|
func = tp.tpr_deny
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Log
|
-- Log
|
||||||
if minetest.settings:get_bool("log_mods") then
|
if minetest.settings:get_bool("log_mods") then
|
||||||
minetest.log("action", S("[Teleport Request] TPS Teleport v@1 Loaded!", version))
|
minetest.log("action", S("[Teleport Request] TPS Teleport v@1 Loaded!", tp.version))
|
||||||
end
|
end
|
||||||
|
84
locale/es.po
84
locale/es.po
@ -16,35 +16,39 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: init.lua:19
|
#: config.lua
|
||||||
msgid "Let players teleport to other players (request will be sent)"
|
msgid "Let players teleport to other players (request will be sent)"
|
||||||
msgstr "Permite que los jugadores se teletransporten a otros jugadores (se enviará una solicitud)"
|
msgstr "Permite que los jugadores se teletransporten a otros jugadores (se enviará una solicitud)"
|
||||||
|
|
||||||
#: init.lua:43
|
#: config.lua
|
||||||
msgid "Gives full admin-access to a player."
|
msgid "Gives full admin-access to a player."
|
||||||
msgstr "Da acceso total de administrador a un jugador."
|
msgstr "Da acceso total de administrador a un jugador."
|
||||||
|
|
||||||
#: init.lua:50
|
#: config.lua
|
||||||
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
||||||
msgstr "Permite a los jugadores teletransportarse a las coordenadas especificadas (si esta permitido por la protección de la área)"
|
msgstr "Permite a los jugadores teletransportarse a las coordenadas especificadas (si esta permitido por la protección de la área)"
|
||||||
|
|
||||||
#: init.lua:105
|
#: init.lua
|
||||||
msgid "You are teleporting to @1."
|
msgid "You are not allowed to send requests because you're muted."
|
||||||
msgstr "Te estas teletransportando a @1."
|
msgstr "No tienes permiso para mandar solicitudes de teletransporte porque estás silenciado."
|
||||||
|
|
||||||
#: init.lua:111
|
#: init.lua
|
||||||
msgid "Usage: /tpr <Player name>"
|
msgid "Usage: /tpr <Player name>"
|
||||||
msgstr "Uso: /tpr <jugador>"
|
msgstr "Uso: /tpr <jugador>"
|
||||||
|
|
||||||
#: init.lua:116
|
#: init.lua
|
||||||
msgid "There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"
|
msgid "There is no player by that name. Keep in mind this is case-sensitive, and the player must be online"
|
||||||
msgstr "No hay jugador con ese nombre. Tenga en cuenta que esto es caso-sensitivo, y el jugador debe de estar én linea."
|
msgstr "No hay jugador con ese nombre. Tenga en cuenta que esto es caso-sensitivo, y el jugador debe de estar én linea."
|
||||||
|
|
||||||
#: init.lua:120
|
#: init.lua
|
||||||
|
msgid "You are teleporting to @1."
|
||||||
|
msgstr "Te estas teletransportando a @1."
|
||||||
|
|
||||||
|
#: init.lua
|
||||||
msgid "@1 is requesting to teleport to you. /tpy to accept"
|
msgid "@1 is requesting to teleport to you. /tpy to accept"
|
||||||
msgstr "@1 esta pidiendo teletransportarse a ti. /tpy para aceptar"
|
msgstr "@1 esta pidiendo teletransportarse a ti. /tpy para aceptar"
|
||||||
|
|
||||||
#: init.lua:121
|
#: init.lua
|
||||||
msgid "Teleport request sent! It will timeout in @1 seconds"
|
msgid "Teleport request sent! It will timeout in @1 seconds"
|
||||||
msgstr "¡Solicitud enviada! Se agotara en @1 segundos"
|
msgstr "¡Solicitud enviada! Se agotara en @1 segundos"
|
||||||
|
|
||||||
@ -52,39 +56,39 @@ msgstr "¡Solicitud enviada! Se agotara en @1 segundos"
|
|||||||
msgid "Request timed-out."
|
msgid "Request timed-out."
|
||||||
msgstr "La solicitud enviada expiró."
|
msgstr "La solicitud enviada expiró."
|
||||||
|
|
||||||
#: init.lua:147
|
#: init.lua
|
||||||
msgid "@1 is teleporting to you."
|
msgid "@1 is teleporting to you."
|
||||||
msgstr "@1 se esta teletransportando a ti."
|
msgstr "@1 se esta teletransportando a ti."
|
||||||
|
|
||||||
#: init.lua:152
|
#: init.lua
|
||||||
msgid "Usage: /tphr <Player name>"
|
msgid "Usage: /tphr <Player name>"
|
||||||
msgstr "Uso: /tphr <jugador>"
|
msgstr "Uso: /tphr <jugador>"
|
||||||
|
|
||||||
#: init.lua:160
|
#: init.lua
|
||||||
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny"
|
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny"
|
||||||
msgstr "@1 esta pidiendo que tu te teletransportes a el/ella. /tpy para aceptar, /tpn para denegar"
|
msgstr "@1 esta pidiendo que tu te teletransportes a el/ella. /tpy para aceptar, /tpn para denegar"
|
||||||
|
|
||||||
#: init.lua:187
|
#: init.lua
|
||||||
msgid "Usage: /tpc <x, y, z>"
|
msgid "Usage: /tpc <x, y, z>"
|
||||||
msgstr "Uso: /tpc <x, y, z>"
|
msgstr "Uso: /tpc <x, y, z>"
|
||||||
|
|
||||||
#: init.lua:194
|
#: init.lua
|
||||||
msgid "You cannot teleport to a location outside the map!"
|
msgid "You cannot teleport to a location outside the map!"
|
||||||
msgstr "¡No puedes teletransportarte afuera del mundo!"
|
msgstr "¡No puedes teletransportarte afuera del mundo!"
|
||||||
|
|
||||||
#: init.lua:204
|
#: init.lua
|
||||||
msgid "Teleporting to: @1, @2, @3"
|
msgid "Teleporting to: @1, @2, @3"
|
||||||
msgstr "Teletransportandose a: @1, @2, @3"
|
msgstr "Teletransportandose a: @1, @2, @3"
|
||||||
|
|
||||||
#: init.lua:215
|
#: init.lua
|
||||||
msgid "Error: @1 is protected by @2."
|
msgid "Error: @1 is protected by @2."
|
||||||
msgstr "Error: @1 esta protegido por @2."
|
msgstr "Error: @1 esta protegido por @2."
|
||||||
|
|
||||||
#: init.lua:240
|
#: init.lua
|
||||||
msgid "Error: You do not have permission to teleport to those coordinates."
|
msgid "Error: You do not have permission to teleport to those coordinates."
|
||||||
msgstr "Error: No tienes permiso para teletransportarte a esas coordenadas."
|
msgstr "Error: No tienes permiso para teletransportarte a esas coordenadas."
|
||||||
|
|
||||||
#: init.lua:258
|
#: init.lua
|
||||||
msgid "Teleport request denied."
|
msgid "Teleport request denied."
|
||||||
msgstr "Solicitud denegada."
|
msgstr "Solicitud denegada."
|
||||||
|
|
||||||
@ -96,63 +100,63 @@ msgstr "Tú denegaste la solicitud de teletransporte que @1 te mando."
|
|||||||
msgid "Usage: /tpn allows you to deny teleport requests sent to you by other players."
|
msgid "Usage: /tpn allows you to deny teleport requests sent to you by other players."
|
||||||
msgstr "Uso: /tpn te permite denegar solicitudes enviadas para ti de otros jugadores."
|
msgstr "Uso: /tpn te permite denegar solicitudes enviadas para ti de otros jugadores."
|
||||||
|
|
||||||
#: init.lua:278
|
#: init.lua
|
||||||
msgid "Usage: /tpy allows you to accept teleport requests sent to you by other players"
|
msgid "Usage: /tpy allows you to accept teleport requests sent to you by other players"
|
||||||
msgstr "Uso: /tpy te permite aceptar solicitudes enviadas para ti de otros jugadores"
|
msgstr "Uso: /tpy te permite aceptar solicitudes enviadas para ti de otros jugadores"
|
||||||
|
|
||||||
#: init.lua
|
#: init.lua
|
||||||
msgid "@1 just disconnected/left (by timeout)."
|
msgid "@1 doesn't exist, or just disconnected/left (by timeout)."
|
||||||
msgstr "@1 se desconecto/fue."
|
msgstr "@1 no existe, o se desconecto/fue."
|
||||||
|
|
||||||
#: init.lua:317
|
#: init.lua
|
||||||
msgid "Request Accepted!"
|
msgid "Request Accepted!"
|
||||||
msgstr "¡Solicitud aceptada!"
|
msgstr "¡Solicitud aceptada!"
|
||||||
|
|
||||||
#: init.lua:330
|
#: init.lua
|
||||||
msgid "Usage: <x|y|z> <number>"
|
msgid "Usage: <x|y|z> <number>"
|
||||||
msgstr "Uso: <x|y|z> <numero>"
|
msgstr "Uso: <x|y|z> <numero>"
|
||||||
|
|
||||||
#: init.lua:353
|
|
||||||
msgid "Not a valid axis. Valid options are X, Y or Z"
|
|
||||||
msgstr "Eje invalido. Opciones validas son x, y, o z"
|
|
||||||
|
|
||||||
#: init.lua
|
#: init.lua
|
||||||
msgid "Not a number!"
|
msgid "Not a number!"
|
||||||
msgstr "¡No un número!"
|
msgstr "¡No un número!"
|
||||||
|
|
||||||
#: init.lua:367
|
#: init.lua
|
||||||
|
msgid "Not a valid axis. Valid options are X, Y or Z"
|
||||||
|
msgstr "Eje invalido. Opciones validas son x, y, o z"
|
||||||
|
|
||||||
|
#: init.lua
|
||||||
msgid "EVADE!"
|
msgid "EVADE!"
|
||||||
msgstr "¡EVADIR!"
|
msgstr "¡EVADIR!"
|
||||||
|
|
||||||
#: init.lua:394
|
#: init.lua
|
||||||
msgid "Request teleport to another player."
|
msgid "Request teleport to another player."
|
||||||
msgstr "Enviar solicitud para teletransportarte a otro jugador."
|
msgstr "Enviar solicitud para teletransportarte a otro jugador."
|
||||||
|
|
||||||
#: init.lua:395
|
#: init.lua
|
||||||
msgid "<playername> | leave playername empty to see help message"
|
msgid "<playername> | leave playername empty to see help message"
|
||||||
msgstr "<jugador> | Deje el nombre del jugador vacío para ver el mensaje de ayuda"
|
msgstr "<jugador> | Deje el nombre del jugador vacío para ver el mensaje de ayuda"
|
||||||
|
|
||||||
#: init.lua:401
|
#: init.lua
|
||||||
msgid "Request player to teleport to you"
|
msgid "Request player to teleport to you"
|
||||||
msgstr "Solicita al jugador que se teletransporte a ti."
|
msgstr "Solicita al jugador que se teletransporte a ti."
|
||||||
|
|
||||||
#: init.lua:408
|
#: init.lua
|
||||||
msgid "Teleport to coordinates"
|
msgid "Teleport to coordinates"
|
||||||
msgstr "Teletransportarse a las coordenadas especificadas."
|
msgstr "Teletransportarse a las coordenadas especificadas."
|
||||||
|
|
||||||
#: init.lua:409
|
#: init.lua
|
||||||
msgid "<coordinates> | leave coordinates empty to see help message"
|
msgid "<coordinates> | leave coordinates empty to see help message"
|
||||||
msgstr "<coordenadas> | Deje las coordenadas vacías para ver el mensaje de ayuda"
|
msgstr "<coordenadas> | Deje las coordenadas vacías para ver el mensaje de ayuda"
|
||||||
|
|
||||||
#: init.lua:415
|
#: init.lua
|
||||||
msgid "Teleport to relative position"
|
msgid "Teleport to relative position"
|
||||||
msgstr "Teletransportarse a la posición relativa."
|
msgstr "Teletransportarse a la posición relativa."
|
||||||
|
|
||||||
#: init.lua:416
|
#: init.lua
|
||||||
msgid "<axis> <distance> | leave empty to see help message"
|
msgid "<axis> <distance> | leave empty to see help message"
|
||||||
msgstr "<eje> <distancia> | Deje vacío para ver el mensaje de ayuda"
|
msgstr "<eje> <distancia> | Deje vacío para ver el mensaje de ayuda"
|
||||||
|
|
||||||
#: init.lua:422
|
#: init.lua
|
||||||
msgid "Evade Enemy"
|
msgid "Evade Enemy"
|
||||||
msgstr "Evadir enemigo."
|
msgstr "Evadir enemigo."
|
||||||
|
|
||||||
@ -180,14 +184,14 @@ msgstr "Teletransportandose a @1."
|
|||||||
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
||||||
msgstr "No hay lugar con ese nombre. Tenga en cuenta que esto es caso-sensitivo."
|
msgstr "No hay lugar con ese nombre. Tenga en cuenta que esto es caso-sensitivo."
|
||||||
|
|
||||||
#: init.lua:428
|
#: init.lua
|
||||||
msgid "Accept teleport requests from another player"
|
msgid "Accept teleport requests from another player"
|
||||||
msgstr "Aceptar solicitudes de otro jugador."
|
msgstr "Aceptar solicitudes de otro jugador."
|
||||||
|
|
||||||
#: init.lua:434
|
#: init.lua
|
||||||
msgid "Deny teleport requests from another player"
|
msgid "Deny teleport requests from another player"
|
||||||
msgstr "Denegar solicitudos de otro jugador."
|
msgstr "Denegar solicitudos de otro jugador."
|
||||||
|
|
||||||
#: init.lua:441
|
#: init.lua
|
||||||
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
||||||
msgstr "[TPS] Solicitud de teletransporte v@1 Cargado!"
|
msgstr "[TPS] Solicitud de teletransporte v@1 Cargado!"
|
||||||
|
@ -16,35 +16,39 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: init.lua:19
|
#: config.lua
|
||||||
msgid "Let players teleport to other players (request will be sent)"
|
msgid "Let players teleport to other players (request will be sent)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:43
|
#: config.lua
|
||||||
msgid "Gives full admin-access to a player."
|
msgid "Gives full admin-access to a player."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:50
|
#: config.lua
|
||||||
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
msgid "Allow player to teleport to coordinates (if allowed by area protection)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:105
|
#: init.lua
|
||||||
msgid "You are teleporting to @1."
|
msgid "You are not allowed to send requests because you're muted."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:111
|
#: init.lua
|
||||||
msgid "Usage: /tpr <Player name>"
|
msgid "Usage: /tpr <Player name>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:116
|
#: init.lua
|
||||||
msgid "There is no player by that name. Keep in mind this is case sensitive, and the player must be online"
|
msgid "There is no player by that name. Keep in mind this is case sensitive, and the player must be online"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:120
|
#: init.lua
|
||||||
|
msgid "You are teleporting to @1."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: init.lua
|
||||||
msgid "@1 is requesting to teleport to you. /tpy to accept"
|
msgid "@1 is requesting to teleport to you. /tpy to accept"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:121
|
#: init.lua
|
||||||
msgid "Teleport request sent! It will timeout in @1 seconds"
|
msgid "Teleport request sent! It will timeout in @1 seconds"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -52,39 +56,39 @@ msgstr ""
|
|||||||
msgid "Request timed-out."
|
msgid "Request timed-out."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:147
|
#: init.lua
|
||||||
msgid "@1 is teleporting to you."
|
msgid "@1 is teleporting to you."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:152
|
#: init.lua
|
||||||
msgid "Usage: /tphr <Player name>"
|
msgid "Usage: /tphr <Player name>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:160
|
#: init.lua
|
||||||
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny"
|
msgid "@1 is requesting that you teleport to them. /tpy to accept; /tpn to deny"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:187
|
#: init.lua
|
||||||
msgid "Usage: /tpc <x, y, z>"
|
msgid "Usage: /tpc <x, y, z>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:194
|
#: init.lua
|
||||||
msgid "You cannot teleport to a location outside the map!"
|
msgid "You cannot teleport to a location outside the map!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:204
|
#: init.lua
|
||||||
msgid "Teleporting to: @1, @2, @3"
|
msgid "Teleporting to: @1, @2, @3"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:215
|
#: init.lua
|
||||||
msgid "Error: @1 is protected by @2."
|
msgid "Error: @1 is protected by @2."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:240
|
#: init.lua
|
||||||
msgid "Error: You do not have permission to teleport to those coordinates."
|
msgid "Error: You do not have permission to teleport to those coordinates."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:258
|
#: init.lua
|
||||||
msgid "Teleport request denied."
|
msgid "Teleport request denied."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -96,31 +100,31 @@ msgstr ""
|
|||||||
msgid "Usage: /tpn allows you to deny teleport requests sent to you by other players."
|
msgid "Usage: /tpn allows you to deny teleport requests sent to you by other players."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:278
|
#: init.lua
|
||||||
msgid "Usage: /tpy allows you to accept teleport requests sent to you by other players"
|
msgid "Usage: /tpy allows you to accept teleport requests sent to you by other players"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua
|
#: init.lua
|
||||||
msgid "@1 just disconnected/left (by timeout)."
|
msgid "@1 doesn't exist, or just disconnected/left (by timeout)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:317
|
#: init.lua
|
||||||
msgid "Request Accepted!"
|
msgid "Request Accepted!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:330
|
#: init.lua
|
||||||
msgid "Usage: <x|y|z> <number>"
|
msgid "Usage: <x|y|z> <number>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:353
|
|
||||||
msgid "Not a valid axis. Valid options are X, Y or Z"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: init.lua
|
#: init.lua
|
||||||
msgid "Not a number!"
|
msgid "Not a number!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:367
|
#: init.lua
|
||||||
|
msgid "Not a valid axis. Valid options are X, Y or Z"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: init.lua
|
||||||
msgid "EVADE!"
|
msgid "EVADE!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -148,46 +152,46 @@ msgstr ""
|
|||||||
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
msgid "There is no place by that name. Keep in mind this is case-sensitive."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:394
|
#: init.lua
|
||||||
msgid "Request teleport to another player."
|
msgid "Request teleport to another player."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:395
|
#: init.lua
|
||||||
msgid "<playername> | leave playername empty to see help message"
|
msgid "<playername> | leave playername empty to see help message"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:401
|
#: init.lua
|
||||||
msgid "Request player to teleport to you"
|
msgid "Request player to teleport to you"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:408
|
#: init.lua
|
||||||
msgid "Teleport to coordinates"
|
msgid "Teleport to coordinates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:409
|
#: init.lua
|
||||||
msgid "<coordinates> | leave coordinates empty to see help message"
|
msgid "<coordinates> | leave coordinates empty to see help message"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:415
|
#: init.lua
|
||||||
msgid "Teleport to relative position"
|
msgid "Teleport to relative position"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:416
|
#: init.lua
|
||||||
msgid "<axis> <distance> | leave empty to see help message"
|
msgid "<axis> <distance> | leave empty to see help message"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:422
|
#: init.lua
|
||||||
msgid "Evade Enemy"
|
msgid "Evade Enemy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:428
|
#: init.lua
|
||||||
msgid "Accept teleport requests from another player"
|
msgid "Accept teleport requests from another player"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:434
|
#: init.lua
|
||||||
msgid "Deny teleport requests from another player"
|
msgid "Deny teleport requests from another player"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: init.lua:441
|
#: init.lua
|
||||||
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
msgid "[Teleport Request] TPS Teleport v@1 Loaded!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
2
mod.conf
2
mod.conf
@ -1,3 +1,3 @@
|
|||||||
name = tpr
|
name = tpr
|
||||||
optional_depends = areas, intllib
|
optional_depends = areas, intllib, beerchat, chat2
|
||||||
description = Allows players to send a request to other players to teleport to them, and do much more.
|
description = Allows players to send a request to other players to teleport to them, and do much more.
|
||||||
|
8
settingtypes.txt
Normal file
8
settingtypes.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Timeout delay (default is 60)
|
||||||
|
tp.timeout_delay (Timeout delay after a request is sent) int 60
|
||||||
|
|
||||||
|
# Enables immediate teleport to players for those who have tp_admin privilege (enabled by default)
|
||||||
|
tp.enable_immediate_teleport (Immediate teleport for those with tp_admin privilege) bool true
|
||||||
|
|
||||||
|
# Enables Teleport To Place command (disabled by default)
|
||||||
|
tp.enable_tpp_command (Enable Teleport To Place command) bool false
|
@ -1,2 +0,0 @@
|
|||||||
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
|
@ -1,2 +0,0 @@
|
|||||||
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
|
Loading…
Reference in New Issue
Block a user