Jump to content

Thecoldwolf52

Members
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    3

Thecoldwolf52 last won the day on March 12

Thecoldwolf52 had the most liked content!

Thecoldwolf52's Achievements

New Botter

New Botter (2/14)

  • One Year In
  • One Month Later
  • Dedicated
  • Week One Done
  • Conversation Starter

Recent Badges

3

Reputation

  1. I have a collection of scripts that I worked on extensively during my first year of learning how to program. This website, this SDK, and this community taught me so very much that I would like to release all of my work, open source, for others to view, extend, or learn from. This entire project is open source. Be aware that all of these scripts were made by me, a very new developer who learned programming by starting here. This community is amazing and I have learned so much from you all. I would like to give back, as I was hoping to become a premium scripter myself, learning everything I thought would be necessary to do so, however, game development has taken all of my recent time. As far as I'm aware these scripts will work out the box, as long as you update the dax walker keys that are inside of each script. I was using a paid version of dax walker, so my setup may differ from other, more simple/free setups. Also, some of the scripts initialize dax walker differently than others. Not sure why this is, but the MLM script, and the Smithing script implement it in the best way I knew how. A lot of these scripts started simple and were slowly refactored and built upon over a decent period of time. The project is broken into two sections, the Library, which holds all of the data, tasks, and item files that are essentially helper libraries for the scripts that they are named after. The other section is the scripts themselves. I hope this project gives anyone new a jumping off point that they can use themselves to analyze and learn from. Most of these scripts have pretty hard coded locations that they can work at, so they are not the safest scripts to use, especially if a relatively large group starts using them, so use at your own risk. I have not tried to run any of these scripts in over a year as of March 12, 2025. And because of that I don't fully remember why I did things, or how the scripts are set up. Almost all of these scripts follow a similar pattern, there is a lot of repeated code, however, I found it better for me learning, to go ahead a reimplement all of the basic stuff for each script such as the overlay, Dax walker initialization, GUI, and my basic state machines, if you can call them that. This project includes: AIO Agility (had some slight bugs that could cause the player to held up at some points) (This could have been an actual game bug that got the player stuck on invalid tiles, if that has been fixed, the script should work great) AIO Combat (Last script I worked on, I believe it works for almost any area, just isn't as good as it could be) AIO Cooker (This worked great at edgeville, but I ended up changing the location to AlKarid later) AIO Fisher (Very simple implementation of fishing, will work at almost any location as far as I know) AIO Miner (Most values are hardcoded, would need the ore deposit variables changed to mine different ore) AIO Smelter (One of the more fleshed out scripts, showcasing how to use data tables, data items, and tasks) AIO Smither (Arguably my best script, this one can and will get you to 99 smithing. However locations are hard coded and limited, Includes GUI, Tasks, Data tables, Item tables, etc.) AIO Woodcutter (Gives the option to drop items, bank items, and pick up birds nests. Will auto equip axes) MLM State Machine (This one implements my first attempt at a state machine, this script has worked great and was able to get an ironman account to 80+ mining without bans, I don't think I implemented the top floor fully or at all) Canifis Agility (Not sure why this is separate from AIO Agility. This must be a very simple implementation from my first attempt at agility before making the AIO version) Dax Walker Testing (This is a very basic script showcasing how to use dax walker to send your player to places without having to click yourself.) Guardians of the Rift (This one was my final script, it is very much work in progress and does not work basically at all, I was testing how to get gameplay messages, and using lots of debug logs to ensure I was doing things correctly.) Rune Mysteries (My first attempt at questing script, this is not fully implemented and right now it only starts the quest as far as I can tell) Visualizer (This was just a fun script to test my ESP abilities using this SDK. It will display items, players, if players are in combat, and just general information about what is going on around your player character.) Under the libraries section you'll find some massive data tables that can be used to find or manipulate any and every object from that skill. For example, inside of the SmithingData file, you will find every item that can be smithed in the game, the level required, the name of the item, XP gained per smith, barsRequired, bar type, and if the item is members only or not. I would strongly encourage you guys to check out these data tables as they may be useful for any projects that you may be working on. All data was compiled and created from the Runescape wiki directly. Please feel free to ask me about why I did anything I did, and I will continue to update this post with examples and or point you toward the resources I used to create these scripts. The repository can be found at: https://github.com/TroyKaplan/RandomTesting Everything in this project will be completely open source, no licensing, no credit necessary if you use or build on top of anything inside of this project. Feel free to use it for any purpose you wish, also contact me on discord, through Tribot's discord (No DM's please, just @ me in programming or general chat of the discord channel) if you wish to talk about anything inside of this project, or post below. My discord name is the same as my name here.
  2. This is a silly script just to see if I can make a chat bot in RS using this client. I'm sure this can be improved upon. Feel free to let me know how! I just started learning java recently and have made a few simple scripts, but wanted to see if I could put chatGPT into a script. Here it is: package scripts; import org.jetbrains.annotations.NotNull; import org.tribot.script.sdk.*; import org.tribot.script.sdk.input.Keyboard; import org.tribot.script.sdk.interfaces.PlayerMessageListener; import org.tribot.script.sdk.query.PlayerQuery; import org.tribot.script.sdk.script.TribotScript; import org.tribot.script.sdk.script.TribotScriptManifest; import org.tribot.script.sdk.query.Query; import org.tribot.script.sdk.types.Player; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; import java.security.Key; @TribotScriptManifest(name = "GPT Test Script", author = "Me", category = "Practice", description = "GPT Testing") public class GPTTestScript implements TribotScript { boolean talkingToSomeone; String lastMessage; private static final String API_URL = "https://api.openai.com/v1/chat/completions"; String player; String message; PlayerMessageListener playerMessage = new PlayerMessageListener() { @Override public void onPlayerMessage(@NotNull String s, @NotNull String s1) { player = s; message = s1; } }; @Override public void execute(final String args) { while (true) { MessageListening.addPlayerMessageListener(playerMessage); playerMessage.onPlayerMessage(player,message); if (!talkingToSomeone) { // can enable these to chat in the game and ask people to chat //Keyboard.typeString("Talk to me plz! Put '..' in the message to chat with me!"); //Keyboard.pressEnter(); } //looking for a message with ".." so we aren't responding to every message that we get. This can be configured if (message != null && message.contains("..") && message != lastMessage) { talkingToSomeone = true; Log.debug("Player: " + player); Log.debug("Sent message: " + message); Keyboard.typeString(player + " " + chatGPT("Respond with a few words" + message)); Keyboard.pressEnter(); //Log.debug("Response: " + chatGPT("Respond with a few words" + message)); lastMessage = message; } else { talkingToSomeone = false; //Waiting.waitNormal(10000,1500); } Waiting.waitUniform(500,800); } } public String chatGPT(String message) { String url = "https://api.openai.com/v1/chat/completions"; String apiKey = "APIKEYHERE"; // YOUR API key goes here String model = "gpt-3.5-turbo"; // current model of chatgpt api try { // Create the HTTP POST request URL obj = new URL(url); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); con.setRequestProperty("Authorization", "Bearer " + apiKey); con.setRequestProperty("Content-Type", "application/json"); // Build the request body String body = "{\"model\": \"" + model + "\", \"messages\": [{\"role\": \"user\", \"content\": \"" + message + "\"}]}"; con.setDoOutput(true); OutputStreamWriter writer = new OutputStreamWriter(con.getOutputStream()); writer.write(body); writer.flush(); writer.close(); // Get the response BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); // returns the extracted contents of the response. return extractContentFromResponse(response.toString()); } catch (IOException e) { throw new RuntimeException(e); } } // This method extracts the response expected from chatgpt and returns it. public String extractContentFromResponse(String response) { int startMarker = response.indexOf("content") + 11; // Marker for where the content starts. int endMarker = response.indexOf("\"", startMarker); // Marker for where the content ends. return response.substring(startMarker, endMarker); // Returns the substring containing only the response. } }
×
×
  • Create New...