Jump to content

Method help


boyyo11

Recommended Posts

Hey there, ive coded for RSbot back in the day and have created many complex scripts. But im completly new to this api, and im quite confused on the MethodProvider stuff. Im just trying to get some basic stuff such as walking, magic, interface interaction, skill hovering and what not. If anyone could point me in the direction for some of that stuff. For magic I would like to just know how to cast one spell if you could tell me, walking i wouldnt like to use points because that can be very time consuming, and it would be much easier to do like Walk.toLocation(Point p) if that is possible. And interfaces, I know there is the widget id and child id, if you could simply tell me how to deal with an interface with the two ids i said above. And I know how to open the skill tab, but idk how to hover over a skill, I remember on rsbot they had a Skill class which i could just be like hoverOver(Skill s) and that would do the trick. Thanks for any help

Link to comment
Share on other sites

If you need to get familiar with API: http://osbot.org/api

 

For interfaces, you can do interfaces.get(30).interact("Close"); as an example,

 

For walking, localWalker.walk(pos);

 

If you are using Eclipse, just type "this." and wait, it will open a popup of suggestions etc and you can see what variables there are, e.g. camera.toEntity, mouse.move

 

PM me if you need more help :D

Link to comment
Share on other sites

If you need to get familiar with API: http://osbot.org/api

 

For interfaces, you can do interfaces.get(30).interact("Close"); as an example,

 

For walking, localWalker.walk(pos);

 

If you are using Eclipse, just type "this." and wait, it will open a popup of suggestions etc and you can see what variables there are, e.g. camera.toEntity, mouse.move

 

PM me if you need more help biggrin.png

Awesome thanks man, will do if I have any more questions thanks for the example

 

Your primary class extending Script has MethodProvider access. Eg. you can call getSkills(), getBank() and so on. Or you can access their instances (skills, bank etc.)

 

skills.hoverSkill(Skill.HITPOINTS);

 

localWalker.walk(point)

Awesome thanks for the tip man

 

 

Thanks guys - boyyo

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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