Results 1 to 15 of 15

Thread: HoverSpell; Antiban/Spell Casting/Spell checking function.

  1. #1
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default HoverSpell; Antiban/Spell Casting/Spell checking function.

    Lol... This is one of JAD's Ideas that I stole from him.

    Haven't found any bugs yet, but you could help .

    Well... I have two versions. The first one is just a big "case" statement with EXACT coords. The second adds coords to the x and y and may be off of the center a bit. I guess I can post both.


    Gives you an option to cast the spell and returns true if it sees the green "you have the runes" color.
    SCAR Code:
    program HoverMagic;
    {.Include SRL/SRL.scar}

    Function HoverSpell(Which: Integer; Cast:Boolean): Boolean;
     Var xm, ym, xz, yz:Integer;
     begin;
      If (not (GameTab(7)))Then
       GameTab(7);
      GetMousePos(xz, yz);
      Case Which of
       1: begin;         //Home tele  //Row 1
           xm:= 575;
           ym:= 235;
          end;
       2: begin;
           xm:= 600;
           ym:= 235;
          end;
       3: begin;
           xm:= 623;
           ym:= 240;
          end;
       4: begin;
            xm:= 650;
            ym:= 240;
           end;
       5: begin;
            xm:= 674;
            ym:= 235;
           end;
       6: begin;
            xm:= 697;
            ym:= 240;
           end;
       7: begin;
            xm:= 720;
            ym:= 238
           end;
       8: begin;      //Row 2
            xm:= 577;
            ym:= 262;
           end;
       9: begin;
            xm:= 600;
            ym:= 262;
           end;
       10: begin;
            xm:= 622;
            ym:= 261;
           end;
       11: begin;
            xm:= 649;
            ym:= 261;
           end;
       12: begin;
            xm:= 670;
            ym:= 263;
           end;
       13: begin;
            xm:= 696;
            ym:= 265;
           end;
       14: begin;
            xm:= 721;
            ym:= 265;
           end;
       15: begin; //Row 3
            xm:= 579;
            ym:= 286;
           end;
       16: begin;
            xm:= 600;
            ym:= 286;
           end;
       17: begin;
            xm:= 623;
            ym:= 286;
           end;
       18: begin;
            xm:= 647;
            ym:= 286;
           end;
       19: begin;
            xm:= 671;
            ym:= 287;
           end;
       20: begin;
            xm:= 697;
            ym:= 285;
           end;
       21: begin;
            xm:= 718;
            ym:= 286;
           end;
       22: begin; //Row 4
            xm:= 580;
            ym:= 311;
           end;
       23: begin;
            xm:= 600;
            ym:= 311;
           end;
       24: begin;
            xm:= 627;
            ym:= 313;
           end;
       25: begin;
            xm:= 646;
            ym:= 309;
           end;
       26: begin;
            xm:= 627;
            ym:= 312;
           end;
       27: begin;
            xm:= 694;
            ym:= 310;
           end;
       28: begin;
            xm:= 721;
            ym:= 309;
           end;
       29: begin;  //Row 5
            xm:= 577;
            ym:= 335;
           end;
       30: begin;
            xm:= 601;
            ym:= 334;
           end;
       31: begin;
            xm:= 624;
            ym:= 338;
           end;
       32: begin;
            xm:= 649;
            ym:= 336;
           end;
       33: begin;
            xm:= 673;
            ym:= 334;
           end;
       34: begin;
            xm:= 697;
            ym:= 335;
           end;
       35: begin;
            xm:= 720;
            ym:= 335;
           end;
       36: begin; //Row 6
            xm:= 572;
            ym:= 356;
           end;
       37: begin;
            xm:= 599;
            ym:= 359;
           end;
       38: begin;
            xm:= 624;
            ym:= 356;
           end;
       39: begin;
            xm:= 649;
            ym:= 359;
           end;
       40: begin;
            xm:= 671;
            ym:= 362;
           end;
       41: begin;
            xm:= 649;
            ym:= 362;
           end;
       42: begin;
            xm:= 720;
            ym:= 361;
           end;
       43: begin; //Row 7
            xm:= 704;
            ym:= 544;
           end;
       44: begin;
            xm:= 731;
            ym:= 552;
           end;
       45: begin;
            xm:= 755;
            ym:= 550;
           end;
       46: begin;
            xm:= 781;
            ym:= 550;
           end;
       47: begin;
            xm:= 800;
            ym:= 552;
           end;
       48: begin;
            xm:= 827;
            ym:= 552;
           end;
       49: begin;
            xm:= 851;
            ym:= 550;
           end;
       50: begin; //Row 8
            xm:= 705;
            ym:= 573;
           end;
       51: begin;
            xm:= 731;
            ym:= 571;
           end;
       52: begin;
            xm:= 752;
            ym:= 572;
           end;
       53: begin;
            xm:= 781;
            ym:= 572;
           end;
       54: begin;
            xm:= 801;
            ym:= 572;
           end;
       55: begin;
            xm:= 826;
            ym:= 572;
           end;
       56: begin;
            xm:= 851;
            ym:= 562;
           end;
       57: begin; //Row 9
            xm:= 704;
            ym:= 598;
           end;
       58: begin;
            xm:= 729;
            ym:= 597;
           end;
       59: begin;
            xm:= 753;
            ym:= 598;
           end;
       60: begin;
            xm:= 776;
            ym:= 599;
           end;
       61: begin;
            xm:= 802;
            ym:= 599;
           end;
       62: begin;
            xm:= 822;
            ym:= 599;
           end;
       63: begin;
            xm:= 850;
            ym:= 599;
           end;
      end;
      If (FindColorTolerance(x, y, 65280, 680, 440, 870, 456, 5) or
          FindColorTolerance(x, y, 65280, 680, 600, 870, 625, 5)) Then
       begin;
        Result:= True;
       end else
        begin;
        Result:= False;
       end;
      If (Cast) Then
       begin;
        MMouse(xm, ym, 5, 5);
        Wait(500+Random(1000));
        Mouse(xm, ym, 5, 5, True);
       end else
        begin;
        MMouse(xm, ym, 5, 5);
        Wait(3000+Random(3000));
        MMouse(xz, yz, 5, 5);
       end;
     end;

    begin
     WriteLn('spell 36 makes the box to top');
     WriteLn('Green spell color is: 65280');
     HoverSpell(36, False);
     If not (HoverSpell(36, False)) Then
      Writeln('TEST COMPLETE');
    end.

    This on it a little different and works a little different too. Spells cords start at 0.
    SCAR Code:
    program New;
    {.Include SRL/SRL.scar}

    Function HoverSpell(Row, Column: Integer; Cast: Boolean): Boolean;
     Var i, b, xm, ym: Integer;
     begin;
      If not (GetCurrentTab = 7)Then
       begin;
        MouseBox(730, 175, 740, 205, 1);
        Wait(500+Random(1000));
       end;
      xm:= 575;
      ym:= 235;
      For I:=1 to Row do
       begin;
        ym:= ym + 30 - 2;
       end;
      For B:=1 to Column do
       begin;
        xm:= xm + 25 - 2;
       end;
      If (FindColorTolerance(x, y, 65280, 680, 440, 870, 456, 5) or
          FindColorTolerance(x, y, 65280, 680, 600, 870, 625, 5)) Then
       begin;
        Result:= True;
       end else
        begin;
        Result:= False;
       end;
      If (Cast) Then
       begin;
        MMouse(xm, ym, 3, 3);
        Wait(500+Random(1000));
        Mouse(xm, ym, 3, 3, True);
       end else
       begin;
        MMouse(xm, ym, 3, 3);
        Wait(3000+Random(3000));
        MMouse(xm, ym, 3, 3);
       end;
     end;

    begin
     BenMouse:= True;
     HoverSpell(1, 3, False);
     If (HoverSpell(1, 3, False)) Then  //Wind bolt
      WriteLn('YAY!');
    end.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  2. #2
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    These look nice That is a gigantic case though.

  3. #3
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Yeah. But it works fast enough for me. I don't think it actually loads the rest of the case stement except for whats called.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  4. #4
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    True. It doesn't...are you sure you need all the begins and ends though?

    As for this:

    SCAR Code:
    MMouse(xm, ym, 3, 3);
        Wait(500+Random(1000));
        Mouse(xm, ym, 3, 3, True);

    What's the point? Mouse already waits a sufficient time before clicking...unless you wanted to check for UpText?

    Good work though. I bet it took a long time getting all those co-ordinates.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  5. #5
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Dunno, the begins were just to be safe. (Methinks more than one command needs begin-end; Like in an If statement).

    It didn't take that long... I used a for loop to create the case statement .
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I like it. Maybe you could replace the numbers with the actually names of the spells so people won't have to count the spell numbers.

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    When I feel like it...

    But for the anti-ban part of it, making a random number to hover over the spell would be easier than a random case.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  8. #8
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    This is nice, can I use it in a script if I credit fully?

  9. #9
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Yes... Thats why I posted it here feel free.

    I'd like to see my name somewhere too.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  10. #10
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,069
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    that sucks
    FORMERLY BORN2CODE | Play Internet Games
    http://img147.imageshack.us/img147/2084/sigg.png

  11. #11
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    What sucks? Tell me more.

    Really... Post something usefull.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  12. #12
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by born2code View Post
    that sucks
    Shutup Travis. I'd like to see you try.

    Also, r0bot...you could do something like:
    SCAR Code:
    case which of

        1: Spell := WindStrike;

        2: Spell := WaterStrike;

      end;
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  13. #13
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    *gasp*


    That would take a long time.

    But I could do it... when I'm bored
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  14. #14
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Ask if you need help.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  15. #15
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Nah. I don't think I do, but thats a pretty big case... And I can use a loop to generate it!
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Tv's Staff Spell Selecter
    By Tv-XxX in forum Research & Development Lounge
    Replies: 6
    Last Post: 06-11-2008, 11:32 AM
  2. world of warcraft cheat? spell editor/stats ect ect
    By solemn wishes in forum Gaming
    Replies: 8
    Last Post: 11-13-2007, 04:49 AM
  3. Spell Checker...
    By Dankness in forum SRL Site Discussion
    Replies: 4
    Last Post: 11-05-2006, 01:03 AM

Posting Permissions

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