Definite Posted August 15, 2015 Share Posted August 15, 2015 (edited) Hey.. I am a complete noob at scripting and want to create a simple kill & loot certain item script. Can anyone help. I have seen http://osbot.org/forum/topic/58775-a-beginners-guide-to-writing-osbot-scripts-where-to-get-started-by-apaec/ . Is there any way I can use that skeleton to integrate a kill / loot script? Or can anyone point me in the right direction for how to start such a script? Edited August 15, 2015 by Definite 1 Quote Link to comment Share on other sites More sharing options...
itzDot Posted August 15, 2015 Share Posted August 15, 2015 yes you can use that skeleton to build a simple kill/loot script Quote Link to comment Share on other sites More sharing options...
Apaec Posted August 15, 2015 Share Posted August 15, 2015 to kill: NPC enemy = npcs.closest("exact npc name goes here"); if (enemy != null && enemy.exists()) { enemy.interact("Attack"); } To loot: GroundItem g = groundItems.closest("exact item name here"); if (g != null && g.exists()) { g.interact("Take"); } apa Quote Link to comment Share on other sites More sharing options...
Definite Posted August 16, 2015 Author Share Posted August 16, 2015 to kill: NPC enemy = npcs.closest("exact npc name goes here");if (enemy != null && enemy.exists()) { enemy.interact("Attack");}To loot:GroundItem g = groundItems.closest("exact item name here");if (g != null && g.exists()) { g.interact("Take");}apaWow that is simple. Is there a food support, take from Bank and eat. All foods, cannon use option, wall from Bank to location. Also about the gui to show gains xp/hr. Time run, item gained. Quote Link to comment Share on other sites More sharing options...
omni4life Posted August 16, 2015 Share Posted August 16, 2015 (edited) Wow that is simple. Is there a food support, take from Bank and eat. All foods, cannon use option, wall from Bank to location. Also about the gui to show gains xp/hr. Time run, item gained. You can definitely do all of those things, but it's a learning curve. You should familiarise yourself with the API which is, in essence, a list of OSBot's built in functions so that you don't have to create them yourself. You can find the API here. The xp/hr, time run and items gained etc tracker is all part of what is called the 'paint'. If you want to learn to create a paint, I highly suggest the tutorial that was written by Pug. It can be found here. That will run you through how to do most of what you want to know for that part. As for the others, there are built in functions for most of it that you can use. I would love to be more helpful but I'm still very much learning myself, however, if you have any general questions I'm always happy to do what I can to lend a hand. My advise on how to begin would be start by creating a script that attacks Men and loots their bones/drops of your choice. That's a fairly simple script that would be manageable for anyone beginning to learn I believe and removes the complexities of eating and similar. As you begin to feel more comfortable, just add new elements such as eating and change the target NPC from Men to something like Lessor Demons (anything that can't immediately kill you if there's an error with the script). Edited August 16, 2015 by omni4life Quote Link to comment Share on other sites More sharing options...
Twin Posted August 16, 2015 Share Posted August 16, 2015 Wow that is simple. Is there a food support, take from Bank and eat. All foods, cannon use option, wall from Bank to location. Also about the gui to show gains xp/hr. Time run, item gained. You can do anything if you code it. Literally everything you just stated is really easy to do, it's just making sure it doesn't run into any issues along the way, that's the hard part. 1 Quote Link to comment Share on other sites More sharing options...
Saiyan Posted August 18, 2015 Share Posted August 18, 2015 Haha im trying to make a script too definite Gl man :p i'm soo bad at it tho lmao 1 Quote Link to comment Share on other sites More sharing options...