Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Buy OSRS Gold

Sell OSRS Gold

Search the Community

Showing results for tags 'snippets'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • TRiBot
    • News and Announcements
    • Old School Scripts
    • Help and Guidance
    • Development
    • Bugs and Errors
    • Tutorials
  • Scripters' Forums
    • Scripter Application
  • RuneScape®
    • General
    • Guides/Tutorials
    • Achievements
  • General
    • General
    • Questions
    • Discussions & Debates
    • Introductions
    • Suggestions
    • Feedback
  • The Black Market
    • Disputes
    • Repository Credits
    • Gold Exchange
    • Item Exchange
    • Membership Sales
    • Services
    • Other
    • Middleman Services

Blogs

  • Getting Started With TRiBot
  • The Best Way To Get Rid Of Termites
  • How to Generate Real Estate Leads Using Twitter
  • A Guide to Landing Pages
  • Dog Grooming in Sydney – 5 steps to finding a grooming salon
  • Cheap RS 2007 Gold for Spring 2020!
  • Logo Design Mistakes- Your Business Should Avoid at All Cost
  • Effective Pest Control Measures
  • В Алматы карантин из-за коронавируса: жизнь в условиях пандемии
  • Preschool Educational Toys, Helping One's Child Prepare For the Future
  • Automating Tribot
  • Payment error
  • Animal Crossing: New Horizons Cuts Player Interest Rates
  • network-security-engineer
  • SERVICES 100% BY HAND
  • The best place to buy Animal Crossing Bells
  • Major Content of Escape from Tarkov Patch 0.12.5.6924 Optimizations
  • You need to rest properly when playing Rocket League
  • Escape from Tarkov hits 200k concurrent players
  • List of Rocket League Ranking System
  • Should I need to run a paid ad campaign, when organically I rank well?
  • Rocket League SPRING SERIES: EUROPE TAKEAWAYS
  • How to play Rocket League
  • Twitch Drops Come Back in Escape from Tarkov
  • The Path of Exile game features
  • Be more seen
  • Rocket League Took Actions to Fight Racism and Discrimination in the Game 
  • Rocket League camera setting 
  • Animal Crossing -List of Wedding Season Rewards
  • What WoW Classic race and sophistication is best?
  • FIFA 21 Coming to Steam
  • The Ideal Place for Global Players to Buy and Sell Rocket League Items 
  • Customize furniture in Animal Crossing: New Horizons
  • ABOUT NBA 2K20
  • Purchase Cheap RL Items from Lolga.com to set aside bunches of Cash 
  • Ethan Smith

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


Bio

Found 5 results

  1. I decided to create my own banking API that mimics tribots way of implementing the API as much as possible. Basically it would only contain nothing more than just method calls. Simple and easy to use. This API is a reworked version that is currently in my jHerblore script. I intend to release my GE api as well once I have finished that one up too. The API requires DaxWalker & Wastedbro's Item Price API. Other than that the rest is achieveable with standard dependencies that already comes with tribot. All of the method names are the same as the ones from Banking & GrandExchange class in tribot, with a few exceptions, the only difference is that these methods are called with different class names such as Banker & Exchanger, so they do not collide with the Banking & GrandExchange class of tribot and cause an ambiguity problem. List of available methods: Some of the features this API offers: - Methods that incorporate any form of withdrawing or depositing do not need you to first check if the bank is open nor if it is loaded. It will attempt to open the bank if it is not open before returning false, and wait for bank to load if it is not loaded yet. - Methods that incorporate any form of buying or selling do not need you to first check if the exchange window is open. It will attempt to open the exchange window if it is not open before returning false. - Deselector. All methods that require the mouse to click somewhere on the screen first check if an item or spell is selected, if it is then it will deselect whatever is selected before attempting the requested action. - Additional failsafes, not just the deselector. Tribots banking api does not know if what you were trying to click actually was succesfully clicked. Instead it views succesfully calling the click function as a succesfull attempt. It's kind of like playing pin the nail to the donkey game. It does not know if it pinned it at the right location, but as long as it pinned it the function returns true. This is not true for all methods, some methods do actually check if the action was succesfully performed, however they do not reattempt the action if it failed. 1 call = 1 attempt. My api will reattempt any action that might fail, several times, before returning false and will also wait until inventory count is updated. For example using the tribot banking API if you were to deposit all your items and then immediately check your available inventory space before withdrawing items then it might not work as you wish because Banker.depositAll() returns before the action of depositing has finished. - When banking, closes GrandExchange window if it is open. - When buying/selling, closes the bank screen if it is open. - Support for withdrawing items in noted format and with or without stack exception. Stack exception is basically if you wish to draw X amount of items in your inventory but you only had Y left, then you can choose if you wish to draw these items or not. Also supports depositing of noted item ids if you happen to pass a list with of items that contains items of unnoted item ids, but the item in your inventory is a noted version of the item in your inventory. Also will not deposit equipment or items if you have none equipped or in your inventory. There is a total of 4 different depositing methods and 16 different withdrawing methods. - Unique dynamic sleeping method, all methods that should sleep already have sleeps implemented so you do not need to call a sleep after executing any of the methods. Involves random varying sleeps but will occasionally, every so often, in a irregular pattern, sleep a bit longer. I use this because I prefer it over General.sleep(). Feel free to replace it with whichever method you wish. Remember before running the main loop in your script to call: jGeneral.get().generateSeed(); This will create a random number between 0-100 that will be added to your dynamic sleeps in milliseconds. This is so no bot has the same average reaction/sleeping time. - When buying items on the GE, if the bot does not have any money or too little money in the inventory, it will check if you have enough of the missing amount in the bank and withdraw that amount. - Custom buying method that checks for an exact string match of the item you wish to buy and chooses that one from the returned items in the buy window search box. The standard GE api does not do this and will for instance click the wrong herb when it searches for "Guam leaf" in the grand exhcange, this is because more than one item contains "guam leaf" in their name. Such as Grimy guam leaf and so on. - Profit tracking when buying/selling items on the GE. This is optional. GET THE SOURCE HERE! UPDATES: - Pushed new updates that fix some of the methods that I've tested a bit for now, bit of logic and efficiency improvements. Also added 2 new depositing methods. Remember to replace the old java files with the new ones. - Pushed even more updates. Fixed interface problem for withdrawing noted items. My GE api is now also been released to the public. Enjoy!
  2. SPX TUTORIALS & INFO LIST LIST Get Worlds By Type Conditional Sleeping TRiBot Rank & Title List
  3. - Credits to Sea Shepard for path Drawling methods public RSTile[] CirclePathGenerator1(Positionable CenterPositionable, Positionable DestinationPositionable, int radius){ ArrayList<RSTile> ReturnTiles = new ArrayList<RSTile>(); ArrayList<RSTile> ReturnTilesReverse = new ArrayList<RSTile>(); double CurrentAngleFromCenter = Math.atan2(Player.getPosition().getY() - CenterPositionable.getPosition().getY(),Player.getPosition().getX()-CenterPositionable.getPosition().getX()); double destinationAngleFromCenter = Math.atan2(DestinationPositionable.getPosition().getY() - CenterPositionable.getPosition().getY(),DestinationPositionable.getPosition().getX()-CenterPositionable.getPosition().getX()); double counter = CurrentAngleFromCenter; DecimalFormat fmt = new DecimalFormat("0.0'0'"); for(counter = CurrentAngleFromCenter; !fmt.format(counter).toString().equals(fmt.format(destinationAngleFromCenter).toString()); counter = counter + .1){ if(counter>Math.PI){ counter = 0 - Math.PI; } double x1 = CenterPositionable.getPosition().getX() + radius * Math.cos(counter); double y1 = CenterPositionable.getPosition().getY() + radius * Math.sin(counter); RSTile PotentionalRSTileToAdd = new RSTile((int) x1,(int)y1,CenterPositionable.getPosition().getPlane()); if(!ReturnTiles.contains(PotentionalRSTileToAdd)){ ReturnTiles.add(PotentionalRSTileToAdd); } } for(counter = CurrentAngleFromCenter; !fmt.format(counter).toString().equals(fmt.format(destinationAngleFromCenter).toString()); counter = counter - .1){ if(counter< 0 - Math.PI){ counter = Math.PI; } double x1 = CenterPositionable.getPosition().getX() + radius * Math.cos(counter); double y1 = CenterPositionable.getPosition().getY() + radius * Math.sin(counter); RSTile PotentionalRSTileToAdd = new RSTile((int) x1,(int)y1,CenterPositionable.getPosition().getPlane()); if(!ReturnTilesReverse.contains(PotentionalRSTileToAdd)){ ReturnTilesReverse.add(PotentionalRSTileToAdd); } } RSTile[] returnArray2 = new RSTile[ReturnTilesReverse.size()]; returnArray2 = ReturnTilesReverse.toArray(returnArray2); RSTile[] returnArray = new RSTile[ReturnTiles.size()]; returnArray = ReturnTiles.toArray(returnArray); if(returnArray.length>returnArray2.length){ return returnArray2; } else{ return returnArray; } } http://pastebin.com/raw.php?i=qPhJ8Pga Needs severe cleaning up, for anyone that is up to the task. Core logic is all in place. Warfront1
  4. In about 2 weeks from now I'm going to take a break from making scripts and I'm just going to start making snippets for all of the randoms. I will post them all here and change the title when I update them. Please post yours below, and I may add them to the collection as well. (Credits will be given) Haven't made any yet, first I need to finish everything I have on my current list, which is quite large at the moment. You can disable randoms with super.setRandomSolverState(false); right at the top of run(), then you can implement your own custom randoms. I will make a system that detects if randoms are active, then if a method to solve the random has been coded, it will start solving the random. (Each time the code loops, it will check for randoms) I will advance the system more and more as I go. As I said previously I will be able to start this about 2 weeks from now. Randoms will be updated as often as I am able to update them. I am currently on summer break at the moment, so unless I'm going out somewhere or at a friends house, I'm on the forums everyday. I would like other scripters to help me out with this. it's obviously optional to put the randoms in your code, but I will try my best to ensure that the code is clean and works 100% to avoid failed randoms. If you notice anything that needs to be changed once I release the system and start on the randoms, please notify me and I will change whatever it is as soon as possible. Thanks, that's all. I'll keep you up to date once I start making the system.
  5. While coding my EdgevilleManKiller script, I kept gettting a problem with the character attacking men who were outside the house. The character would then get stuck outside. Bad news. So, in response, I developed this algorithm for making sure that whatever/whoever you want is inside a certain area. It's not complicated, but it's useful. private class Area { private int minX, maxX, minY, maxY; public Area (int x, int X, int y, int Y) { this.minX = x; this.maxX = X; this.minY = y; this.maxY = Y; } public boolean isInArea(RSTile coord) { int coordX = coord.getX(); int coordY = coord.getY(); return (coordX > minX && coordX < maxX && coordY > minY && coordY < maxY); } }Directions: Step 1: Copy and paste the code above into your script. Step 2: Go to the place you want to keep your character in, debug position, and find the mins and maxes of both the X and Y coordinates. Assign them to minX, maxX, minY, maxY. It's best to go to the bottom right corner of your area and assign that X to maxX and that Y to minY, and then go to the top left corner of your area and assign that X to minX and that Y to maxY. Step 3: Use the constructor 'new Area (minX, maxX, minY, maxY)' to create your new area. Step 3: In your block of code where you want to use isInArea(coord), get the position (RSTile) of the object that you want to check. Step 4: Type "'areaName'.isInArea(RSTile you just got in step 3)" into wherever you need it. Apparently there is a type RSArea, but I like to implement simple little things like this on my own. It allows me to know exactly what's going on in the background. If you prefer this to RSArea, then have fun, I hope you like it.
×
×
  • Create New...