Krugiztar 0 Share Posted September 13, 2017 So I am currently working on my first script, I got it to kill cows itäs working just fine. The only thing is I want it to pickup the bones that my cow drops and not the bones all around the cow pen. Is there anything in the API that is specific to this? Like npc.loot or something? New to this API, really appriciate the answers C: Link to comment Share on other sites More sharing options...
swift 22 Share Posted September 13, 2017 You need to define what object you want and then interact with the object. Look at game-object in the api. Link to comment Share on other sites More sharing options...
Pyth 127 Share Posted September 13, 2017 There are a few ways to somewhat do this. -Get the cows tile and loot the tile when it dies, although cows are 2 tiles wide so you'd have to set a area. -Set a radius around your player to loot. -Wait until you kill a cow then only loot once before killing another cow. Link to comment Share on other sites More sharing options...
dQw4w9WgXcQ 184 Share Posted September 14, 2017 i usually just set a boolean shouldLoot to true whenever i attack a cow and then when it successfully loots i set shouldLoot false. this way it only loots 1ce per kill. theres no real easy way to make it loot only your own drops, but i dont see why it would be necessary. Link to comment Share on other sites More sharing options...
ozeki6 32 Share Posted September 14, 2017 declare the npc , interact with it , sleep till it's dead , declare a groundObject as closest bones , pick the bones then repeat . you will need something like a boolean or something similar to make it pick only 1 set of bones . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.