Joseph Posted April 5, 2014 Share Posted April 5, 2014 (edited) im just wondering, when your creating a script and there isnt any variable on an entity that will indicate a change. Which i wish there was for my script. Which would help me change my States. What would you normally do. Use a boolean? Edited April 5, 2014 by josedpay Link to comment Share on other sites More sharing options...
Swizzbeat Posted April 5, 2014 Share Posted April 5, 2014 What condition are you trying to look for? Link to comment Share on other sites More sharing options...
Joseph Posted April 5, 2014 Author Share Posted April 5, 2014 its hard to explain without blurting out my new project. i would like 2 conditions. One that indicates if the entity has ores. Link to comment Share on other sites More sharing options...
Nezz Posted April 5, 2014 Share Posted April 5, 2014 I'm not sure what you're asking. Link to comment Share on other sites More sharing options...
Joseph Posted April 5, 2014 Author Share Posted April 5, 2014 I'm not sure what you're asking. im asking what would you do. if you did something to an RS2Object, and your looking for a change on the RS2Object, but there isnt any. You want to be able to indicate that change so you could chnage the current state of your script. Link to comment Share on other sites More sharing options...
Nezz Posted April 5, 2014 Share Posted April 5, 2014 im asking what would you do. if you did something to an RS2Object, and your looking for a change on the RS2Object, but there isnt any. You want to be able to indicate that change so you could chnage the current state of your script. You would have to just have a lot of checks while your'e going through doing that something to the RS2Object. Then when you're done, you set a boolean (or whatever you decide) and go off that. You'll just have to set up how you do it so that you will know for a fact whether it has been done or not. Link to comment Share on other sites More sharing options...
Swizzbeat Posted April 5, 2014 Share Posted April 5, 2014 So essentially you're making a miner :p Write you're own method to grab the current object you're interacting with and check the ID. Link to comment Share on other sites More sharing options...
Nezz Posted April 5, 2014 Share Posted April 5, 2014 If you want more accurate, helpful help, you'll actually have to tell us what you're trying to do. Link to comment Share on other sites More sharing options...
Joseph Posted April 5, 2014 Author Share Posted April 5, 2014 (edited) If you want more accurate, helpful help, you'll actually have to tell us what you're trying to do. So what you could steal my idea Heres a little hint So essentially you're making a miner Write you're own method to grab the current object you're interacting with and check the ID. You would have to just have a lot of checks while your'e going through doing that something to the RS2Object. Then when you're done, you set a boolean (or whatever you decide) and go off that. You'll just have to set up how you do it so that you will know for a fact whether it has been done or not. initially i was think about this, but i was just wondering what the OSD would do. Edited April 5, 2014 by josedpay Link to comment Share on other sites More sharing options...
Nezz Posted April 5, 2014 Share Posted April 5, 2014 So what you could steal my idea Heres a little hint Good guess but nope. Im making a smither / smelter initially i was think about this, but i was just wondering what the OSD would do. Nah, I'm not about that life. If you want our help, you have to risk letting your idea out. tbh, chances are it has already been done. Not to mention I'm working on my own things. cbf to start stealing ideas. lel But what you could/should do depends completely on what you're trying to do. Without that information all we can do is guess. Link to comment Share on other sites More sharing options...
Joseph Posted April 5, 2014 Author Share Posted April 5, 2014 Nah, I'm not about that life. If you want our help, you have to risk letting your idea out. tbh, chances are it has already been done. Not to mention I'm working on my own things. cbf to start stealing ideas. lel But what you could/should do depends completely on what you're trying to do. Without that information all we can do is guess. ill work all night to try to find a solution if i cant. ill tell you what it is tomorrow, and see if you could help. Also this script hasnt been made on osb yet 1 Link to comment Share on other sites More sharing options...
Nezz Posted April 5, 2014 Share Posted April 5, 2014 ill work all night to try to find a solution if i cant. ill tell you what it is tomorrow, and see if you could help. Also this script hasnt been made on osb yet Alright, I wish you luck. I'm kind of excited to find out what it is. If you can't figure it out, and don't want to post it on the forums you're free to PM me about it. 1 Link to comment Share on other sites More sharing options...
Master Awesome Posted April 5, 2014 Share Posted April 5, 2014 Pretty sure it is a ores to steel to cannonball script. Link to comment Share on other sites More sharing options...
Joseph Posted April 5, 2014 Author Share Posted April 5, 2014 Pretty sure it is a ores to steel to cannonball script. nope Link to comment Share on other sites More sharing options...
Deffiliate Posted April 5, 2014 Share Posted April 5, 2014 im just wondering, when your creating a script and there isnt any variable on an entity that will indicate a change. Which i wish there was for my script. Which would help me change my States. What would you normally do. Use a boolean? I'm trying to understand what you're asking here? You're asking how to determine which state you should be in? Well I see you mentioned states, so I guess I can show you my State class (Called a Task): package def.api; import org.osbot.script.Script; public abstract class Task{ public abstract int run() throws InterruptedException; public abstract boolean valid(); private String name = "N/A"; private Script s; public String name () { return name; } public void setName(String name){ this.name = name; } public static Task getValid(Task[] tasks){ for(Task t: tasks){ if(t.valid()){ return t; } } return null; } public Task(){ } public Task(String name){ this.name=name; } public Task(String name, Script s){ this.name=name; this.s = s; } public Script getS() { return s; } public void setS(Script s) { this.s = s; } } Link to comment Share on other sites More sharing options...