SRL Archive - OSR Help

Simple Walking Reflection Script Help


Makeshift

2011-07-19 05:44:48

Hi all,

I decided to make a new thread in here because my old thread was about to become a scripting help thread rather than a request thread.

So far, after following a few tutorials, I've managed to churn out this:

program ReflectionScript;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i reflection\reflection.simba}

const

{---SMART Setup Constants---}
WORLD = x;
MEMBERS = false;
SIGNED = true;
{---------------------------}
{---Declare Players---}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'x';
Players[0].Pass := 'x';
Players[0].Nick := 'x';
Players[0].Active := True;
Players[0].Pin := '';
end;
{-----------}
{---Antibans---}
procedure AntiBan;
begin
case Random(6) of
0: HoverSkill('Random', False);
1: begin
RandomMovement;
HoverSkill('Random', False);
end;
2: BoredHuman;
3: BoredHuman;
4: ExamineInv;
5: begin
RandomAngle(1);
HoverSkill('Random', False);
ExamineInv;
end;
end;
end;
{----------}
{---Antirandoms---}
procedure AntiRandoms;
begin
{$IfDef Reflection}
R_FindRandoms;
{$EndIf}
FindNormalRandoms;
end;
{----------}
{---Actual script begin---}
begin
Smart_Server := WORLD;
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL;

{$IfDef Reflection}
SetupReflection;
{$EndIf}

DeclarePlayers;
LoginPlayer;
repeat
{--------------------------PUT CODE IN HERE--------------------------}
WalkPath([Point(4017, 2793), Point(4006, 2793), Point(3992, 2794),
Point(3980, 2793), Point(3969, 2794), Point(3959, 2795),
Point(3950, 2794), Point(3949, 2803)]);


{--------------------------------------------------------------------}
until AllPlayersInactive; // This means that, once all characters have failed, the script will stop.
end.

So far it quite happily logs in to Varrock east bank, which is where I left it, which is definitely in view of the first tile (4017,2793). This script is just supposed to send the player from Varrock East Bank to Varrock West Bank. Unfortunately, it just idles doing nothing.

I know it's probably something annoyingly tedious, such as forgetting to include something important to do with reflection, but I can't find anything :(.

So, can anybody give me a clue or hand into fixing it?

Thanks in advance,

Makeshift.

KingKong

2011-07-19 06:41:59

Remove the ifdef bit before setupreflection, because setupreflection sets up your reflection and the walkpath needs reflection. Can you tell me what offsets you have in pathmaker?

Makeshift

2011-07-19 07:00:06

My X-Offset was 2806
My Y-Offset was 3532
Which I believe I read was the middle point of the map, is this correct?

Shuttleu

2011-07-19 07:19:36

well assuming you used the map bundled (which was mine) you need to change the offsets to match the one in the txt doc

~shut

EDIT: get it from here and change the offsets to the one in the txt document
make sure you use the map from there (mapp2.png)

Makeshift

2011-07-19 07:29:35

Ah.

Please excuse my idiocy, I forgot to check the readme in the SVN >.>

Sorry.