Jump to content
Swhit

Snippet Request

Recommended Posts

Hey so first of all I wasn't sure whether I should post this in the Tutorials subtopic or Snippets; feel free to move this post around as needed. 

 

Now, getting into the meat and potatoes of this post... as we all know, it is much easier to learn from and see how different aspects of a code interact when we are given an example to follow. Understanding how a method given in the API can be useful is one skill, but seeing how to correctly implement it is another thing. My request, therefore, is for some of you more accomplished scripters out there to post what code you can, in order to help those of us that are starting out. 

 

Small bugs that may throw off or severely slow down the execution of a script may be readily apparent to those that are used to seeing them, but new coders will only be faced with the frustration of a problem that they may not see a way around. A small example of this is when interacting with tin to mine it, if we use interact( "tin ore" ) then the client will click rapidly on the tin rock even if it is depleted. Using interact with the non-depleted tin ore's ID will only make us click on the rock if tin is available. Things like this will frustrate new coders to no end, but can be avoided. 

 

The way that this is different from the "Snippets" section is that I am asking for more than just small pieces of code. Longer examples of code will allow new coders to go through and see what others may be doing, and ideally ask questions so that they may grow and help this community. 

 

Please feel free to post any code that you can contribute in the form of a reply, or as a new topic in this or the Snippets section. Thank you!

Edited by Swhit
Link to comment
Share on other sites

A small example of this is when interacting with tin to mine it, if we use interact( "tin ore" ) then the client will click rapidly on the tin rock even if it is depleted. Using interact with the non-depleted tin ore's ID will only make us click on the rock if tin is available. Things like this will frustrate new coders to no end, but can be avoided.

Sounds more like the OSBot API needs some fixing, removing those "beginner's traps", making it easier to use.

Sorry to hear about the potential fustration. Although, I believe a list of "pitfalls" would be better suited for the "Client Bugs & Suggestions" section. Fix the problem at it's core

Edited by fixthissite
Link to comment
Share on other sites

Hey so first of all I wasn't sure whether I should post this in the Tutorials subtopic or Snippets; feel free to move this post around as needed. 

 

Now, getting into the meat and potatoes of this post... as we all know, it is much easier to learn from and see how different aspects of a code interact when we are given an example to follow. Understanding how a method given in the API can be useful is one skill, but seeing how to correctly implement it is another thing. My request, therefore, is for some of you more accomplished scripters out there to post what code you can, in order to help those of us that are starting out. 

 

Small bugs that may throw off or severely slow down the execution of a script may be readily apparent to those that are used to seeing them, but new coders will only be faced with the frustration of a problem that they may not see a way around. A small example of this is when interacting with tin to mine it, if we use interact( "tin ore" ) then the client will click rapidly on the tin rock even if it is depleted. Using interact with the non-depleted tin ore's ID will only make us click on the rock if tin is available. Things like this will frustrate new coders to no end, but can be avoided. 

 

The way that this is different from the "Snippets" section is that I am asking for more than just small pieces of code. Longer examples of code will allow new coders to go through and see what others may be doing, and ideally ask questions so that they may grow and help this community. 

 

Please feel free to post any code that you can contribute in the form of a reply, or as a new topic in this or the Snippets section. Thank you!

It does exactly what you tell it to. You have to come up with some way to see if they player is already mining

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.

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