View Full Version : Very easy fix needed.
spin3x
05-31-2012, 07:03 PM
Guys I know this is probably an easy fix, but this is what I really find hard (The ending)
Code:
program Fungus;
var
time: integer;
Procedure ToBar;
var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, 2190478, 556, 82, 723, 230, 5) then //bar
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
begin
if FindColorSpiralTolerance(x, y, 730719, 556, 82, 723, 230, 5) then // Plant
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
begin
if FindColorSpiralTolerance(x, y, 999777, 556, 82, 723, 230, 5) then //Swamp
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
begin
if FindColorSpiralTolerance(x, y, 2969405, 556, 82, 723, 230, 5) then //log
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
end;
begin
ToBar
repeat
ToBar;
until(false);
end.
Error: [Error] (40:6): Identifier expected at line 39
Compiling failed.
Runaway
05-31-2012, 07:06 PM
For every begin, you need an end. Also, you can just do:
begin
repeat
ToBar;
until(false);
end.
catanado15
05-31-2012, 07:12 PM
there are so many missing "end;" i recommend you to don't use begin before MoveMouse.. and MoveMouse is really bot-like...
Use Mouse(x, y, 0, 0, True/False);
Runaway
05-31-2012, 07:19 PM
I fixed your standards and made it smaller:
program Fungus;
{$i SRL/SRL.simba}
// be sure to include SRL!
var
time: Integer;
Procedure ToBar;
var
Colors: TIntegerArray;
i, x, y: Integer;
begin
Colors := [2190478, 730719, 999777, 2969405]; // put all of the colors into an array
for i := 0 to High(Colors) do
begin
if FindColorSpiralTolerance(x, y, Colors[i], 556, 82, 723, 230, 5) then // Colors[i] represents a single color
begin
{MoveMouse(x, y);
ClickMouse(x, y, 1);}
Mouse(x, y, 3, 3, mouse_left); // same as the above but less bot-like
FFlag(2); // waits until it's close to the MM flag until continuing
Wait(500+Random(500)); // randomness is good
end;
end;
end;
begin
MarkTime(time);
repeat
ToBar;
until(TimeFromMark(time) > (60 * 1000)); // 60 seconds
end.
spin3x
05-31-2012, 07:49 PM
It doesnt seem to do anything... The mouse just moves to the right by like a mm
Runaway
05-31-2012, 07:59 PM
Make sure SRL.simba is included:
{$i SRL/SRL.simba}
and also, you can use global coordinates for the minimap with your color-finding, like this:
if FindColorSpiralTolerance(x, y, Colors[i], MMX1, MMY1, MMX2, MMY2, 5) then
spin3x
05-31-2012, 08:04 PM
Umm I forgot to mention that this is for an rsps, if that makes a difference.
Recursive
05-31-2012, 08:06 PM
The only difference it makes is that you don't have to worry about using human-like movement. And basically play as a computer not human!
spin3x
06-01-2012, 12:45 PM
Can anyone trusted please tv me. Im having trouble, like I said aboce, when I click run the mouse just moves slowly to the right.
spin3x
06-01-2012, 01:13 PM
Any idea why this isnt doing anything? I select my rsps client using the cross hair, press run and doesnt do anything (Script is running)
program SPSTut;
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['14_6']);//SPS Areas
myPath := [Point(215, 341), Point(212, 316), Point(177, 331), Point(156, 348), Point(146, 377), Point(125, 399), Point(131, 422)];//Path
SPS_WalkPath(myPath);
end.
begin
MarkTime(time);
until(false)
end.
Umm, Are you sure you have the RSPS Client targeted with simba using this thing:http://puu.sh/y7ev
spin3x
06-01-2012, 03:39 PM
Yh, Im pretty sure. Im just wondering that it might be the actual code. Im still new to this. Does sps walking work with rsps? The rsps is a 714 source meaning it looks exactly like rs.
I dont understand what is wrong with thise:
program Fungus;
var
time: integer;
Procedure ToBar;
var
x, y, Time:Integer;
begin
if FindColorSpiralTolerance(x, y, 2190478, 518, 1, 716, 165, 5) then //bar
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
begin
if FindColorSpiralTolerance(x, y, 730719, 518, 1, 716, 165, 5) then // Plant
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
begin
if FindColorSpiralTolerance(x, y, 999777, 518, 1, 716, 165, 5) then //Swamp
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
begin
if FindColorSpiralTolerance(x, y, 2969405, 518, 1, 716, 165, 5) then //log
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
end;
begin
until(false)
end.
CephaXz
06-01-2012, 03:58 PM
For every begin, you need an end. I thought that is answered. If your mouse is slow, try putting SetupSRL in your main loop before everything else. Or just set your mouse speed. I believe normal setupsrl mouse speed is 15.
MouseSpeed := 15;
spin3x
06-01-2012, 05:00 PM
Ok so I think I had it and then got an error on the Until
program Fungus;
var
time: integer;
Procedure ToBar;
var
x, y, Time:Integer;
begin
if FindColorSpiralTolerance(x, y, 2190478, 518, 1, 716, 165, 5) then //bar
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
end;
begin
if FindColorSpiralTolerance(x, y, 730719, 518, 1, 716, 165, 5) then // Plant
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
end;
begin
if FindColorSpiralTolerance(x, y, 999777, 518, 1, 716, 165, 5) then //Swamp
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
end;
begin
if FindColorSpiralTolerance(x, y, 2969405, 518, 1, 716, 165, 5) then //log
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
Wait(2000);
end;
begin
ToBar
until (false); //line 39
end.
[Error] (40:4): Identifier expected at line 39
Compiling failed.
CephaXz
06-01-2012, 05:10 PM
You got 9 begins, and only 5 ends.
And basically, all the solutions needed are already posted on this thread, just that you didn't read them?
Runaway
06-01-2012, 05:28 PM
You got 9 begins, and only 5 ends.
And basically, all the solutions needed are already posted on this thread, just that you didn't read them?
Yeah... take a look at the code I posted. It's (Length(your code) / 2) + speed.
spin3x
06-01-2012, 06:21 PM
The only reason why I tried to do it again is because when I use your code, whenever I click start and move my mouse anywhere, it just keeps moving by like a mm to a direction.
Thats why I asked if someone can tv me, I wanted to show what its doing.
CephaXz
06-01-2012, 06:26 PM
You need to put in
SetupSRL;
Try reading the posts again, I already answered the solution to your problem.
spin3x
06-01-2012, 06:51 PM
Omgf sorry for not reading your thread :S I feel stupid. That fixed the problem :) Thank you so much.
Im truly sorry if I'm annoying or irritating but I really want to learn
Thank you both :) :) Reped
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.