caseywyka Posted May 10, 2014 Share Posted May 10, 2014 Here's part of my method that i need explanation on how to use it properly and what it truly does (api wasn't helping me) Character.interact("Cross","Wilderness Ditch",true,20,true,true); Cant make static reference to non static method I thought this method im calling will interact with the object using that option if its within 20 squares away and will move the camera pitch if necessary. Can someone please explain how to do this properly? Also side note - Is there a method for toggling run or do i have to hard code mouse points and such? Thanks! - Caseywyka (credit for help will be left in script when done) Link to comment Share on other sites More sharing options...
Pandemic Posted May 11, 2014 Share Posted May 11, 2014 You can't call a static method in a non-static method, so you'll have to make a variable and interact with it that way. Example: RS2Object ditch = closestObjectForName("Wilderness Ditch"); ditch.interact("Cross"); You can enable/disable running with this: setRunning(true); //This turns it on setRunning(false); //This shuts it off 1 Link to comment Share on other sites More sharing options...
caseywyka Posted May 12, 2014 Author Share Posted May 12, 2014 thanks and also one more thing, if i have a choice to make like say smelt something. how do i right click it and hit make x Link to comment Share on other sites More sharing options...
Pandemic Posted May 12, 2014 Share Posted May 12, 2014 thanks and also one more thing, if i have a choice to make like say smelt something. how do i right click it and hit make x You'll have to use the interface debugger and find what interface parent and child ID it is, then use: client.getInterface(PARENT_ID).getChild(CHILD_ID).interact("Make-x"); 2 Link to comment Share on other sites More sharing options...
TheScrub Posted May 12, 2014 Share Posted May 12, 2014 (edited) You'll have to use the interface debugger and find what interface parent and child ID it is, then use: client.getInterface(PARENT_ID).getChild(CHILD_ID).interact("Make-x"); i believe smelting has a color tag in it example "Smelt X <col=ff9040>Iron" Edited May 12, 2014 by TheScrub Link to comment Share on other sites More sharing options...
Ericthecmh Posted May 14, 2014 Share Posted May 14, 2014 You can't call a static method in a non-static method, so you'll have to make a variable and interact with it that way. I think you meant it the other way around. You can call static methods from a non-static method, but you can't call non-static methods from a static context (static context includes calling from a static method and calling through the class name instead of an instance) Link to comment Share on other sites More sharing options...
Pandemic Posted May 14, 2014 Share Posted May 14, 2014 I think you meant it the other way around. You can call static methods from a non-static method, but you can't call non-static methods from a static context (static context includes calling from a static method and calling through the class name instead of an instance) Oops, haha. That's what I meant :P Link to comment Share on other sites More sharing options...