SRL Archive - OSR Help

Alot of help needed


Dervish

2010-08-28 14:49:42

Hello :)

In this thread, I'll post what I need help with as I'm trying to "discover" reflection.

So I'll start :

1) Is reflection working right now ?

2) How should I get IDs / Tiles… etc ?

3) If yes, how could I get the IDs of objects, Tiles and stuff printed out ?

GetMyPos;

Has its result as a TTile, how can I make the position put out by Writeln (same as inttostr but for tiles) ?

4) objType, how should I define that when looking for IDs ?

5) How do I put out the ID of the object I'm looking for by Writeln ?

Thanks in advance.

i luffs yeww

2010-08-28 15:14:38

Yes, MyLocationKTHX := GeyMyPos; Writeln(ToStr(MyLocationKTHX.x) + ', ' + ToStr(MyLocationKTHX.y)); or RSBot or TRiBot, previously stated, OBJECT_TYPE_INTERACTABLE (two others, not much use tbh, check Constants.simba), wat? You mean debug it so you know the ID? There's a function called DumpObjects or something. Read through the reflection include.

Hope that helps.

Dervish

2010-08-28 15:16:11

I thought RSBot was shut down ?

i luffs yeww

2010-08-28 15:34:11

powerbot.org (Ex RSBot)

tribot.org (TRiBot)

Dervish

2010-08-28 15:43:46

Tribot seems very nice, thanks i luffs yeww +rep (if you care about rep :p).

More questions might come.

i luffs yeww

2010-08-28 15:55:33

No problem. If you wanna get quicker answers, we could talk on MSN.

[email]panic._@live.com[/email]

Dervish

2010-08-28 16:15:07

Got another question :

What should I put in the variable TInvItem when using the function :

{*******************************************************************************
function R_ItemIDExists(var Item: TInvItem; ID: Integer): Boolean;
By: Drags111
Description: Returns true if the ID is found at least once in the inventory.
Also returns the first item found into the var Item.
*******************************************************************************}

?

i luffs yeww

2010-08-28 16:17:12

It's a variable so you'd do something like


var
TehItem: TInvItem;

begin
if(R_ItemIDExists(TehItem, 1234))then
Writeln('wat');
end.

Dervish

2010-08-28 16:38:40

From: i luffs yeww
It's a variable so you'd do something like


var
TehItem: TInvItem;

begin
if(R_ItemIDExists(TehItem, 1234))then
Writeln('wat');
end.


You are a god >.>

i luffs yeww

2010-08-28 16:55:59

Thanks. :) And check Inventory.simba to see all the information that a TInvItem stores if you want.

(It stores item name, stack size, ID, and actions.)

Dervish

2010-08-29 06:48:08

Procedure WalkToChurch;
begin
if (MeInBox(2943,3373,2949,3368)) then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Position looks fine, checking runes');
If not R_ItemIDExists(LawRune,563) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('law');
repeat
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
Nextplayer(False);
end else;
begin
if(Verify(x,y,'law')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not a law rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Law Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
end else;
Writeln('Law Runes in inventory, checking air rune supply');
If not R_ItemIDExists(AirRune,556) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(IsEquippedID(1381)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Case random(2) of
0: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
begin
Mouse(x,y,2,2,true);
Wait(200+random(100));
end;
end;
1: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air','taff of air',
'of air']) then
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
end;
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end;
end;
end else;
begin
Reportstatus('No staff, going for runes...');
repeat
If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No airs in inventory nor bank...');
Nextplayer(False);
end else;
begin
if(Verify(x,y,'air')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not an air rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Air Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
ReportStatus('Staff equipped.');
end else;
begin
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
end;
{walking here...}
end;
end;
end;

Please help me, I'm lost in the begins and end;s they aren't linked together correctly somewhere and I've been trying to find where for the past 10 minutes, in vain.

Shuttleu

2010-08-29 07:25:44

try this
Procedure WalkToChurch;
begin
if (MeInBox(IntToBox(2943,3373,2949,3368))) then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Position looks fine, checking runes');
If not R_ItemIDExists(LawRune,563) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else
begin
SearchBank('law');
repeat
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
Nextplayer(False);
end else
begin
if(Verify(x,y,'law')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else
begin
Writeln('The item we thought we found was not a law rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Law Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
end else
Writeln('Law Runes in inventory, checking air rune supply');
If not R_ItemIDExists(AirRune,556) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(IsEquippedID(1381)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Case random(2) of
0: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
begin
Mouse(x,y,2,2,true);
Wait(200+random(100));
end;
end;
1: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air','taff of air',
'of air']) then
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
end;
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end;
end;
end else
begin
Reportstatus('No staff, going for runes...');
repeat
If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No airs in inventory nor bank...');
Nextplayer(False);
end else
begin
if(Verify(x,y,'air')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else
begin
Writeln('The item we thought we found was not an air rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Air Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
ReportStatus('Staff equipped.');
end else
begin
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
end;
{walking here...}
end;
end;
end;

~shut

Dervish

2010-08-29 07:36:43

From: Shuttleu
try this
Procedure WalkToChurch;
begin
if (MeInBox(IntToBox(2943,3373,2949,3368))) then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Position looks fine, checking runes');
If not R_ItemIDExists(LawRune,563) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else
begin
SearchBank('law');
repeat
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
Nextplayer(False);
end else
begin
if(Verify(x,y,'law')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else
begin
Writeln('The item we thought we found was not a law rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Law Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
end else
Writeln('Law Runes in inventory, checking air rune supply');
If not R_ItemIDExists(AirRune,556) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(IsEquippedID(1381)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Case random(2) of
0: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
begin
Mouse(x,y,2,2,true);
Wait(200+random(100));
end;
end;
1: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air','taff of air',
'of air']) then
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
end;
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end;
end;
end else
begin
Reportstatus('No staff, going for runes...');
repeat
If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No airs in inventory nor bank...');
Nextplayer(False);
end else
begin
if(Verify(x,y,'air')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else
begin
Writeln('The item we thought we found was not an air rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Air Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
ReportStatus('Staff equipped.');
end else
begin
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
end;
{walking here...}
end;
end;
end;

~shut


Procedure CheckRuneSupplies;
begin
if (MeInBox(2943,3373,2949,3368)) then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Position looks fine, checking runes');
end else;
begin
Writeln('Player not in the bank.');
NextPlayer(False);
end;
If not R_ItemIDExists(LawRune,563) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('law');
repeat
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
Nextplayer(False);
end else;
begin
if(Verify(x,y,'law')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not a law rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Law Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
end else;
Writeln('Law Runes in inventory, checking air rune supply');
If not R_ItemIDExists(AirRune,556) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(IsEquippedID(1381)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
Wait(100+random(100));
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Case random(2) of
0: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
begin
Mouse(x,y,2,2,true);
Wait(200+random(100));
end;
end;
1: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air','taff of air',
'of air']) then
begin
GetMousePos(x,y);
Wait(100+random(50));
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
end;
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end;
end;
end else;
begin
Reportstatus('No staff, going for runes...');
Tries := 0;
repeat
If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No airs in inventory nor bank...');
Nextplayer(False);
end else;
begin
if(Verify(x,y,'air')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not an air rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Air Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
ReportStatus('Runes found and withdrawed from the bank.');
end;
end else;
Writeln('You seem to have the staff of air equipped !');
end else;
Writeln('Runes in inventory found.');
begin
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
end;
end;

Fixed it up myself, i think it works the same way yours does.

I need some more help though, i'm checking for errors and when I compile, I get :


[Error] C:\Simba\Includes\Reflection\./Core/Core.simba(47:13): Unknown identifier 'SmartGetFieldInt' at line 46
Compiling failed.

Why is that ?

I got latest SRL/reflection through the .sex extensions in SIMBA.

Shuttleu

2010-08-29 08:14:42

add this above any other includes in your script
{$i srl/srl/misc/smart.scar}

~shut

Dervish

2010-08-29 08:21:09

From: Shuttleu
add this above any other includes in your script
{$i srl/srl/misc/smart.scar}

~shut


I love you shut but now I get :


[Error] C:\Simba\Includes\srl/srl/misc/smart.scar(9:10): Duplicate identifier 'ISKEYDOWN' at line 8
Compiling failed.

Shuttleu

2010-08-29 08:23:45

From: Dr D. Dervish
I love you shut but now I get :


[Error] C:\Simba\Includes\srl/srl/misc/smart.scar(9:10): Duplicate identifier 'ISKEYDOWN' at line 8
Compiling failed.


try restarting simba, most of the time it helps for me

~shut

EDIT: what do you have for your includes?

Dervish

2010-08-29 08:25:40

program WoZTG;
{$i SRL/SRL.scar}
{$i Reflection/Reflection.simba}
{$i srl/srl/misc/smart.scar}

Edit : fixed through reorganising the order of the includes.

Shuttleu

2010-08-29 08:28:01

this way round ;)
program WoZTG;
{$i srl/srl/misc/smart.scar}
{$i SRL/SRL.scar}
{$i Reflection/Reflection.simba}

i shall quote myself here :)
From: Shuttleu
add this above any other includes in your script


~shut

Dervish

2010-08-29 08:32:05

From: Shuttleu
this way round ;)
program WoZTG;
{$i srl/srl/misc/smart.scar}
{$i SRL/SRL.scar}
{$i Reflection/Reflection.simba}

i shall quote myself here :)


~shut


Sry for being blind >.<

Also, how can I define a TBox for use in the Position check ?

Shuttleu

2010-08-29 08:32:43

IntToBox(X1, Y1, X2, Y2) :)

~shut

Dervish

2010-08-29 08:35:33

From: Shuttleu
IntToBox(X1, Y1, X2, Y2) :)

~shut


Is there a way to do it in the const ? :)

Like :

TBankBox = X1, Y1, X2, Y2; ?

(I get ";" missing when trying that ^)

I get '=' missing when I try :


const
TBankBox.x1 = 2943;
TBankBox.y1 = 3373;
TBankBox.x2 = 2949;
TBankBox.y2 = 3368;

Shuttleu

2010-08-29 08:43:13

From: Dr D. Dervish
Is there a way to do it in the const ? :)

Like :

TBankBox = X1, Y1, X2, Y2; ?

(I get ";" missing when trying that ^)

as far as i am aware, no

you would be best doing something like

var
TBankBox: TBox;


TBankBox:= IntToBox(X1, Y1, X2, Y2); // Stick this somewhere in the setup

then you can use TBankBox


~shut

Dervish

2010-08-29 08:47:06

From: Shuttleu
as far as i am aware, no

you would be best doing something like

var
TBankBox: TBox;


TBankBox:= IntToBox(X1, Y1, X2, Y2);

then you can use TBankBox


~shut


Successfully compiled, YES ! I love you shut and i luffs yeww ! :o

Shuttleu

2010-08-29 08:49:43

From: Dr D. Dervish
Successfully compiled, YES ! I love you shut and i luffs yeww ! :o


no problem, glad you got it working :)

~shut

Dervish

2010-09-01 15:44:37

I've progressed quite far in the script and got to a point where i need to use WalkToTile but I do not know how to make it walk to the tiles I've chosen ?

How can I make integers X and Y to a TTile needed in the function ?


Also, how can I store data in an array ?

What I want to do is to make it remember which worlds there are other people in and log to another but mark the one it was in as populated in order so that it will not pick it to log into.

Shuttleu

2010-09-01 15:47:23

to use the array you can do
TheArray:= [Tile(1234, 5732), Tile(2738, 4298),
Tile(3278, 4539)];
and to walk along the path of tiles you have chosen
WalkPath(TheArray);
or something along those lines

~shut

Dervish

2010-09-01 15:54:36

From: Shuttleu
to use the array you can do
TheArray:= [Tile(1234, 5732), Tile(2738, 4298),
Tile(3278, 4539)];
and to walk along the path of tiles you have chosen
WalkPath(TheArray);
or something along those lines

~shut


I don't want the Array to WalkToTile but to store Worlds data :(.

Shuttleu

2010-09-01 17:46:53

From: Dr D. Dervish
I don't want the Array to WalkToTile but to store Worlds data :(.

i dont follow…

~shut