Universal Trivia in chat

Discussion in 'Plugin Requests' started by XsV=Tool, Dec 24, 2014.

  1. This looks awesome, can wait to give it a spin when it's finished. Thanks for all your hard work guys.
     
  2. Sorry my pc had some issues so I haven't been online in awhile. Hows the project going guys?
     
  3. Apologies for the delayed reply. Been busy with work, family, and the holidays and such, but I'm still working on it. Should be able to get some more done in the next few days when I have a moment to focus on it.
     
  4. I'm teaching myself php and learning how to use linux. Soon I will learn how to make plugins
     
  5. I have a web/mailserver that uses CentOS 7 x64 and a dedicated game server that I run Windows Server 2012 x64 on, so I'm a fairly familiar with Linux. The CentOS Server used to run Ubuntu but I switched it to CentOS in the past year or so. If I can help ya in any way, don't hesitate to message me.

    For plugins, look into C Sharp AKA C# (for being able to read through the decompiled DLL's from Rust) and Lua (the language the plugins are written in). There's plenty of stuff you can google for Lua that explains it pretty thoroughly. The two main DLL's that you want to look at in the Rust installation are AssemblyCSharp.dll and Facepunch.dll. Mostly AssemblyCSharp.dll. I use ILSpy (free and open source) personally, but there are other programs that have been suggested elsewhere on the forums. DotPeek was suggested by Wulf I think and Mughisi says he uses a Microsoft decompiler (most likely not freeware and probably licensed). From what I've seen, most of the hooks are in the global namespace (shows up as a dash '-' in the decompiled dll), so that's where you'll want to look around. And of course, looking at the plugins other authors here have written will give you a good idea of how things work. If ya have any questions on that stuff, there are plenty more experienced devs here who'll be happy to help you (I'm no expert, by far). Just wanted to share the small amount of knowledge I had with ya.

    EDIT: Almost forgot, the Oxide 2 Patcher is also helpful for examining the current hooks and their placement in the dll's to further help you figure out what they do. You can grab a copy of the source here. I use Visual Studio 2013 Express to compile it.
     
  6. nothing can beat .NET Reflector :p
     
  7. wow thank you everyone! I made my first website from scratch today in html5. I think I have about 2 hours left before I finish the tutorials. Next its java script , css3 and php. When I get those done I'm moving into this whole plugin thing. But I'm using linux mint 17.2 MATE in a 64bit VM and learning sudo terminal commands at the same time. I plan to merge into linux for programming for the most part. So all your linux help would be awesome when it comes to programming. As for sudo I'm just reading all the tutorials that come with the os as it covers most of it I think.
     
  8. I used to use .NET Reflector in the very beginning but made the switch a while back Telerik JustDecompile and must say I like it more than .NET Reflector, obligatory decompiled code example :p
    .NET Reflector:
    Code:
    private void FillTexture(){
        <FillTexture>c__AnonStorey49 storey = new <FillTexture>c__AnonStorey49 {
            <>f__this = this
        };
        if (this.ColorTexture != null)
        {
            this.dirtyTexture = true;
            storey.col = new Color32[base.res * base.res];
            Parallel.For(0, base.res, new Action<int>(storey.<>m__4E));
            this.ColorTexture.SetPixels32(storey.col);
        }
    }
    And the same method in JustDecompile:
    Code:
    private void FillTexture()
        {
            if (this.ColorTexture == null)
            {
                return;
            }
            this.dirtyTexture = true;
            Color32[] color32Array = new Color32[this.res * this.res];
            Parallel.For(0, this.res, (int z) => {
                for (int i = 0; i < this.res; i++)
                {
                    color32Array[z * this.res + i] = this.map[z, i];
                }
            });
            this.ColorTexture.SetPixels32(color32Array);
        }
     
  9. Wulf

    Wulf Community Admin

    I did find a trivia web API, and made a basic plugin to use it, but it is far from finished/usable. If you'd like to take a look at the website, see http://jservice.io/. Using the site might be a lot easier than having to create your own content, as you'd only need to specify random or a set of categories.
     
  10. I'll take a look at it for sure over the weekend Wulf. I haven't had the time to work on it like I'd originally planned, so instead of holding up the project, I created a github repo for it. Anyone who is interested is more than welcome to fork and contribute. Just submit a pull request (hopefully explaining a little of what you did as well, so I can learn from it :p) and I'll pull it into the master.

    https://github.com/HellUnit/oxide-2-plugins

    EDIT: Again, sorry for the late reply. I didn't get an email saying there'd been a reply to a watched forum... or maybe I did and deleted it with the million fail2ban e-mails I get from my server every morning.
    SECOND EDIT: The license I included is a default I use for all my projects as a safety precaution I suppose. I can change it to something else if you guys think another would be more worthwhile.
     
  11. This is looking better and more dynamic! Looking forward to unveiling this to our server! Yes!

    edit: PS can you add a "enable multiple choice option" that displays a pre configured set of alternate answers to chose from.
     
  12. Definitely a good idea. Its nowhere near a working state, but I don't have any major plans for the weekend other than chilling with the girlfriend, so I want to take a look at the API Wulf suggested and see how that will change the development plans and try to get closer to a working state. There's a lot of missing config options (pretty much all the ones Mughisi mentioned earlier in the thread). So far, the core is able to load the questions and answers from the extension plugin and print them to the console. Its got a long way to go still. I really apologize for taking on the project and then being so slow about it. I feel like an A-hole, which is why I put it up on Github so we can get things moving if others have the time/inclination/knowledge to contribute.
     
  13. bro no worries, I am excited for this but not at the expense of you or anyone feeling like you took on too much than you can handle. You guys just set your pace and I'm sure if anything we'll all learn allot from this.
    But I am still amazed to see this process happen from start to finish! ;)
     
  14. Just take your time, if someone wants it they should just wait, and if they don't want to wait they can just go write their own :p
    It's a really nice project to start out with, it doesn't need to be the perfect trivia plugin from the start, get it working, publish it, get feedback, add features, get more feedback, add more features, more feedback, rewrite with more features, .......
     
  15. I definitely appreciate the support. :D Taking a look at the API Wulf mentioned now and going to see what I can get done on it today.

    EDIT: So the API is really interesting. Its basically a list of Jeopardy questions sorted by category, difficulty, and air date of the show. I'm thinking of adding that in as an option. So basically you could use your own questions through the extension plugin method or you could use the "Jeopardy API" to get the questions or possibly a combination of both.
     
  16. just checking in on the project, any updates on progression?
     
  17. No, been busy with the Money For Gather plugin recently. Haven't forgotten about it though.
     
  18. I use that plugin on my server its awesome!
     
  19. I was pleasantly surprised to find this thread (first search effort; haven't looked further yet) related to a trivia plugin for Rust! I have some great, somewhat old, memories of my Warcraft 3 RoC dota clan and I hanging out in our channel or another clan's channel & chillin' w/the trivia bot. Though I generally was not so great with knowing the answers, the experience was great. I'd love to see something like it available in Rust. Though this thread's efforts may have concluded concerning the creation of the plugin, I enjoyed reading through the exchanges between those involved. Cheers to all (=