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.

Best way to implement deathwalking?

Featured Replies

I have a script that tends to die, and have tried to implement a deathwalking feature where when the bot dies, it teleports using the ring of dueling in its inventory to castle wars. I currently have an if statement at the top of my onloop like so, but when the bot dies/ is started in lumbridge, it just stands there. Any suggestions?

if (deadArea.contains(player)) {
    		getInventory().interactWithNameThatContains("Castle Wars", "Ring of dueling");
    		new ConditionalSleep(2000, 4000) { 
                @Override 
                public boolean condition() throws InterruptedException {
                    return player.isAnimating(); 
                }
            }.sleep();
    		return 500;
    	} 

 

I have a script that tends to die, and have tried to implement a deathwalking feature where when the bot dies, it teleports using the ring of dueling in its inventory to castle wars. I currently have an if statement at the top of my onloop like so, but when the bot dies/ is started in lumbridge, it just stands there. Any suggestions?

if (deadArea.contains(player)) {
    		getInventory().interactWithNameThatContains("Castle Wars", "Ring of dueling");
    		new ConditionalSleep(2000, 4000) { 
                @Override 
                public boolean condition() throws InterruptedException {
                    return player.isAnimating(); 
                }
            }.sleep();
    		return 500;
    	} 

 

 

check for a message in chatbox which says something like "Oh dear, your dead" or something check it out ur self and if it contains that set a boolean to true and then do the code.

 

I have a script that tends to die, and have tried to implement a deathwalking feature where when the bot dies, it teleports using the ring of dueling in its inventory to castle wars. I currently have an if statement at the top of my onloop like so, but when the bot dies/ is started in lumbridge, it just stands there. Any suggestions?

if (deadArea.contains(player)) {
    		getInventory().interactWithNameThatContains("Castle Wars", "Ring of dueling");
    		new ConditionalSleep(2000, 4000) { 
                @Override 
                public boolean condition() throws InterruptedException {
                    return player.isAnimating(); 
                }
            }.sleep();
    		return 500;
    	} 

 

my guess is that when you die, there's a task that gets cut off but lacks a break condition. i've had that happen to me a few times with path walking. the effect of that is that it keeps trying to run the same code and never stops, effectively meaning the script wont utilize anything else. just a shot in the dark, but a possibility nevertheless

 

edit: if i were you, i would test this with logger messages and make the code something like:

 

if (deadArea.contains(player)) {

        log("confirmed got to this point");

        getInventory().interactWithNameThatContains("Castle Wars", "Ring of dueling");

        .

        .

        .

 

 

to make sure that its actually trying to execute that code

Edited by Imateamcape

  • Author

I figured it out, forgot that the ring of dueling doesn't have a castle wars option when its in your inventory >.> thank you for the debug suggestion though imateamcape that helped me find out the problem!

I figured it out, forgot that the ring of dueling doesn't have a castle wars option when its in your inventory >.> thank you for the debug suggestion though imateamcape that helped me find out the problem!

 

 

check for a message in chatbox which says something like "Oh dear, your dead" or something check it out ur self and if it contains that set a boolean to true and then do the code.

^^ use this for better Deathwalk implement a better condition to be used with the dead area.

Edited by progamerz

Don't do this.

 

It works, or you can check if your player has the death animation (which might be different now because of the grim reaper)

It works, or you can check if your player has the death animation (which might be different now because of the grim reaper)

 

Checking if your HP is zero, or if your character has played the death animation works, but you shouldn't do it because it will only work if a conditional check is executed while those conditions are true. If your script is executing instructions in a loop when you die, then the animation will play and your health will be full when your conditional statement runs.

 

Checking to see if you are in the death area is safer, so you shouldn't do either one of those things.

Checking if your HP is zero, or if your character has played the death animation works, but you shouldn't do it because it will only work if a conditional check is executed while those conditions are true. If your script is executing instructions in a loop when you die, then the animation will play and your health will be full when your conditional statement runs.

 

Checking to see if you are in the death area is safer, so you shouldn't do either one of those things.

why u guys ignoring the message :feels: but yeh its his wish.

why u guys ignoring the message feels.png but yeh its his wish.

boolean death_flag = false;

    @[member='Override']
    public void onMessage(Message message) {
        if (message.getMessage().contains("dead") && message.getType().equals(Message.MessageType.GAME)) {
            log("progamerz raped my butthole :feels:");
            death_flag = true;
        }
    }


my butthole m8

 

feels.png feels.png feels.png

Edited by Solzhenitsyn

 

I have a script that tends to die, and have tried to implement a deathwalking feature where when the bot dies, it teleports using the ring of dueling in its inventory to castle wars. I currently have an if statement at the top of my onloop like so, but when the bot dies/ is started in lumbridge, it just stands there. Any suggestions?

if (deadArea.contains(player)) {
    		getInventory().interactWithNameThatContains("Castle Wars", "Ring of dueling");
    		new ConditionalSleep(2000, 4000) { 
                @Override 
                public boolean condition() throws InterruptedException {
                    return player.isAnimating(); 
                }
            }.sleep();
    		return 500;
    	} 

 

 

Personally for the sleep I would do something like:

new ConditionalSleep(10_000) { 
    @ Override 
    public boolean condition() throws InterruptedException {
        return !deadArea.contains(myPosition());
    }
}.sleep();

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.