SRL Archive - Reflection Help

Need help with my Reflection.


Claymore

2008-08-27 11:57:19

I am making a 1/4th SMART and 3/4 SRL / Normal Script. This script is compatible to people who do not want to use SMART (Meaning no Reflections :() and people who want to use SMART. IT does work but, somehow my WalkToTile isn't working 0.o I set everything correctly.


Part of SetUpScript;
if (Smart) then
begin
SmartSetup(World, True, True, False);
Wait(1000);
SetTargetDC(SmartGetDC);
end

function LoadPath(WhatPath : String): TPoint;
begin
case (WhatPath) of
'DTrees': Point(3088, 3234);
'DBank': Point(3092, 3240);
end;
WriteLn(WhatPath +' has been loaded.');
Exit;
end;
Part of a function
if (Smart) then
begin
DTrees := LoadPath('DTrees');
if WalkToTile(DTrees, 3, 3) then
begin
Result := True;
FFlag(0);
WriteLn('Found the Tile near the Willows!');
Exit;
end;
WriteLn('The specified Tiles is currently outdated.');
end;
begin
SetUpSRL;
SetupReflection;
SetUpScript;
OtherStuff;
end.

So what did i do wrong :(

welcome

2008-08-27 13:38:27

Is that point visible on your MM?

Claymore

2008-08-27 16:32:07

Yes it is.

welcome

2008-08-28 00:43:01

I'm not sure you might want to do
if TileOnMM(DTrees) then
begin
WalkToTile(DTrees, 3, 3);
end;

Claymore

2008-08-28 01:02:42

that doesn't make it any better ;p Because all your doing is checking if the Tile is there.But it isn't necessary because WalkToTile does that already.

welcome

2008-08-28 01:39:37

Does it give you any of your strings or does it skip the process all together?
like does it always do WriteLn('The specified Tiles is currently outdated.');

NiCbaZ

2008-08-28 01:50:41

SetupReflection;


remove that.

turbobk

2008-08-28 02:42:56

You can't have a script that can use smart and the normal RS client.
Your trying to use WalkToTile, but yet you have not Setup SMART, you have to Setup SMART before SRL, and you only have SetupSRL; in your mainloop.

Claymore

2008-08-28 12:39:52

SetUpSMART;

That how you do it?

also i did

if Smart then

so then when i make my non-smart version, its easy to remove for me. Then ill delete 'if Smart then'

sirlaughsalot

2008-08-28 13:15:55

you have to make a setupsmart procedure, i use

Const
SmartWorld='World22';
Signed=True;

procedure SetupSmart;
begin
SmartSetup(SmartWorld, False, Signed, False);
ClearDebug;
WriteLn('Setting up Smart! Chill out man!');
Wait(10000 + random(5000));
SetTargetDC(SmartGetDC);
While not(SmartActive) do Wait(100);
end;

Narcle

2008-08-28 14:16:10

Loadpath is setup wrong… u don't have a result :=

like:

function LoadPath(WhatPath : String): TPoint;
begin
case (WhatPath) of
'DTrees': result := Point(3088, 3234);//add the result :=
'DBank': result := Point(3092, 3240);//add the result :=
end;
WriteLn(WhatPath +' has been loaded.');
Exit;
end;

Claymore

2008-08-28 14:40:10

THank you narcle! although i found that out an hour ago after realizing i forgot to add Result.