Results 1 to 24 of 24

Thread: Bitmap variable problem.

  1. #1
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Red face Bitmap variable problem.

    Update:

    Alright, I believe this is my last problem.

    Code:
    procedure FireRain;
    var i, fire, bandage : Integer;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      if FindBitmap(fire, x, y) then
      MoveMouseSmooth(x, y);
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
      Writeln('Healing with Bandage.');
      if FindBitmap(bandage, x, y) then;
      MoveMouseSmooth(x, y);
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;
    I can see what's wrong here where it will not do the bandage command after the fire rain command.
    I tried fixing the problem by using this.

    Code:
    procedure FireRain;
    var i, fire, bandage : Integer;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      if FindBitmap(fire, x, y) then
      MoveMouseSmooth(x, y);
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
    end;
    begin
      Writeln('Healing with Bandage.');
      if FindBitmap(bandage, x, y) then;
      MoveMouseSmooth(x, y);
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;
    end;
    Though returns with this error
    Code:
    Line 103: [Error] (103:1): Identifier expected in script
    Which is the 'end;' after 'Wait(6 * 1500+random(50));'
    Any ideas? ^^
    Last edited by Littma; 01-26-2010 at 07:33 PM.

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    You can't have a variable inside a procedure that has the same name as the procedure.
    Rename the bitmap to bandage2 or the procedure to bandage2 and it will work

  3. #3
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    You can't have a variable inside a procedure that has the same name as the procedure.
    Rename the bitmap to bandage2 or the procedure to bandage2 and it will work
    Still the script has multiple flaws.
    There used to be something meaningful here.

  4. #4
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    You can't have a variable inside a procedure that has the same name as the procedure.
    Rename the bitmap to bandage2 or the procedure to bandage2 and it will work
    Indeed, you are right.
    What would I do without you

    Quote Originally Posted by Frement View Post
    Still the script has multiple flaws.
    Elaborate? I do see how the mousing could get messed up when finding the bitmaps, any advice?

  5. #5
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by Littma View Post
    Indeed, you are right.
    What would I do without you


    Elaborate? I do see how the mousing could get messed up when finding the bitmaps, any advice?
    SCAR Code:
    program zOMGbotBETA;

    var i, x, y, teflon, bitmap : Integer;
        fire, bandage, divinity : Integer;
        sphere : Integer;

    procedure LoadBitmaps;
    begin
      fire := BitmapFromString(16, 12, 'beNpNkV1I0wEUxX9t2txg/+na' +
           'FN3a5iCRSW5gpYwKyxIibA/2VERhIqyICIqKQUREhVpuWcqcE/yoI' +
           'VNIRbJI+6AJg0W++JQPrZIK+vAhqAi5/bWIDufhwj3n3nO5Jt7scY' +
           '7CfCUyWS9h23s/2TKS8LmxSC6YZLymt4RuE1MbkbbKb8dLonp6DCw' +
           'dtchgpYQMPw4UD+uZr0cueT8eLJgqZ9DEqAu5aZfrjsQGTkCfXfVW' +
           'ydmCbIChIl7sRm54pN2XKKRHy4AZCTklsSW9nyu5nDKibpTTjuVm1' +
           '7iLV4eQuFvaHYkKOnLpK2QxiCQ3L53zhNfRmsNJC8vny+SYZdzCUx' +
           '8y6JC4OXuELoWhUl63FMj9WomUx+xcy6HTzPfIVrnonXEz40Au22T' +
           'AKh3Ks1IeFfOyEZneIYmGEQ+da+kykA4Qqss/41MCOcz51djrpcf5' +
           'qXlNSs+Can++Tx5uv+clrOEqxHSkapFMVCWrkFi1tNVOW3lr4qt6V' +
           'H/DEx9xPd2QyDPeYqXIRKsk0/LHIrFNi3uts2bmNSwofNjJ3DYkuO' +
           'uxu3jUaOyHB1r+Tl7V/wxpfzU5p82klLwxHWMVSK9/qck3YdfF4a7' +
           '6Vqf+f72KTA1TFpIGxtQ84bp3QVtM4Tao7VlXftq6kucfVX1Ez7CJ' +
           'SfuK+Mvh6gi0woiiuZPLEMz8Bp9d0Q4=');
      bandage := BitmapFromString(14, 10, 'beNo9zM0vw3AAxnF/iT/Bh' +
           'ZC4uRNOSCQOIi7inVAmi4uXhIWglBjd1lnbdVsXHSPzErLMWrq2W7' +
           'PZZjhIvMTYRruR/TSW+OY5fvJMNLrhAe+2jtmCXPDQM2fNirgiWCQ' +
           'cAiKqBtau0MF7Zto51fTg0nvgPudSt2d9+InFMqL90qYHN7TKm9Ur' +
           'E0i5gUyCKMXvDB7MttKGzkOk/yWIKjL1cW0DSUYRCJBgilHavz2Wv' +
           'UQVziRaoYuVTri/jsd1Qctoht2R6RmNJbzLR8hwRnB9xzwgdQAipL' +
           'bH/bmOhqr6mvKAsbfAmwohK4jv5SN0TnIrMV86RL8HMR6bLEp4GIM' +
           'Ah5T9FTT2gPDu7b6BI2a+b0/fZV8udvwpUEB2FHgMRHDAdZXwRndN' +
           'nNI9eBfufKuFxOFX8sRPGnKi8yfi0D5vSL1mSjIAt611VbyezQvke' +
           'Opk8U2yqQkmF3bkJUcxbFdZ9F9qsUi7aaQ2L24WkzY/Mf4qWFTZJV' +
           'Gzn6w5Sk5xSGVpmjxfajYOVDOGlvQ1kpbMStwO7jw/IhEyQ8QvNdo' +
           'aGQ==');
      divinity := BitmapFromString(14, 13, 'beNpFkc1rE0EYh/2f/Fs8' +
           '9ObFUBLFUA20WlsEexCpp1LpRXoSEUQjRYM0opFKbTf9QAulBNvar' +
           'BuzSXaT2dnsZx5ndhVfXoY5PPN7n5nZYQLSw5U8WtkvlupXp2rXrr' +
           'ybnno7U/78cLkpQ/wEqRrGMYla4czm9mzjerFZnm6Wi42bt15bLq5' +
           'PAF7CIEBEyCgVCHWqvkVl7nuptHt3Yb/2qeehMTnRq+ngxHrjI1Rs' +
           '2+XjLveWjj9s0w3oRWmQwc6YlsmNymJlfjEENwpHcPCT6hbGKUMyN' +
           'yKRJm07NY48jLVLWfkpA8JjTz5Y3z4Z4So9JkFGnlts1H9gFHJYxT' +
           'rILsnqxp6FJpXPKIkvesL45igBxeSkmtWdpB1lG2hsmCJSLWC6XAz' +
           '4evSfVDXMojohdqQxlWkL5YDyt7Tm5bwVOVBYxEk38vLROexz3tfv' +
           '+Y/UmaMss3HY7si/2Jv3h0+f7Tx+0piZf5XdqLBW0GQ/pGVR3Wyd/' +
           'c4yY/2VPcHS8uad+7U8MyfbNi+q5txC7flL07IZJ3gxfY/TX3z5Aw' +
           '3ns9g=');
      teflon := BitmapFromString(15, 15, 'beNo90MlrE2EYBnD/Ai8qQV' +
           'DxItqoFY1ibRNMDdUszb42k8xMFpNMZkkySSaZyWSPTWvSlJqLKdX' +
           'QQ0V6EU8ePCgILhBPnmoPIh6KUItHBWF820E/Xj7m8Hsfnm+2v3/7' +
           'LW28fE/We83BExgs3whk6yqj74zaqBhXHzt/46Rq+vgljeLilEI5w' +
           'XVXSyuPiWoX55rp+T7TWkHzzTsodeqaDjDIE1e0R8auA1Zbg0R1KX' +
           'XvQVRoo7k6xMLtz1SDuYYtnr+gsx9VToBUai2uZBFhxAjfBhkTF0E' +
           'GszXACFuDCfNtc5SdDaf1KGUKpcyRDMbW4uVOhJ9PVDqhQgs+AEMN' +
           'NyXAQHl/ujKXKoN0EoVSby1R6YKEcOgcYKuuZAFqAPMyIngwEOulS' +
           'zMIcXZSf1mtu3pzRq7hJov+dNlBFJzJIqzA7aEEWWo90VCuIY0Ghw' +
           '4O1PDSAqzYExxISHaRvAGjjTjjSHA410qUFqVRTPbQZC4lWu+ycDc' +
           'ebmD5JlSFnwA1fKRAVpZuuSPAZCwuP4oLCz6S760/6ww3bZGMPcrC' +
           'WMNpA0KYgiTMfwxne+/P609ff0qSNUQbkLgZI2/7YhprcBaldO6I2' +
           'hIYDVTyAK7113cl6fPuL6bWdcVYWAH2bmtn2hk6fHr83KT+H95Pfr' +
           'u1sydJ+XZ/48UbotQ2BQkIhA4fv/wYmzJEudbBA2OD2D5m6st4tm7' +
           'BKTQt1vtDLFNG6JInwd1f21xYfap14HKyjDU21IwzOndI60D9VNEd' +
           'z5oxOsCIw+ev+M7gw1/lVhrk');
      sphere := BitmapFromString(16, 16, 'beNo9z11MUnEYBvC/iCio82' +
           'OrprZZdtEsXVpzrbxotrWumm1d19pabn3MavMjP9eMTEOxY4mBaJr' +
           'SVCxCW9PM1EQpPAgeOYiCH8BARVHwIJYhbySrZ+/l73m2N3WsNmiu' +
           'jmXEGHO5wZ925UB2Ocz1zq3X8EsKnnGwz4FpzmVf3LFqKRvpMak8f' +
           'IatMWKjAhnY+8Y9A0AIl6zYuqcZNt8AjMKGlnKY1xyGZWrWvqZaXV' +
           'FSohC7kG6pQvPFLNmOFKztXgtGuYVerwRcfbsuYosyONbIlQ3SQZH' +
           'bTsLbgXRNaLKJZS2gDYmu6GEQlgQwW726IXbbup2WPteWBtx6cOrA' +
           'oQHbOPQEzXQzF3kB02wmfj+sU3rNBD1gEniNreu6FpNbBtPvtk0ys' +
           'E2B4RvYccDQUA0a4SCcjb6XMgbywz6ILy0ADktiIBotC52ba1/B6G' +
           'sNgVML5Hu4gG5ksrI5gapymqoEyfNoA6Uxw6LLCyCD5Xb4/Rk2ewF' +
           'IICUwgFH1VycA56O95KMfBYFTRSztnaDhorjRVxnq5TqgmkD/DGxt' +
           'wMtU1WYouKlywLP8lVykKKRpH9KnS8LJwkhFbkRfflT3o2gp51C/p' +
           'Rx4Z1TcRCU/ecYn/T4PycsQURagZtOV5WGqyhjyeaxaFKfuTdGtF0' +
           'NjmqIuaZ6TMP/f+1JB13AYU4/RWE3IZAWTqA2dbAtXSOLk1tue5pN' +
           'yTjz5IsmO80/5z+cL0QQ3wsBlaBrC9YLgmY6oeXHkhDLdSuVDU8qo' +
           'MNn49ODsP7+3z9RWhmiqApXCULItRCfdv/jlmFmSpP5ZCdjx/qoEJ' +
           'TuW2Ps3i5/11wujZ/hRJC9c2RW/KDlg6D1qrYsbE19cWMaAd34cS9' +
           'NyEnX+fb9/Ga1oODJVfRhvOWt8e86qfgDGeljqAL0I7p3+mJM09OQ' +
           'E4ZP+80Vx3UuUAi6A/lbobIWREci5a86+qVPKQITBrfTB3D8vGdKo' +
           '');
    end;

    procedure FireRain;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 436, 539, 1);
      MoveMouseSmooth(x, y)
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
      Writeln('Healing with Bandage.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 491, 540, 1);
      MoveMouseSmooth(x, y)
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;

    procedure BandageProc;
    begin
    repeat
      Wait(2 * 500+random(50));
      Writeln('Healing with Bandage.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 491, 540, 1);
      MoveMouseSmooth(x, y)
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
    until(i = 1);
    end;

    procedure DivinityProc;
    begin
      Wait(2 * 500+random(50));
      Writeln('Casting Divinity.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 577, 540, 1);
      MoveMouseSmooth(x,y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50));
      ReleaseMouse(x, y, True);
      Wait(2 * 2500+random(50));
    end;

    procedure TeflonSpray;
    begin
      Wait(2 * 250+random(50));
      Writeln('Casting Teflon Spray.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 604, 540, 1);
      MoveMouseSmooth(x,y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50));
      ReleaseMouse(x, y, True);
      Wait(2 * 1000+random(50));
    end;

    procedure SphereProc;
    begin
      Wait(2 * 250+random(50));
      Writeln('Casting Sphere');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 630, 537, 1);
      MoveMouseSmooth(x, y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50))
      ReleaseMouse(x, y, True);
      Wait(2 * 1000+random(50));
    end;

    begin
    LoadBitmaps;
      repeat
        FireRain;
        DivinityProc;
        FireRain;
        TeflonSpray;
        FireRain;
        SphereProc;
      until(False);
    end.

    Theres atm working version.

    E: Fixed it up a little.
    Last edited by Frement; 01-26-2010 at 06:00 PM.
    There used to be something meaningful here.

  6. #6
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    SCAR Code:
    program zOMGbotBETA;

    var i, x, y, teflon, bitmap : Integer;
        fire, bandage, divinity : Integer;
        sphere : Integer;

    procedure LoadBitmaps;
    begin
      fire := BitmapFromString(16, 12, 'beNpNkV1I0wEUxX9t2txg/+na' +
           'FN3a5iCRSW5gpYwKyxIibA/2VERhIqyICIqKQUREhVpuWcqcE/yoI' +
           'VNIRbJI+6AJg0W++JQPrZIK+vAhqAi5/bWIDufhwj3n3nO5Jt7scY' +
           '7CfCUyWS9h23s/2TKS8LmxSC6YZLymt4RuE1MbkbbKb8dLonp6DCw' +
           'dtchgpYQMPw4UD+uZr0cueT8eLJgqZ9DEqAu5aZfrjsQGTkCfXfVW' +
           'ydmCbIChIl7sRm54pN2XKKRHy4AZCTklsSW9nyu5nDKibpTTjuVm1' +
           '7iLV4eQuFvaHYkKOnLpK2QxiCQ3L53zhNfRmsNJC8vny+SYZdzCUx' +
           '8y6JC4OXuELoWhUl63FMj9WomUx+xcy6HTzPfIVrnonXEz40Au22T' +
           'AKh3Ks1IeFfOyEZneIYmGEQ+da+kykA4Qqss/41MCOcz51djrpcf5' +
           'qXlNSs+Can++Tx5uv+clrOEqxHSkapFMVCWrkFi1tNVOW3lr4qt6V' +
           'H/DEx9xPd2QyDPeYqXIRKsk0/LHIrFNi3uts2bmNSwofNjJ3DYkuO' +
           'uxu3jUaOyHB1r+Tl7V/wxpfzU5p82klLwxHWMVSK9/qck3YdfF4a7' +
           '6Vqf+f72KTA1TFpIGxtQ84bp3QVtM4Tao7VlXftq6kucfVX1Ez7CJ' +
           'SfuK+Mvh6gi0woiiuZPLEMz8Bp9d0Q4=');
      bandage := BitmapFromString(14, 10, 'beNo9zM0vw3AAxnF/iT/Bh' +
           'ZC4uRNOSCQOIi7inVAmi4uXhIWglBjd1lnbdVsXHSPzErLMWrq2W7' +
           'PZZjhIvMTYRruR/TSW+OY5fvJMNLrhAe+2jtmCXPDQM2fNirgiWCQ' +
           'cAiKqBtau0MF7Zto51fTg0nvgPudSt2d9+InFMqL90qYHN7TKm9Ur' +
           'E0i5gUyCKMXvDB7MttKGzkOk/yWIKjL1cW0DSUYRCJBgilHavz2Wv' +
           'UQVziRaoYuVTri/jsd1Qctoht2R6RmNJbzLR8hwRnB9xzwgdQAipL' +
           'bH/bmOhqr6mvKAsbfAmwohK4jv5SN0TnIrMV86RL8HMR6bLEp4GIM' +
           'Ah5T9FTT2gPDu7b6BI2a+b0/fZV8udvwpUEB2FHgMRHDAdZXwRndN' +
           'nNI9eBfufKuFxOFX8sRPGnKi8yfi0D5vSL1mSjIAt611VbyezQvke' +
           'Opk8U2yqQkmF3bkJUcxbFdZ9F9qsUi7aaQ2L24WkzY/Mf4qWFTZJV' +
           'Gzn6w5Sk5xSGVpmjxfajYOVDOGlvQ1kpbMStwO7jw/IhEyQ8QvNdo' +
           'aGQ==');
      divinity := BitmapFromString(14, 13, 'beNpFkc1rE0EYh/2f/Fs8' +
           '9ObFUBLFUA20WlsEexCpp1LpRXoSEUQjRYM0opFKbTf9QAulBNvar' +
           'BuzSXaT2dnsZx5ndhVfXoY5PPN7n5nZYQLSw5U8WtkvlupXp2rXrr' +
           'ybnno7U/78cLkpQ/wEqRrGMYla4czm9mzjerFZnm6Wi42bt15bLq5' +
           'PAF7CIEBEyCgVCHWqvkVl7nuptHt3Yb/2qeehMTnRq+ngxHrjI1Rs' +
           '2+XjLveWjj9s0w3oRWmQwc6YlsmNymJlfjEENwpHcPCT6hbGKUMyN' +
           'yKRJm07NY48jLVLWfkpA8JjTz5Y3z4Z4So9JkFGnlts1H9gFHJYxT' +
           'rILsnqxp6FJpXPKIkvesL45igBxeSkmtWdpB1lG2hsmCJSLWC6XAz' +
           '4evSfVDXMojohdqQxlWkL5YDyt7Tm5bwVOVBYxEk38vLROexz3tfv' +
           '+Y/UmaMss3HY7si/2Jv3h0+f7Tx+0piZf5XdqLBW0GQ/pGVR3Wyd/' +
           'c4yY/2VPcHS8uad+7U8MyfbNi+q5txC7flL07IZJ3gxfY/TX3z5Aw' +
           '3ns9g=');
      teflon := BitmapFromString(15, 15, 'beNo90MlrE2EYBnD/Ai8qQV' +
           'DxItqoFY1ibRNMDdUszb42k8xMFpNMZkkySSaZyWSPTWvSlJqLKdX' +
           'QQ0V6EU8ePCgILhBPnmoPIh6KUItHBWF820E/Xj7m8Hsfnm+2v3/7' +
           'LW28fE/We83BExgs3whk6yqj74zaqBhXHzt/46Rq+vgljeLilEI5w' +
           'XVXSyuPiWoX55rp+T7TWkHzzTsodeqaDjDIE1e0R8auA1Zbg0R1KX' +
           'XvQVRoo7k6xMLtz1SDuYYtnr+gsx9VToBUai2uZBFhxAjfBhkTF0E' +
           'GszXACFuDCfNtc5SdDaf1KGUKpcyRDMbW4uVOhJ9PVDqhQgs+AEMN' +
           'NyXAQHl/ujKXKoN0EoVSby1R6YKEcOgcYKuuZAFqAPMyIngwEOulS' +
           'zMIcXZSf1mtu3pzRq7hJov+dNlBFJzJIqzA7aEEWWo90VCuIY0Ghw' +
           '4O1PDSAqzYExxISHaRvAGjjTjjSHA410qUFqVRTPbQZC4lWu+ycDc' +
           'ebmD5JlSFnwA1fKRAVpZuuSPAZCwuP4oLCz6S760/6ww3bZGMPcrC' +
           'WMNpA0KYgiTMfwxne+/P609ff0qSNUQbkLgZI2/7YhprcBaldO6I2' +
           'hIYDVTyAK7113cl6fPuL6bWdcVYWAH2bmtn2hk6fHr83KT+H95Pfr' +
           'u1sydJ+XZ/48UbotQ2BQkIhA4fv/wYmzJEudbBA2OD2D5m6st4tm7' +
           'BKTQt1vtDLFNG6JInwd1f21xYfap14HKyjDU21IwzOndI60D9VNEd' +
           'z5oxOsCIw+ev+M7gw1/lVhrk');
      sphere := BitmapFromString(16, 16, 'beNo9z11MUnEYBvC/iCio82' +
           'OrprZZdtEsXVpzrbxotrWumm1d19pabn3MavMjP9eMTEOxY4mBaJr' +
           'SVCxCW9PM1EQpPAgeOYiCH8BARVHwIJYhbySrZ+/l73m2N3WsNmiu' +
           'jmXEGHO5wZ925UB2Ocz1zq3X8EsKnnGwz4FpzmVf3LFqKRvpMak8f' +
           'IatMWKjAhnY+8Y9A0AIl6zYuqcZNt8AjMKGlnKY1xyGZWrWvqZaXV' +
           'FSohC7kG6pQvPFLNmOFKztXgtGuYVerwRcfbsuYosyONbIlQ3SQZH' +
           'bTsLbgXRNaLKJZS2gDYmu6GEQlgQwW726IXbbup2WPteWBtx6cOrA' +
           'oQHbOPQEzXQzF3kB02wmfj+sU3rNBD1gEniNreu6FpNbBtPvtk0ys' +
           'E2B4RvYccDQUA0a4SCcjb6XMgbywz6ILy0ADktiIBotC52ba1/B6G' +
           'sNgVML5Hu4gG5ksrI5gapymqoEyfNoA6Uxw6LLCyCD5Xb4/Rk2ewF' +
           'IICUwgFH1VycA56O95KMfBYFTRSztnaDhorjRVxnq5TqgmkD/DGxt' +
           'wMtU1WYouKlywLP8lVykKKRpH9KnS8LJwkhFbkRfflT3o2gp51C/p' +
           'Rx4Z1TcRCU/ecYn/T4PycsQURagZtOV5WGqyhjyeaxaFKfuTdGtF0' +
           'NjmqIuaZ6TMP/f+1JB13AYU4/RWE3IZAWTqA2dbAtXSOLk1tue5pN' +
           'yTjz5IsmO80/5z+cL0QQ3wsBlaBrC9YLgmY6oeXHkhDLdSuVDU8qo' +
           'MNn49ODsP7+3z9RWhmiqApXCULItRCfdv/jlmFmSpP5ZCdjx/qoEJ' +
           'TuW2Ps3i5/11wujZ/hRJC9c2RW/KDlg6D1qrYsbE19cWMaAd34cS9' +
           'NyEnX+fb9/Ga1oODJVfRhvOWt8e86qfgDGeljqAL0I7p3+mJM09OQ' +
           'E4ZP+80Vx3UuUAi6A/lbobIWREci5a86+qVPKQITBrfTB3D8vGdKo' +
           '');
    end;

    procedure FireRain;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 436, 539, 1);
      MoveMouseSmooth(x, y)
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
      Writeln('Healing with Bandage.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 491, 540, 1);
      MoveMouseSmooth(x, y)
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;

    procedure BandageProc;
    begin
    repeat
      Wait(2 * 500+random(50));
      Writeln('Healing with Bandage.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 491, 540, 1);
      MoveMouseSmooth(x, y)
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
    until(i = 1);
    end;

    procedure DivinityProc;
    begin
      Wait(2 * 500+random(50));
      Writeln('Casting Divinity.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 577, 540, 1);
      MoveMouseSmooth(x,y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50));
      ReleaseMouse(x, y, True);
      Wait(2 * 2500+random(50));
    end;

    procedure TeflonSpray;
    begin
      Wait(2 * 250+random(50));
      Writeln('Casting Teflon Spray.');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 604, 540, 1);
      MoveMouseSmooth(x,y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50));
      ReleaseMouse(x, y, True);
      Wait(2 * 1000+random(50));
    end;

    procedure SphereProc;
    begin
      Wait(2 * 250+random(50));
      Writeln('Casting Sphere');
      FindBitmapToleranceIn(bitmap, x, y, 0, 0, 630, 537, 1);
      MoveMouseSmooth(x, y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50))
      ReleaseMouse(x, y, True);
      Wait(2 * 1000+random(50));
    end;

    begin
    LoadBitmaps;
      repeat
        FireRain;
        DivinityProc;
        FireRain;
        TeflonSpray;
        FireRain;
        SphereProc;
      until(False);
    end.

    Theres atm working version.

    E: Fixed it up a little.
    Testing now, will edit my post when done. I see the layout and scripting style. Cleaner, and much more efficient. I'll get back to you on the progress.
    ]
    Last edited by Littma; 01-26-2010 at 06:08 PM.

  7. #7
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    Still the script has multiple flaws.
    No, it had one more flaw, and that was the bitmap that was named wrong. All the other "flaws" were procedures that you renamed. I am sure they would've worked fine without "Proc" after the name.

    EDIT: You updated the post, it looks much cleaner and easier to read now
    Last edited by Zyt3x; 01-26-2010 at 06:05 PM.

  8. #8
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    No, it had one more flaw, and that was the bitmap that was named wrong. All the other "flaws" were procedures that you renamed. I am sure they would've worked fine without "Proc" after the name
    Well the bitmaps had the same names as the procedure, so i think they wouldnt have worked with the same name, or the bitmap names should have been changed.
    There used to be something meaningful here.

  9. #9
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Hmm I see one more flaw..
    SCAR Code:
    program zOMGbotBETA;

    var i, x, y, teflon : Integer;
        fire, bandage, divinity : Integer;
        sphere : Integer;

    procedure LoadBitmaps;
    begin
      fire := BitmapFromString(16, 12, 'beNpNkV1I0wEUxX9t2txg/+na' +
           'FN3a5iCRSW5gpYwKyxIibA/2VERhIqyICIqKQUREhVpuWcqcE/yoI' +
           'VNIRbJI+6AJg0W++JQPrZIK+vAhqAi5/bWIDufhwj3n3nO5Jt7scY' +
           '7CfCUyWS9h23s/2TKS8LmxSC6YZLymt4RuE1MbkbbKb8dLonp6DCw' +
           'dtchgpYQMPw4UD+uZr0cueT8eLJgqZ9DEqAu5aZfrjsQGTkCfXfVW' +
           'ydmCbIChIl7sRm54pN2XKKRHy4AZCTklsSW9nyu5nDKibpTTjuVm1' +
           '7iLV4eQuFvaHYkKOnLpK2QxiCQ3L53zhNfRmsNJC8vny+SYZdzCUx' +
           '8y6JC4OXuELoWhUl63FMj9WomUx+xcy6HTzPfIVrnonXEz40Au22T' +
           'AKh3Ks1IeFfOyEZneIYmGEQ+da+kykA4Qqss/41MCOcz51djrpcf5' +
           'qXlNSs+Can++Tx5uv+clrOEqxHSkapFMVCWrkFi1tNVOW3lr4qt6V' +
           'H/DEx9xPd2QyDPeYqXIRKsk0/LHIrFNi3uts2bmNSwofNjJ3DYkuO' +
           'uxu3jUaOyHB1r+Tl7V/wxpfzU5p82klLwxHWMVSK9/qck3YdfF4a7' +
           '6Vqf+f72KTA1TFpIGxtQ84bp3QVtM4Tao7VlXftq6kucfVX1Ez7CJ' +
           'SfuK+Mvh6gi0woiiuZPLEMz8Bp9d0Q4=');
      bandage := BitmapFromString(14, 10, 'beNo9zM0vw3AAxnF/iT/Bh' +
           'ZC4uRNOSCQOIi7inVAmi4uXhIWglBjd1lnbdVsXHSPzErLMWrq2W7' +
           'PZZjhIvMTYRruR/TSW+OY5fvJMNLrhAe+2jtmCXPDQM2fNirgiWCQ' +
           'cAiKqBtau0MF7Zto51fTg0nvgPudSt2d9+InFMqL90qYHN7TKm9Ur' +
           'E0i5gUyCKMXvDB7MttKGzkOk/yWIKjL1cW0DSUYRCJBgilHavz2Wv' +
           'UQVziRaoYuVTri/jsd1Qctoht2R6RmNJbzLR8hwRnB9xzwgdQAipL' +
           'bH/bmOhqr6mvKAsbfAmwohK4jv5SN0TnIrMV86RL8HMR6bLEp4GIM' +
           'Ah5T9FTT2gPDu7b6BI2a+b0/fZV8udvwpUEB2FHgMRHDAdZXwRndN' +
           'nNI9eBfufKuFxOFX8sRPGnKi8yfi0D5vSL1mSjIAt611VbyezQvke' +
           'Opk8U2yqQkmF3bkJUcxbFdZ9F9qsUi7aaQ2L24WkzY/Mf4qWFTZJV' +
           'Gzn6w5Sk5xSGVpmjxfajYOVDOGlvQ1kpbMStwO7jw/IhEyQ8QvNdo' +
           'aGQ==');
      divinity := BitmapFromString(14, 13, 'beNpFkc1rE0EYh/2f/Fs8' +
           '9ObFUBLFUA20WlsEexCpp1LpRXoSEUQjRYM0opFKbTf9QAulBNvar' +
           'BuzSXaT2dnsZx5ndhVfXoY5PPN7n5nZYQLSw5U8WtkvlupXp2rXrr' +
           'ybnno7U/78cLkpQ/wEqRrGMYla4czm9mzjerFZnm6Wi42bt15bLq5' +
           'PAF7CIEBEyCgVCHWqvkVl7nuptHt3Yb/2qeehMTnRq+ngxHrjI1Rs' +
           '2+XjLveWjj9s0w3oRWmQwc6YlsmNymJlfjEENwpHcPCT6hbGKUMyN' +
           'yKRJm07NY48jLVLWfkpA8JjTz5Y3z4Z4So9JkFGnlts1H9gFHJYxT' +
           'rILsnqxp6FJpXPKIkvesL45igBxeSkmtWdpB1lG2hsmCJSLWC6XAz' +
           '4evSfVDXMojohdqQxlWkL5YDyt7Tm5bwVOVBYxEk38vLROexz3tfv' +
           '+Y/UmaMss3HY7si/2Jv3h0+f7Tx+0piZf5XdqLBW0GQ/pGVR3Wyd/' +
           'c4yY/2VPcHS8uad+7U8MyfbNi+q5txC7flL07IZJ3gxfY/TX3z5Aw' +
           '3ns9g=');
      teflon := BitmapFromString(15, 15, 'beNo90MlrE2EYBnD/Ai8qQV' +
           'DxItqoFY1ibRNMDdUszb42k8xMFpNMZkkySSaZyWSPTWvSlJqLKdX' +
           'QQ0V6EU8ePCgILhBPnmoPIh6KUItHBWF820E/Xj7m8Hsfnm+2v3/7' +
           'LW28fE/We83BExgs3whk6yqj74zaqBhXHzt/46Rq+vgljeLilEI5w' +
           'XVXSyuPiWoX55rp+T7TWkHzzTsodeqaDjDIE1e0R8auA1Zbg0R1KX' +
           'XvQVRoo7k6xMLtz1SDuYYtnr+gsx9VToBUai2uZBFhxAjfBhkTF0E' +
           'GszXACFuDCfNtc5SdDaf1KGUKpcyRDMbW4uVOhJ9PVDqhQgs+AEMN' +
           'NyXAQHl/ujKXKoN0EoVSby1R6YKEcOgcYKuuZAFqAPMyIngwEOulS' +
           'zMIcXZSf1mtu3pzRq7hJov+dNlBFJzJIqzA7aEEWWo90VCuIY0Ghw' +
           '4O1PDSAqzYExxISHaRvAGjjTjjSHA410qUFqVRTPbQZC4lWu+ycDc' +
           'ebmD5JlSFnwA1fKRAVpZuuSPAZCwuP4oLCz6S760/6ww3bZGMPcrC' +
           'WMNpA0KYgiTMfwxne+/P609ff0qSNUQbkLgZI2/7YhprcBaldO6I2' +
           'hIYDVTyAK7113cl6fPuL6bWdcVYWAH2bmtn2hk6fHr83KT+H95Pfr' +
           'u1sydJ+XZ/48UbotQ2BQkIhA4fv/wYmzJEudbBA2OD2D5m6st4tm7' +
           'BKTQt1vtDLFNG6JInwd1f21xYfap14HKyjDU21IwzOndI60D9VNEd' +
           'z5oxOsCIw+ev+M7gw1/lVhrk');
      sphere := BitmapFromString(16, 16, 'beNo9z11MUnEYBvC/iCio82' +
           'OrprZZdtEsXVpzrbxotrWumm1d19pabn3MavMjP9eMTEOxY4mBaJr' +
           'SVCxCW9PM1EQpPAgeOYiCH8BARVHwIJYhbySrZ+/l73m2N3WsNmiu' +
           'jmXEGHO5wZ925UB2Ocz1zq3X8EsKnnGwz4FpzmVf3LFqKRvpMak8f' +
           'IatMWKjAhnY+8Y9A0AIl6zYuqcZNt8AjMKGlnKY1xyGZWrWvqZaXV' +
           'FSohC7kG6pQvPFLNmOFKztXgtGuYVerwRcfbsuYosyONbIlQ3SQZH' +
           'bTsLbgXRNaLKJZS2gDYmu6GEQlgQwW726IXbbup2WPteWBtx6cOrA' +
           'oQHbOPQEzXQzF3kB02wmfj+sU3rNBD1gEniNreu6FpNbBtPvtk0ys' +
           'E2B4RvYccDQUA0a4SCcjb6XMgbywz6ILy0ADktiIBotC52ba1/B6G' +
           'sNgVML5Hu4gG5ksrI5gapymqoEyfNoA6Uxw6LLCyCD5Xb4/Rk2ewF' +
           'IICUwgFH1VycA56O95KMfBYFTRSztnaDhorjRVxnq5TqgmkD/DGxt' +
           'wMtU1WYouKlywLP8lVykKKRpH9KnS8LJwkhFbkRfflT3o2gp51C/p' +
           'Rx4Z1TcRCU/ecYn/T4PycsQURagZtOV5WGqyhjyeaxaFKfuTdGtF0' +
           'NjmqIuaZ6TMP/f+1JB13AYU4/RWE3IZAWTqA2dbAtXSOLk1tue5pN' +
           'yTjz5IsmO80/5z+cL0QQ3wsBlaBrC9YLgmY6oeXHkhDLdSuVDU8qo' +
           'MNn49ODsP7+3z9RWhmiqApXCULItRCfdv/jlmFmSpP5ZCdjx/qoEJ' +
           'TuW2Ps3i5/11wujZ/hRJC9c2RW/KDlg6D1qrYsbE19cWMaAd34cS9' +
           'NyEnX+fb9/Ga1oODJVfRhvOWt8e86qfgDGeljqAL0I7p3+mJM09OQ' +
           'E4ZP+80Vx3UuUAi6A/lbobIWREci5a86+qVPKQITBrfTB3D8vGdKo' +
           '');
    end;

    procedure FireRain;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      FindBitmapToleranceIn(fire, x, y, 0, 0, 436, 539, 1);
      MoveMouseSmooth(x, y)
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
      Writeln('Healing with Bandage.');
      FindBitmapToleranceIn(fire, x, y, 0, 0, 491, 540, 1);
      MoveMouseSmooth(x, y)
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;

    procedure BandageProc;
    begin
    repeat
      Wait(2 * 500+random(50));
      Writeln('Healing with Bandage.');
      FindBitmapToleranceIn(bandage, x, y, 0, 0, 491, 540, 1);
      MoveMouseSmooth(x, y)
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
    until(i = 1);
    end;

    procedure DivinityProc;
    begin
      Wait(2 * 500+random(50));
      Writeln('Casting Divinity.');
      FindBitmapToleranceIn(divinity, x, y, 0, 0, 577, 540, 1);
      MoveMouseSmooth(x,y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50));
      ReleaseMouse(x, y, True);
      Wait(2 * 2500+random(50));
    end;

    procedure TeflonSpray;
    begin
      Wait(2 * 250+random(50));
      Writeln('Casting Teflon Spray.');
      FindBitmapToleranceIn(teflon, x, y, 0, 0, 604, 540, 1);
      MoveMouseSmooth(x,y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50));
      ReleaseMouse(x, y, True);
      Wait(2 * 1000+random(50));
    end;

    procedure SphereProc;
    begin
      Wait(2 * 250+random(50));
      Writeln('Casting Sphere');
      FindBitmapToleranceIn(sphere, x, y, 0, 0, 630, 537, 1);
      MoveMouseSmooth(x, y)
      HoldMouse(x, y, True);
      Wait(2 * 1000+random(50))
      ReleaseMouse(x, y, True);
      Wait(2 * 1000+random(50));
    end;

    begin
    LoadBitmaps;
      repeat
        FireRain;
        DivinityProc;
        FireRain;
        TeflonSpray;
        FireRain;
        SphereProc;
      until(False);
    end.

    You should also free your bitmaps with
    FreeBitmap(bitmap_name);
    I. E FreeBitmap(sphere);

  10. #10
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Turns out it is NOT finding the bitmap when it is clearly on the screen.
    (I target the window as a note)
    Do you see anything that could cause this problem where it does NOT find the bitmap?
    Thanks in advance.

    Example: the cords of the bitmap are 434, 540 which it goes to 0, 0 of the targeted window.

    The reason I'm choosing to use bitmaps are because when I change things around, i'd rather not change the cords constantly so trying to make it find a bitmap instead of following cords.

    EDIT:
    So my question is how could I make it to find the bitmap without cords?

    Quote Originally Posted by Zyt3x View Post
    You should also free your bitmaps with
    FreeBitmap(bitmap_name);
    I. E FreeBitmap(sphere);
    Indeed, though where would I place the freebitmap string? line 1 of the procedure after begin?
    Last edited by Littma; 01-26-2010 at 06:13 PM.

  11. #11
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Could you like post a link to the game?
    There used to be something meaningful here.

  12. #12
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Place all the FreeBitmaps in a procedure called "ScriptTerminate".
    ScriptTerminate is called when the script is stopped / terminated

  13. #13
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Frement View Post
    Could you like post a link to the game?
    http://www.gaiaonline.com/zomglanding/

    Though the bitmaps I am choosing come from various rings throughout the game which can be given by game play.

    The point of the script is to use a ring to attack (multi-target as the monsters are aggressive) heal, and re-buff.

    Quote Originally Posted by Zyt3x View Post
    Place all the FreeBitmaps in a procedure called "ScriptTerminate".
    ScriptTerminate is called when the script is stopped / terminated
    I appreciate the help, I'll take note on that.
    I don't know what I'd do without you both :3

    Though as I've been wondering, the command I'm using to find the bitmaps then click them are not working. Most likely because it's not the right command for the job. Is there another command to find the bitmap, then do an action?
    (I've searched for a bitmap tutorial on this, no luck )

  14. #14
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Littma View Post
    http://www.gaiaonline.com/zomglanding/

    Though the bitmaps I am choosing come from various rings throughout the game which can be given by game play.

    The point of the script is to use a ring to attack (multi-target as the monsters are aggressive) heal, and re-buff.



    I appreciate the help, I'll take note on that.
    I don't know what I'd do without you both :3

    Though as I've been wondering, the command I'm using to find the bitmaps then click them are not working. Most likely because it's not the right command for the job. Is there another command to find the bitmap, then do an action?
    (I've searched for a bitmap tutorial on this, no luck )
    FindBitmap should work just fine, try re-doing your bitmap and test again
    EDIT: Have you tried MoveMouse(x, y); instead of MoveMouseSmooth(x, y);?
    I think that might solve the problem
    Last edited by Zyt3x; 01-26-2010 at 06:35 PM.

  15. #15
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    You should try DTM's too. Thought bitmaps should be working fine.
    There used to be something meaningful here.

  16. #16
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    FindBitmap should work just fine, try re-doing your bitmap and test again
    EDIT: Have you tried MoveMouse(x, y); instead of MoveMouseSmooth(x, y);?
    I think that might solve the problem
    Yes - I used to use cords for MoveMouse/MoveMouseSmooth both worked fine. Just decided to use bitmaps so I wouldn't have to change the location of the rings when I move them and or upgrade.

    Currently testing Find Bitmap though having an issue with it.
    Code:
           if(FindBitmap (fire,x,y)) then
           movemouse(x,y)
    Which returns in the error
    Code:
    [Runtime Error] : Exception: Access violation at address 006BDDC8 in module 'scar.exe'. Read of address 00000000 in line 24 in script
    Line 24 is the string of 'if(FindBitmap (fire,x,y)) then' as I created a new file to test bitmaps in.

    Quote Originally Posted by Frement View Post
    You should try DTM's too. Thought bitmaps should be working fine.
    I've thought about it, though having trouble finding a tutorial on Bitmaps/DTM's. Like I said, I tried the FindBitmap string and no luck, getting a SCAR error.
    Code:
    [Runtime Error] : Exception: Access violation at address 006BDDC8 in module 'scar.exe'.

  17. #17
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Littma View Post
    Yes - I used to use cords for MoveMouse/MoveMouseSmooth both worked fine. Just decided to use bitmaps so I wouldn't have to change the location of the rings when I move them and or upgrade.

    Currently testing Find Bitmap though having an issue with it.
    Code:
           if(FindBitmap (fire,x,y)) then
           movemouse(x,y)
    Which returns in the error
    Code:
    [Runtime Error] : Exception: Access violation at address 006BDDC8 in module 'scar.exe'. Read of address 00000000 in line 24 in script
    Line 24 is the string of 'if(FindBitmap (fire,x,y)) then' as I created a new file to test bitmaps in.


    I've thought about it, though having trouble finding a tutorial on Bitmaps/DTM's. Like I said, I tried the FindBitmap string and no luck, getting a SCAR error.
    Code:
    [Runtime Error] : Exception: Access violation at address 006BDDC8 in module 'scar.exe'.
    Did you load/declare the bitmap before using it? Have you tried saving the script and restarting scar?

  18. #18
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright - I think I found out what the problem was.
    I forgot to add the variable for the bitmap
    Thanks a billion guys, I'll report back with progress.

  19. #19
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, I believe this is my last problem.

    Code:
    procedure FireRain;
    var i, fire, bandage : Integer;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      if FindBitmap(fire, x, y) then
      MoveMouseSmooth(x, y);
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
      Writeln('Healing with Bandage.');
      if FindBitmap(bandage, x, y) then;
      MoveMouseSmooth(x, y);
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;
    I can see what's wrong here where it will not do the bandage command after the fire rain command.
    I tried fixing the problem by using this.

    Code:
    procedure FireRain;
    var i, fire, bandage : Integer;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      if FindBitmap(fire, x, y) then
      MoveMouseSmooth(x, y);
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
    end;
    begin
      Writeln('Healing with Bandage.');
      if FindBitmap(bandage, x, y) then;
      MoveMouseSmooth(x, y);
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 10);
    end;
    end;
    Though returns with this error
    Code:
    Line 103: [Error] (103:1): Identifier expected in script
    Which is the 'end;' after 'Wait(6 * 1500+random(50));'
    Any ideas? ^^
    Last edited by Littma; 01-26-2010 at 07:28 PM.

  20. #20
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    is this for WoW?

  21. #21
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Quote Originally Posted by The Man View Post
    is this for WoW?
    If you would have read the thread you would know that its not

    Also, littma, no double posting.
    There used to be something meaningful here.

  22. #22
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The Man View Post
    is this for WoW?
    Something similar, though for Gaiaonline.
    Everyone stopped posting when I thought it was fixed, now came up with this one error (stated on first post, edited)

  23. #23
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    I have just read again and still do not see where it says it isnt for Wow? :S
    BTW Littma, you need an Until because you have a repeat

  24. #24
    Join Date
    Jan 2010
    Location
    U.S.
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The Man View Post
    I have just read again and still do not see where it says it isnt for Wow? :S
    BTW Littma, you need an Until because you have a repeat
    I do see how that can come in handy, though where would I place such a thing? After the breaking end between fire rain/bandage?
    Like
    Code:
    procedure FireRain;
    var i, fire, bandage : Integer;
    begin
    repeat
      Wait(2 * 250+random(50));
      Writeln('Casting Fire Rain.');
      if FindBitmap(fire, x, y) then
      MoveMouseSmooth(x, y);
      HoldMouse(x, y, True);
      Wait(2 * 500+random(50));
      ReleaseMouse(x, y, True);
      Wait(6 * 1500+random(50));
     Inc(i);
     until(i = 1);
    end;
    begin
    repeat
      Writeln('Healing with Bandage.');
      if FindBitmap(bandage, x, y) then;
      MoveMouseSmooth(x, y);
      Wait(2 * 150+random(50));
      ClickMouse(x, y, True);
      Wait(2 * 2000+random(50));
      Inc(i);
      until(i = 1);
    end;
    end;
    Though even with this done, I need it to be one big loop which I have not learned how to do loops yet o.o

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
  •