Jump to content

rald

Members
  • Posts

    5
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male

Recent Profile Visitors

871 profile views

rald's Achievements

Newbie

Newbie (1/10)

1

Reputation

  1. My 'stache is an important part of who I am so I wanted to share it with you all, do enjoy. other unimportant things about me is I'm ussually bored playing Runescape or coding Minecraft stuff, I went through a pretty rough pokemon go phase and I got to lv28 but thats ok, maybe to end the year off i'll get into making some mobile apps or just get better with osbot stuff cause I got them good ideaz. You'll most likely find me in teh help section, OSBOT is all I use to make bots and I'm pretty new at it but i kinda understand stuff sometimes/ for the most part. One thing I like to do is comb my mustache maybe someone else wants to comb it because it's a daunting task but who knows we will have to see.
  2. I'm trying to use the "getX" thing that I found in the API to check if I'm on the correct tile during my LOOK state. I believe that I'm supposed to import something, and I want to make sure this works. import org.osbot.rs07.script.Position; It won't let me import this and I dont know why.. //EDIT: Going to read the 2nd person's post and try to add stuff in, my LOOK state looks like it might be coming together finally! ;D Here's my code so far: http://pastebin.com/EBGFwGBi //EDIT 2: My script officially can find the knife in the spot it spawns and grabs it! this is so exciting for me haha. I'm assuming my script will just sit here and wait until the next knife spawns until my inv gets full, but it would take ages to wait for that.. so looks like I need to find a way to make my player hop worlds. When my inventory gets full (I can buy more knives for testing purposes to fill it up, thats not a problem) we gotta check what floor we're on until we get to the top floor. Instead of making it click the staircase it would be cool if there was a way to make it go to the tile beside the staircase and then click the stairs, but hey whatever works. This would probably just be helpful in coding another script where instead of going up stairs I could just walk to the next destination. For instance if I were going to edit this to grab fire runes in al kharid mining area then walk to the bank there I could use some destination/position code. Here's what I got so far, I'm trying to play around with the STEAL state and with the 0, 1, 2 cases inside that currently. Sorry about the multiple edits http://pastebin.com/j5R9pWWt //EDIT 3: I think I've made some good progress, my script can now hop worlds and when my inventory is full it goes up the stairs. One thing I'm going to try to figure out later is how i can get it to actually bank, getting my player to go up the stairs was easy lol but getting him to actually bank and go back down seems pretty difficult. I've been getting some strange error and i'll post it with my code afterwards. Just wanna say you guys have helped me a lot and I appreciate it. I'm still a little stuck on the multiple cases thing in my script to determine what to do depending on what floor i'm on. [ERROR][bot #1][11/03 04:39:30 PM]: Error in script executor! java.lang.NullPointerException at Main.onLoop(Main.java:85) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(vk:145) at java.lang.Thread.run(Unknown Source) http://pastebin.com/H5Yd8ZNM All constructive criticism to make this grabber skeleton better is greatly appreciated! Hopefully other scripters new and old can learn a thing or two. //EDIT 4: After playing around with the code for a while I managed to get it to run without errors, it can pick up knives until you are full, hops worlds to find a new knife, gos upstairs Lumby castle when full, and goes to access the bank. After it opens the bank it closes it then reopens it and tries to go up the stairs. my next goal is to make it deposit my items when the bank gets opened and instead of constantly going up- make it go down when it needs to go get more knives. I someone wants to explain how i can make my code switch to from case to case that would be cool, my best guess was to do return case BANK in the code but it always gives me red lines No errors this time, and here's my updated code: http://pastebin.com/AKJVddEe
  3. Hey guys, noob to scripting here looking for a little help with my knife grabbing bot. Basically I want to make a skeleton based on grabbing knives from the crate in lumbridge. I figured it would be one of the best ways for me to dive right in considering the code has to do with a Crate (object) with a knife (Item) on top and a staircase to the bank. I'm not to positive how to work with the Staircase or Bank, or even get the item on the crate into my inventory. My code probably doesnt make much sense right now but my goal is when i find a knife or any item I hop worlds. First i need to know how to grab the knife and check when my inventory is full or not full. When it has an open slot I grab a knife only if i'm on knife floor. Assuming my code uses a "state machine", something i learned about in a scripting guide, my script also is trying to get my code to check what floor i'm on no matter what. Maybe I could create some sort of 2nd state to check this? If I'm on the second floor of lumby castle it needs to go up or down depending on if I should go up and bank or rather go down and get more knives. I don't mind not understanding that part yet but it seems like something that I should start with in the code skeleton. Right now I'm trying to think of states as a bunch of modes that do different things, and the states can all go in to other states which are kind of like different "countries". The "countries" being floors that check what state I should be in then sending me to the appropriate "country" , then putting me back in another state to complete the task that needs to get done. An example of how i could use this as a skeleton is maybe I could make other bots for picking up other items that spawn on the ground, but those might require me to learn about doors so I was hoping if I figured out how to interact with a crate maybe I could learn how to interact with a door and learning about states I could make door states depending if the door was closed or open. My current code: ----------------------------------------------------- http://pastebin.com/UJ6gBQWj
×
×
  • Create New...