Page 1 of 1

[Mod] Magican [0.1] [magican]

PostPosted: Wed Apr 09, 2014 19:21
by Mitroman
This is my third mod and I am now better in programming mods with lua! Thanks for the comments of the first and second mod! So, back to the mod: Was it your dream to be a magican? So here it comes: It adds three magic sticks into the game:
Magicstick:
[ ] [D] [ ]
[ ] [S] [ ]
[ ] [S] [ ]

By left-click, it will teleport you at the block that you are looking at. By right-click it will teleport you at the top of the block(s).

Telestick:
[ ] [M] [ ]
[ ] [S] [ ]
[ ] [S] [ ]

By left-click it will remove the block and stores it in your "magicinvenotry". Then left-click again and the block will be set to the block that you are looking at. With right-click (after have a block in the "magicinventory") you can spawn the block at the top the other block. So it will stack the block into the air... (if you do not know what I mean just try ;) ).

Drystick:
[M] [D] [M]
[ ] [S] [ ]
[ ] [S] [ ]

By left-click it will change a block (e.g. grass, tree, (something that can be dryed) ) into sand, gravel or (stone into fire).

M = mese crystal
D = diamond
S = stick

Download: https://github.com/Mitroman/magican/archive/master.zip
Code: https://github.com/Mitroman/magican
Depends: none
License: CC-BY-SA 3.0

Bugs:
1. With the tele wand, if you right click a block without anything in the "magic inventory" it gives an error.
Status: Fixed.

Screenshots coming soon...

For ideas, ... please conact me! =)
If you wanna more mods like my three mods, just say it! (Another mod is coming, a digger block that diggs blocks automatic. When you want, I will finish the digger mod.)

PostPosted: Wed Apr 09, 2014 21:54
by Evergreen
Cool idea! Testing it now. Also, try using the "range" feature for tools. (especially for the wand which teleports you)
Edit: With the tele wand, if you right click a block without anything in the "magic inventory" it gives an error.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:59:47: ERROR[main]: ServerError: ...est_versions/minetest-play/bin/../mods/magican/stick.lua:45: bad argument #4 to 'set_node' (string expected, got nil)
17:59:47: ERROR[main]: stack traceback:
17:59:47: ERROR[main]:  [C]: in function 'set_node'
17:59:47: ERROR[main]:  ...est_versions/minetest-play/bin/../mods/magican/stick.lua:45: in function <...est_versions/minetest-play/bin/../mods/magican/stick.lua:38>

PostPosted: Thu Apr 10, 2014 08:31
by 4aiman
Evergreen wrote: Also, try using the "range" feature for tools. (especially for the wand which teleports you)


Don't do it without proper preparations, though.
If you would set 'range' to, say, 20 and do not change on_dig and on_rightclick behaviour of all mods, then you'll enable cheating:
- digging with the wands far away;
- opening inventories far away.

So do it with caution and feel free to ask for help :)

Also, have you some plans regarding the future of this mod of yours?

PostPosted: Thu Apr 10, 2014 09:49
by Mitroman
Evergreen wrote:Cool idea! Testing it now. Also, try using the "range" feature for tools. (especially for the wand which teleports you)
Edit: With the tele wand, if you right click a block without anything in the "magic inventory" it gives an error.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:59:47: ERROR[main]: ServerError: ...est_versions/minetest-play/bin/../mods/magican/stick.lua:45: bad argument #4 to 'set_node' (string expected, got nil)
17:59:47: ERROR[main]: stack traceback:
17:59:47: ERROR[main]:  [C]: in function 'set_node'
17:59:47: ERROR[main]:  ...est_versions/minetest-play/bin/../mods/magican/stick.lua:45: in function <...est_versions/minetest-play/bin/../mods/magican/stick.lua:38>

Ill fix. Thanks :D

Re: [Mod] Magican [0.1] [magican]

PostPosted: Sun Sep 14, 2014 22:57
by balthazariv
The idea is original, good works.

Thanks

Re: [Mod] Magican [0.1] [magican]

PostPosted: Mon Sep 15, 2014 08:22
by Minetestforfun
Good work, very funny :)