Jump to content

yfoo

Lifetime Sponsor
  • Posts

    239
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by yfoo

  1. I recieved a 2day ban on an obvious goldfarming account (if you looked at the stats) that has been active for about 22days. This was a p2p account. Is it common for p2p goldfarming accounts to recieve a temp ban as opposed to a perm?
  2. How do you get the GrandExchange.Box that the below method uses to buy an item. buyItem(int itemId, java.lang.String searchTerm, int price, int quantity) Is there another way of doing it that is not (python-like psuedocode) for box in geBoxes: if box.getItemID == correctItemID: return box return null Thanks.
  3. Thanks, I got it working again. It took me a while to realize that Mouse dragged is not supposed to be in checkMouseEvent(MouseEvent). public void checkMouseEvent(MouseEvent e) { switch(e.getID()) { case MouseEvent.MOUSE_DRAGGED: //This should not be here, Mouse dragged needs be its own seperate overridden method. break; .... } } Makes sense too as dragged likely needs to be "listened" differently than a press or release.
  4. Hey @Alek When OSbot updated to 2.5 some API changes were made to implementing a mouse listener. As the title suggest, how do you use the new class BotMouseListener? Specifically what does the API doc mean when checkMouseEvent(java.awt.event.MouseEvent e) states: Use this method in place of mouseClicked(MouseEvent), mousePressed(MouseEvent), mouseReleased(MouseEvent). Before 2.5 I was using a mouse listener to have a draggable paint: onStart(){ this.bot.addMouseListener(this); //method doesnt exist anymore this.bot.getCanvas().addMouseMotionListener(this); //marked as deprecated } @Override public void mouseClicked(MouseEvent e) { //not used } @Override public void mousePressed(MouseEvent e) { Point clickPt = e.getPoint(); if(paintArea.contains(clickPt)){ movingPaint = true; xOffset = clickPt.x - paintArea.x; yOffset = clickPt.y - paintArea.y; } } @Override public void mouseReleased(MouseEvent e) { movingPaint = false; xOffset = 0; yOffset = 0; } @Override public void mouseEntered(MouseEvent e) { //not used } @Override public void mouseExited(MouseEvent e) { //not used } @Override public void mouseDragged(MouseEvent e) { if(movingPaint){ Point mousePos = e.getPoint(); paintArea.x = mousePos.x - xOffset; paintArea.y = mousePos.y - yOffset; } } @Override public void mouseMoved(MouseEvent e) { //not used } Thanks.
  5. I want scriptor 2 status so I can sell premium scripts and get into the Osbot pyramid scheme I write scripts under their API @ my own hours -> [buying knives from a pyramid scheme] so I can sell them to other people -> [and selling the knives door to door] and give 30% of the sell price to Osbot -> [the pyramid scheme makes money for free] And likely make minium wage (relative to the hours I put in) as opposed to a six figure software engineering position. Jokes done. Base goals completed (75 atk/str/def/range + 70 prayer). Time for chapter 2: maxed main (99 atk/str/def/range) The script I used is my own Lucid_Dream_NMZ which obviously does NMZ. I've finally fixed the majority of bugs that can occur in dream such as: not drinking overloads and guzzling rockcakes to 1. fixed with onMessage() checks for overload message than flipping a boolean value, drinkOverload() checks if this is true to drink. Before I checked if hp was >= 51. not prayer flicking rapid heal properly fixed by using a seperate thread to flip another boolean value (doPrayerFlick) to true after a normal random interval (around 40 seconds). prayerFlick() uses this boolean value to determine whether to flick. not logging out when dying in NMZ fixed with onMessage() again with a check for the death game message forgeting to turn melee prayer off after drinking an overload fixed with a conditional sleep that exists after player has finished taking damage. (Turn on protect melee -> Condition Sleep -> Turn off protect melee) it is possible to get stacked for a large amount of damage when the overload runs out and your hp reverts to ~51, in my case the absorption handling happens BEFORE drinking an overload therefore my character would sometimes die when reoverloading as there are no code checks to drink absorptions at that point until the next onLoop() iteraction. This took a while to figure out as the script would sometimes fail after 30mins, sometimes after 2 or 3 hours. As a result the script is capable of doing full runs of NMZ until absorptions run out. The next step is to support moving to corner, usage of power ups and special attacks. Then re-entering dream, blowpipe recharge, and maybe barrows repair support. At that point it should be competative with Fruity NMZ. For now there is an ALPHA version of the script on my github, but as more features are implemented (like dream entering) I will migrate development to a private repository out of respect to @Fruity. This script is planned to feature 2 modes: an AFK mode that does not prayer flick and emulates a human player leaving his account afk in nmz thereby letting his hp regen up to a random amount (hpRegenLimit) then coming back and guzzling rockcakes back to 1 hp before afking again. an Active mode that does prayer flick and emulates a human player actively keeping his HP at 1 with rock cakes and prayer flicking. And the ability to arbitrarily switch modes after a random interval (or not, pures benefit from active mode). This is to implement a more advanced form of antiban as opposed to primative methods such as xp checking or random camera rotations. With obby armor + berseker necklace + obby sword I am able to average ~80k xp/hr. This is significantly higher than Dharoks which averages 67k xp/hr, until ~95 str and ~90hp I expect obby to beat dharoks. The plan is to get 90 str 90 attack, test xp rates using dharoks and proceed accordingly. 90 range 99 str 99 atk 99 def 99 range Proggy1: Proggy2: As a side project I am also botting my pure with the same script, that pure however has used APA's sand crabs script (75 str, atk), as well as Dream's firemaking script (50 firemaking) and Polymophism's thieving script (53 thieving) before using my NMZ script. therefore my pure is not a osbot BTW-man. However I will attest that my main has never been botted with a script that is not of my own creation and likely will never do so! I do have some proggies detailing my pure range training progress. The plan is to get 99 range, str,and 52 prayer, at which point he becomes a maxed ags pure. Pure Stats: NMZ Progges, These are only 2 hours because thats how long my pure surives. Thats it, Thanks for reading.
  6. Do the methods onMessage, onLoop, and onPaint execute on seperate threads? If I call do something in onMessage that interacts with runescape (such as drinking an overload when the overload depelation message appears) will it work as if it was called in onLoop?
  7. Thanks for 50 FM. From my usage I would like to suggest some script improvements: - When the script begins a firemaking chain it moves to destination using the minimap then does a left click (the one that has runescape show the the yellow x marker) move to a square. Sometimes this is unnecessary because the original destination reached with the minimap move is also a valid FM starting point. My concern is that this action seems very botlike. Did you hardcode starting points? I would find an ingame area (represented by the Area class) that are valid FM starting points. If a minimap move lands within this area, start the firemaking chain from that square rather than doing a redundant move to a specific square. If not, then do a left click move into a random square inside this area. - Script also needs a check to determine if someone else is firemaking in the same line as you. I have been crashed by some asshole doing this. Maybe a conditional sleep after calling Inventory.interact(log, tinderbox) (or whatever you used) that stops sleeping after receiving xp or/and if the player stops preforming the firemaking animation. This would perhaps ensure that you are not trailing another player in fming in front of you.
  8. To determine what to put in the paint.
  9. Cool, I can now track and display xp gained for a specific combat skill instead of having to track them all. Must have missed the section on configs when I read expliv's scripting tutorial. I had to do some research on what exactly 43 refered to. 13. Configs
  10. How do you check what combat skill is being trained? Upon a cursory check with the widget debugger there does not seem to be a difference in the combat style button widget variables when a said button is selected or not but I am likely missing something. The other way I can think of is using the experience tracker to find out which skill's xp is increasing but that feels like a clunky approach. Thanks.
  11. Day 40 or so? I like to use OsBuddy as the client for mirror mode as I find it fitting that because Osbuddy was once used as botting client, it should now be used by a botting client. I'm sorry, I forgot about this thread. But better late than never. The 2 images seen below is of 2 accounts I've botted mage on using my splash-alching script (originally my stun-alcher). This is another way of saying the script was tested with ~20M experience @ 150k xph. I also managed to get an osbot gitweb account and submitted the aforementioned script for sdn approval. When I hopefully get scriptor 1, ill apply for scriptor 2 in order to release a premium Barrows script in the future. The source code for this script can be found here if you wish to compile your own version: https://github.com/PayPalMeRSGP/StunAlchWithNodes GUI and Paint, the paint is also draggable. Ignore the runtime, the paint's text is inaccurate until the user is confirms their settings. Apparently fishing spots are considered NPCs.
  12. What if I want to run the client through the ide to set breakpoints?
  13. Logic for resetng should be looked at. Presently a incorrect reset can be triggered when a spot's crabs have been disturbed and said crabs are walking around, this results in the script determining a reset is necessary, walking away, returning only to attempt to reset again. I think proper sequence of events should be... detects crabs disturbed at spot -> attacks nearby crabs not in combat in hopes of catching all stray crabs -> return to afk position and resume normal operation.
  14. I bot using only the scripts I write therefore achieving an ingame goal still retains meaning as I to put in effort to implement, test, and debug my code. So I do play the game and reasonably enjoy doing so. It comes down to a matter of botting to play vs playing to bot.
  15. @Chris Got it, thanks. There is a difference between hitting build vs rebuild. That was maybe why sometimes a hotswap worked, I selected rebuild.
  16. How do you deploy a code change while the client is running and have the refresh button correctly poll the newly created jar file? My current development setup was created using this tutorial: I know that the populated script list does not contain my latest code changes because I change the script name under the script's manifest upon recompiling. (DEBUG0, DEBUG1, DEBUG2... etc.) I've tried... setting my artifact deployment folder to a seperate folder and manually moving the jar files into the scripts folder. (Refresh doesn't poll the newest version) attempting to delete the old jar files in in scripts folder. (Unable to do so, the files are in use by the client) I have been able to use hook into osbot's process using intellJ and attempting a hotswap and have this SOMETIMES work. I am not sure what I am doing different when the aforementioned process failes or succeeds. My IDE is IntellJ. Thank you for your assistance.
  17. Day 4 or 5: 12/16/17 @Young Heek: Kinda, it looks something like this: package ScriptClasses; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "PayPalMeRSGP", name = "v:Alpha", info = "Alpha: Stun Alch", version = 0.12, logo = "") public class StunAlchScriptEntryPoint extends Script { PriorityQueueWrapper pqw; @Override public void onStart() throws InterruptedException { super.onStart(); ConstantsAndStatics.setHostScriptReference(this); pqw = new PriorityQueueWrapper(); } @Override public int onLoop() throws InterruptedException { return pqw.executeTopNode(); } } Runescape: I manually did a dragon defender. In doing so also advanced a few atk, str, and def levels. I now also have 94 mage. Current Stats: Scripting Progress: Implmented some artifical alching errors. I'm forgoing alching twice in a row because I don't think its necessary. Misclicking on earth blast when attempting to alch Attempting to alch an item but not clicking on the item. (there are some spots along the right edge of the alch icon that does not have the the item directly underneath) Some Issues I fixed After an alch runescape will return automatically return the player back to the magic tab, sometimes my script will attempt to race runescape by manually clicking back to the magic tab. This was caused by a call to canCast() before runescape automatically segues the tab back. I fixed the above by calculating the number of alchs left and storing that value therefore only calling canCast() on script start. (as of right now I just set that value to 100 for debugging purposes) Also after alching I was using the Magic.hoverOverSpell() to queue up a stun, however this happens only AFTER runescape flips the tab back to magic. I instead used Mouse.move() to a randomly generated coordinates over the stun icon similtaneously while runescape flips the tab back. These posts are more in depth than any commit message I've ever written. In my opinion the script is reasonably human-like but can use more tweaking. But I'll eat my words if I get banned. On another note, am I suppoused to take of InterruptedExceptions (try/catch/finally) or just throw them? I'm assuming just throw them as they are handled by the client as I occasionally see caught errors in the logger. As always, thank you for reading.
  18. Day 2: 12/13/17 Runescape Progress: 92 Magic with ~200k to 93, so about ~800k was gained. This was done using the alching script I made on my first day at OSbot. Scripting Progress: Created a Alpha version working stun-alching script. Had a little trouble with casting stun while the player is still alching animation but eventually fixed it, see below. The link to the souce code can be found here. https://github.com/PayPalMeRSGP/StunAlchWithNodes To better organize the script I used a node based system explained in this post: The advantage I interpretated from reading the above post are... seperating code into chunks or Nodes. This can be thought of as encapsulation as each node class holds the necessary code to preform its action reducing the code in onLoop() to just pq.executeNextAction(). I have nodes for alching, stunning, alching_error, and stunning_error. Alching and Stunning are explained by their respective names. Since stun-alching is a high APM task misclicks can occur thereby, a alching/stunning_error is an artificial mistake made by the script to emulate a human player. The mistakes I plan to program in later are... For Alching_errors: Misclicking on earth blast when attempting to alch Attempting to alch an item but not clicking on the item forgetting to stun and alching twice in a row For Stunning_errors: Misclicking on the NPC (missing) Misclicking entangle but not casting it (and not wasting runes) Misclicking entangle and casting it (maybe this goes in) a cleaner way to allow randomization of actions to occur. To implement the Node System I used a Priority Queue, the node at the top of the queue is to be executed next, usually this is either an alch or a stun as these have the highest priority by default. To swap between an alch or a stun, I switch the key or priority of the respective nodes. These nodes are then deleted and readded into the Pqueue,. In Java, a key update in a priority queue requires deleting and re-adding the associated object. (at least according to someone on stackoverflow) For an alching or stunning error to occur (i.e: have the alch/stun error node at the top of the pQueue), every time a successful alch or stun occurs I have a chance to increase the key of a stun_error or alch_error. (successful alch -> increase key of stun error; successful stun -> increase key of alch error). Eventually the priority of a stun error or alch error exceeds that of a successful alch or stun allowing for an artificial error to occur. The reason for having a success in one increase the other (its opposite) is because we do not want to proceed with an alching error after alching, the next action is suppoused to be a stun therefore a chance for a stun error to occur. In my opinion this is better than having random.nextInt() everywhere. Finally I would like to thank these users in no particular order for assisting me with scripting or otherwise in some way. Probably because I read something you wrote that was helpful. @Bobrocket @Apaec @Explv @The Undefeated@Chris Thank you for reading. Any constructive criticism on my progress or scripts are appreciated.
  19. In the process of writing a stun alching script I noticed that after calling castSpellOnEntity(HIGH_ALCH) then calling hoverSpell(STUN). The next call of castSpell(STUN) will not process until after the previous call of castSpellOnEntity(HIGH_ALCH). To better summarize: cast high alch -> hover cursor over stun -> pause until after high alch completes -> cast stun. However by replacing hoverSpell() with a call to Mouse.move() with random coordinates within the bounds of the stun spell, stun will be casted mid animation of high alch resulting in the desired outcome. My conclusion is that internally castSpell() or castSpellOnEntity() will delay the next castSpell() or castSpellOnEntity(). Can anyone else confim this? On another note, how do you check what interface tab the player is currently at (i.e: magic tab, inventory tab, quest tab, etc.) relevant code that handles stun alching: public int executeNodeAction() throws InterruptedException{ Magic m = hostScriptReference.getMagic(); PriorityNode nextNode = this.pq.peek(); hostScriptReference.log("Executing: " + nextNode.p.name()); switch(nextNode.p){ case ALCH: if(m.canCast(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY)){ m.castSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY); MethodProvider.sleep(ConstantsAndStatics.randomNormalDist(ConstantsAndStatics.BETWEEN_ALCH_MEAN_MS, ConstantsAndStatics.BETWEEN_ALCH_STDDEV_MS)); if(m.isSpellSelected()){ hostScriptReference.getInventory().interact("Cast","Magic longbow"); } MethodProvider.sleep(ConstantsAndStatics.randomNormalDist(ConstantsAndStatics.RS_GAME_TICK_MS, 80)); swapKeysStunAlch(); if(hoverOverStun()){ //originally was m.hoverSpell(Spells.NormalSpells.STUN) //return (int) ConstantsAndStatics.randomNormalDist(50, 5); return 0; //force onLoop to not sleep to better test } } hostScriptReference.log("cannot cast alch"); return 10; case STUN: if(m.canCast(Spells.NormalSpells.STUN)){ if(npc == null){ hostScriptReference.log("no NPC creating instance"); npc = hostScriptReference.getNpcs().closest("Monk of Zamorak"); } stop = System.currentTimeMillis(); m.castSpellOnEntity(Spells.NormalSpells.STUN, npc); swapKeysStunAlch(); if(m.hoverSpell(Spells.NormalSpells.HIGH_LEVEL_ALCHEMY)){ //return (int) ConstantsAndStatics.randomNormalDist(50, 5); return 0; //force onLoop to not sleep to better test } } hostScriptReference.log("cannot cast stun"); return 10; case ALCH_ERROR: //for later implementations of emulating human mistakes return 0; case STUN_ERROR: return 0; } return 1000; } private boolean hoverOverStun(){ int randX = ThreadLocalRandom.current().nextInt(STUN_UPPER_LEFT_BOUND.x, STUN_LOWER_RIGHT_BOUND.x); int randY = ThreadLocalRandom.current().nextInt(STUN_UPPER_LEFT_BOUND.y, STUN_LOWER_RIGHT_BOUND.y); hostScriptReference.log("hovering stun at: (" + randX + ", " + randY + ")"); return !hostScriptReference.getMouse().move(randX, randY); } The onLoop() method: @Override public int onLoop() throws InterruptedException { return pqw.executeNodeAction(); }
  20. A random mouse move within the bounds of the the high alch icon. My solution was to hardcode the 2 points on opposite corners of the icon (bounds) as at the time I did not know the method to obtain them. private static final Point LOWER_BOTTOM_LEFT_BOUND = new Point(709,336); private static final Point UPPER_TOP_RIGHT_BOUND = new Point(720,321); private boolean randomMouseMove(){ this.randomMouseMoveCountdown--; if(this.randomMouseMoveCountdown <= 0){ this.randomMouseMoveCountdown = ThreadLocalRandom.current().nextInt(750, 1001); int randX = ThreadLocalRandom.current().nextInt(LOWER_BOTTOM_LEFT_BOUND.x, UPPER_TOP_RIGHT_BOUND.x); int randY = ThreadLocalRandom.current().nextInt(LOWER_BOTTOM_LEFT_BOUND.y, UPPER_TOP_RIGHT_BOUND.y); getMouse().move(randX, randY); return true; } return false; } Within a set bounds.
  21. OsBot Ironman Challenge Rules IronMan mode in Runescape prevents the player from financially interacting with any other player in the game. Based upon RS IronMan mode, the OsBot Ironman Challenge prevents me from using any script not of my own creation. However taking and using code snippits such as from Explv's paint tutorial is legal. Methodology For about the next month I will attempt to spend a significant amount of time with OsBot's API to program an undetermined number scripts to achieve a number of ingame goals as well as proficiently learn the API. Simultaneously I will be botting on my account with the scripts I've made. Furthermore I will be hosting a public github repo with every script I write for now (not the future barrows one). Constructive Criticism is appreciated. https://github.com/PayPalMeRSGP These are the current stats of the my 3 week old account. I have legit played this account everything except 91 mage. I would be very sad if the account is banned and will do my best to ensure a standard of script nondeterminism. Bot smartly... breaks, 3-4 hours sessions MAX, playing legitamently, etc. Tenative Goals 75 atk, 75 str, 75 def, 70 range, 70 prayer, 99 mage. Scripter I Scripter II Planned Scripts Hello World Autoclicked: introduction to OSbot API https://github.com/PayPalMeRSGP/HelloWorld_OsBot Splash Alcher (awaiting sdn approval) https://github.com/PayPalMeRSGP/StunAlchWithNodes/tree/master/src DONE GUI to select debuff splashing spell (curse, vulerability, enfeeble, or stun), target NPC, and Alching target Draggable paint Splash Alching TODO add ability to splash debuff spell without alching. NMZ afker (Alpha) https://github.com/PayPalMeRSGP/NMZ_AFK Done: Drinks absorptions when low, Drinks Overloads when needed, guzzles rockcake to lower hp to 1. emulates AFKing NMZ by letting hp regenerate to a randomly generated limit and only interacting when an overload or absorption is needed. Otherwise the mouse is off the screen. TODO: Paint and GUI Automatically enter dreams Buy potions when low fix bug where sometimes overloads are skipped and the script guzzles to 1 hp from 51hp or above. Probably better to use onMessage() check for the overload expiration message instead of doing an HP check Detect when attacked by multiple NPCs and run across the room to encourage NPCs to line up. Barrows Script (After ScriptorII) Personal Skillset PayPal Software Engineer Proficient with Java and OOP paradigms. Passable with stackoverflow: Golang, Python, Ionic2 Framework, C/C++ Android Development Bachlors in CS Understanding of Data Structures and Algorithms, O(N), and all those genuinely intresting topics.
  22. Thanks guys, I ended up using the mouse position display and hardcoding it. I'll remember this.
  23. The client is able to highlight the bounds of interaction for items in the inventory. What class/methods would I use to obtain these bounds?
  24. yfoo

    Hello World

    Hi, I just started playing OSRS ~3weeks ago but have played/extensively botted back 6-7 years ago when Rs3 was still Rs2. This was also back when RSbuddy was a botting client and I was script kiddy. Now as a software engineer, I joined OSbot because I wanted to make my own scripts and get a few 99s. As a personal rule, I am not allowed to use anyone else's scripts, therefore any scripts I run are my own creation. If people are intrested I am willing to make my scripts open source along with progress updates on my account. I'll be botting in mirror mode to presumably mask the usage of a 3rd party client. For my Hello World script for OSbot's API heres a simple high alcher: https://github.com/PayPalMeRSGP/HelloWorld_OsBot. Currently it only alchs magic longbows but I plan to modify it tomorrow to include a paint and an item selection interface. Furthermore to make the script less deterministic it already uses a normal distribution method to generate a random interval between click intervals. Thank you for reading this, and good luck with goldfarming and inflating the runescape economy.
×
×
  • Create New...