Exemplo n.º 1
0
        public static string GetPlayerPassword()
        {
            var sFunc = "GetPlayerPassword";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueString());
        }
Exemplo n.º 2
0
        public static int GetMaxLevel()
        {
            var sFunc = "GetMaxLevel";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueInt());
        }
Exemplo n.º 3
0
        public static void RemoveBannedIP(string ip)
        {
            var sFunc = "RemoveBannedIP";

            NWNXCore.NWNX_PushArgumentString(ip);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 4
0
        public static string GetServerName()
        {
            var sFunc = "GetServerName";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueString());
        }
Exemplo n.º 5
0
        public static void SetDMPassword(string password)
        {
            var sFunc = "SetDMPassword";

            NWNXCore.NWNX_PushArgumentString(password);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 6
0
        public static void SetServerName(string name)
        {
            var sFunc = "SetServerName";

            NWNXCore.NWNX_PushArgumentString(name);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 7
0
        public static string GetBannedList()
        {
            var sFunc = "GetBannedList";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueString());
        }
Exemplo n.º 8
0
        public static void RemoveBannedCDKey(string key)
        {
            var sFunc = "RemoveBannedCDKey";

            NWNXCore.NWNX_PushArgumentString(key);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 9
0
        public static void SetMaxLevel(int nLevel)
        {
            var sFunc = "SetMaxLevel";

            NWNXCore.NWNX_PushArgumentInt(nLevel);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 10
0
        public static void AddBannedPlayerName(string playerName)
        {
            var sFunc = "AddBannedPlayerName";

            NWNXCore.NWNX_PushArgumentString(playerName);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 11
0
        public static void SetDebugValue(AdministrationDebugType type, int state)
        {
            var sFunc = "SetDebugValue";

            NWNXCore.NWNX_PushArgumentInt(state);
            NWNXCore.NWNX_PushArgumentInt((int)type);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 12
0
        public static void SetPlayOption(AdministrationOption option, int value)
        {
            var sFunc = "SetPlayOption";

            NWNXCore.NWNX_PushArgumentInt(value);
            NWNXCore.NWNX_PushArgumentInt((int)option);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 13
0
        public static int GetPlayOption(AdministrationOption option)
        {
            var sFunc = "GetPlayOption";

            NWNXCore.NWNX_PushArgumentInt((int)option);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);

            return(NWNXCore.NWNX_GetReturnValueInt());
        }
Exemplo n.º 14
0
        public static void DeletePlayerCharacter(uint oPC, bool bPreserveBackup = true, string sKickMessage = "")
        {
            var sFunc = "DeletePlayerCharacter";

            NWNXCore.NWNX_PushArgumentString(sKickMessage);
            NWNXCore.NWNX_PushArgumentInt(bPreserveBackup ? 1 : 0);
            NWNXCore.NWNX_PushArgumentObject(oPC);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 15
0
        public static AdministrationDebugType GetDebugValue(int type)
        {
            var sFunc = "GetDebugValue";

            NWNXCore.NWNX_PushArgumentInt(type);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);

            return((AdministrationDebugType)NWNXCore.NWNX_GetReturnValueInt());
        }
Exemplo n.º 16
0
        public static int DeleteTURD(string playerName, string characterName)
        {
            var sFunc = "DeleteTURD";

            NWNXCore.NWNX_PushArgumentString(characterName);
            NWNXCore.NWNX_PushArgumentString(playerName);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);

            return(NWNXCore.NWNX_GetReturnValueInt());
        }
Exemplo n.º 17
0
        // Convert unpacked itemproperty structure to native type.
        public static Lite.ItemProperty PackIP(ItemPropertyUnpacked itemProperty)
        {
            const string sFunc = "PackIP";

            NWNXCore.NWNX_PushArgumentString(itemProperty.Tag);
            NWNXCore.NWNX_PushArgumentObject(itemProperty.Creator);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.SpellId);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.IsUseable ? 1 : 0);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.ChanceToAppear);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.UsesPerDay);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.Param1Value);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.Param1);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.CostTableValue);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.CostTable);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.SubType);
            NWNXCore.NWNX_PushArgumentInt(itemProperty.Property);

            NWNXCore.NWNX_CallFunction(PLUGIN_NAME, sFunc);
            return(NWNXCore.NWNX_GetReturnValueItemProperty());
        }
Exemplo n.º 18
0
        /// @brief Gets the active item property at the index
        /// @param oItem - the item with the property
        /// @param nIndex - the index such as returned by some Item Events
        /// @return A constructed NWNX_IPUnpacked, except for creator, and spell id.
        public static ItemPropertyUnpacked GetActiveProperty(uint oItem, int nIndex)
        {
            const string sFunc = "GetActiveProperty";

            NWNXCore.NWNX_PushArgumentInt(nIndex);
            NWNXCore.NWNX_PushArgumentObject(oItem);
            NWNXCore.NWNX_CallFunction(PLUGIN_NAME, sFunc);

            return(new ItemPropertyUnpacked
            {
                Property = NWNXCore.NWNX_GetReturnValueInt(),
                SubType = NWNXCore.NWNX_GetReturnValueInt(),
                CostTable = NWNXCore.NWNX_GetReturnValueInt(),
                CostTableValue = NWNXCore.NWNX_GetReturnValueInt(),
                Param1 = NWNXCore.NWNX_GetReturnValueInt(),
                Param1Value = NWNXCore.NWNX_GetReturnValueInt(),
                UsesPerDay = NWNXCore.NWNX_GetReturnValueInt(),
                ChanceToAppear = NWNXCore.NWNX_GetReturnValueInt(),
                IsUseable = Convert.ToBoolean(NWNXCore.NWNX_GetReturnValueInt()),
                Tag = NWNXCore.NWNX_GetReturnValueString()
            });
        }
Exemplo n.º 19
0
        // Convert native itemproperty type to unpacked structure
        public static ItemPropertyUnpacked UnpackIP(Lite.ItemProperty ip)
        {
            const string func = "UnpackIP";

            NWNXCore.NWNX_PushArgumentItemProperty(ip);
            NWNXCore.NWNX_CallFunction(PLUGIN_NAME, func);

            return(new ItemPropertyUnpacked
            {
                Id = NWNXCore.NWNX_GetReturnValueString(),
                Property = NWNXCore.NWNX_GetReturnValueInt(),
                SubType = NWNXCore.NWNX_GetReturnValueInt(),
                CostTable = NWNXCore.NWNX_GetReturnValueInt(),
                CostTableValue = NWNXCore.NWNX_GetReturnValueInt(),
                Param1 = NWNXCore.NWNX_GetReturnValueInt(),
                Param1Value = NWNXCore.NWNX_GetReturnValueInt(),
                UsesPerDay = NWNXCore.NWNX_GetReturnValueInt(),
                ChanceToAppear = NWNXCore.NWNX_GetReturnValueInt(),
                IsUseable = Convert.ToBoolean(NWNXCore.NWNX_GetReturnValueInt()),
                SpellId = NWNXCore.NWNX_GetReturnValueInt(),
                Creator = NWNXCore.NWNX_GetReturnValueObject(),
                Tag = NWNXCore.NWNX_GetReturnValueString()
            });
        }
Exemplo n.º 20
0
        public static void ClearPlayerPassword()
        {
            var sFunc = "ClearPlayerPassword";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 21
0
        public static void ReloadRules()
        {
            var sFunc = "ReloadRules";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }
Exemplo n.º 22
0
        public static void ShutdownServer()
        {
            var sFunc = "ShutdownServer";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
        }