crystalclear: renamed to crystalkamikaze :)
This commit is contained in:
parent
1603f86387
commit
b32586700a
@ -1,30 +0,0 @@
|
||||
local fnd=false
|
||||
local cpos={x=0,y=0,z=0}
|
||||
local function find_crystal()
|
||||
if fnd then return cpos end
|
||||
for k, v in ipairs(minetest.localplayer.get_nearby_objects(100)) do
|
||||
if ( v:get_item_textures():find("mcl_end_crystal")) then
|
||||
cpos=v:get_pos()
|
||||
fnd=true
|
||||
return cpos
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_globalstep(function()
|
||||
if minetest.settings:get_bool("crystalclear") then
|
||||
minetest.settings:set_bool('noclip',true)
|
||||
minetest.settings:set_bool("pitch_move",true)
|
||||
minetest.settings:set_bool("continuous_forward",true)
|
||||
find_crystal()
|
||||
autofly.aim(cpos)
|
||||
core.set_keypress("special1", true)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_death(function()
|
||||
if not minetest.settings:get_bool("crystalclear") then return end
|
||||
fnd=false
|
||||
end)
|
||||
|
||||
minetest.register_cheat("crystalClear", "Combat", "crystalclear")
|
31
clientmods/crystalkamikaze/init.lua
Normal file
31
clientmods/crystalkamikaze/init.lua
Normal file
@ -0,0 +1,31 @@
|
||||
local fnd=false
|
||||
local cpos={x=0,y=0,z=0}
|
||||
local function find_crystal()
|
||||
if fnd then return cpos end
|
||||
for k, v in ipairs(minetest.localplayer.get_nearby_objects(100)) do
|
||||
if ( v:get_item_textures():find("mcl_end_crystal")) then
|
||||
cpos=v:get_pos()
|
||||
fnd=true
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
minetest.register_globalstep(function()
|
||||
if not minetest.settings:get_bool("crystalkamikaze") then return end
|
||||
if not find_crystal() then return end
|
||||
|
||||
minetest.settings:set_bool('noclip',true)
|
||||
minetest.settings:set_bool("pitch_move",true)
|
||||
minetest.settings:set_bool("continuous_forward",true)
|
||||
autofly.aim(cpos)
|
||||
core.set_keypress("special1", true)
|
||||
end)
|
||||
|
||||
minetest.register_on_death(function()
|
||||
if not minetest.settings:get_bool("crystalkamikaze") then return end
|
||||
fnd=false
|
||||
end)
|
||||
|
||||
minetest.register_cheat("CrystalKamikaze", "Combat", "crystalkamikaze")
|
@ -38,4 +38,4 @@ load_mod_autocraft = true
|
||||
load_mod_quint = true
|
||||
load_mod_automt = true
|
||||
load_mod_nlist = true
|
||||
load_mod_crystalclear = true
|
||||
load_mod_crystalkamikaze = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user