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

Flexx

Registered
  • Content Count

    384
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Flexx

  1. Hi everyone! Today I'll be releasing my first script, flexxShields. It was a request I saw that I decided to make :-). (CLASS FILE NOW ATTACHED) REQUIREMENTS: - Started dragon slayer (32 quest points) - That's it RULES: - When selling the shields, PLEASE do not undercut. Not that many people buy them, but still. WHERE TO GET: - Will be on the TRiBot repository once it is approved. - Use this class file attached. - Source code: http://pastebin.com/m50YfE1x CHANGELOG: V1.0: Release V1.1: Fixed a few IDs and improved a few methods. Proggies flexxShields.class
  2. Fair enough, I'll try to push one out today. Should prove that I am no thief.
  3. It's great to see so many updates . Hopefully tabs is a solution to the CPU problem
  4. Said it there =P Thanks
  5. The point of this is pretty much to bring the issue of CPU usage to the staff's attention. From a different thread about this topic on August 11th, Trilez said he fixed it, but unfortunately it's back into overdrive again. Not to pester anyone but it's kind of annoying to see 4 clients taking up the same amount of CPU usage as 11 did in the past :/ Thanks
  6. Thanks for the update. Unfortunately this does kick up the CPU by quite a bit (10-20% more). I don't know if this is something that can be worked on, or it's just how it is. Thanks
  7. Deleted the post because I had tested it and it worked. Why not release it to the community if it's working. I'm still waiting for a mod to come along to this thread, this is really quite pathetic. If you have anything else to say, please post it in the dispute forum. This is not a sub-forum for arguing.
  8. Looks like he wants to escalate xd. Please refer to the wonders of x[1].hover(); Look carefully, there are blue dots. Because you seem like you are pretty new to tribot and don't understand how to communicate with other people, I'll spoon-feed this information to you: the blue dots mean the mouse is moving to a place on the screen. x[1].hover() just makes the mouse move to different points on the same object x. In my script, I have a more intelligent tree hover method involving right clicks and predictions. As for your complaint about "omg I n33d to s33 the line of code", here you go. There's really only one way to do it efficiently: RSTile[] current_tree = tree[0].getPosition(); Oh and by the way, silly little sock monster likes to tell people they broke rules when they didn't. Maybe I'm not too silly to do the same thing when I point this out: Offensive material/Flaming You may not post material that is racist or prejudiced in any way. You may not "flame" another user. This refers to publically "calling out" another user and using disrespectful terms to address them or their character. If you have a problem with someone, private message them. If they are suspected to be breaking a rule, report them! Accusing a user of scamming without proof publically falls into this as well. If you believe you have been wronged, make a dispute and staff will take action. Uh oh :L. Enjoy your four points :-). Also to be quite honest this thread is defunct from it's original purpose, so if a mod comes along feel free to delete of the flame posts.
  9. Simply put, current_tree is just an rstile that contains the position of the tree you are interacting with. Besides using it for ents I use it for a hovering method as well. I don't really understand what you mean by "how did you get that"? If you'd like to know how I use it then I'd be glad to teach you.
  10. Not trying to to start a flame war or anything, but this almost general knowledge. The only time you've been associated with code like is was when someone posted an ent detection snippet with object ids. I asked if it worked for you, because when I had implemented it previously it didn't. The only person who probably deserves credit here is Liam (Arckos), because he helped me use this. So I will add credit to him on the thread. If you really want to escalate and claim I stole general knowledge go ahead, I have plenty of skype logs with Arckos predating this thread by weeks about npc ent detection. Please don't do this again.
  11. CREDIT: Arckos, SockMonster, they helped show me this method. EDIT: This isn't actually 100% flawless as sometimes ents aren't npcs. As the owner of a woodcutting script, ents are possible one of the most annoying things to combat. Thankfully, there is a way around IDs so you don't have to keep updating every time the game changes. For starters, when a tree turns into an ent the Object ID changes, and it becomes an NPC. We don't really care about the object, but what can do is check for an npc with the name "Yew". That's the ent. To add this into our script, let's create an ent() method. public void ent() { //First we declare the RSNPC ent RSNPC[] ent = NPCs.findNearest("Yew"); //Now we find the nearest NPC called "Yew" (the ent) RSObject[] Tree = Objects.findNearest(10, "Yew"); if (ent.length > 0) { //if the distance between the player and the ent npc is 2, if (ent[0].getPosition().distanceTo(current_tree) < 2) { //debug message println("Ent Detected - Switching Trees"); //switch to the nearest tree. Tree[0].click("Chop down"); sleep(500, 1700); println("Switched tree"); } } } Now that we have the ent() method, we need to call it in our loop. I find the best way to do this is to structure your loop to have something like this: public int loop(){//schtuffwhile(isAnimating()){ent()anyotherchecks()} Now when we are cutting a tree (boolean isAnimating), it will check for an ent every time the loop returns. Enjoy
  12. As I said coord clicking is never acceptable - The point of the tutorial isn't to scavenge for an interface but to show the user how one would go about it. As for the sleeping, I'll accept your advice and change it. I've also now added ifFull(). Thanks
  13. One of my favorite ways of minimizing ban rate is to call various switch statements in my methods. Most of this is just general knowledge, but I feel like sometimes it's overlooked. This snippet is for joining and idling in clan chats. First we create a method for opening up the interface. private void joinChat(){ GameTab.open(GameTab.TABS.CLAN); sleep(200,300); } Obviously this is a very poorly written method, as it had no checks as to whether the tab is already open, or if it's already in a clan chat. To improve it, let's add a check to see if it's already in a clan chat. Remember, this is necessary because if we call this method in our onStart(), it will execute every time the script starts. If it's already in a clan chat and you restart a script, it will leave the chat and then type the name. private void joinChat(){ GameTab.open(GameTab.TABS.CLAN); sleep(200,300); if(isntInClanChat()){ //Actions here }else //if isInClanChat is true, go back to the inventory. GameTab.open(GameTab.TABS.INVENTORY); } Now let's check if it's in a clan chat. RSInterfaceChild ChatName = Interfaces.get(589, 0 ); if (ChatName != null) if (ChatName.getText().contains("Not in chat")){ //actions }else GameTab.open(GameTab.TABS.INVENTORY); } Now let's implement our actions. private void joinChat(){ GameTab.open(GameTab.TABS.CLAN); sleep(200,300); RSInterfaceChild ChatName = Interfaces.get(589, 0 ); if (ChatName != null) if (ChatName.getText().contains("Not in chat")){ Mouse.click(580, 449, 1); sleep(1000,1500); chatChooser(); sleep(100,200); GameTab.open(GameTab.TABS.INVENTORY); sleep(200,300); }else GameTab.open(GameTab.TABS.INVENTORY); } As I said in the code, coord clicking is really never ok, and you should always try to use interfaces. But, for the purpose of this tutorial it's ok. As you can see, I've added an action (Mouse.click(580, 449, 1) . This is what clicks "Join Chat". Then, I call a chatChooser() method, which we will create next. After that, I reopen the inventory tab and the code finishes. Now let's create the chatChooser() method. private void chatChooser() { status = ("Joining clan chat..."); int random = General.random(1, 4); switch(random){ case 1: println("Chose Sparc Mac CC"); Keyboard.typeSend("Sparc Mac"); sleep(300,600); break; case 2: println("Chose So Wreck3d CC"); Keyboard.typeSend("So Wreck3d"); sleep(300,600); break; case 3: Keyboard.typeSend("Mod Mark"); sleep(300,600); break; case 4: println("Chose NightmareRH CC"); Keyboard.typeSend("NightmareRH"); sleep(300,600); break; } } This method is different from the others; It's actually a switch statement. If your bots just joined the exact same clan every time, it would be kind of fishy. Therefore, the method would be bad. So what I've done is created 4 different options of clans. Obviously you can add more if you wish, I'm sure you can figure out how. When the method is called, it selects a random number 1-4 int random = General.random(1, 4); and then it calls the number switch(random){ and then does the actions called. Let's say it selected the number 2. case 2: println("Chose So Wreck3d CC"); Keyboard.typeSend("So Wreck3d"); sleep(300,600); break; First, it will print in the log what FC it chose. Then, I use Keyboard.typeSend to type the string "So Wreck3d". I add a sleep for any delay, and then the code completes. So, now the code can choose between any of those 4 fcs. And you are done! Here's the finished code (make sure to put it in your onStart): private void joinChat(){ GameTab.open(GameTab.TABS.CLAN); sleep(200,300); if(isInClanChat()){ Mouse.click(580, 449, 1); sleep(200,300); chatChooser(); sleep(200,300); GameTab.open(GameTab.TABS.INVENTORY); sleep(200,300); }else GameTab.open(GameTab.TABS.INVENTORY); } private boolean onStart(){ joinChat();//other stoof return true; //for my code, might not need this. } Enjoy! EDIT: As pointed out by Arckos, if the clan chat is full it will error out. Here is a solution to this: 1. Import MessageLIstener for 07 2. Declare this: boolean isFull; 3. Add this into the generated code: @Override public void serverMessageRecieved(String arg0) { if(arg0.contains("Clan")){ isFull = true; }else isFull = false; } 4. Modify joinChat() method: private void joinChat(){ GameTab.open(GameTab.TABS.CLAN); sleep(200,300); RSInterfaceChild ChatName = Interfaces.get(589, 0 ); if (ChatName != null) if (ChatName.getText().contains("Not in chat")){ Mouse.click(580, 449, 1); sleep(1000,1500); if(isFull != true){ chatChooser(); }else{ println("Chat was full, attempt #2..."); Mouse.click(580, 449, 1); sleep(1000,1500); chatChooser(); } sleep(100,200); GameTab.open(GameTab.TABS.INVENTORY); sleep(200,300); }else GameTab.open(GameTab.TABS.INVENTORY); } Enjoy ^^
  14. Nevermind. Great update!
  15. Flexx

    Cleverbot

    Nice to see this is now implemented into the api But if USA used Cleverbot for it I really think the creator of this thread should be credited..
×
×
  • Create New...