Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.FlowLayout;
- import java.util.Random;
- import javax.swing.JCheckBox;
- import javax.swing.JFrame;
- import javax.swing.JOptionPane;
- import javax.swing.JPanel;
- import javax.swing.JTextArea;
- import javax.swing.event.ChangeEvent;
- import javax.swing.event.ChangeListener;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSComponent;
- import org.rsbot.script.wrappers.RSInterface;
- import org.rsbot.script.wrappers.RSTile;
- @ScriptManifest(authors = { "C123" }, keywords = "Doubling Scam", name = "C123MoneyDoubler", version = 2.4,description = "Doubling Money For You!")
- public class C123MoneyDoubler extends Script {
- String message;
- Random random = new Random();
- String effect[] = {"red:", "glow1:", "glow2:", "green:", "wave:", "wave2:", "cyan:", "green:", "white:", "flash2:"};
- String txt[] = {"Come on guys, try me! ", "Quitting RS ! Doubling all money 22M left! minumum 20k", "Quitting RS ! Doubling all money 22M left! minumum 20k"};
- String txt2[] = {"Quitting RS Doubling money 21m left! -- free 25k test try me", "Doubling money - Legit and pro guys!", "Doubling Money - Free 20k Test", "Double Money test me with 20k! T.R.U.S.T.E.D."};
- RSTile startTile;
- long timer2;
- boolean acceptAccepted = false;
- long timer = 0;
- public boolean isOnTradeWindow(){
- if(interfaces.get(334).isValid() || interfaces.get(335).isValid()){
- return true;
- }else{
- return false;
- }
- }
- public boolean onStart(){
- startTile = getMyPlayer().getLocation();
- acceptAccepted = (JOptionPane.showInputDialog("1. Accept when other person accepts? 2. Accept when other person adds money on trade? (1. = true, 2. = false").contains("true"));
- return true;
- }
- public void dance(){
- if(!isOnTradeWindow()){
- RSInterface inter = interfaces.get(464);
- if(game.getCurrentTab() == 13){
- RSComponent dance = inter.getComponent(random(14,17));
- if(dance != null){
- if(timer < System.currentTimeMillis()){
- if(!isOnTradeWindow()){
- dance.doClick();
- }
- keyboard.sendTextInstant(effect[random.nextInt(effect.length)]+""+txt[random.nextInt(txt.length)], true);
- timer = System.currentTimeMillis()+7000;
- }
- }
- }else{
- game.openTab(13);
- }
- }else{
- RSInterface tradeOne = interfaces.get(335);
- if(tradeOne != null){
- RSComponent hasAccepted = tradeOne.getComponent(37);
- if(hasAccepted != null){
- if(acceptAccepted){
- if(hasAccepted.getText().contains("accepted")){
- RSComponent acceptOne = tradeOne.getComponent(17);
- if(acceptOne != null){
- acceptOne.doClick();
- }
- }
- }else{
- RSComponent wealth = tradeOne.getComponent(45);
- if(wealth != null){
- if(!wealth.getText().contains("transfer")){
- RSComponent acceptOne = tradeOne.getComponent(17);
- if(acceptOne != null){
- acceptOne.doClick();
- }
- }
- }
- }
- }
- }
- RSInterface tradeTwo = interfaces.get(334);
- if(tradeTwo != null){
- RSComponent acceptTwo = tradeTwo.getComponent(21);
- if(acceptTwo != null){
- acceptTwo.doClick();
- sleep(1000);
- }
- }
- }
- }
- public void checkMessages(){
- if(!isOnTradeWindow()){
- RSInterface chatBox = interfaces.get(137);
- if(chatBox != null){
- for(int x = 180; x < 280; x++){
- if(chatBox.getComponent(x) != null && chatBox.getComponent(x).getAbsoluteY() > 330){
- String curCompText = chatBox.getComponent(x).getText();
- if(curCompText.contains("wishes to trade with you")){
- if(!isOnTradeWindow()){
- for(String y: chatBox.getComponent(x).getActions()){
- if(y.contains("trade"));
- chatBox.getComponent(x).doAction("trade");
- }
- sleep(1000);
- }
- }else if(curCompText.contains("Accepted trade.")){
- if(timer2 < System.currentTimeMillis()){
- keyboard.sendText("No Problem, bro. Come back in 30 minutes for your money, this takes a while >.<.", true);
- }
- }else if(curCompText.contains("Other player declined trade.")){
- if(timer2 < System.currentTimeMillis()){
- keyboard.sendText("No problem mate, quitting RS , this hour I double all money!", true);
- keyboard.sendText(txt2[random.nextInt(txt2.length)], true);
- timer2 = System.currentTimeMillis()+5000;
- }
- }
- }
- }
- }
- }
- }
- public void checkArea(){
- if(!new RSArea(new RSTile(startTile.getX()-5, startTile.getY()-5), new RSTile(startTile.getX()+5, startTile.getY()+5)).contains(getMyPlayer().getLocation())){
- walking.walkTo(startTile);
- }
- }
- @Override
- public int loop() {
- checkArea();
- checkMessages();
- dance();
- return 100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement