I was trying get open ai to write a plugin and this is as far as it got me.
using System;
using System.Collections.Generic;
using Oxide.Core;
using Newtonsoft.Json;

namespace Oxide.Plugins
{
    [Info("IncreasedWaterCapacity", "Substrata", "1.0.0")]
    [Description("Increases the collection rate of water guns & water pistols")]

    class IncreasedWaterCapacity : RustPlugin
    {
        System.Random random = new System.Random();
        ItemDefinition freshWater = ItemManager.FindItemDefinition(-1779180711);
        ItemDefinition waterGun = ItemManager.FindItemDefinition(722955039);
        ItemDefinition waterPistol = ItemManager.FindItemDefinition(-1815301988);

        void OnCollectWater(BasePlayer player, Item item)
        {
            if (item == null || item.info.itemid != waterGun.itemid && item.info.itemid != waterPistol.itemid) return;
            if (freshWater == null) return;

            int amount = GetAmount(configData.minWaterGunCapacity, configData.maxWaterGunCapacity);
            if (item.info.itemid == waterPistol.itemid)
                amount = GetAmount(configData.minWaterPistolCapacity, configData.maxWaterPistolCapacity);

            if (amount > 0)
                item.inventory.AddItem(freshWater, amount);
        }

        int GetAmount(int min, int max)
        {
            if (min < 0) min = 0;
            if (max < 0) max = 0;
            if (min >= max) return max;
            return random.Next(min, max + 1);
        }

        #region Configuration
        private ConfigData configData;

        private class ConfigData
        {
            [JsonProperty(PropertyName = "Minimum Water Gun Capacity")]
            public int minWaterGunCapacity { get; set; }
            [JsonProperty(PropertyName = "Maximum Water Gun Capacity")]
            public int maxWaterGunCapacity { get; set; }
            [JsonProperty(PropertyName = "Minimum Water Pistol Capacity")]
            public int minWaterPistolCapacity { get; set; }
            [JsonProperty(PropertyName = "Maximum Water Pistol Capacity")]
            public int maxWaterPistolCapacity { get; set; }

            [JsonProperty(PropertyName = "Version (Do not modify)")]
            public Oxide.Core.VersionNumber Version { get; set; }
        }

        protected override void LoadConfig()
        {
            base.LoadConfig();
            try
            {
                configData = Config.ReadObject<ConfigData>();
                if (configData == null) throw new Exception();

                if (configData.Version < Version)
                    UpdateConfigValues();

                SaveConfig();
            }
            catch
            {
                PrintError("Your configuration file contains an error. Using default configuration values.");
                LoadDefaultConfig();
            }
        }

        protected override

void LoadDefaultConfig()
{
configData = new ConfigData
{
minWaterGunCapacity = 100,
maxWaterGunCapacity = 200,
minWaterPistolCapacity = 50,
maxWaterPistolCapacity = 100,
Version = Version
};
SaveConfig();
}

    protected override void SaveConfig() => Config.WriteObject(configData);

    private void UpdateConfigValues()
    {
        if (configData.Version == null)
        {
            configData.minWaterGunCapacity = 100;
            configData.maxWaterGunCapacity = 200;
            configData.minWaterPistolCapacity = 50;
            configData.maxWaterPistolCapacity = 100;
        }

        configData.Version = Version;
        SaveConfig();
    }
    #endregion
}

}

I was wanting it to increse the default capacity of a water gun and water pistol. If someone know how to make it work that be great!

Merged post

This was the other one that I was trying to get to switch the order of damage building grades could take. wood -> toptier or stone -> metal.

using System;
using Oxide.Core.Plugins;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("TopTierWood", "Author", "1.0.0")]
    [Description("Changes the appearance of a building block to look like wood while maintaining the strength of a top tier block")]
    class TopTierWood : Plugin
    {
        #region Variables
        private BuildingBlock _buildingBlock;
        #endregion

        #region Hooks
        private void Init()
        {
            _buildingBlock = GetBuildingBlockLookingAt();

            if (_buildingBlock == null)
            {
                PrintError("No building block found!");
                return;
            }

            ChangeBuildingBlockSkin();
            ChangeBuildingBlockGrade();
        }
        #endregion

        #region Methods
        private BuildingBlock GetBuildingBlockLookingAt()
        {
            RaycastHit raycastHit;
            var flag = Physics.Raycast(Camera.main.transform.position, Camera.main.transform.forward, out raycastHit, 100f);
            return flag ? raycastHit.GetEntity() as BuildingBlock : null;
        }

        private void ChangeBuildingBlockSkin()
        {
            // replace with the skin id for the wood material
            _buildingBlock.skinID = 0;
        }

        private void ChangeBuildingBlockGrade()
        {
            // replace with the appropriate grade id for the top tier building block
            _buildingBlock.grade = BuildingGrade.Enum.TopTier;
        }
        #endregion
    }
}​


Merged post

As you can see I don't have the know how to do it yet, but I'm trying to learn.

Merged post

I got pretty close with this one.
using Oxide.Core;
using Oxide.Core.Plugins;
using System;
using System.Collections.Generic;

namespace Oxide.Plugins
{
    [Info("Simple Suggestion Box", "Flechen", "1.0.0")]
    [Description("Allows players to send suggestions to the admin and stores them in a data file")]
    public class SimpleSuggestionBox : RustPlugin
    {
        private const string PermissionAdmin = "simplesuggestionbox.admin";
        private const string PermissionClear = "simplesuggestionbox.clear";
        private readonly List<Suggestion> suggestions = new List<Suggestion>();
        private static readonly int MaxSuggestionsToShow = 10;

        private void Init()
        {
            permission.RegisterPermission(PermissionAdmin, this);
            permission.RegisterPermission(PermissionClear, this);
        }

        [ChatCommand("suggest")]
        private void SuggestCommand(BasePlayer player, string command, string[] args)
        {
            if (args.Length < 1)
            {
                SendReply(player, "Usage: /suggest <suggestion>");
                return;
            }

            var suggestion = string.Join(" ", args);
            suggestions.Add(new Suggestion { Time = DateTime.UtcNow, Player = player.displayName, Message = suggestion });
            SendReply(player, "Thanks for your suggestion!");
        }

        [ChatCommand("suggestions")]
        private void ViewSuggestionsCommand(BasePlayer player, string command, string[] args)
        {
            if (!permission.UserHasPermission(player.UserIDString, PermissionAdmin))
            {
                SendReply(player, "You do not have permission to view suggestions.");
                return;
            }

            if (suggestions.Count == 0)
            {
                SendReply(player, "No suggestions have been made.");
                return;
            }

            var suggestionCount = suggestions.Count;
            for (var i = Math.Max(suggestionCount - MaxSuggestionsToShow, 0); i < suggestionCount; i++)
            {
                var suggestion = suggestions[i];
                var suggestionNumber = (i + 1).ToString().PadLeft(3, '0');
                SendReply(player, $"{suggestionNumber} - {suggestion.Time} - {suggestion.Player} : {suggestion.Message}");
            }
        }

        [ChatCommand("suggestionsclear")]
        private void ClearSuggestionsCommand(BasePlayer player, string command, string[] args)
        {
            if (!permission.UserHasPermission(player.UserIDString, PermissionClear))
            {
                SendReply(player, "You do not have permission to clear suggestions.");
                return;
            }

            suggestions.Clear();
            SendReply(player, "All suggestions have been cleared.");
        }

        private class Suggestion
        {
            public DateTime Time { get; set; }
            public string Player { get; set; }
            public string Message { get; set; }
        }
    }
}​

I gave it a more basic task and it failed, like setting the time of day and not progressing time.

 

Then tried other things and it told me it can't do it, but only show me guidelines of how it could be done.

8SecSleeper

I gave it a more basic task and it failed, like setting the time of day and not progressing time.

 

Then tried other things and it told me it can't do it, but only show me guidelines of how it could be done.

It can definitely somehow navigate you to "how could it work" or on what basics but it wont really make a working plugin by itself in my opinion.

I shared these just in case someone wanted to make them and cliam them.

Another one I wanted to fix was automated trains. only have the automated train on the tracks, I've tried everything that I know how to do and can get it to do it.

using Oxide.Core;
using System.Collections.Generic;

namespace Oxide.Plugins
{
    [Info("PrefabLimiter", "HoverCatz", "1.0.0")]
    class PrefabLimiter : RustPlugin
    {

        Dictionary<string, int> spawnChances = new Dictionary<string, int>();

        void OnServerInitialized()
        {
            /* Load config */

            spawnChances = Interface.Oxide.DataFileSystem.ReadObject<Dictionary<string, int>>("PrefabLimiter") ?? spawnChances;

            if (spawnChances == null)
                spawnChances = new Dictionary<string, int>();

            if (spawnChances.Count <= 0)
                AddDefaultConfig();

            Interface.Oxide.DataFileSystem.WriteObject("PrefabLimiter", spawnChances);

            Puts($"PrefabLimiter successfully initialized. Loaded {spawnChances.Count} config values.");
        }

        private void AddDefaultConfig()
        {
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores/metal-ore.prefab", 100);		// 0% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores/stone-ore.prefab", 100);	// 100% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores/sulfur-ore.prefab", 100);	// 0% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_sand/metal-ore.prefab", 100);	// 0% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_sand/stone-ore.prefab", 100);	// 100% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_sand/sulfur-ore.prefab", 100);	// 0% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_snow/metal-ore.prefab", 100);	// 0% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_snow/stone-ore.prefab", 100);	// 100% chance to spawn
            //spawnChances.Add("assets/bundled/prefabs/autospawn/resource/ores_snow/sulfur-ore.prefab", 100);	// 100% chance to spawn
			//spawnChances.Add("assets/bundled/prefabs/autospawn/collectable/stone/metal-collectable.prefab", 100);	// 0% chance to spawn
			//spawnChances.Add("assets/bundled/prefabs/autospawn/collectable/stone/sulfur-collectable.prefab", 100);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/locomotive/locomotive.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/workcart/workcart_aboveground.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/workcart/workcart_aboveground2.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagona.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagonb.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagonc.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagond.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagone.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagonunloadable.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagonunloadablefuel.entity.prefab", 0);	// 0% chance to spawn
			spawnChances.Add("assets/content/vehicles/trains/wagons/trainwagonunloadableloot.entity.prefab", 0);	// 0% chance to spawn

            // Add more prefabs here if you want
            // https://www.corrosionhour.com/rust-prefab-list/
        }

        void Unload()
        {
            Interface.Oxide.DataFileSystem.WriteObject("PrefabLimiter", spawnChances);
        }

        [ConsoleCommand("prefabLimiterReload")]
        void ReloadConfig(ConsoleSystem.Arg _)
        {
            /* Reload config */

            spawnChances = Interface.Oxide.DataFileSystem.ReadObject<Dictionary<string, int>>("PrefabLimiter") ?? spawnChances;

            if (spawnChances == null)
                spawnChances = new Dictionary<string, int>();

            if (spawnChances.Count <= 0)
                AddDefaultConfig();

            Interface.Oxide.DataFileSystem.WriteObject("PrefabLimiter", spawnChances);

            Puts($"PrefabLimiter successfully reloaded {spawnChances.Count} config values.");
        }

        void OnEntitySpawned(BaseNetworkable entity)
        {

            int intChance;
            string name = entity.name;

            if (!spawnChances.TryGetValue(name, out intChance))
                return; // Doesn't exist in our list? 100% chance to spawn

            if (intChance == 100)
                return; // 100% chance, spawn.
            else
            if (intChance == 0)
            {
                entity.AdminKill(); // Destroy the Prefab! No chance check.
                return;
            }

            float fChance = intChance / 100f;
            float rnd = UnityEngine.Random.value;

            if (rnd > fChance)
                entity.AdminKill(); // Destroy the Prefab!

        }

    }
}​


Merged post

that one removes everything