Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Lua
➜ Smaug Lua Forums
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Orik
USA (182 posts) Bio
|
| Date
| Sun 15 Jul 2007 06:15 PM (UTC) |
| Message
| Hey Nick,
Do you think you could add Smaug Lua Forums to the smaug forum list? That we'd hvae smaug running smaug compiling, smaug commands, smaug code, and smaug lua.
That way all the lua posts would be in one spot and You could put the links at the top of the forum so people can see them easy and quick access.
ALso, do you update the lua code files every time you make a new post to show the new things you've done or are you just showing us what you've done yourself and don't have the files available for download yet.
Have you tried this on smaugfuss 1.8 as well? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 15 Jul 2007 11:07 PM (UTC) |
| Message
| I have made a Lua topic in this forum, to separate the Lua-related stuff, as you suggested.
Quote:
... do you update the lua code files every time you make a new post ...
Not quite yet. I was trying to do the preliminary post to get people interested. I am cleaning up the code a bit, making sure the task system still works, and making things slightly more modular. As the project grows in size, I don't want individual files to get too unwieldy.
The new files should be released in an hour or so from the time of this post.
Quote:
Have you tried this on smaugfuss 1.8 as well?
No, I haven't, but it should fit in OK. The reason is that the changes to the stock SMAUG code are pretty minor - a few hooks here and there. Basically if you search for "lua" in the released files here, you would see where the hooks should go.
Basically as I described earlier, it is:
- Add Lua state to character struct
- Initialize it to NULL as soon as possible
- Start the Lua script engine up when the player connects
- Shut the Lua script engine down when the character struct is about to be destroyed - if necessary
- "Hook into" the Lua script at various appropriate places (eg. changing rooms).
After that, there are a few more files to be added to the project, that provide the bulk of the Lua support.
In addition, for the resets, there is an additional Lua state for the entire MUD. Since this doesn't belong to any particular player, the state itself is stored in the new Lua source files, so that doesn't require any change to the stock code. However, in a couple of places in comm.c I added a couple of lines to initialise the state, tell it the MUD is starting up, tell it the MUD is shutting down, and call it for things like room resets. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Orik
USA (182 posts) Bio
|
| Date
| Reply #2 on Sun 15 Jul 2007 11:12 PM (UTC) |
| Message
| Awesome. I can't wait to see the released code. I'll have to definately put it in and start messing around with it.
Awesome stuff. I was kind of "meh, I don't know if I want to get into it yet."
But after seeing all of your posts, I'm downright excited. | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,385 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top