2 -- gui shit shamelessly stolen from advmarkers
3 -- https://git.minetest.land/luk3yx/advmarkers-csm
5 PATCHING MINETEST: (for autoaim)
6 in l_localplayer.h add:
7 static int l_set_yaw(lua_State *L);
8 static int l_set_pitch(lua_State *L);
10 in l_localplayer.cpp add:
11 int LuaLocalPlayer::l_set_yaw(lua_State *L)
13 LocalPlayer *player = getobject(L, 1);
14 f32 p = (float) luaL_checkinteger(L, 2);
16 g_game->cam_view.camera_yaw = p;
17 g_game->cam_view_target.camera_yaw = p;
21 int LuaLocalPlayer::l_set_pitch(lua_State *L)
23 LocalPlayer *player = getobject(L, 1);
24 f32 p = (float) luaL_checkinteger(L, 2);
26 g_game->cam_view.camera_pitch = p;
27 g_game->cam_view_target.camera_pitch = p;
31 in src/client/game.h, below class Game { public: add:
32 CameraOrientation cam_view = {0};
33 CameraOrientation cam_view_target = { 0 };
35 from src/client/game.cpp remove
36 CameraOrientation cam_view = {0};
37 CameraOrientation cam_view_target = { 0 };
42 -- .wa x,y,z name - add waypoint with coords and name
43 -- .wah - quickadd this location (name will be time and date)
44 -- .wp - open the selection menu
51 local landing_distance
=100
55 local storage
= minetest
.get_mod_storage()
57 local lpos
={x
=0,y
=0,z
=0}
58 local info
=minetest
.get_server_info()
59 local stprefix
="autofly-".. info
['address'] .. '-'
61 autofly
.cruiseheight
= 30
63 local modname
= minetest
.get_current_modname()
64 local modpath
= minetest
.get_modpath(modname
)
65 dofile(modpath
.. "/wpforms.lua")
70 local function pos_to_string(pos
)
71 if type(pos
) == 'table' then
72 pos
= minetest
.pos_to_string(vector
.round(pos
))
74 if type(pos
) == 'string' then
79 local function string_to_pos(pos
)
80 if type(pos
) == 'string' then
81 pos
= minetest
.string_to_pos(pos
)
83 if type(pos
) == 'table' then
84 return vector
.round(pos
)
87 function round2(num
, numDecimalPlaces
)
88 return tonumber(string.format("%." .. (numDecimalPlaces
or 0) .. "f", num
))
91 function autofly
.get2ddst(pos1
,pos2
)
92 return vector
.distance({x
=pos1
.x
,y
=0,z
=pos1
.z
},{x
=pos2
.x
,y
=0,z
=pos2
.z
})
95 local last_sprint
= false
97 minetest
.register_globalstep(function()
99 if minetest
.settings
:get_bool("autosprint") or (minetest
.settings
:get_bool("continuous_forward") and minetest
.settings
:get_bool("autofsprint")) then
100 core
.set_keypress("special1", true)
102 elseif last_sprint
then
103 core
.set_keypress("special1", false)
108 if not minetest
.localplayer
then return end
109 if not autofly
.flying
then autofly
.set_hud_info("")
111 local pos
= autofly
.last_coords
113 local dst
= vector
.distance(pos
,minetest
.localplayer
:get_pos())
115 if not (speed
== 0) then etatime
= round2(dst
/ speed
/ 60,2) end
116 autofly
.etatime
=etatime
117 autofly
.set_hud_info(autofly
.last_name
.. "\n" .. pos_to_string(pos
) .. "\n" .. "ETA" .. etatime
.. " mins")
118 if autofly
.flying
and dst
< landing_distance
then
123 if not minetest
.settings
:get_bool("freecam") and autofly
.flying
and (minetest
.settings
:get_bool('afly_autoaim')) then
124 autofly
.aim(autofly
.last_coords
)
125 --core.set_keypress("special1", true)
128 if ( os
.time() < ltime
+ 1 ) then return end
131 local dst
=vector
.distance(minetest
.localplayer
:get_pos(),lpos
)
135 lpos
=minetest
.localplayer
:get_pos()
140 function autofly
.set_hud_wp(pos
, title
)
142 minetest
.localplayer
:hud_remove(hud_wp
)
144 pos
= string_to_pos(pos
)
146 if not pos
then return end
148 title
= pos
.x
.. ', ' .. pos
.y
.. ', ' .. pos
.z
150 autofly
.last_name
=title
152 minetest
.localplayer
:hud_change(hud_wp
, 'name', title
)
153 minetest
.localplayer
:hud_change(hud_wp
, 'world_pos', pos
)
155 hud_wp
= minetest
.localplayer
:hud_add({
156 hud_elem_type
= 'waypoint',
167 function autofly
.set_hud_info(text
)
168 if not minetest
.localplayer
then return end
169 if type(text
) ~= "string" then return end
170 local vspeed
=minetest
.localplayer
:get_velocity()
171 local ttext
=text
.."\nSpeed: "..speed
.."n/s\n"..round2(vspeed
.x
,2) ..','..round2(vspeed
.y
,2) ..','..round2(vspeed
.z
,2) .."\nYaw:"..round2(minetest
.localplayer
:get_yaw(),2).."° Pitch:" ..round2(minetest
.localplayer
:get_pitch(),2).."°"
173 minetest
.localplayer
:hud_change(hud_info
,'text',ttext
)
175 hud_info
= minetest
.localplayer
:hud_add({
176 hud_elem_type
= 'text',
177 name
= "Flight Info",
181 position
= {x
=0,y
=0.90},
182 alignment
={x
=1,y
=1},
191 function autofly
.display_waypoint(name
)
192 local pos
=autofly
.get_waypoint(name
)
193 autofly
.last_name
= name
194 autofly
.last_coords
= pos
195 autofly
.set_hud_info(name
)
196 autofly
.aim(autofly
.last_coords
)
197 autofly
.set_hud_wp(autofly
.last_coords
, autofly
.last_name
)
201 function autofly
.goto_waypoint(name
)
202 local wp
=autofly
.get_waypoint(name
)
204 autofly
.last_name
=name
205 autofly
.display_waypoint(autofly
.last_name
)
209 function autofly
.goto(pos
)
210 oldpm
=minetest
.settings
:get_bool("pitch_move")
211 minetest
.settings
:set_bool("pitch_move",true)
212 minetest
.settings
:set_bool("continuous_forward",true)
213 if minetest
.settings
:get_bool("afly_sprint") then
214 minetest
.settings
:set_bool("autofsprint",true)
215 minetest
.settings
:set_bool("autoeat_timed",true)
217 minetest
.settings
:set_bool("afly_autoaim",true)
218 autofly
.last_coords
= pos
219 autofly
.last_name
= minetest
.pos_to_string(pos
)
220 autofly
.aim(autofly
.last_coords
)
222 autofly
.set_hud_wp(autofly
.last_coords
, autofly
.last_name
)
226 function autofly
.arrived()
227 if not autofly
.flying
then return end
228 minetest
.settings
:set("continuous_forward", "false")
229 minetest
.settings
:set_bool("autofsprint",false)
230 minetest
.settings
:set_bool("pitch_move",oldpm
)
231 minetest
.settings
:set_bool("afly_autoaim",false)
232 minetest
.settings
:set_bool("autoeat_timed",false)
233 autofly
.set_hud_info("Arrived at destination")
234 autofly
.flying
= false
235 minetest
.localplayer
:hud_change(hud_info
,'text',autofly
.last_name
.. "\n" .. "Arrived at destination.")
236 minetest
.sound_play({name
= "default_alert", gain
= 1.0})
239 local cruise_wason
=false
241 local nodenames_ground
= {
246 'mcl_colorblocks:hardened_clay',
247 'mcl_colorblocks:hardened_clay_orange',
248 'mcl_colorblocks:hardened_clay_yellow',
249 'mcl_colorblocks:hardened_clay_red',
251 'mcl_core:netherrack',
253 'mcl_core:water_source',
254 'mcl_core:water_flowing',
255 'mcl_core:lava_source',
256 'mcl_core:lava_flowing',
260 'mcl_anvils:anvil_damage_1',
261 'mcl_anvils:anvil_damage_2',
262 'mcl_anvils:update_formspec_0_60_0',
264 'mcl_armor:boots_chain',
265 'mcl_armor:boots_diamond',
266 'mcl_armor:boots_gold',
267 'mcl_armor:boots_iron',
268 'mcl_armor:boots_leather',
269 'mcl_armor:chestplate_',
270 'mcl_armor:chestplate_chain',
271 'mcl_armor:chestplate_diamond',
272 'mcl_armor:chestplate_gold',
273 'mcl_armor:chestplate_iron',
274 'mcl_armor:chestplate_leather',
276 'mcl_armor:helmet_chain',
277 'mcl_armor:helmet_diamond',
278 'mcl_armor:helmet_gold',
279 'mcl_armor:helmet_iron',
280 'mcl_armor:helmet_leather',
281 'mcl_armor:leggings_',
282 'mcl_armor:leggings_chain',
283 'mcl_armor:leggings_diamond',
284 'mcl_armor:leggings_gold',
285 'mcl_armor:leggings_iron',
286 'mcl_armor:leggings_leather',
287 'mcl_banners:banner_item_',
288 'mcl_banners:banner_item_white',
289 'mcl_banners:hanging_banner',
290 'mcl_banners:respawn_entities',
291 'mcl_banners:standing_banner',
293 'mcl_beds:bed_red_bottom',
294 'mcl_beds:bed_red_top',
295 'mcl_beds:bed_white_bottom',
298 'mcl_biomes:chorus_plant',
301 'mcl_books:bookshelf',
303 'mcl_books:writable_book',
304 'mcl_books:written_book',
306 'mcl_bows:arrow_box',
307 'mcl_bows:arrow_entity',
315 'mcl_brewing:stand_',
316 'mcl_brewing:stand_000',
317 'mcl_brewing:stand_001',
318 'mcl_brewing:stand_010',
319 'mcl_brewing:stand_011',
320 'mcl_brewing:stand_100',
321 'mcl_brewing:stand_101',
322 'mcl_brewing:stand_110',
323 'mcl_brewing:stand_111',
324 'mcl_buckets:bucket_empty',
325 'mcl_buckets:bucket_lava',
326 'mcl_buckets:bucket_river_water',
327 'mcl_buckets:bucket_water',
332 'mcl_cauldrons:cauldron',
333 'mcl_cauldrons:cauldron_',
334 'mcl_cauldrons:cauldron_1',
335 'mcl_cauldrons:cauldron_1r',
336 'mcl_cauldrons:cauldron_2',
337 'mcl_cauldrons:cauldron_2r',
338 'mcl_cauldrons:cauldron_3',
339 'mcl_cauldrons:cauldron_3r',
341 'mcl_chests:ender_chest',
342 'mcl_chests:reset_trapped_chests',
343 'mcl_chests:trapped_chest',
344 'mcl_chests:trapped_chest_',
345 'mcl_chests:trapped_chest_left',
346 'mcl_chests:trapped_chest_on',
347 'mcl_chests:trapped_chest_on_left',
348 'mcl_chests:trapped_chest_on_right',
349 'mcl_chests:trapped_chest_right',
350 'mcl_chests:update_ender_chest_formspecs_0_60_0',
351 'mcl_chests:update_formspecs_0_51_0',
352 'mcl_chests:update_shulker_box_formspecs_0_60_0',
353 'mcl_chests:violet_shulker_box',
356 'mcl_cocoas:cocoa_1',
357 'mcl_cocoas:cocoa_2',
358 'mcl_cocoas:cocoa_3',
359 'mcl_colorblocks:concrete_',
360 'mcl_colorblocks:concrete_powder_',
361 'mcl_colorblocks:glazed_terracotta_',
362 'mcl_colorblocks:glazed_terracotta_black',
363 'mcl_colorblocks:glazed_terracotta_blue',
364 'mcl_colorblocks:glazed_terracotta_brown',
365 'mcl_colorblocks:glazed_terracotta_cyan',
366 'mcl_colorblocks:glazed_terracotta_green',
367 'mcl_colorblocks:glazed_terracotta_grey',
368 'mcl_colorblocks:glazed_terracotta_light_blue',
369 'mcl_colorblocks:glazed_terracotta_lime',
370 'mcl_colorblocks:glazed_terracotta_magenta',
371 'mcl_colorblocks:glazed_terracotta_orange',
372 'mcl_colorblocks:glazed_terracotta_pink',
373 'mcl_colorblocks:glazed_terracotta_purple',
374 'mcl_colorblocks:glazed_terracotta_red',
375 'mcl_colorblocks:glazed_terracotta_silver',
376 'mcl_colorblocks:glazed_terracotta_white',
377 'mcl_colorblocks:glazed_terracotta_yellow',
378 'mcl_colorblocks:hardened_clay',
379 'mcl_colorblocks:hardened_clay_',
380 'mcl_colorblocks:hardened_clay_orange',
381 'mcl_comparators:comparator_',
382 'mcl_comparators:comparator_off_',
383 'mcl_comparators:comparator_off_comp',
384 'mcl_comparators:comparator_off_sub',
385 'mcl_comparators:comparator_on_',
386 'mcl_comparators:comparator_on_comp',
387 'mcl_comparators:comparator_on_sub',
388 'mcl_compass:compass',
389 'mcl_core:acacialeaves',
390 'mcl_core:acaciasapling',
391 'mcl_core:acaciatree',
392 'mcl_core:acaciawood',
394 'mcl_core:andesite_smooth',
396 'mcl_core:apple_gold',
397 'mcl_core:axe_diamond',
400 'mcl_core:axe_stone',
404 'mcl_core:birchsapling',
405 'mcl_core:birchtree',
406 'mcl_core:birchwood',
407 'mcl_core:bone_block',
410 'mcl_core:brick_block',
412 'mcl_core:charcoal_lump',
414 'mcl_core:clay_lump',
415 'mcl_core:coalblock',
416 'mcl_core:coal_lump',
417 'mcl_core:coarse_dirt',
419 'mcl_core:cobblestone',
421 'mcl_core:darksapling',
426 'mcl_core:diamondblock',
428 'mcl_core:diorite_smooth',
430 'mcl_core:dirt_with_dry_grass',
431 'mcl_core:dirt_with_dry_grass_snow',
432 'mcl_core:dirt_with_grass',
433 'mcl_core:dirt_with_grass_snow',
435 'mcl_core:emeraldblock',
437 'mcl_core:frosted_ice_',
438 'mcl_core:frosted_ice_0',
441 'mcl_core:glass_black',
442 'mcl_core:glass_blue',
443 'mcl_core:glass_brown',
444 'mcl_core:glass_cyan',
445 'mcl_core:glass_gray',
446 'mcl_core:glass_green',
447 'mcl_core:glass_light_blue',
448 'mcl_core:glass_lime',
449 'mcl_core:glass_magenta',
450 'mcl_core:glass_orange',
451 'mcl_core:glass_pink',
452 'mcl_core:glass_purple',
453 'mcl_core:glass_red',
454 'mcl_core:glass_silver',
455 'mcl_core:glass_white',
456 'mcl_core:glass_yellow',
457 'mcl_core:goldblock',
458 'mcl_core:gold_ingot',
459 'mcl_core:gold_nugget',
461 'mcl_core:granite_smooth',
462 'mcl_core:grass_path',
465 'mcl_core:ironblock',
466 'mcl_core:iron_ingot',
467 'mcl_core:iron_nugget',
468 'mcl_core:jungleleaves',
469 'mcl_core:junglesapling',
470 'mcl_core:jungletree',
471 'mcl_core:junglewood',
473 'mcl_core:lapisblock',
474 'mcl_core:lava_flowing',
475 'mcl_core:lava_source',
478 'mcl_core:mossycobble',
480 'mcl_core:mycelium_snow',
482 'mcl_core:packed_ice',
484 'mcl_core:pick_diamond',
485 'mcl_core:pick_gold',
486 'mcl_core:pick_iron',
487 'mcl_core:pick_stone',
488 'mcl_core:pick_wood',
490 'mcl_core:podzol_snow',
491 'mcl_core:realm_barrier',
493 'mcl_core:redsandstone',
494 'mcl_core:redsandstonecarved',
495 'mcl_core:redsandstonesmooth',
496 'mcl_core:redsandstonesmooth2',
498 'mcl_core:replace_legacy_dry_grass_0_65_0',
500 'mcl_core:sandstone',
501 'mcl_core:sandstonecarved',
502 'mcl_core:sandstonesmooth',
503 'mcl_core:sandstonesmooth2',
506 'mcl_core:shovel_diamond',
507 'mcl_core:shovel_gold',
508 'mcl_core:shovel_iron',
509 'mcl_core:shovel_stone',
510 'mcl_core:shovel_wood',
511 'mcl_core:slimeblock',
514 'mcl_core:snowblock',
515 'mcl_core:spruceleaves',
516 'mcl_core:sprucesapling',
517 'mcl_core:sprucetree',
518 'mcl_core:sprucewood',
521 'mcl_core:stonebrick',
522 'mcl_core:stonebrickcarved',
523 'mcl_core:stonebrickcracked',
524 'mcl_core:stonebrickmossy',
525 'mcl_core:stone_smooth',
526 'mcl_core:stone_with_coal',
527 'mcl_core:stone_with_diamond',
528 'mcl_core:stone_with_emerald',
529 'mcl_core:stone_with_gold',
530 'mcl_core:stone_with_iron',
531 'mcl_core:stone_with_lapis',
532 'mcl_core:stone_with_redstone',
533 'mcl_core:stone_with_redstone_lit',
535 'mcl_core:sword_diamond',
536 'mcl_core:sword_gold',
537 'mcl_core:sword_iron',
538 'mcl_core:sword_stone',
539 'mcl_core:sword_wood',
540 'mcl_core:tallgrass',
545 'mcl_core:water_flowing',
546 'mcl_core:water_source',
548 'mcl_dispenser:dispenser_down',
549 'mcl_dispenser:dispenser_up',
550 'mcl_dispensers:dispenser',
551 'mcl_dispensers:dispenser_down',
552 'mcl_dispensers:dispenser_up',
553 'mcl_dispensers:update_formspecs_0_60_0',
554 'mcl_doors:acacia_door',
555 'mcl_doors:birch_door',
556 'mcl_doors:dark_oak_door',
557 'mcl_doors:iron_door',
558 'mcl_doors:iron_trapdoor',
559 'mcl_doors:iron_trapdoor_open',
560 'mcl_doors:jungle_door',
561 'mcl_doors:register_door',
562 'mcl_doors:register_trapdoor',
563 'mcl_doors:spruce_door',
564 'mcl_doors:trapdoor',
565 'mcl_doors:trapdoor_open',
566 'mcl_doors:wooden_door',
567 'mcl_droppers:dropper',
568 'mcl_droppers:dropper_down',
569 'mcl_droppers:dropper_up',
570 'mcl_droppers:update_formspecs_0_51_0',
571 'mcl_droppers:update_formspecs_0_60_0',
576 'mcl_dye:dark_green',
588 'mcl_end:chorus_flower',
589 'mcl_end:chorus_flower_dead',
590 'mcl_end:chorus_fruit',
591 'mcl_end:chorus_fruit_popped',
592 'mcl_end:chorus_plant',
593 'mcl_end:dragon_egg',
594 'mcl_end:end_bricks',
598 'mcl_end:purpur_block',
599 'mcl_end:purpur_pillar',
600 'mcl_farming:add_gourd',
601 'mcl_farming:add_plant',
602 'mcl_farming:beetroot',
603 'mcl_farming:beetroot_',
604 'mcl_farming:beetroot_0',
605 'mcl_farming:beetroot_1',
606 'mcl_farming:beetroot_2',
607 'mcl_farming:beetroot_item',
608 'mcl_farming:beetroot_seeds',
609 'mcl_farming:beetroot_soup',
611 'mcl_farming:carrot',
612 'mcl_farming:carrot_',
613 'mcl_farming:carrot_1',
614 'mcl_farming:carrot_2',
615 'mcl_farming:carrot_3',
616 'mcl_farming:carrot_4',
617 'mcl_farming:carrot_5',
618 'mcl_farming:carrot_6',
619 'mcl_farming:carrot_7',
620 'mcl_farming:carrot_item',
621 'mcl_farming:carrot_item_gold',
622 'mcl_farming:cookie',
623 'mcl_farming:grow_plant',
624 'mcl_farming:growth',
625 'mcl_farming:hay_block',
626 'mcl_farming:hoe_diamond',
627 'mcl_farming:hoe_gold',
628 'mcl_farming:hoe_iron',
629 'mcl_farming:hoe_stone',
630 'mcl_farming:hoe_wood',
632 'mcl_farming:melon_item',
633 'mcl_farming:melon_seeds',
634 'mcl_farming:melontige_',
635 'mcl_farming:melontige_1',
636 'mcl_farming:melontige_2',
637 'mcl_farming:melontige_3',
638 'mcl_farming:melontige_4',
639 'mcl_farming:melontige_5',
640 'mcl_farming:melontige_6',
641 'mcl_farming:melontige_7',
642 'mcl_farming:melontige_linked',
643 'mcl_farming:melontige_unconnect',
644 'mcl_farming:mushroom_brown',
645 'mcl_farming:mushroom_red',
646 'mcl_farming:place_seed',
647 'mcl_farming:potato',
648 'mcl_farming:potato_',
649 'mcl_farming:potato_1',
650 'mcl_farming:potato_2',
651 'mcl_farming:potato_3',
652 'mcl_farming:potato_4',
653 'mcl_farming:potato_5',
654 'mcl_farming:potato_6',
655 'mcl_farming:potato_7',
656 'mcl_farming:potato_item',
657 'mcl_farming:potato_item_baked',
658 'mcl_farming:potato_item_poison',
659 'mcl_farming:pumkin_seeds',
660 'mcl_farming:pumpkin',
661 'mcl_farming:pumpkin_',
662 'mcl_farming:pumpkin_1',
663 'mcl_farming:pumpkin_2',
664 'mcl_farming:pumpkin_3',
665 'mcl_farming:pumpkin_4',
666 'mcl_farming:pumpkin_5',
667 'mcl_farming:pumpkin_6',
668 'mcl_farming:pumpkin_7',
669 'mcl_farming:pumpkin_face',
670 'mcl_farming:pumpkin_face_light',
671 'mcl_farming:pumpkin_pie',
672 'mcl_farming:pumpkin_seeds',
673 'mcl_farming:pumpkintige_linked',
674 'mcl_farming:pumpkintige_unconnect',
676 'mcl_farming:soil_wet',
677 'mcl_farming:stem_color',
679 'mcl_farming:wheat_',
680 'mcl_farming:wheat_1',
681 'mcl_farming:wheat_2',
682 'mcl_farming:wheat_3',
683 'mcl_farming:wheat_4',
684 'mcl_farming:wheat_5',
685 'mcl_farming:wheat_6',
686 'mcl_farming:wheat_7',
687 'mcl_farming:wheat_item',
688 'mcl_farming:wheat_seeds',
689 'mcl_fences:dark_oak_fence',
691 'mcl_fences:nether_brick_fence',
692 'mcl_fire:basic_flame',
693 'mcl_fire:eternal_fire',
695 'mcl_fire:fire_charge',
696 'mcl_fire:flint_and_steel',
698 'mcl_fishing:bobber',
699 'mcl_fishing:bobber_entity',
700 'mcl_fishing:clownfish_raw',
701 'mcl_fishing:fish_cooked',
702 'mcl_fishing:fishing_rod',
703 'mcl_fishing:fish_raw',
704 'mcl_fishing:pufferfish_raw',
705 'mcl_fishing:salmon_cooked',
706 'mcl_fishing:salmon_raw',
707 'mcl_flowerpots:flower_pot',
708 'mcl_flowerpots:flower_pot_',
709 'mcl_flowers:allium',
710 'mcl_flowers:azure_bluet',
711 'mcl_flowers:blue_orchid',
712 'mcl_flowers:dandelion',
713 'mcl_flowers:double_fern',
714 'mcl_flowers:double_fern_top',
715 'mcl_flowers:double_grass',
716 'mcl_flowers:double_grass_top',
719 'mcl_flowers:lilac_top',
720 'mcl_flowers:oxeye_daisy',
722 'mcl_flowers:peony_top',
724 'mcl_flowers:rose_bush',
725 'mcl_flowers:rose_bush_top',
726 'mcl_flowers:sunflower',
727 'mcl_flowers:sunflower_top',
728 'mcl_flowers:tallgrass',
729 'mcl_flowers:tulip_orange',
730 'mcl_flowers:tulip_pink',
731 'mcl_flowers:tulip_red',
732 'mcl_flowers:tulip_white',
733 'mcl_flowers:waterlily',
734 'mcl_furnaces:flames',
735 'mcl_furnaces:furnace',
736 'mcl_furnaces:furnace_active',
737 'mcl_furnaces:update_formspecs_0_60_0',
739 'mcl_heads:skeleton',
740 'mcl_heads:wither_skeleton',
742 'mcl_hoppers:hopper',
743 'mcl_hoppers:hopper_disabled',
744 'mcl_hoppers:hopper_item',
745 'mcl_hoppers:hopper_side',
746 'mcl_hoppers:hopper_side_disabled',
747 'mcl_hoppers:update_formspec_0_60_0',
748 'mcl_hunger:exhaustion',
750 'mcl_hunger:saturation',
751 'mcl_inventory:workbench',
752 'mcl_itemframes:item',
753 'mcl_itemframes:item_frame',
754 'mcl_itemframes:respawn_entities',
755 'mcl_itemframes:update_legacy_item_frames',
756 'mcl_jukebox:jukebox',
757 'mcl_jukebox:record_',
758 'mcl_jukebox:record_1',
759 'mcl_jukebox:record_2',
760 'mcl_jukebox:record_3',
761 'mcl_jukebox:record_4',
762 'mcl_jukebox:record_5',
763 'mcl_jukebox:record_6',
764 'mcl_jukebox:record_7',
765 'mcl_jukebox:record_8',
766 'mcl_jukebox:record_9',
767 'mcl_maps:empty_map',
768 'mcl_maps:filled_map',
770 'mcl_minecarts:activator_rail',
771 'mcl_minecarts:activator_rail_on',
772 'mcl_minecarts:check_front_up_down',
773 'mcl_minecarts:chest_minecart',
774 'mcl_minecarts:command_block_minecart',
775 'mcl_minecarts:detector_rail',
776 'mcl_minecarts:detector_rail_on',
777 'mcl_minecarts:furnace_minecart',
778 'mcl_minecarts:get_rail_direction',
779 'mcl_minecarts:get_sign',
780 'mcl_minecarts:golden_rail',
781 'mcl_minecarts:golden_rail_on',
782 'mcl_minecarts:hopper_minecart',
783 'mcl_minecarts:is_rail',
784 'mcl_minecarts:minecart',
785 'mcl_minecarts:rail',
786 'mcl_minecarts:tnt_minecart',
787 'mcl_minecarts:velocity_to_dir',
789 'mcl_mobitems:blaze_powder',
790 'mcl_mobitems:blaze_rod',
792 'mcl_mobitems:carrot_on_a_stick',
793 'mcl_mobitems:chicken',
794 'mcl_mobitems:cooked_beef',
795 'mcl_mobitems:cooked_chicken',
796 'mcl_mobitems:cooked_mutton',
797 'mcl_mobitems:cooked_porkchop',
798 'mcl_mobitems:cooked_rabbit',
799 'mcl_mobitems:ender_eye',
800 'mcl_mobitems:feather',
801 'mcl_mobitems:ghast_tear',
802 'mcl_mobitems:gunpowder',
803 'mcl_mobitems:leather',
804 'mcl_mobitems:magma_cream',
805 'mcl_mobitems:milk_bucket',
806 'mcl_mobitems:mutton',
807 'mcl_mobitems:nether_star',
808 'mcl_mobitems:porkchop',
809 'mcl_mobitems:rabbit',
810 'mcl_mobitems:rabbit_foot',
811 'mcl_mobitems:rabbit_hide',
812 'mcl_mobitems:rabbit_stew',
813 'mcl_mobitems:rotten_flesh',
814 'mcl_mobitems:saddle',
815 'mcl_mobitems:shulker_shell',
816 'mcl_mobitems:slimeball',
817 'mcl_mobitems:spider_eye',
818 'mcl_mobitems:string',
820 'mcl_mobspawners:doll',
821 'mcl_mobspawners:respawn_entities',
822 'mcl_mobspawners:spawner',
823 'mcl_mushrooms:brown_mushroom_block_cap_corner',
824 'mcl_mushrooms:brown_mushroom_block_cap_side',
825 'mcl_mushrooms:mushroom_brown',
826 'mcl_mushrooms:mushroom_red',
827 'mcl_mushrooms:mushroom_stew',
828 'mcl_mushrooms:red_mushroom_block_cap_corner',
829 'mcl_mushrooms:red_mushroom_block_cap_side',
830 'mcl_mushrooms:replace_legacy_mushroom_caps',
831 'mcl_nether:glowstone',
832 'mcl_nether:glowstone_dust',
834 'mcl_nether:nether_brick',
835 'mcl_nether:netherbrick',
836 'mcl_nether:nether_lava_flowing',
837 'mcl_nether:nether_lava_source',
838 'mcl_nether:netherrack',
839 'mcl_nether:nether_wart',
840 'mcl_nether:nether_wart_',
841 'mcl_nether:nether_wart_0',
842 'mcl_nether:nether_wart_1',
843 'mcl_nether:nether_wart_2',
844 'mcl_nether:nether_wart_block',
845 'mcl_nether:nether_wart_item',
847 'mcl_nether:quartz_block',
848 'mcl_nether:quartz_chiseled',
849 'mcl_nether:quartz_ore',
850 'mcl_nether:quartz_pillar',
851 'mcl_nether:quartz_smooth',
852 'mcl_nether:red_nether_brick',
853 'mcl_nether:soul_sand',
854 'mcl_observers:observer',
855 'mcl_observers:observer_down',
856 'mcl_observers:observer_down_off',
857 'mcl_observers:observer_down_on',
858 'mcl_observers:observer_off',
859 'mcl_observers:observer_on',
860 'mcl_observers:observer_up',
861 'mcl_observers:observer_up_off',
862 'mcl_observers:observer_up_on',
864 'mcl_ocean:dead_brain_coral_block',
865 'mcl_ocean:dried_kelp',
866 'mcl_ocean:dried_kelp_block',
869 'mcl_ocean:kelp_dirt',
870 'mcl_ocean:kelp_gravel',
871 'mcl_ocean:kelp_redsand',
872 'mcl_ocean:kelp_sand',
873 'mcl_ocean:prismarine',
874 'mcl_ocean:prismarine_brick',
875 'mcl_ocean:prismarine_crystals',
876 'mcl_ocean:prismarine_dark',
877 'mcl_ocean:prismarine_shard',
878 'mcl_ocean:seagrass',
879 'mcl_ocean:seagrass_',
880 'mcl_ocean:seagrass_dirt',
881 'mcl_ocean:seagrass_gravel',
882 'mcl_ocean:seagrass_redsand',
883 'mcl_ocean:seagrass_sand',
884 'mcl_ocean:sea_lantern',
885 'mcl_ocean:sea_pickle_',
886 'mcl_ocean:sea_pickle_1_',
887 'mcl_ocean:sea_pickle_1_dead_brain_coral_block',
888 'mcl_ocean:sea_pickle_1_off_',
889 'mcl_ocean:sea_pickle_1_off_dead_brain_coral_block',
890 'mcl_paintings:painting',
891 'mcl_playerplus:surface',
892 'mcl_player:preview',
893 'mcl_portals:end_portal_frame',
894 'mcl_portals:end_portal_frame_eye',
895 'mcl_portals:portal',
896 'mcl_portals:portal_end',
897 'mcl_potions:awkward',
898 'mcl_potions:dragon_breath',
899 'mcl_potions:fermented_spider_eye',
900 'mcl_potions:fire_resistance',
901 'mcl_potions:glass_bottle',
902 'mcl_potions:harming',
903 'mcl_potions:harming_2',
904 'mcl_potions:harming_2_splash',
905 'mcl_potions:harming_splash',
906 'mcl_potions:healing',
907 'mcl_potions:healing_2',
908 'mcl_potions:healing_2_splash',
909 'mcl_potions:healing_splash',
910 'mcl_potions:invisibility',
911 'mcl_potions:invisibility_plus',
912 'mcl_potions:invisibility_plus_splash',
913 'mcl_potions:invisibility_splash',
914 'mcl_potions:leaping',
915 'mcl_potions:leaping_plus',
916 'mcl_potions:leaping_plus_splash',
917 'mcl_potions:leaping_splash',
918 'mcl_potions:mundane',
919 'mcl_potions:night_vision',
920 'mcl_potions:night_vision_arrow',
921 'mcl_potions:night_vision_lingering',
922 'mcl_potions:night_vision_plus',
923 'mcl_potions:night_vision_plus_arrow',
924 'mcl_potions:night_vision_plus_lingering',
925 'mcl_potions:night_vision_plus_splash',
926 'mcl_potions:night_vision_splash',
927 'mcl_potions:poison',
928 'mcl_potions:poison_2',
929 'mcl_potions:poison_2_splash',
930 'mcl_potions:poison_splash',
931 'mcl_potions:regeneration',
932 'mcl_potions:river_water',
933 'mcl_potions:slowness',
934 'mcl_potions:slowness_plus',
935 'mcl_potions:slowness_plus_splash',
936 'mcl_potions:slowness_splash',
937 'mcl_potions:speckled_melon',
938 'mcl_potions:strength',
939 'mcl_potions:strength_2',
940 'mcl_potions:strength_2_lingering',
941 'mcl_potions:strength_2_splash',
942 'mcl_potions:strength_lingering',
943 'mcl_potions:strength_plus',
944 'mcl_potions:strength_plus_lingering',
945 'mcl_potions:strength_plus_splash',
946 'mcl_potions:strength_splash',
947 'mcl_potions:swiftness',
948 'mcl_potions:swiftness_plus',
949 'mcl_potions:swiftness_plus_splash',
950 'mcl_potions:swiftness_splash',
953 'mcl_potions:water_breathing',
954 'mcl_potions:water_splash',
955 'mcl_potions:weakness',
956 'mcl_potions:weakness_lingering',
957 'mcl_potions:weakness_plus',
958 'mcl_potions:weakness_plus_lingering',
959 'mcl_potions:weakness_plus_splash',
960 'mcl_potions:weakness_splash',
961 'mcl_signs:respawn_entities',
962 'mcl_signs:set_text_',
963 'mcl_signs:standing_sign',
964 'mcl_signs:standing_sign22_5',
965 'mcl_signs:standing_sign45',
966 'mcl_signs:standing_sign67_5',
968 'mcl_signs:wall_sign',
970 'mcl_skins:skin_select',
971 'mcl_sponges:sponge',
972 'mcl_sponges:sponge_wet',
973 'mcl_sponges:sponge_wet_river_water',
976 'mcl_stairs:slab_concrete_',
977 'mcl_stairs:slab_purpur_block',
978 'mcl_stairs:slab_quartzblock',
979 'mcl_stairs:slab_redsandstone',
980 'mcl_stairs:slab_sandstone',
981 'mcl_stairs:slab_stone',
982 'mcl_stairs:slab_stonebrick',
983 'mcl_stairs:slab_stone_double',
984 'mcl_stairs:slab_wood',
986 'mcl_stairs:stair_cobble',
987 'mcl_stairs:stair_concrete_',
988 'mcl_stairs:stair_sandstone',
989 'mcl_stairs:stair_stonebrick',
990 'mcl_stairs:stair_stonebrickcracked',
991 'mcl_stairs:stair_stonebrickcracked_inner',
992 'mcl_stairs:stair_stonebrickcracked_outer',
993 'mcl_stairs:stair_stonebrick_inner',
994 'mcl_stairs:stair_stonebrickmossy',
995 'mcl_stairs:stair_stonebrickmossy_inner',
996 'mcl_stairs:stair_stonebrickmossy_outer',
997 'mcl_stairs:stair_stonebrick_outer',
998 'mcl_stairs:stairs_wood',
999 'mcl_supplemental:nether_brick_fence_gate',
1000 'mcl_supplemental:nether_brick_fence_gate_open',
1001 'mcl_supplemental:red_nether_brick_fence',
1002 'mcl_supplemental:red_nether_brick_fence_gate',
1003 'mcl_supplemental:red_nether_brick_fence_gate_open',
1004 'mcl_throwing:arrow',
1007 'mcl_throwing:egg_entity',
1008 'mcl_throwing:ender_pearl',
1009 'mcl_throwing:ender_pearl_entity',
1010 'mcl_throwing:flying_bobber',
1011 'mcl_throwing:flying_bobber_entity',
1012 'mcl_throwing:snowball',
1013 'mcl_throwing:snowball_entity',
1015 'mcl_tools:axe_diamond',
1016 'mcl_tools:axe_gold',
1017 'mcl_tools:axe_iron',
1018 'mcl_tools:axe_stone',
1019 'mcl_tools:axe_wood',
1020 'mcl_tools:pick_diamond',
1021 'mcl_tools:pick_gold',
1022 'mcl_tools:pick_iron',
1023 'mcl_tools:pick_stone',
1024 'mcl_tools:pick_wood',
1026 'mcl_tools:shovel_diamond',
1027 'mcl_tools:shovel_gold',
1028 'mcl_tools:shovel_iron',
1029 'mcl_tools:shovel_stone',
1030 'mcl_tools:shovel_wood',
1031 'mcl_tools:sword_diamond',
1032 'mcl_tools:sword_gold',
1033 'mcl_tools:sword_iron',
1034 'mcl_tools:sword_stone',
1035 'mcl_tools:sword_wood',
1036 'mcl_torches:flames',
1037 'mcl_torches:torch',
1038 'mcl_torches:torch_wall',
1039 'mcl_walls:andesite',
1042 'mcl_walls:diorite',
1043 'mcl_walls:endbricks',
1044 'mcl_walls:granite',
1045 'mcl_walls:mossycobble',
1046 'mcl_walls:netherbrick',
1047 'mcl_walls:prismarine',
1048 'mcl_walls:rednetherbrick',
1049 'mcl_walls:redsandstone',
1050 'mcl_walls:sandstone',
1051 'mcl_walls:stonebrick',
1052 'mcl_walls:stonebrickmossy',
1054 'mcl_wool:black_carpet',
1056 'mcl_wool:blue_carpet',
1058 'mcl_wool:brown_carpet',
1060 'mcl_wool:cyan_carpet',
1061 'mcl_wool:dark_blue',
1064 'mcl_wool:green_carpet',
1066 'mcl_wool:grey_carpet',
1067 'mcl_wool:light_blue',
1068 'mcl_wool:light_blue_carpet',
1070 'mcl_wool:lime_carpet',
1072 'mcl_wool:magenta_carpet',
1074 'mcl_wool:orange_carpet',
1076 'mcl_wool:pink_carpet',
1078 'mcl_wool:purple_carpet',
1080 'mcl_wool:red_carpet',
1082 'mcl_wool:silver_carpet',
1084 'mcl_wool:white_carpet',
1086 'mcl_wool:yellow_carpet',
1090 function autofly
.cruise()
1091 if not minetest
.settings
:get_bool('afly_cruise') then
1092 if cruise_wason
then
1094 core
.set_keypress("jump",false)
1095 core
.set_keypress("sneak",false)
1099 local lp
=minetest
.localplayer
:get_pos()
1100 local pos1
= vector
.add(lp
,{x
=16,y
=100,z
=16})
1101 local pos2
= vector
.add(lp
,{x
=-16,y
=-100,z
=-16})
1102 local nds
=minetest
.find_nodes_in_area_under_air(pos1
, pos2
, nodenames_ground
)
1107 for k
,v
in ipairs(nds
) do
1108 local nd
= minetest
.get_node_or_nil(v
)
1109 if nd
~= nil and nd
.name
~= "air" then
1116 if (autofly
.cruiseheight
~= nil) then y
=y
+autofly
.cruiseheight
end
1117 local diff
= math
.ceil(lp
.y
- y
)
1119 if not cruise_wason
then --initially set the cruiseheight to the current value above ground
1120 -- if not found then return end --wait with activation til a ground node has been found.
1121 local clr
,nnd
=minetest
.line_of_sight(lp
,vector
.add(lp
,{x
=1,y
=-200,z
=1}))
1122 if not clr
then diff
= math
.ceil(lp
.y
- nnd
.y
)
1123 elseif not found
then return end
1124 if diff
< 1 then autofly
.cruiseheight
= 20
1125 else autofly
.cruiseheight
= diff
end
1128 minetest
.display_chat_message("cruise mode activated. target height set to " .. diff
.. " nodes above ground.")
1132 if nfctr
<20 then nfctr
= nfctr
+ 1 return end
1133 --minetest.display_chat_message("no nodes found for 20 iterations. lowering altitude.")
1135 minetest
.settings
:set_bool("free_move",false)
1136 core
.set_keypress("jump",false)
1137 core
.set_keypress("sneak",false)
1142 if diff
< -tolerance
then
1143 minetest
.settings
:set_bool("free_move",true)
1144 core
.set_keypress("jump",true)
1145 core
.set_keypress("sneak",false)
1146 --minetest.display_chat_message("too low: " .. y)
1147 elseif diff
> tolerance
* 10 then
1148 core
.set_keypress("jump",false)
1149 core
.set_keypress("sneak",true)
1150 minetest
.settings
:set_bool("free_move",false)
1151 --minetest.display_chat_message("too high: " .. y)
1152 elseif diff
> tolerance
then
1153 core
.set_keypress("jump",false)
1154 core
.set_keypress("sneak",true)
1156 minetest
.settings
:set_bool("free_move",true)
1157 core
.set_keypress("jump",false)
1158 core
.set_keypress("sneak",false)
1159 --minetest.display_chat_message("target height reached: " .. y)
1165 function autofly
.aim(tpos
)
1166 local ppos
=minetest
.localplayer
:get_pos()
1168 local dir
=vector
.direction(ppos
,tpos
)
1172 yyaw
= math
.atan2(-dir
.x
, dir
.z
) + (math
.pi
* 2)
1174 yyaw
= math
.atan2(-dir
.x
, dir
.z
)
1176 yyaw
= round2(math
.deg(yyaw
),0)
1177 pitch
= round2(math
.deg(math
.asin(-dir
.y
) * 1),0);
1178 minetest
.localplayer
:set_yaw(yyaw
)
1179 minetest
.localplayer
:set_pitch(pitch
)
1183 function autofly
.autotp(tpname
)
1184 if minetest
.localplayer
== nil then return end
1186 if tpname
== nil then
1187 tpos
= autofly
.get_waypoint('AUTOTP')
1188 elseif type(tpname
) == "table" then
1191 tpos
=autofly
.get_waypoint(tpname
)
1193 if tpos
== nil then return end
1194 local lp
=minetest
.localplayer
1195 local dst
=vector
.distance(lp
:get_pos(),tpos
)
1197 minetest
.sound_play({name
= "default_alert", gain
= 3.0})
1198 autofly
.delete_waypoint('AUTOTP')
1201 autofly
.set_waypoint(tpos
,'AUTOTP')
1202 for k
, v
in ipairs(lp
.get_nearby_objects(4)) do
1203 local txt
= v
:get_item_textures()
1204 if ( txt
:find('mcl_boats_texture')) then
1205 autofly
.aim(vector
.add(v
:get_pos(),{x
=0,y
=-1.5,z
=0}))
1206 minetest
.after("0.2",function()
1207 minetest
.interact("place") end)
1208 minetest
.after("2.5",function()
1209 autofly
.warpae('AUTOTP')
1214 minetest
.sound_play({name
= "default_alert", gain
= 3.0})
1215 autofly
.delete_waypoint('AUTOTP')
1218 function autofly
.axissnap()
1219 if not minetest
.settings
:get_bool('afly_snap') then return end
1220 local y
=minetest
.localplayer
:get_yaw()
1222 if ( y
< 45 or y
> 315 ) then
1224 elseif (y
< 135) then
1226 elseif (y
< 225 ) then
1228 elseif ( y
< 315 ) then
1232 minetest
.localplayer
:set_yaw(yy
)
1236 minetest
.register_on_death(function()
1237 if minetest
.localplayer
then
1238 local name
= 'Death waypoint'
1239 local pos
= minetest
.localplayer
:get_pos()
1240 autofly
.last_coords
= pos
1241 autofly
.set_waypoint(pos
, name
)
1242 autofly
.display_waypoint(name
)
1246 function autofly
.warp(name
)
1247 local pos
=vector
.add(autofly
.get_waypoint(name
),{x
=0,y
=150,z
=0})
1249 minetest
.localplayer
:set_pos(pos
)
1253 function autofly
.warpae(name
)
1254 local s
, m
= autofly
.warp(name
)
1256 minetest
.disconnect()
1261 function autofly
.getwps()
1263 for name
, _
in pairs(storage
:to_table().fields
) do
1264 if name
:sub(1, string.len(stprefix
)) == stprefix
then
1265 table.insert(wp
, name
:sub(string.len(stprefix
)+1))
1272 function autofly
.set_waypoint(pos
, name
)
1273 pos
= pos_to_string(pos
)
1274 if not pos
then return end
1275 storage
:set_string(stprefix
.. tostring(name
), pos
)
1279 function autofly
.delete_waypoint(name
)
1280 storage
:set_string(stprefix
.. tostring(name
), '')
1283 function autofly
.get_waypoint(name
)
1284 return string_to_pos(storage
:get_string(stprefix
.. tostring(name
)))
1287 function autofly
.rename_waypoint(oldname
, newname
)
1288 oldname
, newname
= tostring(oldname
), tostring(newname
)
1289 local pos
= autofly
.get_waypoint(oldname
)
1290 if not pos
or not autofly
.set_waypoint(pos
, newname
) then return end
1291 if oldname
~= newname
then
1292 autofly
.delete_waypoint(oldname
)
1297 local function register_chatcommand_alias(old
, ...)
1298 local def
= assert(minetest
.registered_chatcommands
[old
])
1300 for i
= 1, select('#', ...) do
1301 minetest
.register_chatcommand(select(i
, ...), table.copy(def
))
1305 minetest
.register_chatcommand('waypoints', {
1307 description
= 'Open the autofly GUI',
1308 func
= function(param
) autofly
.display_formspec() end
1311 register_chatcommand_alias('waypoints','wp', 'wps', 'waypoint')
1314 minetest
.register_chatcommand('add_waypoint', {
1315 params
= '<pos / "here" / "there"> <name>',
1316 description
= 'Adds a waypoint.',
1317 func
= function(param
)
1318 local s
, e
= param
:find(' ')
1319 if not s
or not e
then
1320 return false, 'Invalid syntax! See .help add_mrkr for more info.'
1322 local pos
= param
:sub(1, s
- 1)
1323 local name
= param
:sub(e
+ 1)
1325 -- Validate the position
1330 -- Validate the name
1331 if not name
or #name
< 1 then
1332 return false, 'Invalid name!'
1336 return autofly
.set_waypoint(pos
, name
), 'Done!'
1339 register_chatcommand_alias('add_waypoint','wa', 'add_wp')
1342 minetest
.register_chatcommand('add_waypoint_here', {
1344 description
= 'marks the current position',
1345 func
= function(param
)
1346 local name
= os
.date("%Y-%m-%d %H:%M:%S")
1347 local pos
= minetest
.localplayer
:get_pos()
1348 return autofly
.set_waypoint(pos
, name
), 'Done!'
1351 register_chatcommand_alias('add_waypoint_here', 'wah', 'add_wph')
1353 minetest
.register_chatcommand('clear_waypoint', {
1355 description
= 'Hides the displayed waypoint.',
1356 func
= function(param
)
1357 if autofly
.flying
then autofly
.flying
=false end
1359 minetest
.localplayer
:hud_remove(hud_wp
)
1361 return true, 'Hidden the currently displayed waypoint.'
1362 elseif not minetest
.localplayer
.hud_add
then
1363 minetest
.run_server_chatcommand('clrmrkr')
1365 elseif not hud_wp
then
1366 return false, 'No waypoint is currently being displayed!'
1369 minetest
.localplayer
:hud_remove(v
)
1375 register_chatcommand_alias('clear_waypoint', 'cwp','cls')
1377 minetest
.register_chatcommand('autotp', {
1378 params
= 'position',
1379 description
= 'autotp',
1380 func
= function(param
)
1381 autofly
.autotp(minetest
.string_to_pos(param
))
1384 register_chatcommand_alias('autotp', 'atp')
1387 minetest
.after("3.0",function()
1388 if autofly
.get_waypoint('AUTOTP') ~= nil then autofly
.autotp(nil) end
1392 math
.randomseed(os
.time())
1394 local randflying
= false
1396 minetest
.register_globalstep(function()
1397 if randflying
and not autofly
.flying
then
1398 local x
= math
.random(-31000, 31000)
1399 local y
= math
.random(2000, 31000)
1400 local z
= math
.random(-31000, 31000)
1402 autofly
.goto({x
= x
, y
= y
, z
= z
})
1406 local function randfly()
1407 if not randflying
then
1409 local lp
= minetest
.localplayer
:get_pos()
1410 autofly
.goto({lp
.x
, 6000, lp
.z
})
1417 minetest
.register_chatcommand("randfly", {
1418 description
= "Randomly fly up high (toggle).",
1423 minetest
.register_cheat("AutoflyAim", "Movement", "afly_autoaim")
1424 minetest
.register_cheat("AxisSnap", "Movement", "afly_snap")
1425 minetest
.register_cheat("Cruise", "Movement", "afly_cruise")
1426 minetest
.register_cheat("AutoflySprint", "Movement", "afly_sprint")
1427 minetest
.register_cheat("Waypoints", "Movement", autofly
.display_formspec
)