Results 1 to 8 of 8

Thread: need more help please

  1. #1
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need more help please

    i know I've made 2 scripting help threads today, but the only way I'm going to get good at scripting is by asking all you professionals heres a script that casts a specific spell on a specific monster, without using a staff. so it clicks the spell, then clicks the monster and repeats. only problem I'm having is the mouse is Flying through the thing. I'm using MoveMouseSmooth too.. i don't get why its going SO fast. anyway, heres the script. originally made to help somebody who needed a zombie killing script.

    SCAR Code:
    program ZombieKiller;

    const

    ZombieColor    =4088199;  //set zombie color
    SpellBookColor =4940670;  //set spell book tab color
    SpellColor       =131074;  //set spell color in example air blast color.
    procedure AttackZombie;
    var x,y:integer;
    begin
    if (FindColorSpiral(x,y, ZombieColor,0,0,271,172)) then
     begin
     if (FindColorSpiral(x,y,SpellBookColor,0,0,647,292)) then
     MoveMouseSmooth(x,y)
     wait(2000+random(50))
     ClickMouse(x,y,true)
     end;
    end;
    procedure CastSpell;
    var x,y:integer;
    begin
    if(FindColorSpiral(x,y,SpellColor,0,0,647,292)) then
     begin
     MoveMouseSmooth(x,y)
     wait(2000+random(50))
     ClickMouse(x,y,true)
     end;
    end;
    procedure ClickZombie;
    var x,y:integer;
    begin
    if(findColorSpiral(x,y,ZombieColor,0,0,271,172)) then
     begin
     MoveMouseSmooth(x,y)
     wait(2000+random(25))
     ClickMouse(x,y,true)
     end;
    end;
    begin
    SetupSRL;
    repeat
    AttackZombie;
    CastSpell;
    ClickZombie;
    until(false)
    end.
    anybody know how to slow it down a little?

  2. #2
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add
    SCAR Code:
    MouseSpeed := 12 + random(3);
    The higher the mouse speed, the slower the mouse will go. Add that somewhere at the begining of your main loop.

  3. #3
    Join Date
    Dec 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't use MoveMouseSmooth, instead use MMouse, and instead of using ClickMouse use Mouse with SRL.

  4. #4
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Study below


    SCAR Code:
    program ZombieKiller;
     
    const
     
    ZombieColor    = 4088199;  //set zombie color
    SpellBookColor = 4940670;  //set spell book tab color
    SpellColor       = 131074;  //set spell color in example air blast color.
    procedure AttackZombie;
    var x,y:integer;
    begin
      if (FindColorSpiral(x,y, ZombieColor,0,0,271,172)) then
      begin
        if (FindColorSpiral(x,y,SpellBookColor,0,0,647,292)) then
        MMouse(x, y, 2, 2)
        wait(1000+random(50))
        Mouse(x,y, 2, 2, true)
      end;
    end;


    procedure CastSpell;
    var x,y:integer;
    begin
      if(FindColorSpiral(x,y,SpellColor,0,0,647,292)) then
      begin
        MMouse(x, y);
        wait(1000+random(50))
        Mouse(x,y, 2, 2, true)
      end;
    end;

    procedure ClickZombie;
    var x,y:integer;
    begin
      if(findColorSpiral(x,y,ZombieColor,0,0,271,172)) then
      begin
        MMouse(x, y, 2, 2)
        wait(2000+random(25))
        Mouse(x,y, 2, 2, true)
      end;
    end;


    begin
      SetupSRL;
      repeat
        AttackZombie;
        CastSpell;
        ClickZombie;
      until(false)
    end.

    I ddin't actually look at your things much, your procs, but I just noticed I hope ur in very early alpha. but ya. in a hury
    Sorry
    bye.

    -ejj

    hakuna matata ;)

  5. #5
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ejjman1 View Post
    Study below
    I ddin't actually look at your things much, your procs, but I just noticed I hope ur in very early alpha. but ya. in a hury
    Sorry
    bye.

    -ejj
    well, you couldn't really call it alpha lol.. i barely know what I'm doing, just trying to be a scripter. still learning.

    and thanks for all the help uber and junior. you guys are awsome
    but junior, when i put the MouseSpeed := 12 + random(3); in my script, i put it as a const. like right with the colors and stuff. is that where i'm supposed to put it? cause when i rune the script it says
    Line 8: [Error] (17669:1): Duplicate identifier '' in script and line 8 is where i put the MouseSpeed.

  6. #6
    Join Date
    Dec 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no, you put it in the main loop, like this:
    SCAR Code:
    begin
      SetupSRL;
      repeat
        MouseSpeed := 12 + Random(3);
        AttackZombie;
        CastSpell;
        ClickZombie;
      until(false)
    end.

  7. #7
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nucular View Post
    no, you put it in the main loop, like this:
    SCAR Code:
    begin
      SetupSRL;
      repeat
        MouseSpeed := 12 + Random(3);
        AttackZombie;
        CastSpell;
        ClickZombie;
      until(false)
    end.
    ok thanks dude your awsome. I'm on my way to becoming a nooby scripter lol.

  8. #8
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can also use the SRL mouse() procedure, which has a pretty good speed setting already, and it will click for you automatically. Sometimes I use movemousesmoothex() which allows you to set a speed in one of the arguments, and you can also make it more human like.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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