1. NOTE: These forums are no longer used. Please use Discord instead.

How do you give yourself items w/ 'damage' values in craftscript?

Discussion in 'CraftScripts' started by Kimb, May 23, 2014.

  1. Kimb

    Kimb New Member

    I need help on giving myself items with "damage" values (such as 14276:2 or 20264:64 for modded copper ingots) in craftscripts. the player.giveItem command works fine with INTEGER IDs but ANY attempt to use an item ID w/ a damage value always returns an error. HELLLPP!
  2. PseudoKnight

    PseudoKnight Well-Known Member Developer

    BaseItemStack(int id, int amount, short data)
  3. Kimb

    Kimb New Member

    OK now how do I get it into my inventory? I am still NEW NEW NEW to this....I have so far only found the playerGiveItem routine with the limits mentioned above.
  4. wizjany

    wizjany Administrator Developer

    you'll need to be bukkit-specific and use their API.
    cast LocalPlayer to BukkitPlayer, then getPlayer() to get org.bukkit's Player object, and use the inventory methods they provide