[Mod] Teleport Request [git rolling release][tpr]

Post Reply
User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

[Mod] Teleport Request [git rolling release][tpr]

by Traxie21 » Post

This mod is a response to the need I have seen on several Minetest servers.
It clones the popular tpa feature in the MineCraft Bukkit mod, Essentials.

Usage:
Type /tpr [playername] to request permission to teleport to a player.
The other player may now type /tpy to allow you to teleport to them, or /tpn to deny.

Type /tphr [playername] to request permission to teleport another player to you.
The other player may now type /tpy to allow you to teleport them to you, or /tpn to deny.

Download:
From CWz's repository: https://github.com/ChaosWormz/teleport- ... master.zip
...or browse the code: https://github.com/ChaosWormz/teleport-request

Install: after downloading and/or extracting, rename the top-level directory to "tpr". Then either place it in your worldmods directory, or put it in your global mods directory and enable it like usual.

Changelog:
Versions beyond 1.0:
Just bugfixes and internal code improvements.

1.0:
Pretty sure this is bug free.
Added /tphr (only visible difference)
Cleaned up code again, variables are still confusing, but it works fine.
Last release unless bugs are found, or good suggestions are added.

0.2:
Fixed major bug
Changed accept command to /tpy
Added deny command /tpn
Added configurable timeout, default 30 seconds.

0.1a:
Base release.

License:
WTFPL

Upcoming:
Change accept/deny commands to /tpy and /tpn. Thanks jojoa -DONE
Fix assumed bug. - DONE
System to /tphr - DONE
Configurable teleport canceling after time - DONE

Credits:
PlitzAdam: for helping me with file.io and showing me an excellent lua tutorial
celeron55: I copied the find_free_place_near function until I write my own :3
jojoa1997: For making my code a bit more logical and helping me get past a syntax error.
Last edited by Traxie21 on Tue Jan 22, 2013 17:20, edited 1 time in total.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

what about
/tp <name>
/tpy
/tpn

y and n are yes and no. the reason i say /tp and not /tpaccept because /tp is way quicker. also /tpy and /tpn are kinda self explanitory and also easy.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

+1 this is pretty sweet.

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Good idea jojoa! I just used the same command Essentials used.
However, I think I'll stick with /tpr as the request command to ensure better compatibility.

Ty Infinity :D
ALSO: I was brainstorming earlier, and it occoured to me that there is probably a bug in this version. If more than one person have pending teleportation requests to the same person, either the server will crash, or both players will be teleported.

I will fix this as soon as I get home, which may be as late as next Monday.

Adding Credits to main post as well.

Posted from my Kindle Keyboard.
Last edited by Traxie21 on Wed Jan 16, 2013 07:36, edited 1 time in total.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Traxie21 wrote:Good idea jojoa! I just used the same command Essentials used.
However, I think I'll stick with /tpr as the request command to ensure better compatibility.

Ty Infinity :D
ALSO: I was brainstorming earlier, and it occoured to me that there is probably a bug in this version. If more than one person have pending teleportation requests to the same person, either the server will crash, or both players will be teleported.

I will fix this as soon as I get home, which may be as late as next Monday.

Adding Credits to main post as well.

Posted from my Kindle Keyboard.
Well /tpr is good. It thought it was /tprequest. I think that there should be one for admins /tpr all and everyone getrs a request.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Erm... what happens if they all accept?
Admin bouncing XD
However, I will probably add a bypass perm so that admins, typing /tpr will be able to teleport without needing to be accepted.

Would that work for you?

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

No they teleport to the admin. As in a admin saying everyone come here
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

New release: 0.2

Changelog:
0.2:
Fixed major bug
Changed accept command to /tpy
Added deny command /tpn
Added configurable timeout, default 30 seconds.

And jojo, I see what you mean, will add a /tphere

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

make tphere for everyone though
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Thats what I meant. However, Its going to be a little tricky to teleport everyone to the admin, but I think I can manage.

This is my first mod after all.

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Hey why not /goto since that a main teleport, code inport.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

What? Could you explain that more clearly please?

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Likwid H-Craft wrote:Hey why not /goto since that a main teleport, code inport.
that is what /tpr is teleport request
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

New release: 1.0 (hopefully final)

Changelog:
1.0:
Pretty sure this is bug free.
Added /tphr (only visible difference)
Cleaned up code again, variables are still confusing, but it works fine.
Last release unless bugs are found, or good suggestions are added.

Zeno
Member
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-
Location: Australia

Re: [Mod] Teleport Request [git rolling release][tpr]

by Zeno » Post

Major rewrite (see original post for new download links)

Potential issues: This version requires no special privs apart from interact. The new priv "tpr_admin" is now only registered if regnewpriv is set to true. Currently the new privilege does nothing and may be deprecated unless somebody would like the feature.

JoshMars
Member
Posts: 108
Joined: Sat May 17, 2014 23:24
In-game: rubber UbuntuJosh

Re:

by JoshMars » Post

Traxie21 wrote: Pretty sure this is bug free.
Famous last words...

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests