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

Search the Community

Showing results for tags 'scripts'.



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
  • How much does WoW Classic cost?
  • Special Olympics NY partners with Mission Control for Rocket League competitions
  • Rocket League:Premium Challenges and Rewards
  • The things Psyonix has made for this occasion are generally birthday-themed
  • Epic Games Store version of Rocket League
  • The Rocket League people group quickly got their pitchforks and took to Reddit
  • The arrival of cross-platform progression means changes to player-to-player trading
  • will Rocket League Credits stay dynamic

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 63 results

  1. Notes: This is not exactly a guide as much as it is me sharing my experience and findings with various aspects of scripting for combat-related tasks. The format in which this guide is presented resembles that of a guide, and is why I have decided to share this under the Scripting Tutorials section. I intend for this to be useful to beginners who wish to quickly grasp the concept sand fundamentals of writing scripts which rely on combat-based functions and methods. Also, this was meant to be an open guide, in that all members feel free to add to it any information, corrections, or suggestions. Let us begin. Combat Helper - RS07 1. COMPOSITION My first attempt at a script that included combat was awful, to say the least. 5 months ago, January 2015, I wrote my first combat script while learning to program in Java (with 4 years prior C/C++ knowledge). The first thing I learned from my experience was to invest time into figuring out what you intend for your script to accomplish, and planning out important steps or "components" of the overall routine. Consider what you will need and what you wish to include in your script before beginning. Essentially, this should be the case for almost any script, not just combat. What will your program do? What will you need to make it do what you wish? How should it perform overall? Answering these questions ahead of time will save a lot confusion later and allow for some form of organization to be followed. Additionally, be considerate of the user even if that user is yourself. It is worthwhile to make scripts that are very presentable, have friendly-simple interfacing, have good modifiability and robustness. What might a combat script include? It may of course may entirely BLAH: 1. Banking 2. Looting 3. Attacking 4. Healing For simplicity and starting out, only what is necessary should be included. For example, a power-leveling bot would not need to incorporate a routine for looting. Though, it may be given the option to do so through design. Also, consider a bot which kills chickens for feathers. In this instance, it would be unnecessary to include a healing routine. A simple yet effective implementation for these components that works well for me is: private boolean stopScript;public void run() { // Run function of main program loop while(!stopScript) { // Boolean conditional for script bank(); // Check for banking. If so, perform it and travel. combat(); // Get in game NPC and pursue it. Heal if needed. loot(); // Pick items off the ground. }}public void combat() { // Combat function - integrates both attacking and healing /* attack and heal */} 1.1 Banking Banking is perhaps the simplest of the above fundamental combat script components. In many of my script applications, I have gotten away will writing a single function to perform the banking routine necessary for my task. private final RSTile myBank = new RSTile(1000, 1000, 0);private final RSTile mySpot = new RSTile(2000, 2000, 0);public void bank() { if(Inventory.isFull()) { // Is inventory full? banking = true; // If so, enable banking status (thread-safe) WebWalking.walkTo(myBank); // and run/walk to myBank. if(Banking.openBank()) { // Check if the bank account is open. Banking.depositAll(); // If so, deposit all inventory items sleep(400,800); // and perform short delay. WebWalking.walkTo(mySpot); // Walk back to desired location, my spot, banking = false; // and disable banking status. (thread-safe) } }}Other programs may not be as simple, requiring additional features and capabilities. Such features include dynamic clicking, sleeping, or waiting using time-based conditionals. /* This conditional statement dynamically waits for the bank screen to appear. */if(Timing.waitCondition(new Condition() { // If the wait condition returns true @Override // Allow process Override for conditional public boolean active() { // Condition function General.sleep(100); // Sleep every 0.1 seconds return Banking.isBankScreenOpen(); // Check: Is bank screen open? } }, 1000)) { // If Condition function returns true before time-out /* Perform banking actions here */}Most importantly from banking I have learned that it is extremely important to test the method for getting to the bank. Nothing is worse then having a bot that knows how to bank, but cannot properly get to the bank or travel back from the bank. The banking actions, if written and tested, should be rather straight forward and cooperative. 1.2 Looting In my experience, I have found it very useful to allow looting to be optional. This is done by simply designing a boolean control or state via enum property to govern the capability, and then implementing it as some form of user control. In this case, the shell design for the loot() function may look somewhat like: private boolean looting;public void loot() { if(looting) { /* Perform loot operations here */ }}In my opinion, looting is a bit more tricky then your typical banking routine. The difficulty in this is knowing when an enemy has been killed, and then waiting for the items to appear on the ground after completing their unique death animation. One simple way to do this is to manually determine the time it takes for the items to drop once detecting the NPC target's health to be zero. A routine for this might look like: private final int[] lootItems = { 100, 200, 300 }; // Array of item IDsprivate RSNPC monster; // Target monsterprivate boolean fighting; // Boolean combat conditionalprivate boolean looting; // Boolean loot conditionalpublic void loot() { if(looting) { if(monster != null) { // Check if NPC target is null. if(monster.getHealth() == 0) { // Is NPC target dead? sleep(3500); // Sleep for death animation. pickUp(lootItems); // Loot only items from loot array. monster = null; // Reset NPC target to no target. fighting = false; // Reset combat conditional to "out-of-combat" } } }}With this sleep function approach, the player is forced to wait out the death animation and allow the loot to appear. However, the pickUp() method is what's responsible for performing the actual looting action. An approach that has worked for me was: boolean pickUp(int[] ids) { if(ids != null) { // Check if loot ID array is null RSGroundItem item = findClosestItem(ids); // Get closest item if(item != null) { // If the item exist if(item.isOnScreen()) { // If the item is on the screen final int currentInventory = Inventory.getCount(ids); // Get number of inventory items for(int i = 0; i < 20; ++i) { Clicking.click("Take " + item.getDefinition().getName(), item); sleep(200,500); if(Inventory.getCount(ids) > currentInventory) // If item was picked up break; } return Inventory.getCount(ids) > currentInventory; // Return pick up status } else { WebWalking.walkTo(item.getPosition()); // If not on screen, walk to item pickUp(ids); // Recursive call: pick up item } } } return false;}RSGroundItem findClosestItem(int[] ids) { RSGroundItem[] items = GroundItems.find(ids); // Get items on ground int distance = 99999; // Initialize large distance RSGroundItem closest = null; // Initialize closest item DPathNavigator dNav = new DPathNavigator(); // Path object for(RSGroundItem iter : items) { int i; if(iter != null && (i = dNav.findPath(iter).length) < distance) { distance = i; // New closest distance closest = iter; // New closest item } } return closest;}Keep in mind that it is important for the primary combat sequence loop to be fast enough to detect when the health of the target reaches zero. There is of course only a limited amount of time for when the target's health will be equal to zero before it disappears. Other methods for looting may be as simple as clicking the item once it appears, and utilizing a boolean condition to flag if the item has or has not been successfully looted. A cowhide farming bot, for example, could make use of such a simple method because it is expected that a cowhide drops from each cow upon death. What you should employ depends on your script's needs and performance expectations. 1.3 Attacking The attacking routine has been the most challenging to pursue. I have learned that it requires more testing then any of the components, and deserves extremely careful design in order to be successful. There are several instances to consider when attacking a target. They include, multi-combat, retaliation, target switching, target validation. There will always be instances in which multi-combat may be present, retaliation is needed if being attacked, switching to another target if the target NPC is lost or stolen, and validating if a target is available for attack. But first, we will look at the basics for finding a potential target. A procedure that works well for me includes, finding a target in the area, getting the closest target, and then clicking on that target: private RSNPC monster;public void attack() { RSNPC npcs[] = NPCs.findNearest("Chicken"); // Get array of nearest NPCs if(npcs.length > 0) { // Did we get any NPCs nearby? target = npcs[0]; // The 0th NPC is the closest if(monster != null) { // Null check the RSNPC object // Click the target DynamicClicking.clickRSTile(monster.getAnimablePosition(), "Attack "+monster.getName()); } }}Though the process is simple, there are immediately problems with this short snippet of code. Firstly, how do we know if nearest target is even on the screen to be clicked? Also, we do not know if the target is valid for combat. Is it already being attacked or busy with some sort of other action? Lastly, how is it known if the user has finally started attacking the target and can top clicking it? A revised and more promising routine might be: private RSNPC monster;public void attack() { if(!fighting) { // Boolean condition for combat RSNPC npcs[] = NPCs.findNearest("Chicken"); // Get array of nearest NPCs if(npcs.length > 0) { // Did we get any NPCs nearby? for(RSNPC npc : npcs) { // Iterate through all NPCs // Check if NPC is available if(!npc.isInCombat() && !npc.isInteractingWithMe() && npc.isValid())) { monster = npc; // Set target } } if(monster != null) { // Null check the RSNPC object if(!monster.isOnScreen()) { // Is monster on screen? int rand = 1 + General.random(1, 99); // Get a random number between 1-100 if(rand > 50) { Camera.turnToTile(monster.getPosition()); // Turn to the target's tile } else { WebWalking.walkTo(monster.getAnimablePosition()); // Walk to the target's tile } } for(int i = 0; i < 20; ++i) { // Attempt a max of 20 clicks // If target and player in combat if(npc.isInCombat() || Combat.isUnderAttack() || (Combat.getAttackingEntities.length > 0)) { break; } // Click the target DynamicClicking.clickRSTile(monster.getAnimablePosition(),"Attack "+monster.getName()); sleep(200,500); // Short delay } // Player is engaged in combat if(Combat.isUnderAttack() || (Combat.getAttackingEntities.length > 0)) { fighting = true; // Toggle fighting, stop searching for a target } } } }}Though this snippet may not work for certain instance of combat, it is useful to show what kind of necessary checks and procedures should be considered when trying to attack a target. In my applications, this snippet of code has been enough for me to accomplish what I need. Additional code that is necessary to include are checks for in-combat instances. What if the user is being attacked but not attacking or if the NPC is somehow lost or stolen? Here is one way I have addressed this problem: private RSNPC monster;private boolean fighting;public void inFight() { // Can be included in attack() if(fighting) { // Boolean condition for combat RSPlayer player = Player.getRSPlayer(); // Get user object info if(player != null) { // Null check RSPlayer object RSCharacter target = player.getInteractingCharacter(); // Get the user's actual target if(target == null) { // If actual target is null monster = getInterractingNPC(); // Set target to attacking NPC if(monster != null) { // If an attacking target exists monster.click(); // Click the new attacking target sleep(250, 400); // Short delay } else { // If no attacking target present fighting = false; // There is no fight, toggle off } } } }}A few necessary states and conditions that I would like to share regarding combat are below. I found that much of the methods in the API did not accomplish what was expected. These methods I have defined offer a little bit more of a literal meaning to their actions. /* Check if the player is in combat */boolean playerInCombat() { return Combat.getAttackingEntities().length > 0;}/* Check if the player is attacking a target */boolean playerIsAttacking() { return Combat.isUnderAttack();}/* Check if the target is attacking the user */boolean targetIsAttackingMe(RSNPC target) { return target.isInCombat() && target.isInteractingWithMe();}​/* Check if the target is in combat, but not attacking the user */boolean targetNotAttackingMe(RSNPC target) { return target.isInCombat() && !target.isInteractingWithMe();}​/* Check if the target engaged with the user but not attacking (stuck behind something or walking toward user) */boolean targetEngagedWithMe(RSNPC target) { return !target.isInCombat() && target.isInteractingWithMe();}​/* Check if the target is not in combat and not interacting with user (free to engage) */boolean targetIsNotEngaged(RSNPC target) { return !target.isInCombat() && !target.isInteractingWithMe();}​/* Check if the user is in combat and not attacking a target */boolean playerInCombatAndNotAttacking() { return Combat.getAttackingEntities().length > 0 && !Combat.isUnderAttack();}​/* Check if the user is attacking a target and not being attacked */boolean playerAttackingAndNotAttacked() { return Combat.getAttackingEntities().length < 1 && Combat.isUnderAttack();}​/* Check if the target has died */boolean targetIsDead(RSNPC target) { return target.getHealth() == 0;} 1.4 Healing Healing is an integral part of many combat scripts. Essentially, healing in/out of combat requires a few steps: checking for food in the inventory (and bank), eating below a certain health level or percentage, executing the click-to-eat process. Most times, healing methods will need to be implemented in with the attacking methods of a combat script. In this case it is necessary to combine methods or designate an individual thread for healing. In implementation, I prefer to check if the health value is below a certain point before checking for available food in the user's inventory. The user is to flee combat in the case that there is no food and the health falls below the observed percentage. In all other cases, the user may continue to fight. Another important consideration is with banking and food supplies. I've found it best to end the script when the user runs out of the selected food supply. If both the bank and inventory has no supply of the desired food, then log out and kill the program. A simple example of a healing method would be: private final int[] foodToEat = { 100, 200, 300 }; // Food array for eatingprivate final int timeToEat = 1900; // Rounded-up time to eatprivate final int minHealth = 10; // Eat at or below this healthpublic void heal() { // While current HP <= minHealth and food exists while((Combat.getHP() < (minHealth+1)) && foodExists()) eat(); // Eat food}public boolean eat() { RSItem[] food = Inventory.find(foodToEat); // Get food in inventory final int currHP = Combat.getHP(); // Get current HP level if(food.length > 0) { // Check if food was found if(food[0] != null) { // Check if first food is null if(Clicking.click("Eat", food[0])) { // Click to eat food return Timing.waitCondition(new Condition() { // Conditional for eating action @Override public boolean active() { // True when finished eating return Combat.getHP() > currHP; // Return health change status } }, timeToEat); // If Condition function returns true before time-out } } } return false; // Didn't complete eating sequence}public boolean foodExists() { return Inventory.find(foodToEat).length > 0; // Return inventory food quantity}Such a method might be included using a thread or be directly implemented into the combat method. Either method works well unless the thread actions are unsafe (via design) or the time to loop through the entire combat sequence is too long and slow (again, via design). For example, the direct combat implementation from section 1.3 would look like: private RSNPC monster;private boolean fighting;public void inFight() { // Can be included in attack() if(fighting) { // Boolean condition for combat heal(); /* Implement heal() here */ RSPlayer player = Player.getRSPlayer(); // Get user object info if(player != null) { // Null check RSPlayer object RSCharacter target = player.getInteractingCharacter(); // Get the user's actual target if(target == null) { // If actual target is null monster = getInterractingNPC(); // Set target to attacking NPC if(monster != null) { // If an attacking target exists monster.click(); // Click the new attacking target sleep(250, 400); // Short delay } else { // If no attacking target present fighting = false; // There is no fight, toggle off } } } }}This implementation would make the overall design flow as: private boolean stopScript;public void run() { // Run function of main program loop while(!stopScript) { // Boolean conditional for script bank(); combat(); loot(); }}public void combat() { attack(); inFight();}Another task-based design could be to implement each of the discussed four components directly in order. Fighting cows, goblins, men/women, and rats may allow for such implementation as they may rarely require healing. private boolean stopScript;public void run() { // Run function of main program loop while(!stopScript) { // Boolean conditional for script bank(); attack(); // Incorporates our inFight() method loot(); heal(); }} Closing Remarks: These are methods which I have experience, learned, and followed myself. I do not take credit for creating or inventing all of the content presented in this forum thread. It is intended to represent my experience and learned lessons, and for me to share the collection of knowledge I have gained in regards to combat-based scripts and tasks. Feel free to append to this information or offer additional insightful information for our reading audience. Thank you.
  2. Guest

    Review my first script

    A problem i encountered when botting with a lvl 3 char at Draynor willows was that the Dark wizards always attacked me and i kept dying.. Features: Takes east way from the bank to the willows instead of the west way (which is closer to the wizards) Runs back to the bank whenever it gets in combat and stays there for x amount of seconds to recover the lost hp Banking / dropping support Features to be implemented: Get axe from the bank if player has none in inventory or equipped ABCL 10 GUI Request: Please review my code and give some constructive criticisms (this is my first script ever) Here is a screenshot: Source code : https://github.com/Aegisemon/AegisCutter Thanks
  3. Currently, I'm learning the basic's of using Tribot's API to build scripts for Old School Runescape. I have a computer science background and degree, it's just been years sense I've done Java. So I literally have to start from the beginning again. I had a question about implementing random detection and solving into your script. Do I have to include it in my while loop to check for randoms then continue? Or does tribot automatically handle the random while pausing the script. Thanks in advanced.
  4. Hello, I am a CS student interested in becoming a script writer in the near future. I have done a lot of research on scripts and I wanted to ask those that are experienced: What are the different types of scripts? I have seen some that use states, while others seem to just through a bunch of nodes into a collection and loop through them checking all of the conditions for them to execute. What is in your own individual opinion your preferred way to write a script? Why? And which way do you think is best? Also, please don't hesitate to leave any tips for me. I am new to scripting. :] P.S. If you could as well, please leave any resources you might think would be helpful for me.
  5. Hello, I made a script for my f2p accounts but now I want to test it. But I can't load the local scripts, it wil not show up in the script manager.. How can I fix this?
  6. As the title suggests, does anyone mind offering advice? I frequently use gitHub for code referencing, downloads, open source, etc. but have never shared to a community before. I have a lot of shit that I will be sharing with you guys. :-) Thanks
  7. I purchased 20 credits onto my account and Im trying to buy a premium green dragon script, but when I hit purchase script it says "insufficient funds" any solutions??
  8. Im looking for a script that supports fishing sharks, and successfully banking them, preferably in catherby. Im looking for the most successfully, error free, premium or not
  9. Okay, I have $8 to spend, I have a low level pure with 5 att 79 str, I can get 89 str to max out my combat, planning on doing it with a bot. NEED HELP - Should I get VIP Extended, and use Wasted Man Killer, OR should I get VIP Extended and use Wastedbro's Al-Kharid Warriors, OR should I get Relleka Crabs PRO. Need help, recommendations, good or bad of any/all scripts, which would be better and why. GIVE ME YOUR OPINION MONEY WISE, AS WELL. Mainly though, I'm wondering which can get me 88-89 str FASTER, BETTER, (Efficiency is key) BUT without a ban (what has better anti-bans). I know Wastedbro is one of the best bot-makers but from the reviews I've seen Relekka is OP. Thoughts? Really appreciated, need people to comment FAST. Thanks community, sorry for the caps!
  10. Hello, How do I submit a script I made? its my very 1st one and I got no idea on how to make it so everyone can use it and give me feedback on how i did. could someone please explain how i do this. Thanks, BAT
  11. Guest

    help with scripts not appering

    hey guys i really need some help. wen i load my client it works fine and wen i click view script folder its always empty but here it says i have 10script already. i have activated some scripts i cant see any scripts to start. i have tried re installing tribot but it doesnt work
  12. most of you might of seen my old post I made about the IP's Client Accepting, and then a day later I randomly get my account logged into by some random guy. And Im Looking for some help and or informations on these usernames/or people the next day after I accepted the IP's the Tribot client was requested this happen. (Today) I always keep my Friends chat offline or friends only. but i decided why dont i turn it on and see if any random people message me (might be the hacker right?) This is what I get. Some guy under the name "iBurnKenyans" Pmed me Asking me to buy unids clearly wanting me to access my bank because I might of been ratted/or javadriveby I look up his account on the highscores and strike at him with something really stupid, but return he gives me some important information I was able to record. Then.. I keep getting random accounts asking me/trying to lead me to put in my bank info.. I have virus scanned my computer 4 times, with 4 different anti viruses.. checked my registry.. nothing out of the usual.. Even disconnected my computer off the internet re did everything all over again.. and still havent found anything weird.. my paypal wasn't touched. My Youtube Channel I have worked over 3 Years on and manage to have 2.5k Subscribers and 668k Total views (might not be alot) but Im proud to say i have worked and owned that. My Skype or non of my other accounts/runescape accounts have been logged into.. just my main runescape account. and the bankpin was tried to be taken off.. could anyone give any suggestions on what to do.. I feel pretty confident my computer is clean but im still scared to access my bank LOL.. I have 1 or 2 people in mind who might be doing this and also have voice recordings of them hacking/ddosin/ratting other people or players.. might be leaked if I find out i was hacked by them. sorry about this whole situation. its just quite annoying and kinda wanted to share it with you guys.. Any idea's on what to do.
  13. Guest

    I Officially want a hug...

    Found my old rsbot.org scripts from 2009-10, if anyone wants to have a look through the files and what not, let me know so I can upload them... thought maybe if a scripter got their hands on them with a few id modifications, they might come in handy... got like 90 scripts all up
×
×
  • Create New...