SRL Archive - Help and Support

Question about RadialWalk?


Cheesehunk

2006-02-21 17:13:13

I just started SRL scripting, and I am making a powercutter…

But I just cannot seem to figure out RadialWalk.

function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: integer): Boolean; 
By: WT-Fakawi & Wizzup?
Description:
Walks TheColor from StartRadial to EndRadial for Radius Distance

I have looked in the manual, and the actual script to see how it works, but I cannot seem to figure it out.

If you could help me that would be great!

Is the StartRadial your starting coordinates?
EndRadial ending?
What is a radius?
Xmod? Ymod?

In other words, I have no idea what they are…
any help would be appreciated.


Also, why do I get this error:
Failed when compiling
Line 14: [Error] (8172:38): Close round expected in script
When I run this Function:
function WeAreInDraynorBank: Boolean;
var InBank: Boolean;
begin
InBank:=False;
PerfectNorth;
if FindSymbol(x,y,'bank') and
FindMMColorTol(x,y,1196903,40) then
begin
Players[CurrentPlayer].Loc;='Draynor'
Inbank:=True;
end;
begin
if (not(FindSymbol(x,y,'bank')) and
(not(FindMMColorTol(x,y,1196903,40)) then //Line 14
InBank:=False;
Writeln('Please Restart Script In Draynor Bank'}
TerminateScript;
end;
end;

This is the version if you wish to test the function in it's own script without doing anything:
{.include SRL/SRL.scar}

function WeAreInDraynorBank: Boolean;
var InBank: Boolean;
begin
SetupSRL;
InBank:=False;
PerfectNorth;
if FindSymbol(x,y,'bank') and
FindMMColorTol(x,y,1196903,40) then
begin
Players[CurrentPlayer].Loc;='Draynor'
Inbank:=True;
end;
begin
if (not(FindSymbol(x,y,'bank')) and
(not(FindMMColorTol(x,y,1196903,40)) then
InBank:=False;
Writeln('Please Restart Script In Draynor Bank'}
TerminateScript;
end;
end;
Do I need 15 rep to give out Reputation?
If so, SRL Developer's, and possibly scripters shpuld start with 15 rep…

Also, is talking about Rep against the rules?

Thanks,
Cheesehunk.

masquerader

2006-02-21 18:44:29

heh, nobody cares about rep

radial walk stuff:
the word radial is weird, basically it just searches in a circle
0 is at the top, 90 is at the right, 180 is the bottom, and 270 is the left

ex: if you want to check the right half for the color, use 0-180
it searches in the opposite direction if you enter in 180-0

radius is just how far away from the center of the map you want to start looking(648,83)

xmod and ymod are parameters for makemouseflag

i wrote a function-findcolorradius, that has minimap rotation built in, and also another radius parameter

script error: i think its just missing another ) on the if statement line

Cheesehunk

2006-02-21 19:48:45

From: masquerader
heh, nobody cares about rep

radial walk stuff:
the word radial is weird, basically it just searches in a circle
0 is at the top, 90 is at the right, 180 is the bottom, and 270 is the left

ex: if you want to check the right half for the color, use 0-180
it searches in the opposite direction if you enter in 180-0

radius is just how far away from the center of the map you want to start looking(648,83)

xmod and ymod are parameters for makemouseflag

i wrote a function-findcolorradius, that has minimap rotation built in, and also another radius parameter

script error: i think its just missing another ) on the if statement line

Alright, I fixed the procedure…
And I think I figured out RadialWalk now!

Thanks a lot for the help.
And about the rep, I was just wondering… Thanks.

Krazy_Meerkat

2006-02-21 22:30:43

When you put your (not you forgot to close the bracket at the end. (not(whatever(howeverlong)))
This is interesting.. Does it click on a random co-ordinate of the colour within the section or is it always going to click the first colour it finds from the edge?

masquerader

2006-02-21 23:52:00

yer..look at the procedure

it goes in the direction from start radial to end radial and then it moves a little bit toward the center

fawki had some nice pictures somewhere

Cheesehunk

2006-02-22 00:23:42

Alright, I am pretty sure I got it now!
Thanks, and if you come across those pictures, would it be ok if I could get a look at them?:)

And Krazy, I don't get what you mean..
The function returns true if You are inDraynor bank, that's it… and if you aren't it terminates the script, simple as that!

Krazy_Meerkat

2006-02-22 02:43:59

I thought that was the DTMRotate which returned true for draynor bank. Radial walk is a walker I presume…

The Prince of Randomness?

2006-02-22 22:11:59

From: Krazy_Meerkat
I thought that was the DTMRotate which returned true for draynor bank. Radial walk is a walker I presume…


no its a Stat editor that editss ur runescapey scapey statzoors and caaan rotates urr itemsss…

sorry <3..:o

jk

Krazy_Meerkat

2006-02-23 03:40:21

can it rotate to 360 mill? cuz io want le37 staatz

The Prince of Randomness?

2006-02-23 14:00:57

Lol it walks in Degrees, like walk 360 degrees, then walk in a 180 degree, they are all angles

Krazy_Meerkat

2006-02-23 22:21:36

I hope you're not talking to me :) I was just messing..

Dankness

2006-02-25 15:18:45

From: masquerader
heh, nobody cares about rep

radial walk stuff:
the word radial is weird, basically it just searches in a circle
0 is at the top, 90 is at the right, 180 is the bottom, and 270 is the left

ex: if you want to check the right half for the color, use 0-180
it searches in the opposite direction if you enter in 180-0

radius is just how far away from the center of the map you want to start looking(648,83)

xmod and ymod are parameters for makemouseflag

i wrote a function-findcolorradius, that has minimap rotation built in, and also another radius parameter

script error: i think its just missing another ) on the if statement line


lol thanks masquerader you taught me how to use it and i wasnt even curious!