Jump to content

Mephisto

Members
  • Posts

    48
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Mephisto

  1. Jup fixed the issue I indeed stored the widget data when it didn't exist yet. Thanks!
  2. Hello everyone! I'm trying to figure out widgets, and eventually want to get the text of a widget from a dialogue. This is my code: RS2Widget chatWidget = getWidgets().get(231, 4); NPC npc = getNpcs().closest(Area, "Doomsayer"); if (npc!= null && npc.isVisible() && !dialogues.inDialogue()) { npc.interact("Talk-to"); new ConditionalSleep(10000,500) { @Override public boolean condition() throws InterruptedException { return dialogues.inDialogue(); } }.sleep(); log("Im in dialogue"); log("Waiting for widget to become visible"); new ConditionalSleep(10000,500) { @Override public boolean condition() throws InterruptedException { return chatWidget != null; } }.sleep(); if (chatWidget != null) { log("Widget exists"); } else { log("Widget doesn't exist"); } } My bot opens the dialogue which should make the widget visible, but it doesn't recognise the widget: https://imgur.com/a/h69uvPc Does anyone know whats going on? Thanks in advance! Mephisto
  3. You can make scripts yourself which can for example level different skills in one go. I make my own scripts that level a couple skills in one go with some breaks, this way I don't have to set them up manually for each skill and can let them run for a long time without looking at them. I also use 'Accountstarters' which is a .bat file with some code: cd C:/Users/%username% for /f "delims=" %%x in ('dir /s /od /b OSBot*.jar') do set recent=%%x java -jar "%recent%" -mem 1024 - allow lowresource,lowcpu -proxy (Your proxy here):(Proxy username):(proxypass) -login (Osbot username):(Osbot password) -bot (bot login email):(bot login password):(pin) -world (world number) -script (scriptname) echo %recent% pause Put this in a .txt file with the correct info and convert it into a .bat file. Now you only have to double click your bat file and your bot starts right away.
  4. If WebWalkEvent can walk anywhere on runescape, and WalkEvent can't. Why should I use WalkEvent at all?
  5. Hey guys! I have a question about WebWalkEvents and WalkingEvents: When should you use Webwalkevents and when should you use Walkingevents? (Are there any benefits using either of the two in different situations?). Thanks in advance, Mephisto
  6. I guess you're right! I have made some simple scripts in the past and recently trying to create some bigger/longer scripts. The reason I looked into task based scripts is because I think that with tasks I can organise my script better, making it better to oversee. Making whole scripts with if & else statements inside my onLoop(); method makes it complicated to read when the scripts get bigger. (I have thrown away many scripts I made because I can't read them quickly a couple days after I made them. Though I agree with you, I guess my first step is to get my own structure/patterns to keep these scripts organised and leave task based scripts for what it is now. Thanks for replying, Mephisto
  7. Hello everyone! I'm trying to make my first task based script, but am experiencing some issues with a task. I want my EquipGear task to eguip items based on the bots defence level, so everytime I run the task it will check the defence level and based on the defence level he will choose what piece/variable to pick from. This is my Task superclass: package Test.account.skills; import org.osbot.rs07.script.MethodProvider; public abstract class CombatTask { protected MethodProvider mp; public CombatTask(MethodProvider mp) { this.mp = mp; } public abstract boolean canProcess(); public abstract void process(); public void run() { if (canProcess()) process(); } } And this is my EquipGear task: package Test.account.skills; import org.osbot.rs07.api.ui.EquipmentSlot; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.utility.ConditionalSleep; public class EquipGear extends CombatTask { public EquipGear(MethodProvider mp) { super(mp); } @Override public boolean canProcess() { // If the bot isn't wearing a piece or multiple pieces of equipment -> Statement = true. if (!mp.getEquipment().isWearingItem(EquipmentSlot.AMULET, amuletGear) || !mp.getEquipment().isWearingItem(EquipmentSlot.HAT, headGear) ||!mp.getEquipment().isWearingItem(EquipmentSlot.CHEST, bodyGear) || !mp.getEquipment().isWearingItem(EquipmentSlot.LEGS, legGear) || !mp.getEquipment().isWearingItem(EquipmentSlot.SHIELD, shieldGear) || !mp.getEquipment().isWearingItem(EquipmentSlot.WEAPON, mainHandGear)); mp.log("Isn't wearing set"); return true; } @Override public void process() { setGear(); if (mp.getInventory().contains(headGear) && mp.getInventory().contains(bodyGear) && mp.getInventory().contains(legGear) && mp.getInventory().contains(amuletGear) && mp.getInventory().contains(shieldGear) && mp.getInventory().contains(mainHandGear)){ mp.log("Equiping " +headGear); mp.getInventory().interact(headGear,"Wear"); new ConditionalSleep(2500, 500) { @Override public boolean condition() throws InterruptedException { return mp.getEquipment().isWearingItem(EquipmentSlot.HAT, headGear); } }.sleep(); mp.getInventory().interact(bodyGear,"Wear"); new ConditionalSleep(2500, 500) { @Override public boolean condition() throws InterruptedException { return mp.getEquipment().isWearingItem(EquipmentSlot.CHEST, bodyGear); } }.sleep(); mp.getInventory().interact(legGear,"Wear"); new ConditionalSleep(2500, 500) { @Override public boolean condition() throws InterruptedException { return mp.getEquipment().isWearingItem(EquipmentSlot.LEGS, legGear); } }.sleep(); mp.getInventory().interact(amuletGear, "Wear"); new ConditionalSleep(2500, 500) { @Override public boolean condition() throws InterruptedException { return mp.getEquipment().isWearingItem(EquipmentSlot.AMULET, amuletGear); } }.sleep(); mp.getInventory().interact(shieldGear, "Wear"); new ConditionalSleep(2500, 500) { @Override public boolean condition() throws InterruptedException { return mp.getEquipment().isWearingItem(EquipmentSlot.SHIELD, shieldGear); } }.sleep(); mp.getInventory().interact(mainHandGear,"Wield"); new ConditionalSleep(2500, 500) { @Override public boolean condition() throws InterruptedException { return mp.getEquipment().isWearingItem(EquipmentSlot.WEAPON, mainHandGear); } }.sleep(); } } } Is there anyway I can implement something like this?: if (mp.getSkills().getStatic(Skill.DEFENCE) < 10) { String headGear = "Iron full helm"; String bodyGear = "Iron platebody"; String legGear = "Iron platelegs"; String amuletGear = "Amulet of power"; String shieldGear = "Iron kiteshield"; String mainHandGear = "Iron scimitar"; }else if (mp.getSkills().getStatic(Skill.DEFENCE)>= 10 && mp.getSkills().getStatic(Skill.DEFENCE) < 20){ String headGear = "Steel full helm"; String bodyGear = "Steel platebody"; String legGear = "Steel platelegs"; String amuletGear = "Amulet of power"; String shieldGear = "Steel kiteshield"; String mainHandGear = "Steel scimitar"; } I have tried making another class SetGear: package Test.account.skills; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.MethodProvider; public class SetGear { protected MethodProvider mp; public SetGear(MethodProvider mp) { this.mp = mp; } public void gear() { if (mp.getSkills().getStatic(Skill.DEFENCE) < 10) { String headGear = "Iron full helm"; String bodyGear = "Iron platebody"; String legGear = "Iron platelegs"; String amuletGear = "Amulet of power"; String shieldGear = "Iron kiteshield"; String mainHandGear = "Iron scimitar"; }else if (mp.getSkills().getStatic(Skill.DEFENCE)>= 10 && mp.getSkills().getStatic(Skill.DEFENCE) < 20){ String headGear = "Steel full helm"; String bodyGear = "Steel platebody"; String legGear = "Steel platelegs"; String amuletGear = "Amulet of power"; String shieldGear = "Steel kiteshield"; String mainHandGear = "Steel scimitar"; } } } And try to run it inside the EquipGear task like this: (but that didn't work). SetGear set = new SetGear(MethodProvider mp); set.gear(); Do I have to make seperate tasks for each level spectrum or can this be implemented in one task? Can anyone help me out? Thanks in advance! Btw: I'm not experienced with programming, I recently watched this course on yt: https://www.youtube.com/watch?v=8cm1x4bC610&t=148s to understand the basics and am now practicing with it.
  8. @Czar First of all, thanks for the free trial. Second, My bot get stuck when trying to bank in lumbridge castle (upstairs). The bot walks to the bank, but once it gets inside the bank it walks straight out (doesn't grab food) and climbs down the stairs after which it starts walking to the bank again. This is my setup: Video: https://mephistoosrs.tumblr.com/post/186550638632
  9. Hey, can you hit me up with a free trial?
  10. Hey, I would like to try this script out.
  11. Yeah, Jagex Mod Acorn works on weekends https://twitter.com/jagexacorn. She could have banned your accounts.
  12. Looks amazing lol, sick...
  13. Dayum and only 1 client open ????
  14. What is your source on this if I may ask?
  15. It's impossible to get legit accounts for these prices, you could maybe get a quashed account for +-65m but that's it.
  16. Mephisto

    .

    Well, you can start off by not using free-scripts, I believe those have the highest & fastests banrates because they have some flaws in the script & many people use them. Best is to get your own private script and do things no-one else does & make sure your bot act as "human" as possible. Click intensive skills have the fastest-ban rates, thats because a lot of people can't do click intensive things for a couple hours straight. (So when a player does do a click intensive method/skill its highly unlikely that its a legit player).
  17. Mephisto

    .

    Yes like @JARNQ says it can be either. Some of my bots received a permanent ban without any prior temporary bans, some of my bots got a temporary ban first before they got permanently banned. I don't think they give permanent bans depending on if the bot was goldfarming or not. (I recently had some 2 day bans on some my Zulrah bots).
  18. Mephisto

    .

    You would probably get a permanent ban. When they gave you a temporary ban for botting you were very lucky that they gave you another chance. Its highly unlikely that they would give you an extra chance when you get caught for the same offence.
  19. I was indeed reusing events. I fixed it now Thanks @Fruity & @dormic for the quick replies !
  20. So I wrote a little script and tried to run it. And it gave me this error: java.lang.NullPointerException at org.osbot.rs07.event.InteractionEvent.<init>(zi:86) at Thieverclass.onStart(Thieverclass.java:51) at org.osbot.rs07.event.ScriptExecutor.IIIIiiiiIIii(bp:284) at org.osbot.rs07.event.ScriptExecutor.start(bp:20) at org.osbot.lB.IIIIiiiiIIii(ws:46) at org.osbot.NB.iIiIiiiIiiiI(yab:177) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) How can I fix this? & What does this error mean exactly ? (when I google it I still don't understand it fully) The script I wrote: if (lumbridgeSquare != null){ if (lumbridgeSquare.contains(myPlayer())){ log("Player arrived in Lumbridge"); //Arrived in Lumbridge MethodProvider.sleep(MethodProvider.random(2000, 3000)); getWalking().walk(lTRoute_1); if (lTrapdoor != null){ if (lTrapdoor.isVisible()) { MethodProvider.sleep(MethodProvider.random(1000, 3000)); execute(climbdownTrapdoor); } } } } Edit: Found the flaw, had something to do with reusing an event.
×
×
  • Create New...