Jump to content

First script


gorgas8

Recommended Posts

Hello, i was creating my very first script by tutorials and free source scripts i found in this forum. I ran it few times to see where it will fail and the next day my account got banned. Well all skills was botted in 1 week, but i believe they detected my script. So i have a question, does mouse moves randomly, human like by default or do i have to make it move like that? Also my path wasnt randomized and had too big gaps, but bot was able to click beyond minimap, maybe this was the case?

Link to comment
Share on other sites

Hello, i was creating my very first script by tutorials and free source scripts i found in this forum. I ran it few times to see where it will fail and the next day my account got banned. Well all skills was botted in 1 week, but i believe they detected my script. So i have a question, does mouse moves randomly, human like by default or do i have to make it move like that? Also my path wasnt randomized and had too big gaps, but bot was able to click beyond minimap, maybe this was the case?

 

Mouse moves randomly by default. You do not get banned by clicking on minimap beyond, path randomization (or rather lack of it) might affect your ban, but mostly, probably you were just unlucky.

 

In debugging window select mouse-position to see your script cursor, you should see how the mouse moves

Edited by Nitrousek
Link to comment
Share on other sites

Can someone help me to make this case to wait till character is not attacked anymore, everything i try results to errors.. Also it should change world if totalStuff is less than 1.

case BUY:
                        sleep(random(2400, 2800));
                        if (myPlayer().isAnimating() || myPlayer().getInteracting() != null) sleep(random(1400, 2800));
                        
                    {
                        NPC shopOwner = npcs.closest("Owner");
                        if (shopOwner != null){
                            shopOwner.interact("Trade");
                            sleep(random(2400, 2800));
                            
                            RS2Widget item = getWidgets().get(300, 2, 4);
                            if (item != null){
                                int totalStuff = item.getItemAmount();
                                if (totalStuff >1){
                            item.interact(false, "Buy 10");
                            sleep(random(220, 420));    
                           item.interact(false, "Buy 10");
                            sleep(random(220, 420));    
                            item.interact(false, "Buy 10");
                            sleep(random(1500, 2500));
                                }
                            }

                            
                            else{
                                if (Worlds != null && Worlds[worldCounter] != -1){
                                worlds.hop(Worlds[worldCounter]);
                                log("World hop.");
                                worldCounter++;
                            }
                            else{
                                log("int array is null");
                            }
                            if (worldCounter == 7){
                                worldCounter = 0;
                            }
                            sleep(random(11700, 13000));

                                sleep(random(2400, 2800));
                            }
                            break;
                        }
                    }
Edited by gorgas8
Link to comment
Share on other sites

Can someone help me to make this case to wait till character is not attacked anymore, everything i try results to errors.. Also it should change world if totalStuff is less than 1.

 

case BUY:

                        sleep(random(2400, 2800));

                        if (myPlayer().isAnimating() || myPlayer().getInteracting() != null) sleep(random(1400, 2800));

                        

                    {

                        NPC shopOwner = npcs.closest("Owner");

                        if (shopOwner != null){

                            shopOwner.interact("Trade");

                            sleep(random(2400, 2800));

                            

                            RS2Widget item = getWidgets().get(300, 2, 4);

                            if (item != null){

                                int totalStuff = item.getItemAmount();

                                if (totalStuff >1){

                            item.interact(false, "Buy 10");

                            sleep(random(220, 420));    

                           item.interact(false, "Buy 10");

                            sleep(random(220, 420));    

                            item.interact(false, "Buy 10");

                            sleep(random(1500, 2500));

                                }

                            }

                            

                            else{

                                if (Worlds != null && Worlds[worldCounter] != -1){

                                worlds.hop(Worlds[worldCounter]);

                                log("World hop.");

                                worldCounter++;

                            }

                            else{

                                log("int array is null");

                            }

                            if (worldCounter == 7){

                                worldCounter = 0;

                            }

                            sleep(random(11700, 13000));

                                sleep(random(2400, 2800));

                            }

                            break;

                        }

                    }

 

Do everyone a favour when you post code, post it using the code tool, and make sure it is properly formatted. Otherwise it is a headache to read.

 

 

https://gyazo.com/5819a6c62741a431cb9fa7113d3f6dc9

 

Also there is a method in the API for determining if the player is under attack

myPlayer().isUnderAttack() 
Edited by Explv
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...