1. Stupid Question anyone got the link to all the Current items i can spawn int othe Game
     
  2. Wulf

    Wulf Community Admin

  3. Any idea on what the new blueprints fall under

    I got players Freaking out about locks id like to allow them to lock there houses
     
  4. Wulf

    Wulf Community Admin

    I don't know about those yet, sorry.
     
  5. Yeah, need an item list too for locks etc... pain in the ass.
     
  6. Where can I find the blueprints' short name? I could only find the Legacy ones :/
     
  7. May be I am not realizing about something, but that link does not give me the blueprint shortname (it is for the /give command)...
     
  8. Man, did you find how to give bp to players? I cant find any bp ID...
     
  9. That's exactly my problem xD
     
  10. =((
     
  11. Code:
    PLUGIN.Name = "Item Blueprint IDs"
    PLUGIN.Title = "Item Blueprint IDs"
    PLUGIN.Version = V(1,0,0)
    PLUGIN.Description = "Item Blueprint IDs"
    PLUGIN.Author = "Reneb"
    PLUGIN.HasConfig = falsefunction PLUGIN:OnServerInitialized()
        items = global.ItemManager.GetCraftableItems()
        for i=0, items.Count-1 do
            print(items[i].itemid .. " - " .. items[i].displayname)
        end
    end

    Currently this will display:
    Code:
    6:02 PM [Info] 14101 - Pistol Bullet
    6:02 PM [Info] 13987 - 5.56 Rifle Cartridge
    6:02 PM [Info] 14100 - Shotgun Cartridge
    6:02 PM [Info] 11904 - Wooden Arrow
    6:02 PM [Info] 14209 - Salvaged Axe
    6:02 PM [Info] 11949 - Bandage
    6:02 PM [Info] 6296 - Hunting Bow
    6:02 PM [Info] 14280 - Wood Storage Box
    6:02 PM [Info] 14286 - Large Wood Box
    6:02 PM [Info] 14167 - Bucket Helmet
    6:02 PM [Info] 14291 - Building Plan
    6:02 PM [Info] 14077 - Leather Gloves
    6:02 PM [Info] 14048 - Burlap Shirt
    6:02 PM [Info] 14076 - Burlap Shoes
    6:02 PM [Info] 14055 - Burlap Trousers
    6:02 PM [Info] 3533 - Camp Fire
    6:02 PM [Info] 14166 - Coffee Can Helmet
    6:02 PM [Info] 14269 - Tool Cupboard
    6:02 PM [Info] 14046 - Door Key
    6:02 PM [Info] 11917 - Furnace
    6:02 PM [Info] 14164 - Gun Powder
    6:02 PM [Info] 13851 - Hammer
    6:02 PM [Info] 14210 - Salvaged Hammer
    6:02 PM [Info] 11975 - Hatchet
    6:02 PM [Info] 14179 - Hazmat Boots
    6:02 PM [Info] 14181 - Hazmat Gloves
    6:02 PM [Info] 14180 - Hazmat Helmet
    6:02 PM [Info] 14177 - Hazmat Jacket
    6:02 PM [Info] 14178 - Hazmat Pants
    6:02 PM [Info] 14211 - Salvaged Icepick
    6:02 PM [Info] 14197 - Snow Jacket - Red
    6:02 PM [Info] 14243 - Snow Jacket - Black
    6:02 PM [Info] 14244 - Snow Jacket - Wood Camo
    6:02 PM [Info] 373 - Bone Knife
    6:02 PM [Info] 14038 - Lantern
    6:02 PM [Info] 11950 - Large Medkit
    6:02 PM [Info] 14251 - Code Lock
    6:02 PM [Info] 14072 - Lock
    6:02 PM [Info] 13985 - Low Grade Fuel
    6:02 PM [Info] 14168 - Metal Facemask
    6:02 PM [Info] 14110 - Metal Chest Plate
    6:02 PM [Info] 11963 - Paper
    6:02 PM [Info] 11980 - Pick Axe
    6:02 PM [Info] 14098 - Eoka Pistol
    6:02 PM [Info] 14103 - Revolver
    6:02 PM [Info] 14343 - Assault Rifle
    6:02 PM [Info] 11864 - Bolt Action Rifle
    6:02 PM [Info] 14099 - Waterpipe Shotgun
    6:02 PM [Info] 11923 - Sleeping Bag
    6:02 PM [Info] 14102 - Thompson
    6:02 PM [Info] 14213 - Stone Spear
    6:02 PM [Info] 14212 - Wooden Spear
    6:02 PM [Info] 11983 - Stone Hatchet
    6:02 PM [Info] 11951 - Medical Syringe
    6:02 PM [Info] 11953 - Torch
    6:02 PM [Info] 836 - Snap Trap
    6:02 PM [Info] 14308 - Urban Boots
    6:02 PM [Info] 12540 - Red Jacket
    6:02 PM [Info] 14307 - Urban Pants
    6:02 PM [Info] 14196 - Green T-Shirt
    6:02 PM [Info] 14344 - Vagabond Jacket
    
    usage:
    inventory.givebp ITEMID

    this will ONLY work for personal use. can't give to other players unless someone makes a plugin for it ;)
     
  12. Ty, but i need to give bp to players(
     
  13. well you can't atm
     
  14. Hi Reneb,

    I'm trying to update the GIVE plugin for our server, any ideas how would I change the following to award BPs?

    player.inventory:GiveItem(global.ItemManager.CreateByName(definition.shortname,1),pref)

    Would it be

    player.inventory:GiveItem(global.ItemManager.CreateById(<blue_print_id_here>,1),pref)

    What you think?

    Also how do I validate the item from the ItemManager by ID? (global.ItemManager.FindItemDefinition - searched for item name correct?)

    Thanks,
    TheDoc
    [DOUBLEPOST=1421651218,1421631801][/DOUBLEPOST]ok more generic question:

    how do I know what methods I can call on player object? Is there an API reference somewhere?

    eg.: global.ItemManager.GetCraftableItems()
    or player.inventory:GiveItem( ... )

    Where can I find info on all those ?

    Thanks,
    TheDoc
     
  15. Wulf

    Wulf Community Admin

    Dig in and decompile the Rust DLLs.
     
  16. Search for : givebp
    And see how rust does it.
    It's something with the function : Learn
     
  17. This is how you would create the Item object for a blueprint
    global.ItemManager.CreateByItemId(itemId, amount, true) --True if the item should be a blueprint

    Then to give the item its the same as giving a normal item but now this will give them the blueprint in the players inventory.
     
  18. I'm not sûre there are Any blueprints at the moment.
     
  19. If you want to force learn an item on a player you will need to do something like this.

    local def = global.ItemManager.FindItemDefinition(itemId)
    and then player.blueprints.Learn(def)
    [DOUBLEPOST=1421652017][/DOUBLEPOST]
    All items are the blueprints, its just a field on the item aka Item.isBlueprint