[Mod] Sethome [sethome]

User avatar
xyz
Member
 
Posts: 450
Joined: Thu Nov 10, 2011 14:25

[Mod] Sethome [sethome]

by xyz » Fri Jan 06, 2012 05:58

Sethome allows users to set their home position (using /sethome) and then teleport to it (using /home). It may be cheaty some way, but it is really helpful.

License: WTFPL
Dependencies: default

Download (slightly outdated version)
github repository
 

radg
Member
 
Posts: 13
Joined: Sun Aug 07, 2011 15:45

by radg » Fri Jan 06, 2012 11:52

xyz wrote:It may be cheaty some way, but it is really helpful.

Probably you should add cooldown.
 

User avatar
sfan5
Moderator
 
Posts: 3791
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Jan 06, 2012 13:35

radg wrote:
xyz wrote:It may be cheaty some way, but it is really helpful.

Probably you should add cooldown.

+2
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
redcrab
Member
 
Posts: 831
Joined: Tue Dec 13, 2011 13:45
Location: France

by redcrab » Fri Jan 06, 2012 14:01

+1 I like the idea to have a limited teleport feature...

Too avoid the abuse, you may do a teleport with a maximum 1000 block aways from home otherwise don't move or move a distance of 1000 block in home direction . and die if the partial player move stopped into a stone. hehe

or also depnding of the distance, the command gives damages ;) (light speed is not a human stuff ;) )
Last edited by redcrab on Fri Jan 06, 2012 14:03, edited 1 time in total.
0.4 for serious builder click here
Dedicated Minetest redcrab server forum at http://minetestbb.suret.net

It's nice to be important but it is more important to be nice.
 

User avatar
jordan4ibanez
Member
 
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Jan 06, 2012 14:21

this needs to be added into the default mods folder
+1
I've been gone for a long time
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Fri Jan 06, 2012 16:43

+9k
My game: RTMG
GENTOO USER
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Fri Jan 06, 2012 23:26

Added to RTMMP.
My game: RTMG
GENTOO USER
 

User avatar
xyz
Member
 
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Sat Jan 07, 2012 11:38

Updated, got cooldown and max_distance settings.
 

Michael Eh?
Member
 
Posts: 389
Joined: Sun Jan 01, 2012 17:21

by Michael Eh? » Thu Feb 09, 2012 18:57

I was thinking this as an extension of teleport command.

/teleport sethome - set 'home' to current location
/teleport home - teleport to home location
 

User avatar
Alienhunter3010
Member
 
Posts: 12
Joined: Sat Nov 03, 2012 07:58

by Alienhunter3010 » Wed Dec 26, 2012 15:06

Merry Xmas to all.

I've add bookmark support to /sethome and /home commands.

You are free to download the init.lua file from here

http://ubuntuone.com/3wZcAwpSjLU7TM9bJxx8n6

Some examples:

/sethome shop

/home shop

(set and teleport to the 'shop' bookmark of the player)

For admins:

/sethome PoliceStation JohnDoe
/home PoliceStation JohnDoe

(set and teleport the user 'JohnDoe' to the 'PoliceStation' bookmark)

default home location still works:

/sethome

/home

(set and teleport to the default bookmark of the player)

You can also show bookmarks labels:

/showhomes

for admins:

/showhomes JohnDoe
Last edited by Alienhunter3010 on Wed Dec 26, 2012 15:27, edited 1 time in total.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Wed Dec 26, 2012 16:59

Alienhunter3010, nice additions! +1
 

User avatar
VanessaE
Moderator
 
Posts: 4384
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Wed Dec 26, 2012 22:37

Nice! Already added your update to my server.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

User avatar
Alienhunter3010
Member
 
Posts: 12
Joined: Sat Nov 03, 2012 07:58

by Alienhunter3010 » Thu Dec 27, 2012 09:35

VanessaE wrote:Nice! Already added your update to my server.


Let me know if something wrong...

I'm not so sure about RegExp in Lua, they seems to be a bit different from Perl or PHP ones...

And I see that if something is wrong on the mod code my local server DUMP (this is a really BAD thing!)
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Wed Jan 09, 2013 19:55

I found a bug! ;)
If you save your position in some world... and then go to another... and try to "/home"... yep, you gonna find yourself in the middle of nowhere. 'Cause /sethome do not store world name :)
 

wulfsdad
Member
 
Posts: 43
Joined: Tue Dec 04, 2012 10:38
GitHub: hildigerr

by wulfsdad » Wed Jan 09, 2013 20:49

4aiman wrote:I found a bug! ;)
If you save your position in some world... and then go to another... and try to "/home"... yep, you gonna find yourself in the middle of nowhere. 'Cause /sethome do not store world name :)


There is a configuration option to store the homes locally to the world in the init file.
 

User avatar
VanessaE
Moderator
 
Posts: 4384
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sun Feb 10, 2013 17:21

Alienhunter3010, another bug in your fork has cropped up:

A user tried to "/sethome xxxx", which caused the server to crash with:

12:19:19: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaE
rror: error: .../.minetest/games/vanessae_game/mods/sethome/init.lua:168: attemp
t to index local 'output' (a nil value)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sun Feb 10, 2013 17:44

wulfsdad wrote:There is a configuration option to store the homes locally to the world in the init file.

Then that should be default behaviour ;)
 

User avatar
LionsDen
Member
 
Posts: 530
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Sat Jun 08, 2013 10:03

I wanted the local worlds save files so I looked at the code and figured out how to do this. It is easy to do as the code has already been written and is just commented out. Two changes to two lines will make this change.

In the sethome directory, there is a file called init.lua, you should create a backup in case something happens. Load the file init.lua into a text editor (I used Notepad++) and change the following two lines, line 13 and 14.

Code: Select all
local homes_file = minetest.get_modpath('sethome')..'/homes'
--local homes_file = minetest.get_worldpath() .. "/homes"


They should be changed to look like this.

Code: Select all
--local homes_file = minetest.get_modpath('sethome')..'/homes'
local homes_file = minetest.get_worldpath() .. "/homes"


All that needed to be done was to add two dashes, the -- to the beginning of line 13 and delete the two dashes, the -- from the beginning of line 14. You just need to save the file and then you can load up minetest and have different worlds using the same position names. I hope this helps anyone that wanted this and had no clue how to do it.
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
Location: New York
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Fri Aug 30, 2013 16:12

how many homes can i set
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Fri Aug 30, 2013 16:26

Element wrote:how many homes can i set
1
Back from the dead!
 

User avatar
LionsDen
Member
 
Posts: 530
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Fri Aug 30, 2013 18:17

Evergreen wrote:
Element wrote:how many homes can i set
1


Only 1 if you use /sethome by itself. But you can set more locations by adding some text after.

Example:

/sethome mine

will set a location that when you type /home mine it will take you there. So technically it is 1 if you want to use the /home command alone, but many more with location identifiers after the /sethome command.

One warning, if you have multiple worlds, the home position and named positions are the same coordinates in every world so they will overwrite one another unless you make the modification to the lua file that I have mentioned in a post above.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Mon Sep 02, 2013 02:31

LionsDen wrote:
Evergreen wrote:
Element wrote:how many homes can i set
1


Only 1 if you use /sethome by itself. But you can set more locations by adding some text after.

Example:

/sethome mine

will set a location that when you type /home mine it will take you there. So technically it is 1 if you want to use the /home command alone, but many more with location identifiers after the /sethome command.

One warning, if you have multiple worlds, the home position and named positions are the same coordinates in every world so they will overwrite one another unless you make the modification to the lua file that I have mentioned in a post above.


This is not quite correct. It is not "/sethome [location]", it is "/sethome <player>" -- by creating that location identifier, you will be effectively using up a player slot.

To be safer and courteous to other players, prefix your home location with your username. "mine" becomes "<player>_mine" or something like that. In this way, you can't set a home name that is someone else's username, and you can set "<player1>_mine" and "<player2>_mine" so that both players can have mines, preventing from one player from creating "/home mine" and preventing all other players from using that.

Of course, all this only works if they have the "home_other" and "sethome_other" priveleges. If they don't, they can only set one home.
Last edited by ak399g on Mon Sep 02, 2013 02:49, edited 1 time in total.
aka SAFR
 

User avatar
LionsDen
Member
 
Posts: 530
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Mon Sep 02, 2013 04:32

ak399g wrote:This is not quite correct. It is not "/sethome [location]", it is "/sethome <player>" -- by creating that location identifier, you will be effectively using up a player slot.

To be safer and courteous to other players, prefix your home location with your username. "mine" becomes "<player>_mine" or something like that. In this way, you can't set a home name that is someone else's username, and you can set "<player1>_mine" and "<player2>_mine" so that both players can have mines, preventing from one player from creating "/home mine" and preventing all other players from using that.


Nope, wrong.

Look at your homes file and the sethome's init.lua file. The player's name is stored with the location name. You are not overwriting anyone else's locations. Maybe you were looking at an old version but the version that I downloaded months ago stores the player info with the location and the location name.
 

User avatar
ak399g
Member
 
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR

by ak399g » Tue Sep 03, 2013 02:01

Didn't have Alienhunter's new init.lua. Works now.
aka SAFR
 

User avatar
fireglow
Member
 
Posts: 93
Joined: Fri Mar 28, 2014 11:36
Location: Germany
IRC: fireglow
In-game: fireglow

Re: [Mod] Sethome [sethome]

by fireglow » Sat Mar 28, 2015 21:57

Does anybody have a recent version of Alienhunters fork?
The UbuntuOne link doesn't work anymore :-/
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: VanessaE and 4 guests