Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • Mazeingmaze: sick
      January 12, 2021, 08:56:35 PM
    • jennipher11: dodian.net
      January 11, 2021, 02:12:23 PM
    • jennipher11: yes it's back online
      January 11, 2021, 02:12:04 PM
    • arham 4: nice
      January 10, 2021, 04:43:09 PM
    • Togasa: Dodian is back online!? Dodian.net
      January 08, 2021, 10:04:21 PM
    • Pwnd: Y'all don't even know there's a community inside talk section
      January 06, 2021, 07:49:05 PM
    • drubrkletern: damn
      January 06, 2021, 01:04:50 AM
    • Zymus: Nobody cares
      January 04, 2021, 06:39:43 AM
    • wildskiller: or does no one give a shit about moparscape anymore?
      January 03, 2021, 09:24:08 PM
    • wildskiller: So, anyone gonna ban the guy in Server and Client development showoff?
      January 03, 2021, 09:24:00 PM
    • zachrida: wheres all my work?
      December 08, 2020, 09:50:22 AM
    • zachrida: what happend?
      December 08, 2020, 09:49:53 AM
    • zachrida: yo
      December 08, 2020, 09:49:36 AM
    • Shady Aftermath: try out skyfire317.com it has 5 custom skills, max level 168 and combat level 255
      December 07, 2020, 12:55:12 PM
    • skyhigh21: twisted-royalty.com is pretty cool i like it so far
      December 05, 2020, 01:35:34 PM
    • jennipher11: and now its back
      November 27, 2020, 03:38:57 PM
    • jennipher11: it was the best rsps
      November 27, 2020, 03:38:52 PM
    • jennipher11: try out dodian.net
      November 27, 2020, 03:38:39 PM
    • ZamorakRSPS:[link]
      November 22, 2020, 06:45:19 PM
    • thewraith500: 08 member here come play my server been up for 3 years developing just now advertising Autoscape.org very fun osrs style with some pre-eoc and customs designed by m
      November 20, 2020, 05:53:25 PM

    Show Posts

    This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


    Topics - Lothy

    Pages: [1]
    1
    Hi guys,


    I've just been playing around for a few hours with RSC and I just wanted to check - is the MoparClassic client (found here: https://github.com/xetr0v/mpc-client) the best client to use, or is Reines' RSCD client better?
    I just noticed that their packet decoders are quite different, so what other differences exist between these two clients? To be honest, I'm not even sure on the version numbers.


    Can anyone provide some insight? My Elysium server from years ago was built to work with the RSCD client. But if this client isn't considered 'good', and the MoparClassic client is better, then I'd rather not have my new code operate with a wrong client version.


    Thanks.

    2
    Here's the original topic: https://forum.moparscape.org/index.php/topic,674073.0.html/


    I've cross-posted this here as well because there has been, and still is, a lot of RSC community interest in easy-to-write resumable game content scripts.
    Scripts that don't result in continuation-hell and/or blocking of thread.


    ----


    Thoughts?

    3
    General Server Discussion / Resumable scripts in C#
    « on: April 07, 2016, 05:26:52 AM »
    You can run the code and see the result yourself here: https://dotnetfiddle.net/WcUSzT


    Java doesn't support coroutines at the language level, but there are tools out there that provide them (e.g.: https://github.com/offbynull/coroutines).
    There are also tools that result in a comparable outcome (e.g.: http://docs.paralleluniverse.co/quasar/).


    But yeah, C# has language level support for this using the yield return construct. The compiler builds up a state machine and does the work for you.


    Thoughts?


    -----


    The tl;dr version containing just the trivial script. The script prints a line, waits one tick, prints another, and then waits 3 seconds (6 ticks) before printing the last line:
    Code: [Select]

        internal class BlahScript : AbstractScript
        {
            public override IEnumerator<IContinueTrigger> RunInner()
            {
                Console.WriteLine("Hi there!");


                yield return SleepOne();


                Console.WriteLine("Let's talk in a few seconds...");


                yield return Sleep(TimeSpan.FromSeconds(3));


                Console.WriteLine("Scratch that, I have to go. :(");
            }
        }


    The entire code sample:
    Code: [Select]

    using System;
    using System.Collections.Generic;
    using System.Threading;


    namespace ConsoleApplication1
    {
        public class Program
        {
            public static void Main(string[] args)
            {
                var l = new Looper();
                l.Loop();
            }
        }


        public class Looper
        {
            public Looper()
            {
                for (var i = 0; i < 5; i++)
                {
                    var e = new Entity
                    {
                        CurrentScript = new BlahScript()
                    };


                    Entities.Add(e);
                }
            }


            private List<Entity> Entities { get; } = new List<Entity>();


            public void Loop()
            {
                while (true)
                {
                    foreach (var e in Entities)
                    {
                        var script = e.CurrentScript;


                        if (script.IsReadyToContinue)
                        {
                            script.Run();
                        }
                    }


                    Console.WriteLine("Tick");


                    if (Entities.TrueForAll(x => x.CurrentScript.IsFinished)) break;


                    Thread.Sleep(500);
                }


                Console.WriteLine("\nEnd of loop.");
            }
        }


        internal class Entity
        {
            public IScript CurrentScript { get; set; }
            public IContinueTrigger CurrentActionTrigger { get; set; }
        }


        #region Script


        internal interface IScript
        {
            bool IsReadyToContinue { get; }
            bool IsFinished { get; }
            void Run();
        }


        internal abstract class AbstractScript : IScript
        {
            private readonly IEnumerator<IContinueTrigger> _scriptSteps;
            private IContinueTrigger _trigger;


            protected AbstractScript()
            {
                _scriptSteps = RunInner();
            }


            public void Run()
            {
                var e = _scriptSteps;
                var hasMore = e.MoveNext();


                if (!hasMore)
                {
                    IsFinished = true;
                    _trigger = null;
                    return;
                }


                _trigger = e.Current;
            }


            public bool IsReadyToContinue => _trigger?.IsReady ?? true;
            public bool IsFinished { get; private set; }
            public abstract IEnumerator<IContinueTrigger> RunInner();


            protected IContinueTrigger SleepOne()
            {
                return new ContinueImmediatelyTrigger();
            }


            protected IContinueTrigger Sleep(TimeSpan ts)
            {
                return new ContinueAfterElapsedTimeTrigger(ts);
            }
        }


        internal class BlahScript : AbstractScript
        {
            public override IEnumerator<IContinueTrigger> RunInner()
            {
                Console.WriteLine("Hi there!");


                yield return SleepOne();


                Console.WriteLine("Let's talk in a few seconds...");


                yield return Sleep(TimeSpan.FromSeconds(3));


                Console.WriteLine("Scratch that, I have to go. :(");
            }
        }


        #endregion


        #region Continue triggers


        internal interface IContinueTrigger
        {
            bool IsReady { get; }
        }


        internal class ContinueImmediatelyTrigger : IContinueTrigger
        {
            public bool IsReady => true;
        }


        internal class ContinueAfterElapsedTimeTrigger : IContinueTrigger
        {
            private readonly DateTime _timeToRun;


            public ContinueAfterElapsedTimeTrigger(TimeSpan ts)
            {
                _timeToRun = DateTime.Now.Add(ts);
            }


            public bool IsReady => DateTime.Now >= _timeToRun;
        }


        #endregion
    }

    4
    Off-Topic (Spam) / Just wanted to say sorry to Davidi
    « on: December 23, 2015, 04:42:46 AM »
    Two months ago, a staffer (Davidi2) was bullied in this place and made fun of, repeatedly.
    Mostly because he was being a sook and complaining about the new mandatory TLS usage for the website and IRC network.


    I just wanted to say, on behalf of all involved, that we are deeply sorry.


    We're sorry...


    We're sorry.


    Sorry.


    We're deeply sorry.


    Video footage of our heartfelt apology may be found here:


    We're sorry.

    5
    Here are the beginnings of a fluent API I'm designing:
    Code: [Select]

            NpcTalkScriptBuilder builder = new NpcTalkScriptBuilder();
            NpcTalkScript script = builder.bindNpcs(95, 224, 268, 485, 540, 617, 792)
                    .executeImmediately((context) -> {
                        Player player = context.getPlayer();


                        player.setBusy(true);
                    })
                    .thenExecuteImmediately((ctx) -> {
                        Player player = ctx.getPlayer();
                        Npc npc = ctx.getNpc();


                        player.informOfChatMessage(new ChatMessage(player, npc,
                                "I'd like to access my bank account please"));
                    })
                    .thenExecuteDelayed(1500, (ctx) -> {
                        Player player = ctx.getPlayer();
                        Npc npc = ctx.getNpc();


                        player.informOfNpcChatMessage(new ChatMessage(npc, player,
                                "Certainly " + (player.getAppearance().isMale() ? "sir" : "miss")));
                    })
                    .thenExecuteDelayed(1500, (ctx) -> {
                        Player player = ctx.getPlayer();


                        player.setBusy(false);
                        player.setAccessingBank(true);
                        Packets.showBank(player);
                    })
                    .finaliseScript();


    The idea, in a nutshell, is that the scripter is largely abstracted from things like nesting.
    It's early days but this will be recursive, allowing for n-depth option selection. I just need to work out the details.


    Thoughts on the use of a fluent API as opposed to the nested solution in RSCD (the worst of them seems to be org.rscdaemon.server.npchandler.Tanner) ??

    6
    I'm told that at least one person has expressed interest in contributing to this project. That's fine.

    Feel free to fork the project and contribute changes via the pull request mechanism. Keep each pull request's changes concise and related to one thing. If they're reasonable then I'll review them and include them in the main branch.

    I'm developing this in my own time, at my own leisure, so no rushing or hassling me.

    https://github.com/MoparClassic/elysium-single-threaded


    Project has been converted to use the Maven build system. Continuous integration now in place: https://travis-ci.org/Lothy/elysium-single-threaded

    7
    RSC Server Development / Discussion / RSCD v25 bugs
    « on: January 23, 2015, 05:04:25 PM »
    What known bugs exist in RSCD v25 (the leaked version) ?
    I've been trying to hack together my own solution but it's a lot of work. To be honest I'm probably better off starting with the content-complete RSCD v25 and making my improvements to it instead, rather than trying to do it the other way around.

    8
    Who would play such a game?


    There are some caveats that I can think of which might be hard/impossible to correct:
    1. Walking - there would no longer be 'chasing' as you have when pking in RSC.
    2. Actions, such as talking to NPCs, wouldn't really block others from using the NPC. I suppose you could change this, but would you want to?


    I can't think of any other stuff right now. What are your thoughts? Do any other issues/caveats come to mind?

    9
    RSC Server Development / Discussion / RSCDv25 original release
    « on: September 26, 2014, 07:46:39 PM »
    Does anyone still have the original release of RSCD v25? I have a few variants that purport to be RSCD v25, but I'm unsure which is the real one (without any alterations by people after reines' release).
    I'd like to know though.


    Are there any distinguishing features? Package names? Anything like that?


    One seems to use the package format org.rscdaemon.*, has a quest package (org.rscdaemon.server.quest), and comes with a sprite editor.
    Another uses the same package format but doesn't come with a quest package.


    Then there's another one using com.rscd.* for the package format, and comes with this TODO list:
    Quote

    - Following
    - Stop walking to someone elses tile?
    - drag ammy teleports
    - Need to "know" the map serverside too, validate walk paths and make sure straight line for spells/range - stop walking through walls
    - large piles not disappearing as they should
    - Removing wall objects needs coded
    - Drinks - wine, tea etc - Poison and zamarok potions too - Grog
    - Add remaining spells (except npc ones for now)
    - Check skulls are working properly
    - CookingDefs are missing wine, fancy pizza types, choc cake, lava eel
    - Need a tiny wait between eating/drinking etc
    - Add smithing
    - Friend list still fudgeed
    - Ores/Logs/Fish etc should have "weight" values in their Defs
    - A new thread with a server socket listening for admin commands (only bind to localhost for security?)
    - Finish weapon aim/power/etc
    - Harvest all ladder coordinates
    - Check for missing objects
    - Create all item spawn points
    - Remove duplicate telepoints, objects, items etc
    - Need a throttle on commands
    - The username to long function in php creates invalid values for usernames over 8? chars, needs a different approach.
    Notably, the client included in this release is the regular RSC client - not the RSCDaemon client (with the green colourscheme).
    Also, the last modified date on many of the files in this release was June 2007.


    Halp me guys, someone here will know. I'm also happy to share all of these as I wouldn't be surprised if existing links anywhere are dead (these files came from a backup DVD I made in 2008, ).

    10
    General Programming / Cyclist/Pedestrian Surveyor Software
    « on: August 12, 2014, 05:03:46 AM »
    Hi guys.

    I wrote this today for a colleague. It's designed for use by engineers and other procurement personnel in transport for the purpose of surveying stretches of road for bicycle and pedestrian use. This would then inform the prioritisation of cycleways that are to be constructed (among other things).

    I figured I'd share it as it contains a variety of interesting things that university-level students currently studying C# would find useful. This includes WPF, use of the MVVM design pattern (using the MVVMLight API), use of Dapper and SQL Server 2012 LocalDB, etc.

    Here's the link: https://github.com/Lothy/cyclist-surveyor

    It requires the .NET framework version 4.5.1 or higher and Microsoft SQL Server 2012 LocalDB to be installed.

    11
    General Discussion / Complaints about staff
    « on: December 09, 2008, 07:04:28 PM »
    This topic has been made to replace the previous topic (which was removed because it was being misused).

    The rules are simple: This topic is for complaints about staff conduct. In other words, if you think a staff member has unfairly warned you then post here.

    This topic is not for complaining about moderator choices.

    Reminder: This isn't for staff praise, either. Don't post things like "Oh, I love [insert moderator here], he's so cool!". We're asking for complaints, and posting praise isn't going to help.

    Second Reminder: This thread is NOT for controversy with other members OR personal issues with your account. This was stuck so that you would all stop making staff complain threads in sections they didn't belong. You're here to complain about the staff not cooperating, their lack of effort, abuse of power, bad judgment, etc. Please try to keep to the topic.

    Pages: [1]
    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal