Пример #1
0
        private void Register(Metadata metadata)
        {
            metadata.Add(new NativeSubrutineDefinition("wait", (Action <int>)Wait));
            metadata.Add(new NativeSubrutineDefinition("str", (Func <int, string>)InternalSubrutines.Str));
            metadata.Add(new NativeSubrutineDefinition("str", (Func <double, string>)InternalSubrutines.Str));
            metadata.Add(new NativeSubrutineDefinition("str", (Func <string, string>)InternalSubrutines.Str));
            metadata.Add(new NativeSubrutineDefinition("val", (Func <string, InjectionValue>)InternalSubrutines.Val));
            metadata.Add(new NativeSubrutineDefinition("len", (Func <string, int>)InternalSubrutines.Len));
            metadata.Add(new NativeSubrutineDefinition("len", (Func <int, int>)InternalSubrutines.Len));
            metadata.Add(new NativeSubrutineDefinition("len", (Func <double, int>)InternalSubrutines.Len));
            metadata.Add(new NativeSubrutineDefinition("left", (Func <string, int, string>)InternalSubrutines.Left));
            metadata.Add(new NativeSubrutineDefinition("right", (Func <string, int, string>)InternalSubrutines.Right));
            metadata.Add(new NativeSubrutineDefinition("mid", (Func <string, int, int, string>)InternalSubrutines.Mid));
            metadata.Add(new NativeSubrutineDefinition("GetArrayLength", InternalSubrutines.GetArrayLength));
            metadata.Add(new NativeSubrutineDefinition("Now", (Func <int>)Now));

            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("true", (Func <int>)(() => 1)));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("false", (Func <int>)(() => 0)));
        }
Пример #2
0
        internal void Register(Metadata metadata)
        {
            metadata.Add(new NativeSubrutineDefinition("UO.Set", (Action <string, string>)Set));
            metadata.Add(new NativeSubrutineDefinition("UO.Set", (Action <string, int>)Set));

            metadata.Add(new NativeSubrutineDefinition("UO.SetGlobal", (Action <string, string>)globals.SetGlobal));
            metadata.Add(new NativeSubrutineDefinition("UO.SetGlobal", (Action <string, int>)globals.SetGlobal));
            metadata.Add(new NativeSubrutineDefinition("UO.SetGlobal", (Action <string, double>)globals.SetGlobal));
            metadata.Add(new NativeSubrutineDefinition("UO.GetGlobal", (Func <string, string>)globals.GetGlobal));

            metadata.Add(new NativeSubrutineDefinition("UO.GetX", (Func <int>)GetX));
            metadata.Add(new NativeSubrutineDefinition("UO.GetX", (Func <string, int>)GetX));
            metadata.Add(new NativeSubrutineDefinition("UO.GetX", (Func <int, int>)GetX));

            metadata.Add(new NativeSubrutineDefinition("UO.GetY", (Func <int>)GetY));
            metadata.Add(new NativeSubrutineDefinition("UO.GetY", (Func <string, int>)GetY));
            metadata.Add(new NativeSubrutineDefinition("UO.GetY", (Func <int, int>)GetY));

            metadata.Add(new NativeSubrutineDefinition("UO.GetZ", (Func <int>)GetZ));
            metadata.Add(new NativeSubrutineDefinition("UO.GetZ", (Func <string, int>)GetZ));
            metadata.Add(new NativeSubrutineDefinition("UO.GetZ", (Func <int, int>)GetZ));

            metadata.Add(new NativeSubrutineDefinition("UO.GetDistance", (Func <string, int>)GetDistance));
            metadata.Add(new NativeSubrutineDefinition("UO.GetDistance", (Func <int, int>)GetDistance));
            metadata.Add(new NativeSubrutineDefinition("UO.GetDistance", (Func <int, int, int, int, int>)GetDistance));

            metadata.Add(new NativeSubrutineDefinition("UO.GetHP", (Func <int>)GetHP));
            metadata.Add(new NativeSubrutineDefinition("UO.GetHP", (Func <int, int>)GetHP));
            metadata.Add(new NativeSubrutineDefinition("UO.GetHP", (Func <string, int>)GetHP));

            metadata.Add(new NativeSubrutineDefinition("UO.GetMaxHP", (Func <int>)GetMaxHP));
            metadata.Add(new NativeSubrutineDefinition("UO.GetMaxHP", (Func <int, int>)GetMaxHP));
            metadata.Add(new NativeSubrutineDefinition("UO.GetMaxHP", (Func <string, int>)GetMaxHP));

            metadata.Add(new NativeSubrutineDefinition("UO.GetNotoriety", (Func <int, int>)GetNotoriety));
            metadata.Add(new NativeSubrutineDefinition("UO.GetNotoriety", (Func <string, int>)GetNotoriety));

            metadata.Add(new NativeSubrutineDefinition("UO.GetInfo", (Func <string, string>)GetInfo));
            metadata.Add(new NativeSubrutineDefinition("UO.GetName", (Func <int, string>)GetName));
            metadata.Add(new NativeSubrutineDefinition("UO.GetName", (Func <string, string>)GetName));

            metadata.Add(new NativeSubrutineDefinition("UO.GetGraphic", (Func <string, int>)GetGraphics));
            metadata.Add(new NativeSubrutineDefinition("UO.GetGraphic", (Func <int, int>)GetGraphics));

            metadata.Add(new NativeSubrutineDefinition("UO.GetDir", (Func <string, int>)GetDir));
            metadata.Add(new NativeSubrutineDefinition("UO.GetDir", (Func <int, int>)GetDir));
            metadata.Add(new NativeSubrutineDefinition("UO.GetDir", (Func <int>)GetDir));

            metadata.Add(new NativeSubrutineDefinition("UO.IsNpc", (Func <int, int>)IsNpc));
            metadata.Add(new NativeSubrutineDefinition("UO.IsNpc", (Func <string, int>)IsNpc));

            metadata.Add(new NativeSubrutineDefinition("UO.Exists", (Func <int, int>)Exists));
            metadata.Add(new NativeSubrutineDefinition("UO.Exists", (Func <string, int>)Exists));

            metadata.Add(new NativeSubrutineDefinition("UO.Getserial", (Func <string, string>)GetSerial));
            metadata.Add(new NativeSubrutineDefinition("UO.GetQuantity", (Func <string, int>)GetQuantity));
            metadata.Add(new NativeSubrutineDefinition("UO.GetQuantity", (Func <int, int>)GetQuantity));
            metadata.Add(new NativeSubrutineDefinition("UO.IsOnline", (Func <int>)IsOnline));
            metadata.Add(new NativeSubrutineDefinition("UO.Dead", (Func <int>)Dead));
            metadata.Add(new NativeSubrutineDefinition("UO.Hidden", (Func <int>)Hidden));
            metadata.Add(new NativeSubrutineDefinition("UO.Hidden", (Func <string, int>)Hidden));

            metadata.Add(new NativeSubrutineDefinition("UO.AddObject", (Action <string, int>)AddObject));
            metadata.Add(new NativeSubrutineDefinition("UO.AddObject", (Action <string>)AddObject));

            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Str", (Func <int>)Str));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Int", (Func <int>)Int));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Dex", (Func <int>)Dex));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Stamina", (Func <int>)Stamina));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Mana", (Func <int>)Mana));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Weight", (Func <int>)Weight));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Gold", (Func <int>)Gold));
            metadata.AddIntrinsicVariable(new NativeSubrutineDefinition("UO.Life", (Func <int>)Life));

            metadata.Add(new NativeSubrutineDefinition("UO.FindType", (Action <string>)FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindType", (Action <int>)FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindType", (Action <int, int>)FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindType", (Action <int, int, int>)FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindType", (Action <string, string, string>)FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindType", (Action <int, int, string>)FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindType", FindType));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <int>)FindCount));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <string, int>)((ignoredParam1) => FindCount())));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <string, string, int>)((ignoredParam1, ignoredParam2) => FindCount())));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <string, string, string, int>)((ignoredParam1, ignoredParam2, ignoredParam3) => FindCount())));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <int, int>)((ignoredParam1) => FindCount())));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <int, int, int>)((ignoredParam1, ignoredParam2) => FindCount())));
            metadata.Add(new NativeSubrutineDefinition("UO.FindCount", (Func <int, int, int, int>)((ignoredParam1, ignoredParam2, ignoredParam3) => FindCount())));
            metadata.Add(new NativeSubrutineDefinition("UO.Ignore", (Action <int>)Ignore));
            metadata.Add(new NativeSubrutineDefinition("UO.Ignore", (Action <string>)Ignore));
            metadata.Add(new NativeSubrutineDefinition("UO.IgnoreReset", (Action)IgnoreReset));
            metadata.Add(new NativeSubrutineDefinition("UO.Count", (Func <string, int>)Count));
            metadata.Add(new NativeSubrutineDefinition("UO.Count", (Func <int, int>)Count));
            metadata.Add(new NativeSubrutineDefinition("UO.Count", (Func <InjectionValue, InjectionValue, InjectionValue, int>)Count));
            metadata.Add(new NativeSubrutineDefinition("UO.Click", (Action <string>)Click));
            metadata.Add(new NativeSubrutineDefinition("UO.Click", (Action <int>)Click));
            metadata.Add(new NativeSubrutineDefinition("UO.UseObject", (Action <string>)UseObject));
            metadata.Add(new NativeSubrutineDefinition("UO.UseObject", (Action <int>)UseObject));
            metadata.Add(new NativeSubrutineDefinition("UO.Attack", (Action <string>)Attack));
            metadata.Add(new NativeSubrutineDefinition("UO.Attack", (Action <int>)Attack));
            metadata.Add(new NativeSubrutineDefinition("UO.GetStatus", (Action <string>)GetStatus));
            metadata.Add(new NativeSubrutineDefinition("UO.GetStatus", (Action <int>)GetStatus));
            metadata.Add(new NativeSubrutineDefinition("UO.UseType", (Action <int>)UseType));
            metadata.Add(new NativeSubrutineDefinition("UO.UseType", (Action <string>)UseType));
            metadata.Add(new NativeSubrutineDefinition("UO.UseType", (Action <int, int>)UseType));
            metadata.Add(new NativeSubrutineDefinition("UO.UseType", (Action <string, string>)UseType));
            metadata.Add(new NativeSubrutineDefinition("UO.UseType", (Action <int, string>)UseType));
            metadata.Add(new NativeSubrutineDefinition("UO.UseType", (Action <string, int>)UseType));

            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetObject", (Action <string>)WaitTargetObject));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetObject", (Action <string, string>)WaitTargetObject));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetSelf", (Action)WaitTargetSelf));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetSelf", (Action <string>)WaitTargetSelf));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetLast", (Action)WaitTargetLast));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetLast", (Action <string>)WaitTargetLast));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetTile", (Action <int, int, int, int>)WaitTargetTile));
            metadata.Add(new NativeSubrutineDefinition("UO.WaitTargetTile", (Action <string, string, string, string>)WaitTargetTile));
            metadata.Add(new NativeSubrutineDefinition("UO.Targeting", (Func <int>)IsTargeting));

            metadata.Add(new NativeSubrutineDefinition("UO.Grab", (Action <int, int>)Grab));
            metadata.Add(new NativeSubrutineDefinition("UO.Grab", (Action <int, string>)Grab));
            metadata.Add(new NativeSubrutineDefinition("UO.Grab", (Action <string, string>)Grab));

            metadata.Add(new NativeSubrutineDefinition("UO.MoveItem", (Action <string, string>)MoveItem));
            metadata.Add(new NativeSubrutineDefinition("UO.MoveItem", (Action <string, int>)MoveItem));
            metadata.Add(new NativeSubrutineDefinition("UO.MoveItem", (Action <int, int>)MoveItem));
            metadata.Add(new NativeSubrutineDefinition("UO.MoveItem", (Action <string, string, string>)MoveItem));
            metadata.Add(new NativeSubrutineDefinition("UO.MoveItem", (Action <int, int, int>)MoveItem));

            metadata.Add(new NativeSubrutineDefinition("UO.SetReceivingContainer", (Action <int>)SetReceivingContainer));
            metadata.Add(new NativeSubrutineDefinition("UO.SetReceivingContainer", (Action <string>)SetReceivingContainer));
            metadata.Add(new NativeSubrutineDefinition("UO.UnsetReceivingContainer", (Action)UnsetReceivingContainer));

            metadata.Add(new NativeSubrutineDefinition("UO.LClick", (Action <int, int>)LClick));
            metadata.Add(new NativeSubrutineDefinition("UO.KeyPress", (Action <int>)KeyPress));
            metadata.Add(new NativeSubrutineDefinition("UO.Press", (Action <int>)Press));
            metadata.Add(new NativeSubrutineDefinition("UO.Say", (Action <string>)Say));

            metadata.Add(new NativeSubrutineDefinition("UO.PlayWav", (Action <string>)PlayWav));

            metadata.Add(new NativeSubrutineDefinition("UO.TextOpen", (Action)TextOpen));
            metadata.Add(new NativeSubrutineDefinition("UO.TextPrint", (Action <string>)TextPrint));

            metadata.Add(new NativeSubrutineDefinition("UO.Msg", (Action <string>)Msg));
            metadata.Add(new NativeSubrutineDefinition("UO.ServerPrint", (Action <string>)ServerPrint));
            metadata.Add(new NativeSubrutineDefinition("UO.Print", (Action <string>)Print));
            metadata.Add(new NativeSubrutineDefinition("UO.CharPrint", (Action <int, string>)CharPrint));
            metadata.Add(new NativeSubrutineDefinition("UO.CharPrint", (Action <string, string>)CharPrint));
            metadata.Add(new NativeSubrutineDefinition("UO.CharPrint", (Action <int, int, string>)CharPrint));
            metadata.Add(new NativeSubrutineDefinition("UO.CharPrint", (Action <string, int, string>)CharPrint));

            metadata.Add(new NativeSubrutineDefinition("UO.InJournal", (Func <string, int>)InJournal));
            metadata.Add(new NativeSubrutineDefinition("UO.InJournalBetweenTimes", (Func <string, int, int, int>)InJournalBetweenTimes));
            metadata.Add(new NativeSubrutineDefinition("UO.InJournalBetweenTimes", (Func <string, int, int, int, int>)InJournalBetweenTimes));
            metadata.Add(new NativeSubrutineDefinition("UO.DeleteJournal", (Action)DeleteJournal));
            metadata.Add(new NativeSubrutineDefinition("UO.DeleteJournal", (Action <string>)DeleteJournal));
            metadata.Add(new NativeSubrutineDefinition("UO.Journal", (Func <int, string>)GetJournalText));
            metadata.Add(new NativeSubrutineDefinition("UO.JournalSerial", (Func <int, string>)JournalSerial));
            metadata.Add(new NativeSubrutineDefinition("UO.JournalColor", (Func <int, string>)JournalColor));
            metadata.Add(new NativeSubrutineDefinition("UO.SetJournalLine", (Action <int>)SetJournalLine));
            metadata.Add(new NativeSubrutineDefinition("UO.SetJournalLine", (Action <int, string>)SetJournalLine));

            metadata.Add(new NativeSubrutineDefinition("UO.Arm", (Action <string>)Arm));
            metadata.Add(new NativeSubrutineDefinition("UO.SetArm", (Action <string>)SetArm));
            metadata.Add(new NativeSubrutineDefinition("UO.Disarm", (Action)Disarm));
            metadata.Add(new NativeSubrutineDefinition("UO.Unequip", (Action <string>)Unequip));
            metadata.Add(new NativeSubrutineDefinition("UO.Equip", (Action <string, int>)Equip));
            metadata.Add(new NativeSubrutineDefinition("UO.Equip", (Action <string, string>)Equip));
            metadata.Add(new NativeSubrutineDefinition("UO.ObjAtLayer", (Func <string, InjectionValue>)ObjAtLayer));

            metadata.Add(new NativeSubrutineDefinition("UO.WarMode", (Action <int>)WarMode));
            metadata.Add(new NativeSubrutineDefinition("UO.WarMode", (Func <int>)WarMode));

            metadata.Add(new NativeSubrutineDefinition("UO.UseSkill", (Action <string>)UseSkill));
            metadata.Add(new NativeSubrutineDefinition("UO.Cast", (Action <string>)Cast));
            metadata.Add(new NativeSubrutineDefinition("UO.Cast", (Action <string, string>)Cast));

            metadata.Add(new NativeSubrutineDefinition("UO.Morph", (Action <string>)Morph));
            metadata.Add(new NativeSubrutineDefinition("UO.Morph", (Action <int>)Morph));

            metadata.Add(new NativeSubrutineDefinition("UO.Timer", (Func <int>)Timer));
            metadata.Add(new NativeSubrutineDefinition("UO.Time", (Func <int>)Time));
            metadata.Add(new NativeSubrutineDefinition("UO.Date", (Func <int>)Date));

            metadata.Add(new NativeSubrutineDefinition("UO.Terminate", (Action <string>)Terminate));
            metadata.Add(new NativeSubrutineDefinition("UO.Random", (Func <int, int>)Random));
        }