Juggles 18 Posted April 7, 2016 How would I go about doing this?I have (getNPC).closest("Name").interact("Use") but im not sure how to select the item first.
Juggles 18 Author Posted April 7, 2016 To select the item, do getInventory().interact("Item name"); Thank you!
Hashtag 9079 Posted April 7, 2016 Hey, I believe there is method called useOn(entity) in the inventory class.
Juggles 18 Author Posted April 7, 2016 Whole script is coded, just need this last part still getInventory().getItemInSlot(2).useOn("NPC"); I thought this would select the item in the second slot and use it on the NPC but that doesnt work. Am I doing it incorrectly?
Dreamlicker 750 Posted April 8, 2016 Whole script is coded, just need this last part still getInventory().getItemInSlot(2).useOn("NPC"); I thought this would select the item in the second slot and use it on the NPC but that doesnt work. Am I doing it incorrectly? That is technically the 3rd slot of the inventory, as the inventory is an array. This means the first slot is 0 and the last is 27.
Calle 25 Posted April 8, 2016 That is technically the 3rd slot of the inventory, as the inventory is an array. This means the first slot is 0 and the last is 27. or in other terms getInventory().getItemInSlot(1).useOn("NPC");
Recommended Posts
Archived
This topic is now archived and is closed to further replies.