SRL Archive - OSR Help

ObjDTM location checking help


Lalaji

2012-09-26 00:51:36

Hello Friends,

I am trying to call this procedure, where it checks if the player is in Lumbi (with ObjDTM) and if true, begins with the walking. The player will be lodestone teleporting to the location (lumbi) and so I think it would be easier to use the location check than to use ObjDTM_WalkPath (which, I understand, checks the starting point before it walks).


Function InLumbi(): Boolean;
Var
LumbiObjDTM: TStringArray;
begin
Result := False;
If Not LoggedIn then Exit;
LumbiObjDTM := ['80:80:7:0:7:64:68:0:7:64:111:0:7:110:112:0:7:68:123:1:7:103:79:1:7:60:53:6:7:39:83:7:30:69:55:39:105:69:120:99:115:124:64:133:32:88'];
result := ObjDTM_InArea(LumbiObjDTM, True); //Type Mismatch here?
end;

Procedure LumbiToBank;
Var
PathToBank: TStringArray;
I: Integer;

begin
If Not LoggedIn Then Exit;
PathToBank := ['9:90:8:0:7:111:111:0:7:65:112:0:7:64:69:0:7:69:124:1:7:59:53:1:7:18:42:6:7:45:135:6:7:39:84:7:23:32:72:48:89:84:75:134:42:145:14:118:3:84',
'47:109:7:0:7:41:117:0:7:17:74:0:7:40:30:1:7:95:118:1:7:70:21:1:7:90:25:1:7:16:108:9:104:120:97:15:63:10:28:26:7:69:7:105:17:126:41:129:98:128'];

If WaitFunc(InLumbi, 250, 14000) then
begin
writeln('Walking To Bank Using ObjDTM');
for I := 0 to 2 do
begin
WriteLn(i);
ObjDTM_WalkPath(PathToBank, 1, 100, 5, False, True)//Works very well
end;
end;
end;

begin
SetUpSRL;

ObjDTM_Setup;
ObjDTM_Debug := True;

ActivateClient;
// TeleToLumbi;
LumbiToBank;
end.

I get a type mismatch error in the code above because ObjDTM_InArea requires a string, not a TStringArray. I cannot declare LumbiObjDTM as a string. How do I use the InArea function properly ?

Thank you for your help!

Flight

2012-09-26 01:00:13

Try this instead mate:

Function InLumbi(): Boolean;
Var
LumbiObjDTM: String;
begin
Result := False;
If Not LoggedIn then Exit;
LumbiObjDTM := '80:80:7:0:7:64:68:0:7:64:111:0:7:110:112:0:7:68:123:1:7:103:79:1:7:60:53:6:7:39:83:7:30:69:55:39:105:69:120:99:115:124:64:133:32:88';
result := ObjDTM_InArea(LumbiObjDTM, True); //Type Mismatch here?
end;

P1ng

2012-09-26 03:43:04

What is the reason you can't declare LumbiObjDTM as a string? If it's declared locally and it doesn't have multiple strings I don't see why it must be an array

Lalaji

2012-09-26 08:17:41

Ffs….
ObjDTM_InArea(LumbiObjDTM[0], True);

^This works.
Thats what I get for scripting late at night..

Thanks for the help though!