Esempio n. 1
0
        public MobDB()
            : base("mobdb", "Mob database")
        {
            Author      = "Duckbat";
            Version     = 5;
            Description =
                "You can add mobs to database so we can automatically record their locations and later find them when campaigning.";
            UpdateUrl = "www.duckbat.com/plugins/update.mobdb.txt";
            Website   = "code.google.com/p/proxymud/";

            RequiredPlayerConfig.Add("tags roomchars on");

            Config = new MobDBConfig();

            RegisterCommand("mobdb", "", CommandMobDB);
            RegisterCommand("add", @"(.+)", CommandAdd, 0, CMDFlags.None, "mobdb");
            RegisterCommand("count", "", CommandCount, 0, CMDFlags.None, "mobdb");
            RegisterCommand("delete", @"(.+)", CommandDelete, 0, CMDFlags.None, "mobdb");
            RegisterCommand("find", @"(exact\s+)?(case\s+)?(.+)", CommandFind, 0, CMDFlags.None, "mobdb");
            RegisterCommand("mobinfo", @"^\s*(\d+)?(\s+.+)?", CommandMobInfo, 3, CMDFlags.None, "mobdb");
            RegisterCommand("save", @"(.+)", CommandSave, 0, CMDFlags.None, "mobdb");
            RegisterCommand("where", @"(.+)", CommandWhere, 2, CMDFlags.None, "mobdb");

            RegisterTrigger("room.id", @"^\$gmcp\.room\.info\.num (-?\d+)$", TriggerRoomInfoNum);
            RegisterTrigger("room.area", @"^\$gmcp\.room\.info\.zone (.*)$", TriggerRoomInfoArea);
            RegisterTrigger("room.chars1", @"^@w\{roomchars\}$", TriggerRoomChars1, TriggerFlags.None, 1500);
            RegisterTrigger("room.chars2", @"^@w\{/roomchars\}$", TriggerRoomChars2, TriggerFlags.None, 500);
            RegisterTrigger("room.chars3", @"(.*)", TriggerRoomChars3);
            RegisterTrigger("lastkills1", "@WName                            Level  Exp  From", TriggerLastKills,
                            TriggerFlags.NotRegex);
            RegisterTrigger("lastkills2", @"^@w(.{30})\s+(\d+)\s+\d+\s+(.+)", TriggerLastKills2);

            Load();
        }
Esempio n. 2
0
        public MoonScript() : base("moons", "Moon Script")
        {
            // Set up extra information (optional).
            Author      = "Duckbat";
            Version     = 1;
            Description = "Tracks the position of three moons and displays how many ticks are until a moon rises or falls. Also tracks, and if you want, alerts when all three moons are about to rise. You need to have been outside and seen all three moons rise or fall at least once for it to work.";
            RequiredPlayerConfig.Add("noweather ON"); // Need this to see the moons.
            UpdateUrl = "www.duckbat.com/plugins/update.moons.txt";
            Website   = "www.duckbat.com/plugins/index.php?t=moons";

            // Register some triggers needed for the moon script
            RegisterTrigger("whiterise", "@WYou see the white moon rising in the west.", OnSeeMoon, TriggerFlags.NotRegex, 1000, 3);
            RegisterTrigger("whitefall", "@WYou notice the white moon falling to the east.", OnSeeMoon, TriggerFlags.NotRegex, 1000, -3);
            RegisterTrigger("greyrise", "@[wD]You see the grey moon rising in the east.", OnSeeMoon, TriggerFlags.None, 1000, 2);
            RegisterTrigger("greyfall", "@[wD]You notice the grey moon falling to the west.", OnSeeMoon, TriggerFlags.None, 1000, -2);
            RegisterTrigger("blackrise", "@BYou see the black moon rising in the east.", OnSeeMoon, TriggerFlags.NotRegex, 1000, 1);
            RegisterTrigger("blackfall", "@BYou notice the black moon falling to the west.", OnSeeMoon, TriggerFlags.NotRegex, 1000, -1);
            RegisterTrigger("tick", "$gmcp.comm.tick", OnTick, TriggerFlags.NotRegex);

            // Register commands to check on the moons
            RegisterCommand("moons", @"^alert\s+(on|off)$", MoonsCommand, 4);
        }