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.

Checking if I'm dead

Featured Replies

hey all.

I'm writing a combat script for me to just afk fight the wizards outside Draynor village. The only problem is if I die. I need a way of detecting if I am dead so I can then walk myself from spawn to where the wizards are and fight them again?

You can check if message contains "You're dead" or what ever it says and/or check if lumbridge spawn area contains your position

  • Author

I've tried the chat method and its not working for me. At least I'm pretty sure it isn't. My script is absolutely crapped out right now

this is not really good but it works and its noob friendly

what youre doin here is youre checking if youre in the specific area so where you gonna be when your dead and then youre gonna walk back to the goblins

so (the areas is not good you should do it yourself thats one x and y coardinate tile  from bottom left to top right when your looking north)

final Area LUMBRIDGE_AREA = new Area (2982,3233,2990,3242);

final Area GOBLIN_AREA = new Area (x,y,x,y);

if (LUMBRIDGE_AREA .contains(myPosition()){

getWalking().webWalk(GOBLIN_AREA);

}

 

Edited by mousbros

  • Author
2 hours ago, mousbros said:

this is not really good but it works and its noob friendly

what youre doin here is youre checking if youre in the specific area so where you gonna be when your dead and then youre gonna walk back to the goblins

so (the areas is not good you should do it yourself thats one x and y coardinate tile  from bottom left to top right when your looking north)

final Area LUMBRIDGE_AREA = new Area (2982,3233,2990,3242);

final Area GOBLIN_AREA = new Area (x,y,x,y);

if (LUMBRIDGE_AREA .contains(myPosition()){

getWalking().webWalk(GOBLIN_AREA);

}

 

I'll try this, thankyou so much, it doesn't have to be pretty, just has to work

 

10 hours ago, hekx said:

hey all.

I'm writing a combat script for me to just afk fight the wizards outside Draynor village. The only problem is if I die. I need a way of detecting if I am dead so I can then walk myself from spawn to where the wizards are and fight them again?

No need to check if your dead. Just check to see if the wizards are nearby, if not walk to the wizard area.

 

Area wizardArea = new Area(0, 0, 0, 0); // Set this to the area of the wizards.
String wizardName = "PlaceNameHere";
NPC wizard = getNpcs().closest(npc -> npc.getName().equalsIgnoreCase(wizardName) && npc.isAttackable());

// If the wizard is null and you are not in the area walk to the area.
// Else If you are in the area and there is no available wizard and you are currently on a p2p world than hop to a p2p world.
// Else If you are in the area and there is no available wizard and you are currently on a f2p world than hop to a f2p world.
if (wizard == null && !wizardArea.contains(myPlayer()))
    getWalking().webWalk(wizardArea);
else if (wizardArea.contains(myPlayer()))
    if (getWorlds().isMembersWorld())
        getWorlds().hopToP2PWorld();
    else
        getWorlds().hopToF2PWorld();

Edited by BravoTaco

Checking if you are in Lumbridge is not necessarily a good solution - what if the user has their spawn point set to Falador for example?

A much more flexible solution would be to check your HP. If you've hit 0 hp, that's the definition of death in OSRS, so that's probably your best bet.

-Apa

  • 2 weeks later...

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.