Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating a simple kill/loot script

Featured Replies

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 by Definite

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

  • Author

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
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.

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 by omni4life

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.

Haha im trying to make a script too definite :D Gl man :p i'm soo bad at it tho lmao 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.