Making Script to build Dungeons

Posted by Fandros on Sat 05 Sep 2015 01:52 AM — 2 posts, 12,911 views.

#0
Hello.

I am working on a script to build a Randomly Generated Dungeon.

I have a friend that uses MudMaster 2k6 and has a script already built. It works really well so far.

some of it would be really easy to convert/

There are also loops

/showme = note or print

-- "MazeMake 10 10" would make a maze 10 x 10

/alias {MazeMake %0}

/showme {Creating 'Maze' array with @Word($0,1) rows and @Word($0,2) columns and 'MazeVNUMS' array to hold vnums for rooms.}

/array {Maze}{@Word($0,1),@Word($0,2)}{Maze}
/array {MazeVNUMS}{@Word($0,1),@Word($0,2)}
{Maze} -- Group name


I am unsure of how to convert the loops and arrays, Would anyone have any helpful hints?

Thanks (I am pretty new to this)
Australia Forum Administrator #1
See this post about Lua tables: http://www.gammon.com.au/forum/?id=4903

Lua are basically arrays, so it should be easy enough to achieve.