SRL Archive - Research & Development Lounge

Change angle not in loop


mriddler

2012-02-01 18:26:04

Ok, i am so close to finishing this Castle Wars script its not funny. I only have one little issue and that is trying to turn the camera angle twice in the game, depending on which team you are on in Castle wars. I need the camera to turn exactly north at one certain point and south at another and i need it to go somewhere in this Procedure.

Procedure Waiting;        // if sara, get closer to leave

var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, 5847086 ,230 , 137 , 298 , 190 , 25) then

begin
MoveMouse(101, 284);
Wait(10000);
CLickMouse(101, 284, 1);
end;
end;

Useful help will get your name mentioned.;)

Kyle Undefined

2012-02-01 18:27:38

MakeCompass('N'); and MakeCompass('S'); should do the trick.

mriddler

2012-02-01 18:30:25

[Error] (12:3): Unknown identifier 'MakeCompass' at line 11

Kyle Undefined

2012-02-01 18:31:33

Hold on…Looking it up.

Are you using SRL5? This works for me:


program new;
{$i srl/srl.simba}

begin
MakeCompass('N');
end.

Also, I noticed you used MoveMouse(); and ClickMouse();. Don't use those, use MMouse(); and Mouse();

mriddler

2012-02-01 18:32:51

[Error] (12:3): Unknown identifier 'MakeCompas' at line 11 >.>

Shuttleu

2012-02-01 18:33:16

From: mriddler
[Error] (12:3): Unknown identifier 'MakeCompass' at line 11


if your getting that error then you havent included SRL

~shut

Inception

2012-02-01 18:33:49

It would be nice to know what line 11 looks like. Also, did you include {$i SRL\SRL.simba} at the top of your script?

mriddler

2012-02-01 18:39:53

this doesn't compile for me for some reason.

{$i SRL/SRL/Misc/stats.simba}

I have managed to make this whole thing so far without needing to use it, sucks for direction i do.

Kyle Undefined

2012-02-01 18:40:33

You don't need that line, it's included in {$i srl/srl.simba} now.

mriddler

2012-02-01 18:41:28

program CastleWars;
{$define SMART}
{$i srl/srl.Simba}


procedure Start; // click guthix

var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, 8562785 , 48 , 4 , 159 , 334 , 20) then

begin
MakeCompas('S');
Writeln('Found Guthix!');
MoveMouse(x, y);
Wait(4000);
CLickMouse(x, y, 1);
Wait(2000)
end;
end;

[Error] (15:3): Unknown identifier 'MakeCompas' at line 14
Compiling failed.

Inception

2012-02-01 18:47:01

Your error is exactly what it says, MakeCompas doesn't exist. Change it to MakeCompass.

Kyle Undefined

2012-02-01 18:47:10

It's MakeCompass, sorry, I updated my post :p Long day at the office :/

mriddler

2012-02-01 18:49:38

Well, it compiles, but now it does nothing… Maybe the compass is at the wrong place?

Inception

2012-02-01 18:56:03

Move MakeCompass('S') outside of the if statement.

mriddler

2012-02-01 18:56:54

Props guys, i found it needs to click on the screen first before it shifts, thanks alot.