-
Posts
48 -
Joined
-
Last visited
-
Feedback
100%
Profile Information
-
Gender
Male
-
Location:
Unknown
Recent Profile Visitors
1685 profile views
Mephisto's Achievements
Bronze Poster (2/10)
7
Reputation
-
Can I get a trial?
-
Jup fixed the issue I indeed stored the widget data when it didn't exist yet. Thanks!
-
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
-
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.
-
If WebWalkEvent can walk anywhere on runescape, and WalkEvent can't. Why should I use WalkEvent at all?
-
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
-
[LF HELP] - Task based script, changing used variables
Mephisto replied to Mephisto's topic in Scripting Help
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 -
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.
-
@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
-
Can I get a free trial aswell :)?
-
Hey, can you hit me up with a free trial?
-
Hey, I would like to try this script out.
-
Yeah, Jagex Mod Acorn works on weekends https://twitter.com/jagexacorn. She could have banned your accounts.
-
Looks amazing lol, sick...