+ Reply to Thread
Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By NerfedWar

Thread: [REQUEST] LuaSQL Bindings Integration

  1. #1
    Rift Disciple Luminatus's Avatar
    Join Date
    Jan 2011
    Location
    California and Colorado
    Posts
    136

    Default [REQUEST] LuaSQL Bindings Integration

    I'm looking for a way to upload character statistics and achievements to an SQL (PostsgreSQL) server backend, or possibly some way of implementing a web based version of the character window, or some form of API to allow for the polling of character data and statistics from a server.

  2. #2
    Soulwalker Sithsa's Avatar
    Join Date
    Nov 2011
    Posts
    7

    Default

    I would suggest saving to the Saved Variables as I doubt you would be able to open another network connection from inside Rift which SQL would need - that would be a serious security risk for Trion and although I don't work for Trion, I wouldn't be surprised if it shifted you fast up into the 'ban' radar.

    After they log out though, an external program that reads the text files they are stored in and uploads outside of Rift might be possible.

    There are a bunch of Lua implementations in Java, for example, that should be able to read the standard Lua formats if you google them.

    http://www.keplerproject.org/luajava is one.

  3. #3
    Rift Chaser NerfedWar's Avatar
    Join Date
    Dec 2010
    Posts
    377

    Default

    Quote Originally Posted by Sithsa View Post
    I would suggest saving to the Saved Variables as I doubt you would be able to open another network connection from inside Rift which SQL would need - that would be a serious security risk for Trion and although I don't work for Trion, I wouldn't be surprised if it shifted you fast up into the 'ban' radar.

    After they log out though, an external program that reads the text files they are stored in and uploads outside of Rift might be possible.

    There are a bunch of Lua implementations in Java, for example, that should be able to read the standard Lua formats if you google them.

    http://www.keplerproject.org/luajava is one.
    This works for me:
    • turn on chat console logging (/log).
    • write an addon that serializes the data you want to get out of rift and uses the print(command) to put the content into the chat console.
    • write a program that:
      • continuously tails the chat log in real-time and extracts the serialized data (use json, there is a lua function) when it appears
      • sends the data to your website via HTTP
      • waits for the next serialized data blob.

    I have working versions of the above (in both C and autohotkey) that sends data to a Google-Apps-Script HTTP listener, which in turn dumps the data into a Google Spreadsheet. Results are then read by a separate Google-Apps-Script that displays "Book of the Fallen" data on my Google-Sites website. You are welcome to have a copy, just a proof of concept.

    Just FYI, you can do SQL select statements against Google Spreadsheets via HTTP and get the results back as JSON Just think of sheets as tables, columns as fields and rows as records. Syntax is SQL, see here.
    Last edited by NerfedWar; 12-09-2011 at 04:20 AM.
    ...the internet treats censorship as damage, and routes around it...
    NerfedWar Addons and Tutorials
    * Note: tutorials are currently being ported to the new site.

  4. #4
    Rift Disciple Luminatus's Avatar
    Join Date
    Jan 2011
    Location
    California and Colorado
    Posts
    136

    Default

    Great input! Now that I think about it, my AWS account has the same SQL like functionality over HTTP. I don't know why I didn't think of that sooner, you just saved me a lot of work!

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts