Source:NetHack 5.0.0/dat/tut-2.lua

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to tut-2.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/tut-2.lua#line12]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

1. 
2. des.level_init({ style = "solidfill", fg = " " });
3. des.level_flags("mazelevel", "noflip",
4.                 "nomongen", "nodeathdrops", "noautosearch");
5. 
6. des.map([[
7. --------------
8. |............|
9. |............|
10. |............|
11. |............|
12. |............|
13. |............|
14. --------------
15. ]]);
16. 
17. 
18. des.region(selection.area(01,01, 73, 16), "lit");
19. 
20. des.stair({ dir = "up", coord = { 2,2 } });
21. 
22. des.engraving({ coord = { 1,1 }, type = "burn", text = "Use '" .. nh.eckey("up") .. "' to go up the stairs", degrade = false });
23. 
24. 
25. des.trap({ type = "magic portal", coord = { 11,5 }, seen = true });
26. 
27. des.non_diggable();