1. I'm trying to find a place, where i can put hook, so i could find what player clicked "Upgrade" on Blueprint Fragments/Pages/Books/Libraries, and what item is being created. If someone could help me, i'd be very happy! :)
     
    Last edited by a moderator: Sep 11, 2015
  2. bump? Anyone can help me with that? or atleast tell me if its possible?
     
  3. You could hook to Oxide API for Rust and replace the item that's being added to player inventory.
     
  4. The class ItemModReveal could be a good place for that hook ;)
    Code:
    public override void ServerCommand(Item item, string command, BasePlayer player)
    {
        if (command == "reveal")
        {
            if (item.amount < this.numForReveal)
            {
                return;
            }
            int num = item.position;
            item.UseItem(this.numForReveal);
            Item item1 = null;
            item1 = (!this.revealedItemOverride ? this.revealList.SpawnRandomItem() : ItemManager.Create(this.revealedItemOverride, this.revealedItemAmount, this.asBlueprint));
            if (item1 != null)
            {
                if (!item1.MoveToContainer(player.inventory.containerMain, (item.amount != 0 ? -1 : num), true))
                {
                    item1.Drop(player.eyes.position, player.eyes.BodyForward() * 2f, new Quaternion());
                }
            }
            if (this.successEffect.isValid)
            {
                Effect.server.Run(this.successEffect.resourcePath, player.eyes.position, new Vector3(), null, false);
            }
        }
    }