Results 1 to 15 of 15

Thread: wow bot improvements

  1. #1
    Join Date
    Apr 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default wow bot improvements

    Hi there! I used to use scar way back in the day to play runescape but now i have tried a new approach. To make a wow bot with it. I run the game in a window so as to be able to switch back and forth easily. I am though having some trouble with it, specially need help with certain parts like when to actually attack and so forth. Here is the code so far:
    Code:
    (*
    have your hook in 2nd slot
    food in last slot
    no loot :(
    *)
    
    program New;
    var
    x,y,i:integer;
    const
    myposx=400;
    myposy=500;
    rangemax=300;
    rangemin=10;   //make bigger than 0
    numberoftries=100; //how many times to try
    checkhealth=1; //1=true 0=false  use potions or food
    
    function withinrange:boolean;
    var
    mydistance:integer;
    begin
        if findcolor(x,y,65535 ,16, 102,748, 546) then //yellow color found
           begin
              // returns x and y of the yellow object.
    
              //distance formula
              mydistance:=distance(myposx,myposy,x,y+20)
    
           end
           else
           mydistance:=0
    
        writeln(inttostr(x) + ',' + inttostr(y)) //debug
        writeln(inttostr(mydistance))
    
        if (mydistance < rangemax) and (mydistance > rangemin) then
           result:=true
        else
           result:=false
    end;
    
    procedure move;
    begin
        sendarrowwait(1,150) //press rigth for 150 ms
        sendarrowwait(0,250) //press up for 150 ms
    end;
    
    procedure kill;
    begin
        keydown(9)     //tab
        keyup(9)
        wait(500)
        if withinrange=true then
          begin
              keydown(84)     //T to attack
              wait(500)
              keyup(84)
              wait(100)
              keydown(50)  //2 attack to hook
              keyup(50)
              wait(2000)
              repeat
                    wait(1000)
              until(findcolortolerance(x,y,9109652,376, 300,439, 302,5)) //or (findcolortolerance(x,y,1184426,304, 120,508, 150,5))    //purple xp and red error
          end;
        if withinrange=false then move;
    end;
    
    procedure health;
    begin
    if checkhealth=1 then
    begin
    if findcolor(x,y,36352,98, 63,98, 63) then wait(100)
    else
    begin
    movemouse(387, 567)
    clickmouse(387, 567,true)
    wait(3000)
    end;
    end;
    
    if checkhealth=0 then
    wait(100)
    end;
    
    
    
    
    
    
    //main code
    
    begin
    activateclient;
    i:=0
    repeat
    wait(500)
    kill;
    health;
    i:=i+1
    until(i=numberoftries)
    end.
    basically what it does is it calculates the distance from the players feet to where the creature is and if its under and over a certain set distance it will press tab, attack it with your range, and then attack with meele. This is the first part i would like to improve my code because it is not very reliable.
    It then keeps on attacking until it finds the purple experience text above your head or i was trying to put if it found red text that stated that you where too far or facing wrong way. This is the second part i am having trouble doing, it tells that their is red text and goes on but i dont always want it to do this. For example it might say too far away and then it goes to the next creature but the too far away has not gone away so it skips and so forth.
    If it finds the red text, finds red text or finds that it isnt between the set distances in moves to the right and forward.
    The last problem i had trouble with was when it had to eat. because it would eat out of nowhere.


    All thanks is appreciated. Sorry for making it so long, but i would rather explain it now thoroughly then have to explain it later.

  2. #2
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is pretty smart, ide love to see it work.

    For the red text, i think you can make a bitmap of it and fill in the background with black. I made a bitmap tutorial here. So if it gets message you are too far, it will go furthere and if it says wrong direction, it will turn around.

    And the purple exp would be good for knowing if the monster is dead, but make sure you make a failsafe so if it takes longer than an x amount of time to kill monster, just continue the script past that part. And the feedign part would be after a fight, check if you have the combat message, if not, tell it where to click to eat your food. I think that all would work.

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Can you preform getcolor on WoW, only if you can you can use SCAR...



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  4. #4
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    lol I thought WoW would be too colourful and detailed for SCAR....might try somethings with it
    Sleeping...

  5. #5
    Join Date
    Mar 2007
    Location
    Under a rock
    Posts
    813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, you dont need colors to move in wow, just arrow keys. And the monsters have many unique colros so a simple tolerance would find them. I want to try something like this later lol.

  6. #6
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    It's just a matter of time before scar gets into Warden's blacklist of programs, and they will ban you. As WoWs Warden client scans the memory, you need to use some kind of rootkit to prevent it from being found.
    I made a new script, check it out!.

  7. #7
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    i wonder does WoW colors change?
    because i have friends that wanted to pay me to make them a WoW
    bot, but didn't get around to it....

  8. #8
    Join Date
    Apr 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    a couple of things to reply to your questions.
    First of all thanks to rune hacker for actually answering my question. So thanks. Second of all I don't search for that many colors, just the purple exp, and the yellow color that u get when u target a creature. If the colors do change you can simple get by this by using the procedure findcolortolerance(var x,y:integer; color,xs,ys,xe,ye:integer; tolerance:integer. Oh and one last thing, i obviously have my scar hidden from all programs so i have no worries about getting banned, but that is a different story and WILL NOT, i repeat WILL NOT explain how to do this. If anyone else wants to chip in with any suggestions on how to more successfully perform procedures or functions then you are by all means welcome.


    And rune hacker if i make the background black does that mean it will like not include the black when it searched for the bitmap? //never mind i read your tutorial even though i know how to do bitmaps.
    And how do i take a picture with the mouse showing on screen?

  9. #9
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    how do i take a picture with the mouse showing on screen?
    i dont think u can take a picture with the mouse showing on the screen....
    i could be wrong though...

  10. #10
    Join Date
    Apr 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That is a very big shame if i cant take a picture with the mouse showing because that would make for a very easy loot procedure.

    If anyone is interested in this idea for a scar made bot for WOW and would like to help me or join me, feel free to add me to aim=spanishkid333 or to xfire= willie199120 or even send me an email at willie_soccer1@hotmail.com

  11. #11
    Join Date
    Feb 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    (*
    have your hook in 2nd slot
    food in last slot
    no loot
    *)

    program New;
    var
    x,y,i:integer;
    const
    myposx=400;
    myposy=500;
    rangemax=300;
    rangemin=10; //make bigger than 0
    numberoftries=100; //how many times to try
    checkhealth=1; //1=true 0=false use potions or food

    function withinrange:boolean;
    var
    mydistance:integer;
    begin
    if findcolor(x,y,65535 ,16, 102,748, 546) then //yellow color found
    begin
    // returns x and y of the yellow object.

    //distance formula
    mydistance:=distance(myposx,myposy,x,y+20)

    end
    else
    mydistance:=0

    writeln(inttostr(x) + ',' + inttostr(y)) //debug
    writeln(inttostr(mydistance))

    if (mydistance < rangemax) and (mydistance > rangemin) then
    result:=true
    else
    result:=false
    end;

    procedure move;
    begin
    sendarrowwait(1,150) //press rigth for 150 ms
    sendarrowwait(0,250) //press up for 150 ms
    end;

    procedure kill;
    begin
    keydown(9) //tab
    keyup(9)
    wait(500)
    if withinrange=true then
    begin
    keydown(84) //T to attack
    wait(500)
    keyup(84)
    wait(100)
    keydown(50) //2 attack to hook
    keyup(50)
    wait(2000)
    repeat
    wait(1000)
    until(findcolortolerance(x,y,9109652,376, 300,439, 302,5)) //or (findcolortolerance(x,y,1184426,304, 120,508, 150,5)) //purple xp and red error
    end;
    if withinrange=false then move;
    end;

    procedure health;
    begin
    if checkhealth=1 then
    begin
    if findcolor(x,y,36352,98, 63,98, 63) then wait(100)
    else
    begin
    movemouse(387, 567)
    clickmouse(387, 567,true)
    wait(3000)
    end;
    end;

    if checkhealth=0 then
    wait(100)
    end;






    //main code

    begin
    activateclient;
    i:=0
    repeat
    wait(500)
    kill;
    health;
    i:=i+1
    until(i=numberoftries)
    end.
    coding error
    begin
    if findcolor(x,y,65535 ,16, 102,748, 546) then //yellow color found
    begin
    // returns x and y of the yellow object.

    //distance formula
    mydistance:=distance(myposx,myposy,x,y+20)

    end
    else // Here Needs a ; =]
    mydistance:=0

  12. #12
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    1,395
    Mentioned
    30 Post(s)
    Quoted
    107 Post(s)

    Default

    Quote Originally Posted by SKy Scripter View Post
    i wonder does WoW colors change?.
    Yes, colors do change (except [menu] window's?) -> there is night and day system.

  13. #13
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    errr why are u asking if u can take a pic with WoW mouse on screen? Why don't u just try it urself? lol
    Sleeping...

  14. #14
    Join Date
    Apr 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im asking to take a pic of the WOW mouse when it is over a creature and it turns into a loot mouse. If i can get this then it will be very easy to loot.

    BTW this is Runehackers interpretation of my script. It uses colors which are not very good for WOW since... they change all the time but he put in a tolerance. I have not tried it or anything. Soon i will be updating my script with better procedures,etc.

    SCAR Code:
    Program WowBot;

    var
      x, y, i : Integer;
      ResultIs : Boolean;

    const
      MobColor1 = 0000; //color of mob(unique to what the surrounding is)
      MobColor2 = 0000; //second mob color
      NumberToKill = 100; //how many mobs do you wish to kill
      CheckHealth = 1; //1=true 0=false use potions or food
      KillTime = 14000;  //time for it to kill the mob
      EatTime = 7000; //time to eat food

    Procedure Rotate;
    begin
      keydown(39); //right arrow
      wait(300); //change to how long a quarter revolution takes
      keydown(39);
    end;

    Procedure MoveForward;
    begin
      keydown(38); //right arrow
      wait(1600); //change to how long it takes to go forward
      keydown(38);
    end;
    {
    Procedure TooFarAway;
    begin
      if(               )then
      begin
        MoveForward;
      end else
      begin
        Exit;
      end;
    end;

    Procedure WrongDirection;
    begin
      if(               )then
      begin
        keydown(39); //right arrow
        wait(300); //change to how long a quarter revolution takes
        keydown(39);
        wait(1000);
      end else
      begin
        Exit;
      end;
    end;
    }

    Procedure FindMob;
    begin
      if(FindColorSpiralTolerance(x,y,MobColor1,64, 600,61, 596,5))or
        (FindColorSpiralTolerance(x,y,MobColor2,64, 600,61, 596,5))then
      begin
        movemouse(x, y);
        getmousepos(x,y);
        clickmouse(x, y, false);
        ResultIs:=1;
      end else
      begin
        ResultIs:=2;
      end;
    end;

    Procedure KillMob;
    begin
      keydown(9); //tab
      wait(20);
      keyup(9);
      wait(1000);
    //  TooFarAway;
    //  WrongDirection;
      if(FindColorSpiralTolerance(x,y,1710847,64, 600,61, 596,5))then //red above your hook
      begin
        MoveForward;
      end else
      begin
        Keydown(84); //T to attack
        Wait(500);
        Keyup(84);
        Wait(100);
        Keydown(50); //2 attack to hook
        Wait(20);
        Keyup(50);
        Wait(KillTime+5000);
        repeat
          wait(1000);
        until(FindColorSpiralTolerance(x,y,9109652,380, 300,433, 316,5)) or (findcolortolerance(x,y,592471,362, 121,447, 158,5))    //purple xp and red error
      end;
    end;

    procedure Health;
    begin
      if checkhealth=1 then
      begin
        if(FindColorSpiralTolerance(x,y,36352,98, 63,98, 63,5))then
        begin
          movemouse(388, 604);
          clickmouse(388, 604,true);
          wait(100)
        end else
          Exit;
        end;
    end;

    //main code
    begin
      activateclient;
      keydown(33); //page up(i think this zooms out, you need to check)
      wait(4000);
      keyup(33);
      i:=0;
      repeat
        wait(100);
        FindMob;
        if(ResultIs = 1)then
        begin
          KillMob;
          Wait(3000);
          health;
          i:=i+1;
        end;
      until(i >= NumberToKill)
    end.

  15. #15
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    Lol I would try it but I don't know how to make it so WoW can't detect ur using it....
    Sleeping...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. First Sig, Rate, suggestions for improvements and such
    By sweetleaf in forum Graphics and Multimedia
    Replies: 5
    Last Post: 12-31-2007, 10:59 PM
  2. My first script, power miner, please post improvements
    By nght spud in forum First Scripts
    Replies: 15
    Last Post: 11-07-2007, 12:50 AM
  3. Flax pixker improvements?
    By tomd741 in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 09-16-2007, 02:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •