1. Aloha! I am wondering this, what steps must I do?

    I have tried
    Code:
     player.inventory.GiveItem(ItemManager.CreateByName(itemName), amount, bp);
    But that did not work
    Item name was "apple"
    Amount was int of 1
    bp was bool of false

    Cheers!
     
    Last edited by a moderator: Dec 26, 2015
  2. The function you are using doesn't exist with the parameters you are passing in.
    Either use this...
    Code:
    public bool GiveItem(Item item, ItemContainer container = null)
    or this...
    Code:
    public bool GiveItem(int itemid, int amount = 1, bool sendNotification = true)
     
  3. Thanks, that fixed one thing, but do you know what ItemManager is in JS?
     
  4. Unfortunately, I'm not familiar with javascript, so no, I don't.
     
  5. Ah, thanks anyway. It works if I put the itemID in manually. I just need to convert the name to ID now.

    Anyone know what ItemManager is under JS?
     
    Last edited by a moderator: Dec 26, 2015
  6. Calytic

    Calytic Community Admin Community Mod

    Code:
    global.ItemManager.CreateByName(name)
     
  7. Thanks! But I've already migrated to LUA, I finished at 5AM. Thanks for the help though, it should help any others who are using JS.

    Cheers