Rust Craft any item at anytime

Discussion in 'Plugin Requests' started by FTM, Nov 19, 2016.

  1. FTM

    FTM

    I'm looking for a plugin that will allow anyone to craft anything at anytime, without needing the items in their inventory.
     
  2. FTM

    FTM

    I'm talking about deployables.

    To give players the ability to craft a gun, without gears.
     
  3. Such things would be only possible by custom chat commands, like "/craft rifle.ak". Thats not very comfortable... :p
     
  4. FTM

    FTM

    That is not true. Intoxicated Creative server is currently running it exactly how I stated. You can join the server, and instantly craft anything without having the resources.
     
  5. Yes, the intoxicated sandbox server does allow crafting any item instantly, with no "visible" mats.
    Those guys do have some cool custom plugins :) I don't think there are any current plugins that do that.
    Other than just allowing players to use F1 spawn menu to get what they want. (AdminSpawn plugin), but that's not crafting them :(
     
    Last edited by a moderator: Nov 26, 2016
  6. Sounds more like hacked the game extremely...
    [DOUBLEPOST=1479615717][/DOUBLEPOST]
    Then try byself to manipulate the itemreipts with itemconfig, and delete in there all stuff from those items you want to be crafted by that.
    Thats the only possible way they got done it...
    [DOUBLEPOST=1479616186][/DOUBLEPOST]
    Which server from their server pool?
    [DOUBLEPOST=1479617298][/DOUBLEPOST]And it is like i said: its not possible to craft everything WITHOUT having resources!!!

    If you would have watched the things corretly on their sandbox servers, then you would have seen then you have 50k of resources added hidden to your inventory when you login ;)
     
  7. FTM

    FTM

    Where are they hidden at? Because you can fill your inventory up with random things.
     
  8. On slots not visual shown. You can extend for example the main container over that actual limit.
    Intoxicated gives you 50k of everything on login, so there's nothing very special behind and shows only, such functions "like craft all without resources" are only a trick..like I said :p
     
  9. FTM

    FTM

    how do I do that then. Lol
     
  10. You need someone who codes you exactly that functions like shown there. A good coder can transform the visual experience on those servers into a plugin.
     
  11. Code:
     void OnPlayerInit(BasePlayer player)
    {
    player.inventory.containerMain.capacity = 60; //add more slot to inventory
    player.inventory.containerMain.maxStackSize = 5000000; //set maxstacksize
    Item item = ItemManager.CreateByItemID(3655341, 500000); //wood
    item.MoveToContainer(player.inventory.containerMain, 59, true); //add item to last slot because 0-59 = 60 slots
    }
    
    something like that is working
     
  12. Doesn't seem to work, just tested it on my dev server.
    [DOUBLEPOST=1480012340][/DOUBLEPOST]
    Code:
    namespace Oxide.Plugins
    {
        [Info("CreativeCraft", "Sami37", 0.1)]
        [Description(".")]    class CreativeCraft : RustPlugin
        {
             void OnPlayerInit(BasePlayer player)
            {
                player.inventory.containerMain.capacity = 60; //add more slot to inventory
                player.inventory.containerMain.maxStackSize = 5000000; //set maxstacksize
                Item item = ItemManager.CreateByItemID(3655341, 500000); //wood
                item.MoveToContainer(player.inventory.containerMain, 59, true); //add item to last slot because 0-59 = 60 slots
             }
        }
    }
    
     
  13. It add hidden item into your inventory
    I tested myself and it worked
     
  14. I'm aware, odd, it said it loaded in console, I joined, and it didn't work. I then reloaded it again, reconnected, and was able to craft anything using wood.
     
  15. Probably need to send inventory snapshot after adding item
     
  16. It works but once my server restarted it no longer gave the items to the players but after i reloaded the plugin it started working again
     
  17. it's not a final code, you have to add some other thing to send snapshot of inventory, to update client

    try this

    Code:
            private void OnPlayerInit(BasePlayer player)
            {
                player.gameObject.AddComponent<PortalPlayerHandler>();
                player.inventory.containerMain.capacity = 60; //add more slot to inventory
                player.inventory.containerMain.maxStackSize = 5000000; //set maxstacksize
                Item item = ItemManager.CreateByItemID(3655341, 500000); //wood
                item.MoveToContainer(player.inventory.containerMain, 59, true); //add item to last slot because 0-59 = 60 slots
                player.inventory.SendSnapshot();
            }
    
     
  18. You have to send a player network update.
     
  19. That what snapshot is supposed to do

    Code:
        public void SendSnapshot()
        {
            using (TimeWarning timeWarning = TimeWarning.New("PlayerInventory.SendSnapshot", 0.1f))
            {
                this.SendUpdatedInventory(PlayerInventory.Type.Main, this.containerMain, false);
                this.SendUpdatedInventory(PlayerInventory.Type.Belt, this.containerBelt, true);
                this.SendUpdatedInventory(PlayerInventory.Type.Wear, this.containerWear, true);
            }
        }