October 23, 20169 yr 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; }
October 23, 20169 yr 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.
October 23, 20169 yr 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 October 23, 20169 yr by Imateamcape
October 23, 20169 yr 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!
October 23, 20169 yr 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 October 23, 20169 yr by progamerz
October 23, 20169 yr 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)
October 23, 20169 yr 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.
October 23, 20169 yr 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 but yeh its his wish.
October 23, 20169 yr why u guys ignoring the message 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 Edited October 23, 20169 yr by Solzhenitsyn
October 23, 20169 yr 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