Jump to content

OsBot IronMan Challenge (Personal Scripts Only)


yfoo

Recommended Posts

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 approvalhttps://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.

 

 

Edited by PayPalMeRSGP
  • Like 4
Link to comment
Share on other sites

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. 

stats12-14-07.png.08c96a6b2291b7eb4bd7ac874b1aa6fd.png

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. 

Edited by PayPalMeRSGP
  • Like 3
Link to comment
Share on other sites

Day 4 or 5: 12/16/17

cheatcodes.png.013365aa3983779cb180263647c331e4.png

@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. 

icebarrage.png.903f0fd6adf6b6247c012c35311046b2.png

Current Stats:

magic94.png.0c951688ca81b05507f0f53a2c974ceb.png

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. 

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

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.

icon.png.53333707ff57a2d91b20a8faad5fe8e6.png

2accs.thumb.jpg.a6e07f9874d0f553b55fdadfa3366a87.jpg

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. 

image.png

 

Edited by PayPalMeRSGP
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...