SRL Archive - Archive

JackLKrawl - SRL Member Application Form


Jackrawl

2008-01-01 00:40:08

<!– BEGIN TEMPLATE: formanswers –>
JackLKrawl - SRL Member Application Form
JackLKrawl

What is the meaning to life?
42

Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
Can 'read' C, but not write it

Other Communitys
None

How Long have You Played Runescape
Don't play it

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

I have been learning SCAR for about 6-7 months. This particular script we are applying with got destroyed during this pointer error earlier today, so this is 12 hour work. I'm pretty sure that there are a trivial errors within it, but for the most part, it is as good as the original.
'I' is actually two people - Sister and Brother. It's very difficult to write sentences with 'We' without making it sound weird, so usually we refer to us as 'I' because it is one username.
Anyway, I wanted to start the New Year off as an SRL Member, because we know all of the basics (or at least think we do), and we found a really cool avatar of House Ix and the Fremen - if you don't know what those two things are, I suggest you read the Dune Series, they're very good books. This is our best effort and we hope that you will accept us.

Happy New Years.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

program AirCrafter;//Aer Faber is latin for 'Air Craftsman.' (This is the actually title of the program
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/MusicLocation.scar}

var
dtmPoint1, dtmPoint2, dtmPoint3, dtmPoint4, dtmPoint5, dtmPoint6,
dtmPoint7, dtmPoint8, dtmAirAltar, dtmExit:Integer;
dtmRegularEssence, dtmPureEssence, dtmTalisman, dtmAirTiara, dtmAirRune:Integer;
intReg, intPure:integer;
Regular, Pure : Boolean;
SumA, SumB: integer;
a, b, c, d, e, f, g, h, j: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Strings[0] := 'a'; //a - Regular Ess b - Pure ess c - Both
Players[0].Strings[1] := '' //Equipped if you have tali/tiara ready
Players[0].Strings[2] := '';
Players[0].Integers[0] := 1; //How many loads for this character
Players[0].Integers[1] := 0;
Players[0].Booleans[0] := True; //True for a tiara, False for a talisman
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure DefineLoopDuration;
var
I:integer;
begin
for I := 0 to HowManyPlayers-1 do
begin
SumA := SumA + Players[I].Integers[0];
end;
if HowManyPlayers-1 = 0 then
begin
writeln('This loop shall run for ' + inttostr(SumA) + ' over one player');
end;
if HowManyPlayers-1 > 0 then
begin
writeln('This loop shall run for ' + inttostr(SumB) + ' over ' + inttostr(HowManyPlayers));
end;
end;
procedure ItemDDTMs;
var
SubPoint : Array [0..3] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=94;
MainPoint.y :=78;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=5723998;
MainPoint.Tolerance:=30;

SubPoint[0].x:=108;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=92;
SubPoint[1].y:=91;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=105;
SubPoint[2].y:=86;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmRegularEssence:= AddDTM(TDTM);

MainPoint.x :=600;
MainPoint.y :=265;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=8027012;
MainPoint.Tolerance:=15;

SubPoint[0].x:=634;
SubPoint[0].y:=265;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=608;
SubPoint[1].y:=273;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=619;
SubPoint[2].y:=278;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPureEssence:= AddDTM(TDTM);

MainPoint.x :=588;
MainPoint.y :=233;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=12105921;
MainPoint.Tolerance:=40;

SubPoint[0].x:=568;
SubPoint[0].y:=229;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=591;
SubPoint[1].y:=230;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=576;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirTiara:= AddDTM(TDTM);

MainPoint.x :=579;
MainPoint.y :=226;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=11974335;
MainPoint.Tolerance:=30;

SubPoint[0].x:=585;
SubPoint[0].y:=233;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=572;
SubPoint[1].y:=230;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=577;
SubPoint[2].y:=241;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmTalisman:= AddDTM(TDTM);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=10;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirRune:= AddDTM(TDTM);
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure Randomas;
begin
case random(40) of
1:MakeCompass('N');
2:MakeCompass('S');
3:MakeCompass('E');
4:MakeCompass('W');
5:RandomRClick;
6:BoredHuman;
end;
end;
procedure DestroyaOfRandoms;
begin
if not(loggedin) then exit;
FindFastRandoms;
FindNormalRandoms;
end;
procedure MotiDDTMs;
var
SubPoint : array [0..4] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=625;
MainPoint.y :=85;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=634;
SubPoint[0].y:=91;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=62965;
SubPoint[0].tolerance:=100;

SubPoint[1].x:=638;
SubPoint[1].y:=92;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=60909;
SubPoint[1].tolerance:=100;

SubPoint[2].x:=650;
SubPoint[2].y:=93;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=60909;
SubPoint[2].tolerance:=100;

SubPoint[3].x:=654;
SubPoint[3].y:=93;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=60909;
SubPoint[3].tolerance:=100;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint1:= AddDTM(TDTM);

MainPoint.x :=609;
MainPoint.y :=134;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=608;
SubPoint[0].y:=113;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=12227199;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=606;
SubPoint[1].y:=111;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=12227199;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=606;
SubPoint[2].y:=113;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12227199;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=616;
SubPoint[3].y:=111;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=15591909;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint2:= AddDTM(TDTM);

MainPoint.x :=639;
MainPoint.y :=133;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=621;
SubPoint[0].y:=54;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=2313568;
SubPoint[0].tolerance:=70;

SubPoint[1].x:=624;
SubPoint[1].y:=86;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=2313568;
SubPoint[1].tolerance:=70;

SubPoint[2].x:=633;
SubPoint[2].y:=64;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12161405;
SubPoint[2].tolerance:=70;

SubPoint[3].x:=622;
SubPoint[3].y:=96;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=12161405;
SubPoint[3].tolerance:=70;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint3:= AddDTM(TDTM);

MainPoint.x :=620;
MainPoint.y :=119;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=629;
SubPoint[0].y:=56;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=11502447;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=621;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=11502447;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=639;
SubPoint[2].y:=53;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=15528428;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=629;
SubPoint[3].y:=109;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=8691373;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint4:= AddDTM(TDTM);

MainPoint.x :=607;
MainPoint.y :=116;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=638;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=629;
SubPoint[1].y:=78;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=617;
SubPoint[2].y:=92;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=593;
SubPoint[3].y:=110;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint5:= AddDTM(TDTM);

MainPoint.x :=622;
MainPoint.y :=130;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=620;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=625;
SubPoint[1].y:=77;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=630;
SubPoint[2].y:=77;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=636;
SubPoint[3].y:=77;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint6:= AddDTM(TDTM);

MainPoint.x :=626;
MainPoint.y :=118;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337
MainPoint.Tolerance:=255;

SubPoint[0].x:=588;
SubPoint[0].y:=61;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9809339;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=596;
SubPoint[1].y:=60;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9809339;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=607;
SubPoint[2].y:=61;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9809339;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=615;
SubPoint[3].y:=61;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9809339;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint7:= AddDTM(TDTM);

MainPoint.x :=228;
MainPoint.y :=209;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3156218;
MainPoint.Tolerance:=50;

SubPoint[0].x:=246;
SubPoint[0].y:=221;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=3156218;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=222;
SubPoint[1].y:=212;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=3156218;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=223;
SubPoint[2].y:=209;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3156218;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=218;
SubPoint[3].y:=202;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=3156218;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint8:= AddDTM(TDTM);

MainPoint.x :=366;
MainPoint.y :=42;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3554368;
MainPoint.Tolerance:=40;

SubPoint[0].x:=320;
SubPoint[0].y:=48;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=6055277;
SubPoint[0].tolerance:=40;

SubPoint[1].x:=363;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=4870227;
SubPoint[1].tolerance:=40;

SubPoint[2].x:=402;
SubPoint[2].y:=42;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3619390;
SubPoint[2].tolerance:=40;

SubPoint[3].x:=324;
SubPoint[3].y:=47;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=5001812;
SubPoint[3].tolerance:=40;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirAltar:= AddDTM(TDTM);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=10;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

SubPoint[3].x:=676;
SubPoint[3].y:=227;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=65536;
SubPoint[3].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmExit:= AddDTM(TDTM);
end;
procedure WithdrawTiara;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'tiara', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
Stuck := 0;
repeat
Stuck := Stuck + 1;
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('ir tiara') then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
GameTab(5);
if FindObj(x, y, 'tiara', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
exit;
end;
end;
end;
until Stuck = 40;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Tiara found.';
NextPlayer(False);
end;
procedure WithdrawTalisman;
var
x, y: integer;
begin
if FindObj(x, y, 'talism', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindObj(x, y, 'talism', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Talisman found.';
end;
procedure EquipPlayer;
var
x, y: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then
begin
if not(loggedin) then LoginPlayer;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
DestroyaofRandoms;
Randomas;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Booleans[0] of
True: WithdrawTiara;
False:WithdrawTalisman;
end;
if not Players[CurrentPlayer].Strings[1] = 'Equipped' then EquipPlayer;
OpenBankFast('feb');
A:=A+1;
end;
end;
end;
procedure WithdrawPureEssence;
var
x, y: integer;
begin
if FindObj(x, y, 'ure', 103214, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
if FindDTM(dtmPureEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
Players[CurrentPlayer].Strings[2] := 'Could not find Pure Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Pure:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawRegularEssence;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'une essence', 5329496, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
repeat
if FindDTM(dtmRegularEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MMouse(x, y, 1, 1);
stuck:=stuck+1;
if isuptext('une essence') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
end;
until stuck = 100;
Players[CurrentPlayer].Strings[2] := 'Could not find Regular Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Regular:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawBothEssence;
begin
case random(2) of
0: WithdrawRegularEssence;
1: WithdrawPureEssence;
end;
if Regular = False then
begin
WithdrawPureEssence;
Players[CurrentPlayer].strings[0] := 'b';
end;
if Pure = False then
begin
Players[CurrentPlayer].strings[0] := 'a';
WithdrawRegularEssence;
end;
end;
procedure WithdrawEssence;
var
x, y, lost: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Strings[0] of
'a' : WithdrawRegularEssence;
'b' : WithdrawPureEssence;
'c' : WithdrawBothEssence;
end;
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
Break;
end;
until Lost = 1000;
end;
procedure WalkToGateFromBank;
var
x, y, lost : integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if dtmRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
DestroyaofRandoms;
Randomas;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
procedure WalkToRuinsFromGate;
var
x, y, Lost : integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Lost := 0;
repeat
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(10);
Lost := 0;
repeat
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
C:=C+1;
end;
procedure EnterRuins;
var
x, y: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if Players[CurrentPlayer].Booleans[0] = True then
begin
if FindObj(x, y, 'nter', 3026482, 50) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
if Players[CurrentPlayer].Booleans[0] = False then
begin
if FindObj(x, y, 'talisman', 213442, 30) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
end;
if DTMRotated(dtmPoint8, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('nter') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
end;
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
end;
procedure Craft;
var
x, y, I: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('serene') then exit;
if DTMRotated(dtmAirAltar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if isuptext('raft') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
for I := 0 to HowManyPlayers do
begin
SumB := SumB + Players[I].Integers[1];
end;
E:=E+1;
Exit;
end;
end;
NextPlayer(False);
end;
procedure ExitRuins;
var
x, y, Lost : integer;
begin
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if FindObj(x, y, 'ortal', 6458002, 40) then
begin //Copied King of Knives - I'll get the original version later
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Break;
end;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
F:=F+1;
end;
procedure WalkToGateFromRuins;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
RadialRoadWalk(FindRoadColor, 150, 180, 60, 0, 0);
FFlag(10);
RadialRoadWalk(FindRoadColor, 50, 150, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
RadialRoadWalk(FindRoadColor, 1, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
FFlag(10);
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(FindFallyRoadColor, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(FindFallyRoadColor, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
NextPlayer(False);
end;
procedure WalkToBankFromGate;
var
x, y, Lost: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
RadialRoadWalk(FindFallyRoadColor, 350, 20, 30, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
procedure DepositRunes;
var
x, y: integer;
begin
if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankFast('feb');
if FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
J:=J+1;
Exit;
end;
NextPlayer(False);
end;
procedure Progress;
var
I: integer;
begin//I need to know where it's breaking, and this was the most simple way.
writeln('Equipped ' + inttostr(a) + ' times');
writeln('Successfully walked to the gate from the bank ' + inttostr(b) + ' times');
writeln('Successfully walked to the ruins ' + inttostr(c) + ' times');
writeln('Successfully entered the ruins ' + inttostr(d) + ' times');
writeln('Successfully crafted ' + inttostr(e) + ' times');
writeln('Successfully left the ruins ' + inttostr(f) + ' times');
writeln('Successfully walked to the gate from the ruins ' + inttostr(g) + ' times');
writeln('Successfully walked to the bank ' + inttostr(h) + ' times');
writeln('Successfully deposited the runes ' + inttostr(j) + ' times');
for I := 0 to HowManyPlayers-1 do
begin
writeln(Players[I].Strings[2]);
end;
writeln('This is Jack L Krawl''s Air Crafter - 12/31/07');
end;
begin
SetupSRL;
SetupSRLMusic;
DeclarePlayers;
ItemDDTMs;
MotiDDTMs;
ActivateClient;
repeat
EquipPlayer;
WithdrawEssence;
WalkToGateFromBank;
WalkToRuinsFromGate;
EnterRuins;
Craft;
ExitRuins;
WalkToGateFromRuins;
WalkToBankFromGate;
DepositRunes;
Progress;
until SumA <= SumB;
end.

——————————————————
<!– END TEMPLATE: formanswers –>

JAD

2008-01-01 00:42:20

Lol, you post your members app at 666 posts? Already starting off with bad luck :p

Anyways, I looked at it briefly and it looks pretty good actually with a quick glance. I'm going to study it more thoroughly and vote later.

Edit: Few things.

Most of your script is DDTM's, which are great, but less is meat then I thought was.

FindFastRandoms isn't needed any more, and you must have read my tutorial on anti ban from a long time ago and are still using commmands from srl (3.7 I think? maybe it was 3.6 don't remember) that were taken out a while ago. So the script shouldn't compile if I'm correct, which would mean that you just made this script for applying if it doesn't even compile… :p

There's a lot of useless code in there and you could shorten your script a lot by combining procedures by just adding an extra if statement to the Withdraw Regular Ess and Pure and Tiara and Talisman…etc.

IDK what I'm voting yet. Got to study it more.

Edit2: another code shortener (even though things like this don't make the script run any better/worse, it is still important to cut down on code wherever possible without effecting the script to clean it up a bit.)


for I := 0 to HowManyPlayers do
begin
SumB := SumB + Players[i].Integers[1];
end;

a begin and end are only needed after an if statement/for to do loop…etc. if you want to do more then 1 thing after the if statement. This could be shortened to 2 lines of code instead of 4, and you probably did this in other areas of your script too


for I := 0 to HowManyPlayers do
SumB := SumB + Players[i].Integers[1];


if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
could be

if(not(LoggedIn)) or (Players[CurrentPlayer.Strings[1] = 'Inequipped' then exit;

You should have LowerCases or Uppercases on constants that the user sets like that because then if they put (for example) 'inequipped', the script wouldn't work because the first letter is not capital.

Flag is broken still (I think), use FFlag(0) instead.

Try finding the road color once before the radial road walking, and then using it in all your radial walks for that walking procedure/function to save less unneeded lag and finding a color over and over again that you don't need to look for.

At the end of WalkToGateFromRuins, you have NextPlayer(False);. That means the script will only do 1 load per player. Not good.

if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then

Maybe have an else in there so the script will radial walk if it doesn't find the DTM. The more fail safes the marrier!

a little bit more random parameters then 1,1 would probably be good, but not required.


if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;

Once again, could be shortened.

Maybe add some fail safes to your bank procedure to try different open bank functions of srl if OpenBankFast doesn't get the job done? Or to look for the bank symbol and reallocate yourself to the bank if it doesn't work?

if FindObj(x, y, 'tiara', 103214, 30) then

Hmm… Maybe a DTM would be better? Or have a fail safe to use a different technique (maybe DTM/bitmap) if that doesn't work.

All those DDTM's take up space, when regular DTM's would have probably worked just as good for some of the things.


Hope that helps some. It's a good try though, and I may vote yes. Still thinking, but just looking for ways for you to improve it :)

Santa_Clause

2008-01-01 00:53:29

You seem to understand what you have to do. I'm guessing you're just lacking a bit of experience…but that's what members is for. Yes from me.

Couple of notes though, your walking isn't very reliable…maybe you could have used DDTMs too? You could have used a static DTM to withdraw the tiara from the bank…

Smartzkid

2008-01-01 00:54:24

Compiles for me.

Line 30 isn't needed. JAD, you really do need to remove that from your tut.

I'll vote tomorrow after a more thorough look, but at 1.1k lines, I'd say you've got a very good chance at getting a yes from me. Good work.

EDIT: Wow…hmm…Seeing as how half of it is ddtms…meh, whatever, I'll take a look tomorrow.

Santa_Clause

2008-01-01 00:57:03

After reading your introduction…it seems quite interesting. So, you and your sister made this script? That's pretty cool…but now I don't know if I should refer to JackLKrawl as 'he' or 'she'.

JAD

2008-01-01 01:03:06

From: Smartzkid
Line 30 isn't needed. JAD, you really do need to remove that from your tut.


Gah… I'm sooo lazy though :p but yeah, I will tomorrow.

Jackrawl

2008-01-01 01:11:01

From: JAD
Lol, you post your members app at 666 posts? Already starting off with bad luck :p

Anyways, I looked at it briefly and it looks pretty good actually with a quick glance. I'm going to study it more thoroughly and vote later.

Edit: Few things.

Most of your script is DDTM's, which are great, but less is meat then I thought was.

FindFastRandoms isn't needed any more, and you must have read my tutorial on anti ban from a long time ago and are still using commmands from srl (3.7 I think? maybe it was 3.6 don't remember) that were taken out a while ago. So the script shouldn't compile if I'm correct, which would mean that you just made this script for applying if it doesn't even compile… :p

There's a lot of useless code in there and you could shorten your script a lot by combining procedures by just adding an extra if statement to the Withdraw Regular Ess and Pure and Tiara and Talisman…etc.

IDK what I'm voting yet. Got to study it more.

Edit2: another code shortener (even though things like this don't make the script run any better/worse, it is still important to cut down on code wherever possible without effecting the script to clean it up a bit.)


for I := 0 to HowManyPlayers do
begin
SumB := SumB + Players[i].Integers[1];
end;

a begin and end are only needed after an if statement/for to do loop…etc. if you want to do more then 1 thing after the if statement. This could be shortened to 2 lines of code instead of 4, and you probably did this in other areas of your script too


for I := 0 to HowManyPlayers do
SumB := SumB + Players[i].Integers[1];


if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
could be

if(not(LoggedIn)) or (Players[CurrentPlayer.Strings[1] = 'Inequipped' then exit;

You should have LowerCases or Uppercases on constants that the user sets like that because then if they put (for example) 'inequipped', the script wouldn't work because the first letter is not capital.

Flag is broken still (I think), use FFlag(0) instead.

Try finding the road color once before the radial road walking, and then using it in all your radial walks for that walking procedure/function to save less unneeded lag and finding a color over and over again that you don't need to look for.

At the end of WalkToGateFromRuins, you have NextPlayer(False);. That means the script will only do 1 load per player. Not good.

if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then

Maybe have an else in there so the script will radial walk if it doesn't find the DTM. The more fail safes the marrier!

a little bit more random parameters then 1,1 would probably be good, but not required.


if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;

Once again, could be shortened.

Maybe add some fail safes to your bank procedure to try different open bank functions of srl if OpenBankFast doesn't get the job done? Or to look for the bank symbol and reallocate yourself to the bank if it doesn't work?

if FindObj(x, y, 'tiara', 103214, 30) then

Hmm… Maybe a DTM would be better? Or have a fail safe to use a different technique (maybe DTM/bitmap) if that doesn't work.

All those DDTM's take up space, when regular DTM's would have probably worked just as good for some of the things.


Hope that helps some. It's a good try though, and I may vote yes. Still thinking, but just looking for ways for you to improve it :)


Flag is broken? Hmm. I guess what caused it to behave as it did was the repeat until loops.
WalkToGateFromRuins is built so it exits if it is behaving correctly. I did the for to do's as I did because I don't really like the setup. I have trouble with the standards for them
for I := 0 to 28 do
begin
blah;
end;
They just look better to us.
I also read in the scripting standards not to use one line for two lines, so I figured I'd just trash or statements completely. I never liked them anyway. I kept the 'if then breaks' though.

JAD

2008-01-01 01:14:49

From: JackLKrawl
Flag is broken? Hmm. I guess what caused it to behave as it did was the repeat until loops.
WalkToGateFromRuins is built so it exits if it is behaving correctly. I did the for to do's as I did because I don't really like the setup. I have trouble with the standards for them
for I := 0 to 28 do
begin
blah;
end;
They just look better to us.
I also read in the scripting standards not to use one line for two lines, so I figured I'd just trash or statements completely. I never liked them anyway. I kept the 'if then breaks' though.


No need to defend yourself, this is a good learning experience and I'm here to (hopefully) help you learn. :)

Santa_Clause

2008-01-01 01:16:31

Oh…wouldn't this give you an 'Out Of Range':

for I := 0 to HowManyPlayers do

I think it should be:

for I := 0 to HowManyPlayers - 1 do

Jackrawl

2008-01-01 01:17:27

From: Santa_Clause
You seem to understand what you have to do. I'm guessing you're just lacking a bit of experience…but that's what members is for. Yes from me.

Couple of notes though, your walking isn't very reliable…maybe you could have used DDTMs too? You could have used a static DTM to withdraw the tiara from the bank…


[Offtopic]Originally I actually intended to use autocoloring functions as I was going through, but sometimes they just failed to find the color completely, so I figured I'd set a high tolerance…They didn't go well anyway. I had to rely on too many factors, and I hate messing with locations[/Offtopic]

I tried to use DDTMs for the tiara, but it hated me too much. I guess it could be the way isuptext works, but I actually went through a whole lot of versions and then said 'screw it.'
From: Santa_Clause
Oh…wouldn't this give you an 'Out Of Range':

for I := 0 to HowManyPlayers do

I think it should be:

for I := 0 to HowManyPlayers - 1 do


Yeah thats a slip-up. Should've caught that.
It should, the array would be too large.

From: Santa_Clause
After reading your introduction…it seems quite interesting. So, you and your sister made this script? That's pretty cool…but now I don't know if I should refer to JackLKrawl as 'he' or 'she'.


If you can't decide, just say 'Krawl' or if you want to irritate me, 'Crawl.'
'Krawl' is actually our last name - 1 letter mixed up.

[Response to Jad on Ors]
Another reason I don't use or statements most of the time is because they go past that line (like, after 70-80 characters?) with what I worked with.]
Actually, I'm not sure if I tested this EquipPlayer. The first time it worked, but I didn't like it because it took too long. I'm going to replace the FindObj with a more suitable function later.

Santa_Clause

2008-01-01 01:28:16

For things that don't change…we use Static DTMs…not DDTMs. Use a static DTM to find the tiara. One main point, which is somewhere in the centre of the object, and then all the subpoints are the black outline with colour 63556…something like that. Put a 255 tolerance on the DTM, and use FindDTM, not FindDTMRotated.

Jackrawl

2008-01-01 01:30:43

From: JAD
No need to defend yourself, this is a good learning experience and I'm here to (hopefully) help you learn. :)


No need to defend myself at all, I'm not being attacked.
Just out of curiosity, what is there any difference in effectiveness between many lines - few lines, assuming that they go through exact same format?
Like your for to do (2 lines) compared with my for to do (4 lines), besides readability?

From: Santa_Clause
For things that don't change…we use Static DTMs…not DDTMs. Use a static DTM to find the tiara. One main point, which is somewhere in the centre of the object, and then all the subpoints are the black outline with colour 63556…something like that. Put a 255 tolerance on the DTM, and use FindDTM, not FindDTMRotated.


I went through many things for that tiara man, it just hates me.

Why can't you use a DDTM for it, and I couldnt use the 255 tolerance on the mainpoint because it could confuse it with the body tiara or water tiara or something, and wind up taking more time than the FindObj.

Also, I used FindDTM before I felt like the camel in the link.

Is there a way to tell it to ignore a certain 'box' after finding the wrong box?
And for those of you who vote no.
http://youtube.com/watch?v=aJuaZKBABO0
You're the camel!

Santa_Clause

2008-01-01 01:40:08

Ignoring certain boxes is only with colours: FindColorSkipBoxArray/Tolerance. DTMs are faster than DDTMs.

Sorry, didn't know/remember that all tiaras were the same shape.

Jackrawl

2008-01-01 01:47:38

From: Santa_Clause
Ignoring certain boxes is only with colours: FindColorSkipBoxArray/Tolerance. DTMs are faster than DDTMs.

Sorry, didn't know/remember that all tiaras were the same shape.


Eh, maybe I can get the copyright on FindDTMSkipBoxArray(Copy paste)?

No problem.

Also, I want to point out this mistake before anyone else, and assure you that actually this script was made for getting me into members - this was done in half a day. Earlier the script got blasted while I was spamming compile, and I tried to save it during the error, so only the item ddtms and half of dtmFaladorBank(which is now dtmPoint1) survived. If I'm not even allowed to post in the intermediate section, then it really makes no sense to me at all for me to stay at the rank that I am.

I failed to put in a NextPlayer(False) due to Players[CurrentPlayer].integers[1] equaling players[CurrentPlayer].Integers[2], SumB was set up so that every time it crafted it equaled itself plus every characters integers[1] value.

I do not believe that there are any other issues, except with ddtms (occasionally) and way I have it set up so that every character that is not the start character must be 'Inequipped.'
Heres the fixed one WITHOUT an out of range error.

program AirCrafter;//Aer Faber is latin for 'Air Craftsman.'
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/MusicLocation.scar}

var
dtmPoint1, dtmPoint2, dtmPoint3, dtmPoint4, dtmPoint5, dtmPoint6,
dtmPoint7, dtmPoint8, dtmAirAltar, dtmExit:Integer;
dtmRegularEssence, dtmPureEssence, dtmTalisman, dtmAirTiara, dtmAirRune:Integer;
intReg, intPure:integer;
Regular, Pure : Boolean;
SumA, SumB: integer;
a, b, c, d, e, f, g, h, j: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Strings[0] := 'a'; //a - Regular Ess b - Pure ess c - Both
Players[0].Strings[1] := '' //Equipped if you have tali/tiara ready
Players[0].Strings[2] := '';
Players[0].Integers[0] := 1; //How many loads for this character
Players[0].Integers[1] := 0;
Players[0].Booleans[0] := True; //True for a tiara, False for a talisman
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure DefineLoopDuration;
var
I:integer;
begin
for I := 0 to HowManyPlayers-1 do
begin
SumA := SumA + Players[I].Integers[0];
end;
if HowManyPlayers-1 = 0 then
begin
writeln('This loop shall run for ' + inttostr(SumA) + ' over one player');
end;
if HowManyPlayers-1 > 0 then
begin
writeln('This loop shall run for ' + inttostr(SumB) + ' over ' + inttostr(HowManyPlayers));
end;
end;
procedure ItemDDTMs;
var
SubPoint : Array [0..3] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=94;
MainPoint.y :=78;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=5723998;
MainPoint.Tolerance:=30;

SubPoint[0].x:=108;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=92;
SubPoint[1].y:=91;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=105;
SubPoint[2].y:=86;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmRegularEssence:= AddDTM(TDTM);

MainPoint.x :=600;
MainPoint.y :=265;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=8027012;
MainPoint.Tolerance:=15;

SubPoint[0].x:=634;
SubPoint[0].y:=265;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=608;
SubPoint[1].y:=273;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=619;
SubPoint[2].y:=278;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPureEssence:= AddDTM(TDTM);

MainPoint.x :=588;
MainPoint.y :=233;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=12105921;
MainPoint.Tolerance:=40;

SubPoint[0].x:=568;
SubPoint[0].y:=229;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=591;
SubPoint[1].y:=230;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=576;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirTiara:= AddDTM(TDTM);

MainPoint.x :=579;
MainPoint.y :=226;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=11974335;
MainPoint.Tolerance:=30;

SubPoint[0].x:=585;
SubPoint[0].y:=233;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=572;
SubPoint[1].y:=230;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=577;
SubPoint[2].y:=241;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmTalisman:= AddDTM(TDTM);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=10;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirRune:= AddDTM(TDTM);
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure Randomas;
begin
case random(40) of
1:MakeCompass('N');
2:MakeCompass('S');
3:MakeCompass('E');
4:MakeCompass('W');
5:RandomRClick;
6:BoredHuman;
end;
end;
procedure DestroyaOfRandoms;
begin
if not(loggedin) then exit;
FindFastRandoms;
FindNormalRandoms;
end;
procedure MotiDDTMs;
var
SubPoint : array [0..4] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=625;
MainPoint.y :=85;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=634;
SubPoint[0].y:=91;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=62965;
SubPoint[0].tolerance:=100;

SubPoint[1].x:=638;
SubPoint[1].y:=92;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=60909;
SubPoint[1].tolerance:=100;

SubPoint[2].x:=650;
SubPoint[2].y:=93;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=60909;
SubPoint[2].tolerance:=100;

SubPoint[3].x:=654;
SubPoint[3].y:=93;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=60909;
SubPoint[3].tolerance:=100;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint1:= AddDTM(TDTM);

MainPoint.x :=609;
MainPoint.y :=134;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=608;
SubPoint[0].y:=113;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=12227199;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=606;
SubPoint[1].y:=111;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=12227199;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=606;
SubPoint[2].y:=113;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12227199;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=616;
SubPoint[3].y:=111;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=15591909;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint2:= AddDTM(TDTM);

MainPoint.x :=639;
MainPoint.y :=133;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=621;
SubPoint[0].y:=54;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=2313568;
SubPoint[0].tolerance:=70;

SubPoint[1].x:=624;
SubPoint[1].y:=86;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=2313568;
SubPoint[1].tolerance:=70;

SubPoint[2].x:=633;
SubPoint[2].y:=64;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12161405;
SubPoint[2].tolerance:=70;

SubPoint[3].x:=622;
SubPoint[3].y:=96;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=12161405;
SubPoint[3].tolerance:=70;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint3:= AddDTM(TDTM);

MainPoint.x :=620;
MainPoint.y :=119;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=629;
SubPoint[0].y:=56;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=11502447;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=621;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=11502447;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=639;
SubPoint[2].y:=53;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=15528428;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=629;
SubPoint[3].y:=109;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=8691373;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint4:= AddDTM(TDTM);

MainPoint.x :=607;
MainPoint.y :=116;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=638;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=629;
SubPoint[1].y:=78;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=617;
SubPoint[2].y:=92;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=593;
SubPoint[3].y:=110;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint5:= AddDTM(TDTM);

MainPoint.x :=622;
MainPoint.y :=130;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=620;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=625;
SubPoint[1].y:=77;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=630;
SubPoint[2].y:=77;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=636;
SubPoint[3].y:=77;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint6:= AddDTM(TDTM);

MainPoint.x :=626;
MainPoint.y :=118;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337
MainPoint.Tolerance:=255;

SubPoint[0].x:=588;
SubPoint[0].y:=61;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9809339;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=596;
SubPoint[1].y:=60;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9809339;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=607;
SubPoint[2].y:=61;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9809339;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=615;
SubPoint[3].y:=61;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9809339;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint7:= AddDTM(TDTM);

MainPoint.x :=228;
MainPoint.y :=209;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3156218;
MainPoint.Tolerance:=50;

SubPoint[0].x:=246;
SubPoint[0].y:=221;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=3156218;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=222;
SubPoint[1].y:=212;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=3156218;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=223;
SubPoint[2].y:=209;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3156218;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=218;
SubPoint[3].y:=202;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=3156218;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint8:= AddDTM(TDTM);

MainPoint.x :=366;
MainPoint.y :=42;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3554368;
MainPoint.Tolerance:=40;

SubPoint[0].x:=320;
SubPoint[0].y:=48;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=6055277;
SubPoint[0].tolerance:=40;

SubPoint[1].x:=363;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=4870227;
SubPoint[1].tolerance:=40;

SubPoint[2].x:=402;
SubPoint[2].y:=42;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3619390;
SubPoint[2].tolerance:=40;

SubPoint[3].x:=324;
SubPoint[3].y:=47;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=5001812;
SubPoint[3].tolerance:=40;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirAltar:= AddDTM(TDTM);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=10;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

SubPoint[3].x:=676;
SubPoint[3].y:=227;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=65536;
SubPoint[3].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmExit:= AddDTM(TDTM);
end;
procedure WithdrawTiara;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'tiara', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
Stuck := 0;
repeat
Stuck := Stuck + 1;
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('ir tiara') then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
GameTab(5);
if FindObj(x, y, 'tiara', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
exit;
end;
end;
end;
until Stuck = 40;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Tiara found.';
NextPlayer(False);
end;
procedure WithdrawTalisman;
var
x, y: integer;
begin
if FindObj(x, y, 'talism', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindObj(x, y, 'talism', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Talisman found.';
end;
procedure EquipPlayer;
var
x, y: integer;
begin
if Players[CurrentPlayer].Active = True then LoginPlayer;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then
begin
if not(loggedin) then LoginPlayer;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
DestroyaofRandoms;
Randomas;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Booleans[0] of
True: WithdrawTiara;
False:WithdrawTalisman;
end;
if not Players[CurrentPlayer].Strings[1] = 'Equipped' then EquipPlayer;
OpenBankFast('feb');
A:=A+1;
end;
end;
end;
procedure WithdrawPureEssence;
var
x, y: integer;
begin
if FindObj(x, y, 'ure', 103214, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
if FindDTM(dtmPureEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
Players[CurrentPlayer].Strings[2] := 'Could not find Pure Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Pure:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawRegularEssence;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'une essence', 5329496, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
repeat
if FindDTM(dtmRegularEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MMouse(x, y, 1, 1);
stuck:=stuck+1;
if isuptext('une essence') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
end;
until stuck = 100;
Players[CurrentPlayer].Strings[2] := 'Could not find Regular Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Regular:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawBothEssence;
begin
case random(2) of
0: WithdrawRegularEssence;
1: WithdrawPureEssence;
end;
if Regular = False then
begin
WithdrawPureEssence;
Players[CurrentPlayer].strings[0] := 'b';
end;
if Pure = False then
begin
Players[CurrentPlayer].strings[0] := 'a';
WithdrawRegularEssence;
end;
end;
procedure WithdrawEssence;
var
x, y, lost: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Strings[0] of
'a' : WithdrawRegularEssence;
'b' : WithdrawPureEssence;
'c' : WithdrawBothEssence;
end;
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
Break;
end;
until Lost = 1000;
end;
procedure WalkToGateFromBank;
var
x, y, lost : integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if dtmRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
DestroyaofRandoms;
Randomas;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
procedure WalkToRuinsFromGate;
var
x, y, Lost : integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Lost := 0;
repeat
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(10);
Lost := 0;
repeat
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
C:=C+1;
end;
procedure EnterRuins;
var
x, y: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if Players[CurrentPlayer].Booleans[0] = True then
begin
if FindObj(x, y, 'nter', 3026482, 50) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
if Players[CurrentPlayer].Booleans[0] = False then
begin
if FindObj(x, y, 'talisman', 213442, 30) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
end;
if DTMRotated(dtmPoint8, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('nter') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
end;
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
end;
procedure Craft;
var
x, y, I: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('serene') then exit;
if DTMRotated(dtmAirAltar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if isuptext('raft') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
E:=E+1;
Exit;
end;
end;
NextPlayer(False);
end;
procedure ExitRuins;
var
x, y, Lost : integer;
begin
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if FindObj(x, y, 'ortal', 6458002, 40) then
begin //Copied King of Knives - I'll get the original version later
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Break;
end;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
F:=F+1;
end;
procedure WalkToGateFromRuins;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
RadialRoadWalk(FindRoadColor, 150, 180, 60, 0, 0);
FFlag(10);
RadialRoadWalk(FindRoadColor, 50, 150, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
RadialRoadWalk(FindRoadColor, 1, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
FFlag(10);
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(FindFallyRoadColor, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(FindFallyRoadColor, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
NextPlayer(False);
end;
procedure WalkToBankFromGate;
var
x, y, Lost: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
RadialRoadWalk(FindFallyRoadColor, 350, 20, 30, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
procedure DepositRunes;
var
x, y: integer;
begin
if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankFast('feb');
if FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
J:=J+1;
Exit;
end;
NextPlayer(False);
end;
procedure Progress;
var
I: integer;
begin//I need to know where it's breaking, and this was the most simple way.
writeln('Equipped ' + inttostr(a) + ' times');
writeln('Successfully walked to the gate from the bank ' + inttostr(b) + ' times');
writeln('Successfully walked to the ruins ' + inttostr(c) + ' times');
writeln('Successfully entered the ruins ' + inttostr(d) + ' times');
writeln('Successfully crafted ' + inttostr(e) + ' times');
writeln('Successfully left the ruins ' + inttostr(f) + ' times');
writeln('Successfully walked to the gate from the ruins ' + inttostr(g) + ' times');
writeln('Successfully walked to the bank ' + inttostr(h) + ' times');
writeln('Successfully deposited the runes ' + inttostr(j) + ' times');
for I := 0 to HowManyPlayers-1 do
begin
writeln(Players[I].Strings[2]);
end;
writeln('This is Jack L Krawl''s Air Crafter - 1/01/08');
end;
procedure NuxtPlayur;
var
A: integer;
begin
if Players[CurrentPlayer].integers[1] = Players[CurrentPlayer].Integers[0] then
begin
A:=A+1;
for A := A to HowManyPlayers-1 do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
if Players[CurrentPlayer].Active = False then
begin
A:=A+1;
for A := A to HowManyPlayers-1 do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
end;
begin
SetupSRL;
SetupSRLMusic;
DeclarePlayers;
ItemDDTMs;
MotiDDTMs;
ActivateClient;
repeat
EquipPlayer;
WithdrawEssence;
WalkToGateFromBank;
WalkToRuinsFromGate;
EnterRuins;
Craft;
ExitRuins;
WalkToGateFromRuins;
WalkToBankFromGate;
DepositRunes;
Progress;
NuxtPlayur;
until SumA <= SumB;
end.
Anyways family is coming around this week, and I start school on the second, so I'll only be here at 4-5 P.M. Eastern if I'm lucky.

BobboHobbo

2008-01-01 02:17:02

Mmm, tough one, yes you know DDTM,DTMS, but i dont get why you use FindObj to find a tiara? DTM's will do it for you.

Mmm, holding vote, leaning towards no. But both of you are still learning so… ethier way GL. Ill wait for other peoples posts.

Naum

2008-01-01 05:06:57

Thats a dmn yes m8. You know enough to be a member! Keep on learning dude :)

mickaliscious

2008-01-01 06:10:26

So why aren't you using static DTM's for pure essence, regular essence, tiara, talisman and air runes? If nothing changes at all changes the DDTM during the entire execution of your script you should make it a static DTM. Saves about 30 lines of code each, and also saves time in compiling and executing.

I just looked again and nothing in your DDTM's is autocolored or tolerance changing. Every single DDTM you made could be replaced with a static dtm. That removes approximately 400 lines of code.

The whole goal is to be as efficient as possible, and putting unneeded begins/ends and ddtms kind've works against that goal.

Also, you never free any of the dtms! Thats a memory waster right there. I wonder how many unfreed dtm's you have hiding away on your computer using up precious bytes. lol.

You put a good amount of time into everything, have by the book standards, multiplayer, and I'm sure the script accomplishes what it should but your unnecessary use of ddtm's and FindFastRandoms makes me think you should study up a little more and learn to be as efficient as possible.

Sorry, it was a tough one but its a no.

Wizzup?

2008-01-01 07:06:15

Jack, you've been here for a long time.
What I see right here is a good script.
Better than the average, you got my yes!

Negaal

2008-01-01 08:10:52

Well, you've been here long…this script wouldn't run over hour or so…
Well, I suggest you to learn usage of ddtms.
The one problem with DTMs is that they were static, meaning that they couldn't be easily edited or changed. They had a set tolerance,area,color ect. Making it hard for them to be very tolerable for some things.

This is why DDTMs were created.


Well, I suggest you to use ddtms only on minimap… use static dtm for items

And I'm currently counting peoples who have used Findnormalrandoms.
Congrationlations you are third…let's see how far it goes:)
DUH! I just wanted to say don't use them…

Standards needs fixing…well, But i had worse than you…
Also un-logical player changing too, nextplayer is middle of procedure ^^

And don't defend yourself so much…Findobj as tiarafinder works but it's shows your standards needs fixing and you'll need to learn…

hmm

case random(2) of
0:writeln('Yes');
1:writeln('No');
end;

Yes

n3ss3s

2008-01-01 08:10:54

 GoTo Wizzy´s_post

Yes from me.

Jackrawl

2008-01-01 10:11:32

From: BobboHobbo
Mmm, tough one, yes you know DDTM,DTMS, but i dont get why you use FindObj to find a tiara? DTM's will do it for you.

Mmm, holding vote, leaning towards no. But both of you are still learning so… ethier way GL. Ill wait for other peoples posts.


It's shaped like a half-circle, I used it in the repeat until loop once it's withdrawn, but not in the bank because there were too many things it could confuse itself. 11 objects are similar to it - The other tiaras, the mime mask, and the essence.

From: NaumanAkhlaq
Thats a dmn yes m8. You know enough to be a member! Keep on learning dude :)


Thanks, will do!
From: n3ss3s
 GoTo Wizzy´s_post

Yes from me.


Thanks lol

From: mickaliscious
So why aren't you using static DTM's for pure essence, regular essence, tiara, talisman and air runes? If nothing changes at all changes the DDTM during the entire execution of your script you should make it a static DTM. Saves about 30 lines of code each, and also saves time in compiling and executing.

I just looked again and nothing in your DDTM's is autocolored or tolerance changing. Every single DDTM you made could be replaced with a static dtm. That removes approximately 400 lines of code.

The whole goal is to be as efficient as possible, and putting unneeded begins/ends and ddtms kind've works against that goal.

Also, you never free any of the dtms! Thats a memory waster right there. I wonder how many unfreed dtm's you have hiding away on your computer using up precious bytes. lol.

You put a good amount of time into everything, have by the book standards, multiplayer, and I'm sure the script accomplishes what it should but your unnecessary use of ddtm's and FindFastRandoms makes me think you should study up a little more and learn to be as efficient as possible.

Sorry, it was a tough one but its a no.


I started to use autocoloring, but that just got outweighed. There were no colors similar to water in Falador, really, and it required you to start logged in or have EquipPlayer before the repeat until as well. Sometimes it would work, sometimes it wouldn't.

How do I free dtms, and how can I use FindFastRandoms more efficiently?
And don't defend yourself so much…Findobj as tiarafinder works but it's shows your standards needs fixing and you'll need to learn…


What do you mean?

From: Negaal
Well, you've been here long…this script wouldn't run over hour or so…
Well, I suggest you to learn usage of ddtms.


Well, I suggest you to use ddtms only on minimap… use static dtm for items

And I'm currently counting peoples who have used Findnormalrandoms.
Congrationlations you are third…let's see how far it goes:)
DUH! I just wanted to say don't use them…

Standards needs fixing…well, But i had worse than you…
Also un-logical player changing too, nextplayer is middle of procedure ^^

And don't defend yourself so much…Findobj as tiarafinder works but it's shows your standards needs fixing and you'll need to learn…

hmm

case random(2) of
0:writeln('Yes');
1:writeln('No');
end;

Yes



O_o I'm going to come back with the number of stickied tutorials saying 'Use FindNormalRandom's with FindFastRandoms because FindFastRandoms doesn't find all of them.'

I didn't use cases like that did I? Ugh…
Don't get me wrong, I'm not defending, I'm trying to learn what I didn't learn in the tutorials or the scripting help section. Am I coming across aggressive? Oh crap, triple post T_T Thats the way to go on an application.

King of Knives

2008-01-01 10:41:10

Atleast you acknowledge that you did triple post ;)

Anyway. The script looks OK. Maybe a little inreliable walking.
I've never been a fan of DDTM's, but I'm the biggest fan of normal DTMs. One of my motto's: "If you can't make a regular DTM work, you're not worthy!" :p

I'm not gonna rant about you using a DDTM and FindObj for tiara, since everybody covered that… times ten…

And you talk about DTM-skipboxes and a copyright. You might as well forget it ;) I made something like that already (adjustable skipboxes…)

It looks to be a yes, but if you get in, you have to be more creative than FindObj :D

-Knives

n3ss3s

2008-01-01 10:44:28

pseudomerged.

Jackrawl

2008-01-01 10:52:37

From: King of Knives
Atleast you acknowledge that you did triple post ;)

Anyway. The script looks OK. Maybe a little inreliable walking.
I've never been a fan of DDTM's, but I'm the biggest fan of normal DTMs. One of my motto's: "If you can't make a regular DTM work, you're not worthy!" :p

I'm not gonna rant about you using a DDTM and FindObj for tiara, since everybody covered that… times ten…

And you talk about DTM-skipboxes and a copyright. You might as well forget it ;) I made something like that already (adjustable skipboxes…)

It looks to be a yes, but if you get in, you have to be more creative than FindObj :D

-Knives


Who triple posted? lol

Yeah yeah, enough with the tiara already! You have to withdraw it once per character, I did make ddtm of it, but it doesn't behave as it should. I'm probably doing something wrong here, like the last time I used the ddtm as the y coordinate..Anyway, it should still be in there. I don't think I removed it.

Thanks for merging, Wizzup?, that did not look good on an application.

I redid WalkToGateFromRuins, is this what you meant JAD?

procedure WalkToBankFromGate;
var
x, y, Lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
RadialRoadWalk(FindFallyRoadColor, 350, 20, 30, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 320, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 320, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 50, 50, 0, 0);
FFlag(0);
if FindSymbol(x, y, 'Bank') then break;
end;
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
I also have a question with if not thens. If it does find it, then is the x, y saved so that I could just leave out the 'if then'?

JAD

2008-01-01 11:56:28

From: n3ss3s
 GoTo Wizzy´s_post

Yes from me.


Probably one of the main reasons Wizzy (and other admins) don't vote very close after a members application opens, is so people don't just copy their vote.

We want all the srl member's opinions here, not Wizzup?'s twice.

BTW, I voted yes. You showed you knew how to script, and I would like to see you continually work on this script even when (if you do) get accepted. A few touch-ups here and there would make drastic changes.

Good luck!

richk1693

2008-01-01 11:59:29

Yes. IMO you know more than enough for members.

n3ss3s

2008-01-01 12:05:48

Umm… Jad…
[donotgetoffendedthisismorelikeajoke]
Which of these you haven't heard of, I agree or GoTo? :p
[/]

JAD

2008-01-01 12:09:52

From: n3ss3s
Umm… Jad…
[donotgetoffendedthisismorelikeajoke]
Which of these you haven't heard of, I agree or GoTo? :p
[/]


Sorry. I didn't see an "I agree" in there (maybe because there wasn't one?), I just saw a Wizzup? voted yes so I voted yes :p

I didn't mean it in a mean way, it was in a constructive way. I wouldn't know if you looked at the script yourself or not but you didn't comment on it, all you did was say Wizzup? voted yes so I'm voting yes.

No big deal, just trying to help.

n3ss3s

2008-01-01 12:11:27

Yeh, I know you… Or I think so lol, I usually say something more but the round was starting in CSS, though did read the script.

Rikje

2008-01-01 12:17:06

You know the things you need to know. imo.

you're active in the commuineti and you care about it.
yes!

Jackrawl

2008-01-01 12:17:40

From: JAD
Probably one of the main reasons Wizzy (and other admins) don't vote very close after a members application opens, is so people don't just copy their vote.

We want all the srl member's opinions here, not Wizzup?'s twice.

BTW, I voted yes. You showed you knew how to script, and I would like to see you continually work on this script even when (if you do) get accepted. A few touch-ups here and there would make drastic changes.

Good luck!


Thanks!
Trust me, if I stop working on Runecrafting h4x, you might as well ban me permanently.

From: richk1693
Yes. IMO you know more than enough for members.


Thanks richk!

From: rikjess
You know the things you need to know. imo.

you're active in the commuineti and you care about it.
yes!


Thankyou!!

I fixed a few problems. I noticed at one point it started going backwards, I gotta do some stuff so I can't go for another load.
It did work perfectly for 3/4ths of the load.

program AiRCorafter;//Aer Faber is latin for 'Air Craftsman.'
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/MusicLocation.scar}

var
dtmPoint1, dtmPoint2, dtmPoint3, dtmPoint4, dtmPoint5, dtmPoint6,
dtmPoint7, dtmPoint8, dtmAirAltar, dtmExit:Integer;
dtmRegularEssence, dtmPureEssence, dtmTalisman, dtmAirTiara, dtmAirRune:Integer;
intReg, intPure:integer;
Regular, Pure : Boolean;
SumA, SumB: integer;
a, b, c, d, e, f, g, h, j: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'ackl';
Players[0].Strings[0] := 'a'; //A - Regular Ess B - Pure ess C - Both
Players[0].Strings[1] := 'Equipped' //Equipped if you have tali/tiara ready
Players[0].Strings[2] := '';
Players[0].Integers[0] := 1; //How many loads for this character
Players[0].Integers[1] := 0;
Players[0].Booleans[0] := True; //True for a tiara, False for a talisman
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure DefineLoopDuration;
var
I:integer;
begin
for I := 0 to HowManyPlayers-1 do
begin
SumA := SumA + Players[I].Integers[0];
end;
if HowManyPlayers-1 = 0 then
begin
writeln('This loop shall run for ' + inttostr(SumA) + ' over one player');
end;
if HowManyPlayers-1 > 0 then
begin
writeln('This loop shall run for ' + inttostr(SumB) + ' over ' + inttostr(HowManyPlayers));
end;
end;
procedure ItemDDTMs;
var
SubPoint : Array [0..3] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=94;
MainPoint.y :=78;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=5723998;
MainPoint.Tolerance:=30;

SubPoint[0].x:=108;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=92;
SubPoint[1].y:=91;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=105;
SubPoint[2].y:=86;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmRegularEssence:= AddDTM(TDTM);

MainPoint.x :=600;
MainPoint.y :=265;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=8027012;
MainPoint.Tolerance:=15;

SubPoint[0].x:=634;
SubPoint[0].y:=265;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=608;
SubPoint[1].y:=273;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=619;
SubPoint[2].y:=278;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPureEssence:= AddDTM(TDTM);

MainPoint.x :=578;
MainPoint.y :=233;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=11447993;
MainPoint.Tolerance:=40;

SubPoint[0].x:=579;
SubPoint[0].y:=226;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=574;
SubPoint[1].y:=237;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=585;
SubPoint[2].y:=236;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirTiara:= AddDTM(TDTM);

MainPoint.x :=579;
MainPoint.y :=226;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=11974335;
MainPoint.Tolerance:=30;

SubPoint[0].x:=585;
SubPoint[0].y:=233;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=572;
SubPoint[1].y:=230;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=577;
SubPoint[2].y:=241;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmTalisman:= AddDTM(TDTM);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=30;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirRune:= AddDTM(TDTM);
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
procedure Randomas;
begin
case random(40) of
1:MakeCompass('N');
2:MakeCompass('S');
3:MakeCompass('E');
4:MakeCompass('W');
5:RandomRClick;
6:BoredHuman;
end;
end;
procedure DestroyaOfRandoms;
begin
if not(loggedin) then exit;
FindFastRandoms;
end;
procedure MotiDDTMs;
var
SubPoint : array [0..4] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=637;
MainPoint.y :=85;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=634;
SubPoint[0].y:=91;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=62965;
SubPoint[0].tolerance:=100;

SubPoint[1].x:=638;
SubPoint[1].y:=92;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=60909;
SubPoint[1].tolerance:=100;

SubPoint[2].x:=650;
SubPoint[2].y:=93;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=60909;
SubPoint[2].tolerance:=100;

SubPoint[3].x:=654;
SubPoint[3].y:=93;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=60909;
SubPoint[3].tolerance:=100;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint1:= AddDTM(TDTM);

MainPoint.x :=609;
MainPoint.y :=134;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=608;
SubPoint[0].y:=113;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=12227199;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=606;
SubPoint[1].y:=111;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=12227199;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=606;
SubPoint[2].y:=113;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12227199;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=616;
SubPoint[3].y:=111;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=15591909;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint2:= AddDTM(TDTM);

MainPoint.x :=639;
MainPoint.y :=133;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=621;
SubPoint[0].y:=54;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=2313568;
SubPoint[0].tolerance:=70;

SubPoint[1].x:=624;
SubPoint[1].y:=86;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=2313568;
SubPoint[1].tolerance:=70;

SubPoint[2].x:=633;
SubPoint[2].y:=64;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12161405;
SubPoint[2].tolerance:=70;

SubPoint[3].x:=622;
SubPoint[3].y:=96;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=12161405;
SubPoint[3].tolerance:=70;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint3:= AddDTM(TDTM);

MainPoint.x :=620;
MainPoint.y :=119;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=629;
SubPoint[0].y:=56;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=11502447;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=621;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=11502447;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=639;
SubPoint[2].y:=53;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=15528428;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=629;
SubPoint[3].y:=109;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=8691373;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint4:= AddDTM(TDTM);

MainPoint.x :=607;
MainPoint.y :=116;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=638;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=629;
SubPoint[1].y:=78;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=617;
SubPoint[2].y:=92;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=593;
SubPoint[3].y:=110;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint5:= AddDTM(TDTM);

MainPoint.x :=622;
MainPoint.y :=130;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=620;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=625;
SubPoint[1].y:=77;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=630;
SubPoint[2].y:=77;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=636;
SubPoint[3].y:=77;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint6:= AddDTM(TDTM);

MainPoint.x :=626;
MainPoint.y :=118;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337
MainPoint.Tolerance:=255;

SubPoint[0].x:=588;
SubPoint[0].y:=61;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9809339;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=596;
SubPoint[1].y:=60;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9809339;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=607;
SubPoint[2].y:=61;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9809339;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=615;
SubPoint[3].y:=61;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9809339;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint7:= AddDTM(TDTM);

MainPoint.x :=228;
MainPoint.y :=209;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3156218;
MainPoint.Tolerance:=50;

SubPoint[0].x:=246;
SubPoint[0].y:=221;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=3156218;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=222;
SubPoint[1].y:=212;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=3156218;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=223;
SubPoint[2].y:=209;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3156218;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=218;
SubPoint[3].y:=202;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=3156218;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint8:= AddDTM(TDTM);

MainPoint.x :=366;
MainPoint.y :=42;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3554368;
MainPoint.Tolerance:=40;

SubPoint[0].x:=320;
SubPoint[0].y:=48;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=6055277;
SubPoint[0].tolerance:=40;

SubPoint[1].x:=363;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=4870227;
SubPoint[1].tolerance:=40;

SubPoint[2].x:=402;
SubPoint[2].y:=42;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3619390;
SubPoint[2].tolerance:=40;

SubPoint[3].x:=324;
SubPoint[3].y:=47;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=5001812;
SubPoint[3].tolerance:=40;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirAltar:= AddDTM(TDTM);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=10;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

SubPoint[3].x:=676;
SubPoint[3].y:=227;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=65536;
SubPoint[3].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmExit:= AddDTM(TDTM);
end;
procedure WithdrawTiara;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'ir tiara', 16645629, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
Stuck := 0;
repeat
Stuck := Stuck + 1;
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
GameTab(5);
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
exit;
end;
end;
until Stuck = 40;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Tiara found.';
NextPlayer(False);
end;
procedure WithdrawTalisman;
var
x, y: integer;
begin
if FindObj(x, y, 'talism', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindObj(x, y, 'talism', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Talisman found.';
end;
procedure EquipPlayer;
var
x, y: integer;
begin
if Players[CurrentPlayer].Active = True then LoginPlayer;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then
begin
if not(loggedin) then LoginPlayer;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
DestroyaofRandoms;
Randomas;
end;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Booleans[0] of
True: WithdrawTiara;
False:WithdrawTalisman;
end;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then EquipPlayer;
OpenBankFast('feb');
A:=A+1;
end;
end;
procedure WithdrawPureEssence;
var
x, y: integer;
begin
if FindObj(x, y, 'ure', 103214, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
if FindDTM(dtmPureEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
Players[CurrentPlayer].Strings[2] := 'Could not find Pure Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Pure:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawRegularEssence;
var
x, y, stuck: integer;
begin
if FindDTM(dtmRegularEssence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('une ess') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
writeln('Make sure your essence is at the top slot, and is visible');
end;
NextPlayer(False);
end;
procedure WithdrawBothEssence;
begin
case random(2) of
0: WithdrawRegularEssence;
1: WithdrawPureEssence;
end;
if Regular = False then
begin
WithdrawPureEssence;
Players[CurrentPlayer].strings[0] := 'b';
end;
if Pure = False then
begin
Players[CurrentPlayer].strings[0] := 'a';
WithdrawRegularEssence;
end;
end;
procedure WithdrawEssence;
var
x, y, lost: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Strings[0] of
'a' : WithdrawRegularEssence;
'b' : WithdrawPureEssence;
'c' : WithdrawBothEssence;
end;
Lost:=0;
repeat
Lost:=Lost+1;
wait(20);
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
Break;
end;
until Lost = 1000;
end;
procedure WalkToGateFromBank;
var
x, y, lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
MakeCompass('N');
RadialRoadWalk(RCo, 160, 250, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(0);
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
RadialRoadWalk(RCo, 170, 220, 40, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if dtmRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
DestroyaofRandoms;
Randomas;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(0);
B:=B+1;
end;
end;
end;
procedure WalkToRuinsFromGate;
var
x, y, Lost : integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Lost := 0;
repeat
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(10);
Lost := 0;
repeat
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
C:=C+1;
end;
procedure EnterRuins;
var
x, y: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if Players[CurrentPlayer].Booleans[0] = True then
begin
if FindObj(x, y, 'nter', 3026482, 50) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
if Players[CurrentPlayer].Booleans[0] = False then
begin
if FindObj(x, y, 'talisman', 213442, 30) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
end;
if DTMRotated(dtmPoint8, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('nter') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
end;
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
end;
procedure Craft;
var
x, y, I: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('serene') then exit;
if DTMRotated(dtmAirAltar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if isuptext('raft') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
E:=E+1;
Exit;
end;
end;
NextPlayer(False);
end;
procedure ExitRuins;
var
x, y, Lost : integer;
begin
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if FindObj(x, y, 'ortal', 6458002, 40) then
begin //Copied King of Knives - I'll get the original version later
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Break;
end;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
F:=F+1;
end;
procedure WalkToGateFromRuins;
var
RCo:Integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
RCo := FindRoadColor;
if RCo > 0 then
begin
RadialRoadWalk(RCo, 150, 180, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 50, 150, 60, 0, 0);
DestroyaofRandoms;
FFlag(10);
RadialRoadWalk(RCo, 1, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
end;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
begin
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
NextPlayer(False);
end;
procedure WalkToBankFromGate;
var
x, y, Lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
RadialRoadWalk(FindFallyRoadColor, 350, 20, 30, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 50, 50, 0, 0);
FFlag(0);
if FindSymbol(x, y, 'Bank') then break;
end;
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
procedure DepositRunes;
var
x, y: integer;
begin
if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankFast('feb');
if not FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindObj(x, y, 'ir rune', 14869221, 40) then
Mouse(x, y, 1, 1, True);
end;
if FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('ir rune') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
end;
J:=J+1;
Exit;
end;
NextPlayer(False);
end;
procedure Progress;
var
I: integer;
begin//I need to know where it's breaking, and this was the most simple way.
writeln('Equipped ' + inttostr(a) + ' times');
writeln('Successfully walked to the gate from the bank ' + inttostr(b) + ' times');
writeln('Successfully walked to the ruins ' + inttostr(c) + ' times');
writeln('Successfully entered the ruins ' + inttostr(d) + ' times');
writeln('Successfully crafted ' + inttostr(e) + ' times');
writeln('Successfully left the ruins ' + inttostr(f) + ' times');
writeln('Successfully walked to the gate from the ruins ' + inttostr(g) + ' times');
writeln('Successfully walked to the bank ' + inttostr(h) + ' times');
writeln('Successfully deposited the runes ' + inttostr(j) + ' times');
for I := 0 to HowManyPlayers-1 do
begin
writeln(Players[I].Strings[2]);
end;
writeln('This is Jack L Krawl''s Air Crafter - 1/01/08');
end;
procedure NuxtPlayur;
var
A: integer;
begin
if Players[CurrentPlayer].integers[1] = Players[CurrentPlayer].Integers[0] then
begin
A:=A+1;
for A := A to HowManyPlayers-1 do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
if Players[CurrentPlayer].Active = False then
begin
A:=A+1;
for A := A to HowManyPlayers-1 do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
end;
begin
SetupSRL;
SetupSRLMusic;
DeclarePlayers;
ItemDDTMs;
MotiDDTMs;
ActivateClient;
repeat
EquipPlayer;
WithdrawEssence;
WalkToGateFromBank;
WalkToRuinsFromGate;
EnterRuins;
Craft;
ExitRuins;
WalkToGateFromRuins;
WalkToBankFromGate;
DepositRunes;
Progress;
NuxtPlayur;
until SumA <= SumB;
end.

P1nky

2008-01-01 12:39:26

yeah most of your script is DDTM and someone already said wont run over a hour i agree with that but you did put your effort learning DDTMs and its quite good of a script just need to be mod or managed by someone unless you can do it

well YES just keep in mind what i said

Smartzkid

2008-01-01 12:54:18

You guys know SCAR, you just need to work on your style or whatever you want to call it. Basically, you just need some practice.

Yes.

Jackrawl

2008-01-01 12:57:38

From: p1nky
yeah most of your script is DDTM and someone already said wont run over a hour i agree with that but you did put your effort learning DDTMs and its quite good of a script just need to be mod or managed by someone unless you can do it

well YES just keep in mind what i said


Not over an hour, not yet. Trust me, I can and will make it so it can run for nights in a row

From: Smartzkid
You guys know SCAR, you just need to work on your style or whatever you want to call it. Basically, you just need some practice.

Yes.


I agree, I'm not finished learning and I'm not finished working. Thanks for your vote!

mickaliscious

2008-01-01 16:02:52

From: JackLKrawl

How do I free dtms, and how can I use FindFastRandoms more efficiently?


FreeDTM(blah);

The most efficient way to use FindFastRandoms is to not use it at all. Everything it does is already in FindNormalRandoms. A good antirandoms procedure basically includes FindNormalRandoms and an if FindFight then statement. Thats really all you'll need.

Please please please for me… Try to learn how to make and use static dtm's. You don't need to do ddtm's for everything.

Those were the only things in your script I didn't like. You'd have my full support if you did those few things, and I'm looking forward to the creation of a reliable essence crafter. (I have 20k essence in bank to be crafted)

You're going to get members anyway, I just wanted to point those things out.

Edit: I just noticed you used Players[CurrentPlayer].Strings[2] when you could have used Players[CurrentPlayer].Loc. Its not a big deal at all actually.

Also, only a few people know, but instead of HowManyPlayers-1 you could do High(Players). High(Players) is faster and gives the same result.

Jackrawl

2008-01-01 16:18:10

From: mickaliscious
FreeDTM(blah);

The most efficient way to use FindFastRandoms is to not use it at all. Everything it does is already in FindNormalRandoms. A good antirandoms procedure basically includes FindNormalRandoms and an if FindFight then statement. Thats really all you'll need.

Please please please for me… Try to learn how to make and use static dtm's. You don't need to do ddtm's for everything.

Those were the only things in your script I didn't like. You'd have my full support if you did those few things, and I'm looking forward to the creation of a reliable essence crafter. (I have 20k essence in bank to be crafted)

You're going to get members anyway, I just wanted to point those things out.

Edit: I just noticed you used Players[CurrentPlayer].Strings[2] when you could have used Players[CurrentPlayer].Loc. Its not a big deal at all actually.

Also, only a few people know, but instead of HowManyPlayers-1 you could do High(Players). High(Players) is faster and gives the same result.


OK, thankyou! I will fix these things now. I know how to do static dtms, it's just that…HOLY MOTHER OF GOD, IT IS SNOWING.
Edit:
Crap dude, I just looked outside and it was so white. Earlier it was just small flurries, now it's like a blizzard(We're from the South).
Originally I did it with Players[CurrentPlayer].Loc, but it just wasn't worth it. Most of the navigation was done with ddtms, so it was just not effective because it would go in chains. It would think it found one thing, but it would find another. It's been tested, and it works perfectly for two loads (He only set it to do 2).

I'll make the corrections, thanks Mick!
I guess FindFight would include the swarms.
Edit: Do you use FreeDTM with the integer or TDTM?

This is what I have so far.
program AirCrafter;//Aer Faber is latin for 'Air Craftsman.'
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/MusicLocation.scar}
const
Dist = True; //Run far?
var
dtmPoint1, dtmPoint2, dtmPoint3, dtmPoint4, dtmPoint5, dtmPoint6,
dtmPoint7, dtmPoint8, dtmAirAltar, dtmExit:Integer;
dtmRegularEssence, dtmPureEssence, dtmTalisman, dtmAirTiara, dtmAirRune:Integer;
intReg, intPure:integer;
Regular, Pure : Boolean;
SumA, SumB: integer;
a, b, c, d, e, f, g, h, j: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'ackl';
Players[0].Strings[0] := 'a'; //a - Regular Ess b - Pure ess c - Both
Players[0].Strings[1] := 'Equipped' //Equipped if you have tali/tiara ready
Players[0].Strings[2] := '';
Players[0].Integers[0] := 1; //How many loads for this character
Players[0].Integers[1] := 0;
Players[0].Booleans[0] := True; //True for a tiara, False for a talisman
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure DefineLoopDuration;
var
I:integer;
begin
for I := 0 to High(Players) do
begin
SumA := SumA + Players[I].Integers[0];
end;
if High(Players) = 0 then
begin
writeln('This loop shall run for ' + inttostr(SumA) + ' over one player');
end;
if High(Players) > 0 then
begin
writeln('This loop shall run for ' + inttostr(SumB) + ' over ' + inttostr(HowManyPlayers));
end;
end;
procedure ItemDDTMs;
begin
dtmRegularEssence := DTMFromString('78DA63CC616060F065C0003A8C0C0C40C4C00' +
'CC48C3140221A5D0523831C03929A4C201146404D1C90F0435511' +
'171E0E57C304C400370E0484');

dtmPureEssence := DTMFromString('78DA638C606260E0646440062DD5550C72401' +
'A24FA1F0818AB30D540646124904E00AA1124A0261BA8460CBF1A' +
'00204C0781');

dtmAirTiara := DTMFromString('78DA637462626078C9800276AE5BC72007A41' +
'981F83F10303A03D53C6240038C482490B603AA798B5B0D187B02' +
'D5BCC16F0E005D3A0AF4');

dtmTalisman := DTMFromString('78DA637466626078C48002F66FDBC6A00CA41' +
'981F83F10307A02D5BC6440038C482490B601AA7946408D2350CD' +
'47FC6A00692F0B09');

dtmAirRune := DTMFromString('78DA639CC6C4C0F08C01053C7DF488410E483' +
'302F17F2060EC00AA79C18006189148200D32E72301354B806A1E' +
'E3570300158F0CD1');
end;
procedure Randomas;
begin
case random(40) of
1:MakeCompass('N');
2:MakeCompass('S');
3:MakeCompass('E');
4:MakeCompass('W');
5:RandomRClick;
6:BoredHuman;
end;
end;
procedure DestroyaOfRandoms;
var
x, y: integer;
begin
if FindFight then
begin
RunTo('N', Dist);
wait(9000+random(3000));
RunBack(x, y);
end;
FindNormalRandoms;
end;
procedure MotiDDTMs;
var
SubPoint : array [0..4] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=637;
MainPoint.y :=85;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=634;
SubPoint[0].y:=91;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=62965;
SubPoint[0].tolerance:=100;

SubPoint[1].x:=638;
SubPoint[1].y:=92;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=60909;
SubPoint[1].tolerance:=100;

SubPoint[2].x:=650;
SubPoint[2].y:=93;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=60909;
SubPoint[2].tolerance:=100;

SubPoint[3].x:=654;
SubPoint[3].y:=93;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=60909;
SubPoint[3].tolerance:=100;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint1:= AddDTM(TDTM);
FreeDTM(dtmPoint1);

MainPoint.x :=609;
MainPoint.y :=134;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=608;
SubPoint[0].y:=113;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=12227199;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=606;
SubPoint[1].y:=111;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=12227199;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=606;
SubPoint[2].y:=113;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12227199;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=616;
SubPoint[3].y:=111;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=15591909;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint2:= AddDTM(TDTM);
FreeDTM(dtmPoint2);

MainPoint.x :=639;
MainPoint.y :=133;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=621;
SubPoint[0].y:=54;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=2313568;
SubPoint[0].tolerance:=70;

SubPoint[1].x:=624;
SubPoint[1].y:=86;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=2313568;
SubPoint[1].tolerance:=70;

SubPoint[2].x:=633;
SubPoint[2].y:=64;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12161405;
SubPoint[2].tolerance:=70;

SubPoint[3].x:=622;
SubPoint[3].y:=96;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=12161405;
SubPoint[3].tolerance:=70;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint3:= AddDTM(TDTM);
FreeDTM(dtmPoint3);

MainPoint.x :=620;
MainPoint.y :=119;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=629;
SubPoint[0].y:=56;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=11502447;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=621;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=11502447;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=639;
SubPoint[2].y:=53;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=15528428;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=629;
SubPoint[3].y:=109;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=8691373;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint4:= AddDTM(TDTM);
FreeDTM(dtmPoint4);

MainPoint.x :=607;
MainPoint.y :=116;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=638;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=629;
SubPoint[1].y:=78;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=617;
SubPoint[2].y:=92;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=593;
SubPoint[3].y:=110;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint5:= AddDTM(TDTM);
FreeDTM(dtmPoint5);

MainPoint.x :=622;
MainPoint.y :=130;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=620;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=625;
SubPoint[1].y:=77;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=630;
SubPoint[2].y:=77;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=636;
SubPoint[3].y:=77;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint6:= AddDTM(TDTM);
FreeDTM(dtmPoint6);

MainPoint.x :=626;
MainPoint.y :=118;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337
MainPoint.Tolerance:=255;

SubPoint[0].x:=588;
SubPoint[0].y:=61;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9809339;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=596;
SubPoint[1].y:=60;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9809339;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=607;
SubPoint[2].y:=61;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9809339;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=615;
SubPoint[3].y:=61;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9809339;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint7:= AddDTM(TDTM);
FreeDTM(dtmPoint7);

MainPoint.x :=228;
MainPoint.y :=209;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3156218;
MainPoint.Tolerance:=50;

SubPoint[0].x:=246;
SubPoint[0].y:=221;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=3156218;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=222;
SubPoint[1].y:=212;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=3156218;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=223;
SubPoint[2].y:=209;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3156218;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=218;
SubPoint[3].y:=202;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=3156218;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint8:= AddDTM(TDTM);
FreeDTM(dtmPoint8);

MainPoint.x :=366;
MainPoint.y :=42;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3554368;
MainPoint.Tolerance:=40;

SubPoint[0].x:=320;
SubPoint[0].y:=48;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=6055277;
SubPoint[0].tolerance:=40;

SubPoint[1].x:=363;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=4870227;
SubPoint[1].tolerance:=40;

SubPoint[2].x:=402;
SubPoint[2].y:=42;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3619390;
SubPoint[2].tolerance:=40;

SubPoint[3].x:=324;
SubPoint[3].y:=47;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=5001812;
SubPoint[3].tolerance:=40;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirAltar:= AddDTM(TDTM);
FreeDTM(dtmAirAltar);

MainPoint.x :=662;
MainPoint.y :=230;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=14869221;
MainPoint.Tolerance:=10;

SubPoint[0].x:=648;
SubPoint[0].y:=232;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=65536;
SubPoint[0].tolerance:=0;

SubPoint[1].x:=662;
SubPoint[1].y:=241;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=65536;
SubPoint[1].tolerance:=0;

SubPoint[2].x:=676;
SubPoint[2].y:=227;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=65536;
SubPoint[2].tolerance:=0;

SubPoint[3].x:=676;
SubPoint[3].y:=227;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=65536;
SubPoint[3].tolerance:=0;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmExit:= AddDTM(TDTM);
FreeDTM(dtmExit);
end;
procedure WithdrawTiara;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'ir tiara', 16645629, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
Stuck := 0;
repeat
Stuck := Stuck + 1;
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
GameTab(5);
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
exit;
end;
end;
until Stuck = 40;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Tiara found.';
NextPlayer(False);
end;
procedure WithdrawTalisman;
var
x, y: integer;
begin
if FindObj(x, y, 'talism', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindObj(x, y, 'talism', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Talisman found.';
end;
procedure EquipPlayer;
var
x, y: integer;
begin
if Players[CurrentPlayer].Active = True then LoginPlayer;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then
begin
if not(loggedin) then LoginPlayer;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
DestroyaofRandoms;
Randomas;
end;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Booleans[0] of
True: WithdrawTiara;
False:WithdrawTalisman;
end;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then EquipPlayer;
OpenBankFast('feb');
A:=A+1;
end;
end;
procedure WithdrawPureEssence;
var
x, y: integer;
begin
if FindObj(x, y, 'ure', 103214, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
if FindDTM(dtmPureEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
Players[CurrentPlayer].Strings[2] := 'Could not find Pure Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Pure:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawRegularEssence;
var
x, y, stuck: integer;
begin
if FindDTM(dtmRegularEssence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('une ess') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
writeln('Make sure your essence is at the top slot, and is visible');
end;
NextPlayer(False);
end;
procedure WithdrawBothEssence;
begin
case random(2) of
0: WithdrawRegularEssence;
1: WithdrawPureEssence;
end;
if Regular = False then
begin
WithdrawPureEssence;
Players[CurrentPlayer].strings[0] := 'b';
end;
if Pure = False then
begin
Players[CurrentPlayer].strings[0] := 'a';
WithdrawRegularEssence;
end;
end;
procedure WithdrawEssence;
var
x, y, lost: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Strings[0] of
'a' : WithdrawRegularEssence;
'b' : WithdrawPureEssence;
'c' : WithdrawBothEssence;
end;
Lost:=0;
repeat
Lost:=Lost+1;
wait(20);
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
Break;
end;
until Lost = 1000;
end;
procedure WalkToGateFromBank;
var
x, y, lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
MakeCompass('N');
RadialRoadWalk(RCo, 160, 250, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(0);
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
RadialRoadWalk(RCo, 170, 220, 40, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if dtmRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
DestroyaofRandoms;
Randomas;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(0);
B:=B+1;
end;
end;
end;
procedure WalkToRuinsFromGate;
var
x, y, Lost : integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Lost := 0;
repeat
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(10);
Lost := 0;
repeat
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost := Lost + 1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
C:=C+1;
end;
procedure EnterRuins;
var
x, y: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if Players[CurrentPlayer].Booleans[0] = True then
begin
if FindObj(x, y, 'nter', 3026482, 50) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
if Players[CurrentPlayer].Booleans[0] = False then
begin
if FindObj(x, y, 'talisman', 213442, 30) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
end;
if DTMRotated(dtmPoint8, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('nter') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
D:=D+1;
Exit;
end;
end;
end;
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
end;
procedure Craft;
var
x, y, I: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('serene') then exit;
if DTMRotated(dtmAirAltar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if isuptext('raft') then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
E:=E+1;
Exit;
end;
end;
NextPlayer(False);
end;
procedure ExitRuins;
var
x, y, Lost : integer;
begin
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if FindObj(x, y, 'ortal', 6458002, 40) then
begin //Copied King of Knives - I'll get the original version later
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
Break;
end;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
F:=F+1;
end;
procedure WalkToGateFromRuins;
var
RCo:Integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
RCo := FindRoadColor;
if RCo > 0 then
begin
RadialRoadWalk(RCo, 150, 180, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 50, 150, 60, 0, 0);
DestroyaofRandoms;
FFlag(10);
RadialRoadWalk(RCo, 1, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
end;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
begin
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
RadialRoadWalk(FindRoadColor, 350, 20, 60, 0, 0);
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
Exit;
end;
NextPlayer(False);
end;
procedure WalkToBankFromGate;
var
x, y, Lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
RadialRoadWalk(FindFallyRoadColor, 350, 20, 30, 0, 0);
DestroyaofRandoms;
Randomas;
FFlag(10);
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
FFlag(5);
Lost := 0;
repeat
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 50, 50, 0, 0);
FFlag(0);
if FindSymbol(x, y, 'Bank') then break;
end;
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
DestroyaofRandoms;
Randomas;
Flag;
B:=B+1;
end;
end;
end;
procedure DepositRunes;
var
x, y: integer;
begin
if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankFast('feb');
if not FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindObj(x, y, 'ir rune', 14869221, 40) then
Mouse(x, y, 1, 1, True);
end;
if FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('ir rune') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
end;
J:=J+1;
Exit;
end;
NextPlayer(False);
end;
procedure Progress;
var
I: integer;
begin//I need to know where it's breaking, and this was the most simple way.
writeln('Equipped ' + inttostr(a) + ' times');
writeln('Successfully walked to the gate from the bank ' + inttostr(b) + ' times');
writeln('Successfully walked to the ruins ' + inttostr(c) + ' times');
writeln('Successfully entered the ruins ' + inttostr(d) + ' times');
writeln('Successfully crafted ' + inttostr(e) + ' times');
writeln('Successfully left the ruins ' + inttostr(f) + ' times');
writeln('Successfully walked to the gate from the ruins ' + inttostr(g) + ' times');
writeln('Successfully walked to the bank ' + inttostr(h) + ' times');
writeln('Successfully deposited the runes ' + inttostr(j) + ' times');
for I := 0 to High(Players) do
begin
writeln(Players[I].Strings[2]);
end;
writeln('This is Jack L Krawl''s Air Crafter - 1/01/08');
end;
procedure NuxtPlayur;
var
A: integer;
begin
if Players[CurrentPlayer].integers[1] = Players[CurrentPlayer].Integers[0] then
begin
A:=A+1;
for A := A to High(Players) do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
if Players[CurrentPlayer].Active = False then
begin
A:=A+1;
for A := A to High(Players) do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
end;
begin
SetupSRL;
SetupSRLMusic;
DeclarePlayers;
ItemDDTMs;
MotiDDTMs;
ActivateClient;
repeat
EquipPlayer;
WithdrawEssence;
WalkToGateFromBank;
WalkToRuinsFromGate;
EnterRuins;
Craft;
ExitRuins;
WalkToGateFromRuins;
WalkToBankFromGate;
DepositRunes;
Progress;
NuxtPlayur;
until SumA <= SumB;
end.
I don't know if I used the right thing for running away.
I did
RunTo('N', True);
wait();
RunBack(x, y);

R0b0t1

2008-01-01 17:15:42

Wow… That post seriously make you sound schizophrenic. :p


I'm going to vote yes because even if I vote no it won't do anything so it will be as if I had voted yes in the first place because if I vote no it will not do anything.

Jackrawl

2008-01-01 17:20:04

From: R0b0t1
Wow… That post seriously make you sound schizophrenic. :p


I'm going to vote yes because even if I vote no it won't do anything so it will be as if I had voted yes in the first place because if I vote no it will not do anything.


Is that good or bad?

mickaliscious

2008-01-01 17:31:29

FreeDTM is for the integer.

so basically:
dtmExit:= AddDTM(TDTM);

At the end of the script you would want to do FreeDTM(dtmExit);
(make sure you free all dtm's by the end of the script.)

Don't do it in your MotiDDTM procedure because then it gets rid of it and you can't use it.

But good job, you made quick work of those fixes too.

And as for RunTo('n', true)…
I think in revision 9 runto automatically waits and does the runback. I'll have to check.

Jackrawl

2008-01-01 17:34:18

From: mickaliscious
FreeDTM is for the integer.

so basically:
dtmExit:= AddDTM(TDTM);

At the end of the script you would want to do FreeDTM(dtmExit);
(make sure you free all dtm's by the end of the script.)

Don't do it in your MotiDDTM procedure because then it gets rid of it and you can't use it.

But good job, you made quick work of those fixes too.


OK, this is what I'm thinking now, but I don't really know if it's a good idea.
Should I put MotiDDTMs, which calls the ddtms, and 'procedure Fix,' which removes them in the repeat until loop? I know most players probably don't run it one time, and when it messes up… =/

mickaliscious

2008-01-01 17:37:50

{*******************************************************************************
procedure RunTo(dir: String; runfar: Boolean);
By: Mutant Squirrle
Description: Runs to direction
*******************************************************************************}

procedure RunTo(dir: string; runfar: Boolean);
begin
SetRun(True);
if (runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 - 63, 0, 0)
'S': MouseFlag(648, 83 + 63, 0, 0)
'E': MouseFlag(648 + 63, 83, 0, 0)
'W': MouseFlag(648 - 63, 83, 0, 0)
end;
end else
if (not runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 - 30, 0, 0)
'S': MouseFlag(648, 83 + 30, 0, 0)
'E': MouseFlag(648 + 30, 83, 0, 0)
'W': MouseFlag(648 - 30, 83, 0, 0)
end;
end;
Wait(6500);
IdleTime(6000, 500, 1.0);
if (runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 + 63, 0, 0)
'S': MouseFlag(648, 83 - 63, 0, 0)
'E': MouseFlag(648 - 63, 83, 0, 0)
'W': MouseFlag(648 + 63, 83, 0, 0)
end;
end else
if (not runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 + 30, 0, 0)
'S': MouseFlag(648, 83 - 30, 0, 0)
'E': MouseFlag(648 - 30, 83, 0, 0)
'W': MouseFlag(648 + 30, 83, 0, 0)
end;
end;
SetRun(False);
GameTab(4);
end;

Looks to me like RunTo already includes a random wait and runs back to where it came from. So no need for the Wait or Runback.

Jackrawl

2008-01-01 17:45:17

From: mickaliscious
{*******************************************************************************
procedure RunTo(dir: String; runfar: Boolean);
By: Mutant Squirrle
Description: Runs to direction
*******************************************************************************}

procedure RunTo(dir: string; runfar: Boolean);
begin
SetRun(True);
if (runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 - 63, 0, 0)
'S': MouseFlag(648, 83 + 63, 0, 0)
'E': MouseFlag(648 + 63, 83, 0, 0)
'W': MouseFlag(648 - 63, 83, 0, 0)
end;
end else
if (not runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 - 30, 0, 0)
'S': MouseFlag(648, 83 + 30, 0, 0)
'E': MouseFlag(648 + 30, 83, 0, 0)
'W': MouseFlag(648 - 30, 83, 0, 0)
end;
end;
Wait(6500);
IdleTime(6000, 500, 1.0);
if (runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 + 63, 0, 0)
'S': MouseFlag(648, 83 - 63, 0, 0)
'E': MouseFlag(648 - 63, 83, 0, 0)
'W': MouseFlag(648 + 63, 83, 0, 0)
end;
end else
if (not runfar) then
begin
case UpperCase(dir) of
'N': MouseFlag(648, 83 + 30, 0, 0)
'S': MouseFlag(648, 83 - 30, 0, 0)
'E': MouseFlag(648 - 30, 83, 0, 0)
'W': MouseFlag(648 + 30, 83, 0, 0)
end;
end;
SetRun(False);
GameTab(4);
end;

Looks to me like RunTo already includes a random wait and runs back to where it came from. So no need for the Wait or Runback.


. . . . . . Yep :duh:

I think I'm going to sit in a dark corner over ahh…looks around*…there…

R0b0t1

2008-01-01 19:15:47

Think of it as you will, schizophrenia is a mental illness.

Jackrawl

2008-01-01 19:33:11

From: R0b0t1
Think of it as you will, schizophrenia is a mental illness.


So good? Can I be bipolar instead? Which would you rather be, schizophrenic or bipolar?

DUDE ITS SNOWING AGAIN.

R0b0t1

2008-01-01 19:43:27

Schizophrenia includes having multiple "people" inside you're brain.


Roses are red,
Violets are blue,
I'm schizophrenic,
And so am I!


Bipolar is changing moods fast… Like reversing the current though and electro magnet.

Jackrawl

2008-01-01 20:27:16

From: R0b0t1
Schizophrenia includes having multiple "people" inside you're brain.



Bipolar is changing moods fast… Like reversing the current though and electro magnet.


oh I see, I thought you were dissing me =/ so which do you prefer?

R0b0t1

2008-01-01 22:43:28

If I had to be one, it'd be Bipolar. You don't need to receive treatment for it, and I think schizophrenia is considered insane.

Rune Hacker

2008-01-01 23:36:24

In procedure WithdrawTiara; does it do that 40 times regardless if it finds the tiara the first time?

Jackrawl

2008-01-02 07:55:15

Nope, it exits out if it finds it. That loop used to make more sense than it does now, but I got a snow day, so I'll have some more time to work on it.

Edit:
OK, I did something weird to it, I have yet to test it. It compiles, but it's still extremely odd. It may give me a runtime error, and it may not even make it outside the bank.
program AirCrafter;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/MusicLocation.scar}
const
Dist = True; //Run far?
var
dtmPoint1, dtmPoint2, dtmPoint3, dtmPoint4, dtmPoint5, dtmPoint6,
dtmPoint7, dtmPoint8, dtmAirAltar:Integer;
dtmRuneEssence, dtmPureEssence, dtmTalisman, dtmAirTiara, dtmAirRune:Integer;
intReg, intPure:integer;
Regular, Pure : Boolean;
SumA, SumB: integer;
a, b, c, d, e, f, g, h, j: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'ackl';
Players[0].Strings[0] := 'a'; //a - Regular Ess b - Pure ess c - Both
Players[0].Strings[1] := 'Equipped' //Equipped if you have tali/tiara ready
Players[0].Strings[2] := '';
Players[0].Integers[0] := 1; //How many loads for this character
Players[0].Integers[1] := 0;
Players[0].Booleans[0] := True; //True for a tiara, False for a talisman
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure DefineLoopDuration;
var
I:integer;
begin
for I := 0 to High(Players) do
begin
SumA := SumA + Players[I].Integers[0];
end;
if High(Players) = 0 then
begin
writeln('This loop shall run for ' + inttostr(SumA) + ' over one player');
end;
if High(Players) > 0 then
begin
writeln('This loop shall run for ' + inttostr(SumB) + ' over ' + inttostr(HowManyPlayers));
end;
end;
procedure ItemDDTMs;
begin
dtmRuneEssence := DTMFromString('78DA638C656060086040016101FE0C1A409A1' +
'188FF03012348DE87010D302291403A8708352940220ABF1A002E' +
'4807E4');

dtmPureEssence := DTMFromString('78DA638C606260E0646440062DD5550C72401' +
'A24FA1F0818AB30D540646124904E00AA1124A0261BA8460CBF1A' +
'00204C0781');

dtmAirTiara := DTMFromString('78DA634C65646010026224F0F7EF5F060D200' +
'D12FD0F048CE9409604AA1A882C8C04D2D14096280135B9409620' +
'7E3500E4AE0913');

dtmTalisman := DTMFromString('78DA637466626078C48002F66FDBC6A00CA41' +
'981F83F10307A02D5BC6440038C482490B601AA7946408D2350CD' +
'47FC6A00692F0B09');

dtmAirRune := DTMFromString('78DA639CC6C4C0F08C01053C7DF488410E483' +
'302F17F2060EC00AA79C18006189148200D32E72301354B806A1E' +
'E3570300158F0CD1');
end;
procedure MotiDDTMs;
var
SubPoint : array [0..4] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=637;
MainPoint.y :=85;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=634;
SubPoint[0].y:=91;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=62965;
SubPoint[0].tolerance:=100;

SubPoint[1].x:=638;
SubPoint[1].y:=92;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=60909;
SubPoint[1].tolerance:=100;

SubPoint[2].x:=650;
SubPoint[2].y:=93;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=60909;
SubPoint[2].tolerance:=100;

SubPoint[3].x:=654;
SubPoint[3].y:=93;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=60909;
SubPoint[3].tolerance:=100;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint1:= AddDTM(TDTM);

MainPoint.x :=609;
MainPoint.y :=124;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=608;
SubPoint[0].y:=113;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=12227199;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=606;
SubPoint[1].y:=111;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=12227199;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=606;
SubPoint[2].y:=113;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12227199;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=616;
SubPoint[3].y:=111;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=15591909;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint2:= AddDTM(TDTM);

MainPoint.x :=639;
MainPoint.y :=133;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=621;
SubPoint[0].y:=54;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=2313568;
SubPoint[0].tolerance:=70;

SubPoint[1].x:=624;
SubPoint[1].y:=86;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=2313568;
SubPoint[1].tolerance:=70;

SubPoint[2].x:=633;
SubPoint[2].y:=64;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12161405;
SubPoint[2].tolerance:=70;

SubPoint[3].x:=622;
SubPoint[3].y:=96;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=12161405;
SubPoint[3].tolerance:=70;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint3:= AddDTM(TDTM);

MainPoint.x :=620;
MainPoint.y :=119;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=629;
SubPoint[0].y:=56;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=11502447;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=621;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=11502447;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=639;
SubPoint[2].y:=53;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=15528428;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=629;
SubPoint[3].y:=109;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=8691373;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint4:= AddDTM(TDTM);

MainPoint.x :=607;
MainPoint.y :=116;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=638;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=629;
SubPoint[1].y:=78;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=617;
SubPoint[2].y:=92;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=593;
SubPoint[3].y:=110;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint5:= AddDTM(TDTM);

MainPoint.x :=622;
MainPoint.y :=130;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=620;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=625;
SubPoint[1].y:=77;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=630;
SubPoint[2].y:=77;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=636;
SubPoint[3].y:=77;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint6:= AddDTM(TDTM);

MainPoint.x :=626;
MainPoint.y :=118;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337
MainPoint.Tolerance:=255;

SubPoint[0].x:=588;
SubPoint[0].y:=61;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9809339;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=596;
SubPoint[1].y:=60;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9809339;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=607;
SubPoint[2].y:=61;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9809339;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=615;
SubPoint[3].y:=61;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9809339;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint7:= AddDTM(TDTM);
FreeDTM(dtmPoint7);

MainPoint.x :=228;
MainPoint.y :=209;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3156218;
MainPoint.Tolerance:=50;

SubPoint[0].x:=246;
SubPoint[0].y:=221;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=3156218;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=222;
SubPoint[1].y:=212;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=3156218;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=223;
SubPoint[2].y:=209;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3156218;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=218;
SubPoint[3].y:=202;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=3156218;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint8:= AddDTM(TDTM);

MainPoint.x :=366;
MainPoint.y :=42;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3554368;
MainPoint.Tolerance:=40;

SubPoint[0].x:=320;
SubPoint[0].y:=48;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=6055277;
SubPoint[0].tolerance:=40;

SubPoint[1].x:=363;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=4870227;
SubPoint[1].tolerance:=40;

SubPoint[2].x:=402;
SubPoint[2].y:=42;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3619390;
SubPoint[2].tolerance:=40;

SubPoint[3].x:=324;
SubPoint[3].y:=47;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=5001812;
SubPoint[3].tolerance:=40;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirAltar:= AddDTM(TDTM);

end;
procedure Fix;
begin
FreeDTM(dtmPoint1);
FreeDTM(dtmPoint2);
FreeDTM(dtmPoint3);
FreeDTM(dtmPoint4);
FreeDTM(dtmPoint5);
FreeDTM(dtmPoint6);
FreeDTM(dtmPoint7);
FreeDTM(dtmPoint8);
FreeDTM(dtmAirAltar);
end;
procedure WithdrawTiara;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'ir tiara', 16645629, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
Stuck := 0;
repeat
Stuck := Stuck + 1;
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
GameTab(5);
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
exit;
end;
end;
until Stuck = 40;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Tiara found.';
NextPlayer(False);
end;
procedure WithdrawTalisman;
var
x, y: integer;
begin
if FindObj(x, y, 'talism', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindObj(x, y, 'talism', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Talisman found.';
end;
procedure EquipPlayer;
var
x, y: integer;
begin
if Players[CurrentPlayer].Active = True then LoginPlayer;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then
begin
if not(loggedin) then LoginPlayer;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
end;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Booleans[0] of
True: WithdrawTiara;
False:WithdrawTalisman;
end;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then EquipPlayer;
OpenBankFast('feb');
A:=A+1;
end;
end;
procedure LiveRandomAndDieRandom;
var
x, y: integer;
begin
if FindFight then
begin
RunTo('N', Dist);
end;
FindNormalRandoms;
end;
procedure WithdrawPureEssence;
var
x, y: integer;
begin
if FindObj(x, y, 'ure', 103214, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
if FindDTM(dtmPureEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
Players[CurrentPlayer].Strings[2] := 'Could not find Pure Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Pure:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawRegularEssence;
var
x, y, stuck: integer;
begin
if FindDTM(dtmRuneEssence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
wait(200+random(300));
if isuptext('une ess') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
writeln('Make sure your essence is at the top slot, and is visible');
end;
NextPlayer(False);
end;
procedure WithdrawBothEssence;
begin
case random(2) of
0: WithdrawRegularEssence;
1: WithdrawPureEssence;
end;
if Regular = False then
begin
WithdrawPureEssence;
Players[CurrentPlayer].strings[0] := 'b';
end;
if Pure = False then
begin
Players[CurrentPlayer].strings[0] := 'a';
WithdrawRegularEssence;
end;
end;
procedure WithdrawEssence;
var
x, y, lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Strings[0] of
'a' : WithdrawRegularEssence;
'b' : WithdrawPureEssence;
'c' : WithdrawBothEssence;
end;
wait(20);
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
Exit;
end;
if not DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
RadialRoadWalk(RCo, 260, 280, 60, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('found dtmPoint1');
Mouse(x, y, 1, 1, True);
FFlag(0);
end else;
Writeln('didn''t find dtmPoint1...Oh well, whatever.');
end;
procedure WalkToGateFromBank;
var
x, y, lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
MakeCompass('N');
RadialRoadWalk(RCo, 160, 250, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(0);
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
RadialRoadWalk(RCo, 170, 220, 40, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(5);
B:=B+1;
end;
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
wait(200+random(300));
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindRoadColor > 0 then
begin
RCo := FindRoadColor;
MakeCompass('N');
RadialRoadWalk(RCo, 170, 200, 50, 0, 0);
FFlag(0);
Players[CurrentPlayer].loc := 'Gate';
Exit;
end;
Mouse(x, y, 1, 1, True);
FFlag(0);
if FindSymbol(x, y, 'Rare Trees') then exit;
if FindSymbol(x, y, 'Spinning wheel') then exit;
if FindSymbol(x, y, 'Water source') then exit;
if FindWaterColor > 0 then exit;
NextPlayer(False);
end;
end;
procedure WalkToRuinsFromGate;
var
x, y, Lost6, XMawd, YMawd : integer; Lost5, Lost7: Boolean; Symbawl : string;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Lost5 := True;//Eh, Guilty til proven innocent
Lost6 := 0;
Lost7 := True;
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Lost5 := False;
end;
if Lost5 and FindSymbol(x, y, 'rare trees') then
begin
Mouse(x, y, 1, 1, True);
end else
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
LiveRandomAndDieRandom;
FFlag(10);
if not DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then
repeat
Wait(20);
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then break;
if FindSymbol(x, y, 'water source') then break;
if Lost6 = 500 then
begin
if FindSymbol(x, y, 'Rare trees') then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then
break;
end;
end;
Lost6:=Lost6+1;
until Lost6 = 600;
if DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Lost6 := 0;
FFlag(0);
end;
if Lost6 > 0 then NextPlayer(False);
LiveRandomAndDieRandom;
if not DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
case Symbawl of
'Water source' : begin
XMawd := 10;
YMawd := -80;
end;
'Spinning wheel' : begin
XMawd := 8;
YMawd := -90;
end;
end;
if FindSymbol(x, y, Symbawl) then
begin
Mouse(x + XMawd, y + YMawd, 1, 1, True);
FFlag(0);
end;
end;
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(5);
C:=C+1;
end;
procedure EnterRuins;
var
x, y: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if Players[CurrentPlayer].Booleans[0] = True then
begin
if FindObj(x, y, 'nter', 3026482, 50) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
D:=D+1;
Exit;
end;
end;
if Players[CurrentPlayer].Booleans[0] = False then
begin
if FindObj(x, y, 'talisman', 213442, 30) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
end;
if DTMRotated(dtmPoint8, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('nter') then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
D:=D+1;
Exit;
end;
end;
end;
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
end;
procedure Craft;
var
x, y, I: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('serene') then exit;
if DTMRotated(dtmAirAltar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if isuptext('raft') then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
E:=E+1;
Exit;
end;
end;
NextPlayer(False);
end;
procedure ExitRuins;
var
x, y, Lost : integer;
begin
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if FindObj(x, y, 'ortal', 6458002, 40) then
begin //Copied King of Knives - I'll get the original version later
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
Break;
end;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
F:=F+1;
end;
procedure WalkToGateFromRuins;
var
RCo:Integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
RCo := FindRoadColor;
if RCo > 0 then
begin
RadialRoadWalk(RCo, 150, 180, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 50, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 1, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
end;
LiveRandomAndDieRandom;
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
Exit;
end;
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
Exit;
end;
LiveRandomAndDieRandom;
NextPlayer(False);
end;
procedure WalkToBankFromGate;
var
x, y, Lost, RCo: integer;
begin
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
RadialRoadWalk(RCo, 350, 20, 30, 0, 0);
LiveRandomAndDieRandom;
FFlag(10);
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(5);
Lost := 0;
repeat
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 50, 50, 0, 0);
FFlag(0);
if FindSymbol(x, y, 'Bank') then break;
end;
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
B:=B+1;
end;
end;
end;
procedure DepositRunes;
var
x, y: integer;
begin
if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankFast('feb');
if not FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindObj(x, y, 'ir rune', 14869221, 40) then
Mouse(x, y, 1, 1, True);
end;
if FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('ir rune') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
end;
J:=J+1;
Exit;
end;
NextPlayer(False);
end;
procedure Progress;
var
I: integer;
begin//I need to know where it's breaking, and this was the most simple way.
writeln('Equipped ' + inttostr(a) + ' times');
writeln('Successfully walked to the gate from the bank ' + inttostr(b) + ' times');
writeln('Successfully walked to the ruins ' + inttostr(c) + ' times');
writeln('Successfully entered the ruins ' + inttostr(d) + ' times');
writeln('Successfully crafted ' + inttostr(e) + ' times');
writeln('Successfully left the ruins ' + inttostr(f) + ' times');
writeln('Successfully walked to the gate from the ruins ' + inttostr(g) + ' times');
writeln('Successfully walked to the bank ' + inttostr(h) + ' times');
writeln('Successfully deposited the runes ' + inttostr(j) + ' times');
for I := 0 to High(Players) do
begin
writeln(Players[I].Strings[2]);
end;
writeln('Did a total of ' + inttostr(SumB) + ' loads');
writeln('This is Jack L Krawl''s Air Crafter - 1/02/08');
end;
procedure NuxtPlayur;
var
A: integer;
begin
if Players[CurrentPlayer].integers[1] = Players[CurrentPlayer].Integers[0] then
begin
A:=A+1;
for A := A to High(Players) do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
if Players[CurrentPlayer].Active = False then
Fix;
end;
begin
SetupSRL;
SetupSRLMusic;
DeclarePlayers;
ItemDDTMs;
MotiDDTMs;
ActivateClient;
repeat
EquipPlayer;
WithdrawEssence;
WalkToGateFromBank;
WalkToRuinsFromGate;
EnterRuins;
Craft;
ExitRuins;
WalkToGateFromRuins;
WalkToBankFromGate;
DepositRunes;
Progress;
NuxtPlayur;
until SumA <= SumB;
Fix;
end.
Ah, no randoms in this one I think.
UPDATE:
Remodeled it again, it gives me dtm runtime errors in WalkToRuinsFromGate -.-; Aside from that, I think everything is fixed, and I added in some more fail-safes, which may actually cause trouble since I haven't changed the ddtms.
program AirCrafter;
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/MusicLocation.scar}
const
Dist = True; //Run far?
var
dtmPoint1, dtmPoint2, dtmPoint3, dtmPoint4, dtmPoint5, dtmPoint6,
dtmPoint7, dtmPoint8, dtmAirAltar:Integer;
dtmRuneEssence, dtmPureEssence, dtmTalisman, dtmAirTiara, dtmAirRune:Integer;
intReg, intPure:integer;
Regular, Pure : Boolean;
SumA, SumB: integer;
a, b, c, d, e, f, g, h, j: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'ackl';
Players[0].Strings[0] := 'a'; //a - Regular Ess b - Pure ess c - Both
Players[0].Strings[1] := 'Equipped' //Equipped if you have tali/tiara ready
Players[0].Integers[0] := 1; //How many loads for this character
Players[0].Booleans[0] := True; //True for a tiara, False for a talisman
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure DefineLoopDuration;
var
I:integer;
begin
for I := 0 to High(Players) do
begin
SumA := SumA + Players[I].Integers[0];
end;
if High(Players) = 0 then
begin
writeln('This loop shall run for ' + inttostr(SumA) + ' over one player');
end;
if High(Players) > 0 then
begin
writeln('This loop shall run for ' + inttostr(SumB) + ' over ' + inttostr(HowManyPlayers));
end;
end;
procedure ItemDDTMs;
begin
dtmRuneEssence := DTMFromString('78DA638C656060086040016101FE0C1A409A1' +
'188FF03012348DE87010D302291403A8708352940220ABF1A002E' +
'4807E4');

dtmPureEssence := DTMFromString('78DA638C606260E0646440062DD5550C72401' +
'A24FA1F0818AB30D540646124904E00AA1124A0261BA8460CBF1A' +
'00204C0781');

dtmAirTiara := DTMFromString('78DA634C65646010026224F0F7EF5F060D200' +
'D12FD0F048CE9409604AA1A882C8C04D2D14096280135B9409620' +
'7E3500E4AE0913');

dtmTalisman := DTMFromString('78DA637466626078C48002F66FDBC6A00CA41' +
'981F83F10307A02D5BC6440038C482490B601AA7946408D2350CD' +
'47FC6A00692F0B09');

dtmAirRune := DTMFromString('78DA639CC6C4C0F08C01053C7DF488410E483' +
'302F17F2060EC00AA79C18006189148200D32E72301354B806A1E' +
'E3570300158F0CD1');
end;
procedure MotiDDTMs;
var
SubPoint : array [0..4] of TDTMPointDef;
MainPoint : TDTMPointDef;
TDTM: TDTM;
begin
MainPoint.x :=637;
MainPoint.y :=85;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=634;
SubPoint[0].y:=91;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=62965;
SubPoint[0].tolerance:=100;

SubPoint[1].x:=638;
SubPoint[1].y:=92;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=60909;
SubPoint[1].tolerance:=100;

SubPoint[2].x:=650;
SubPoint[2].y:=93;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=60909;
SubPoint[2].tolerance:=100;

SubPoint[3].x:=654;
SubPoint[3].y:=93;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=60909;
SubPoint[3].tolerance:=100;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint1:= AddDTM(TDTM);

MainPoint.x :=609;
MainPoint.y :=124;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=608;
SubPoint[0].y:=113;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=12227199;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=606;
SubPoint[1].y:=111;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=12227199;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=606;
SubPoint[2].y:=113;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12227199;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=616;
SubPoint[3].y:=111;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=15591909;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint2:= AddDTM(TDTM);

MainPoint.x :=639;
MainPoint.y :=133;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=621;
SubPoint[0].y:=54;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=2313568;
SubPoint[0].tolerance:=70;

SubPoint[1].x:=624;
SubPoint[1].y:=86;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=2313568;
SubPoint[1].tolerance:=70;

SubPoint[2].x:=633;
SubPoint[2].y:=64;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=12161405;
SubPoint[2].tolerance:=70;

SubPoint[3].x:=622;
SubPoint[3].y:=96;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=12161405;
SubPoint[3].tolerance:=70;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint3:= AddDTM(TDTM);

MainPoint.x :=620;
MainPoint.y :=119;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=629;
SubPoint[0].y:=56;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=11502447;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=621;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=11502447;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=639;
SubPoint[2].y:=53;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=15528428;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=629;
SubPoint[3].y:=109;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=8691373;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint4:= AddDTM(TDTM);

MainPoint.x :=607;
MainPoint.y :=116;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=638;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=629;
SubPoint[1].y:=78;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=617;
SubPoint[2].y:=92;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=593;
SubPoint[3].y:=110;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint5:= AddDTM(TDTM);

MainPoint.x :=622;
MainPoint.y :=130;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337;
MainPoint.Tolerance:=255;

SubPoint[0].x:=620;
SubPoint[0].y:=77;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9677753;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=625;
SubPoint[1].y:=77;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9677753;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=630;
SubPoint[2].y:=77;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9677753;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=636;
SubPoint[3].y:=77;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9677753;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint6:= AddDTM(TDTM);

MainPoint.x :=626;
MainPoint.y :=118;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=1337
MainPoint.Tolerance:=255;

SubPoint[0].x:=588;
SubPoint[0].y:=61;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=9809339;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=596;
SubPoint[1].y:=60;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=9809339;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=607;
SubPoint[2].y:=61;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=9809339;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=615;
SubPoint[3].y:=61;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=9809339;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint7:= AddDTM(TDTM);
FreeDTM(dtmPoint7);

MainPoint.x :=228;
MainPoint.y :=209;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3156218;
MainPoint.Tolerance:=50;

SubPoint[0].x:=246;
SubPoint[0].y:=221;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=3156218;
SubPoint[0].tolerance:=50;

SubPoint[1].x:=222;
SubPoint[1].y:=212;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=3156218;
SubPoint[1].tolerance:=50;

SubPoint[2].x:=223;
SubPoint[2].y:=209;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3156218;
SubPoint[2].tolerance:=50;

SubPoint[3].x:=218;
SubPoint[3].y:=202;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=3156218;
SubPoint[3].tolerance:=50;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmPoint8:= AddDTM(TDTM);

MainPoint.x :=366;
MainPoint.y :=42;
MainPoint.Areasize:=1;
MainPoint.Areashape:=0;
MainPoint.Color:=3554368;
MainPoint.Tolerance:=40;

SubPoint[0].x:=320;
SubPoint[0].y:=48;
SubPoint[0].areasize:=1;
SubPoint[0].areashape:=0;
SubPoint[0].color:=6055277;
SubPoint[0].tolerance:=40;

SubPoint[1].x:=363;
SubPoint[1].y:=70;
SubPoint[1].areasize:=1;
SubPoint[1].areashape:=0;
SubPoint[1].color:=4870227;
SubPoint[1].tolerance:=40;

SubPoint[2].x:=402;
SubPoint[2].y:=42;
SubPoint[2].areasize:=1;
SubPoint[2].areashape:=0;
SubPoint[2].color:=3619390;
SubPoint[2].tolerance:=40;

SubPoint[3].x:=324;
SubPoint[3].y:=47;
SubPoint[3].areasize:=1;
SubPoint[3].areashape:=0;
SubPoint[3].color:=5001812;
SubPoint[3].tolerance:=40;

TDTM.MainPoint := MainPoint;
TDTM.SubPoints := SubPoint;
dtmAirAltar:= AddDTM(TDTM);

end;
procedure Fix;
begin
FreeDTM(dtmPoint1);
FreeDTM(dtmPoint2);
FreeDTM(dtmPoint3);
FreeDTM(dtmPoint4);
FreeDTM(dtmPoint5);
FreeDTM(dtmPoint6);
FreeDTM(dtmPoint7);
FreeDTM(dtmPoint8);
FreeDTM(dtmAirAltar);
end;
procedure WithdrawTiara;
var
x, y, stuck: integer;
begin
if FindObj(x, y, 'ir tiara', 16645629, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
Stuck := 0;
repeat
Stuck := Stuck + 1;
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
GameTab(5);
if FindDTM(dtmAirTiara, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
exit;
end;
end;
until Stuck = 40;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Tiara found.';
NextPlayer(False);
end;
procedure WithdrawTalisman;
var
x, y: integer;
begin
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindDTM(dtmTalisman, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
if FindObj(x, y, 'talism', 103214, 30) then
begin
Mouse(x, y, 1, 1, True);
CloseBank;
GameTab(4);
if FindObj(x, y, 'talism', 103214, 30) then
begin
Players[CurrentPlayer].Strings[1] := 'Equipped';
Exit;
end;
end;
Players[CurrentPlayer].Strings[2] := 'No Air Talisman found.';
end;
procedure EquipPlayer;
var
x, y: integer;
begin
if not (loggedin) then exit;
if Players[CurrentPlayer].Active = True then LoginPlayer;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then
begin
if not(loggedin) then LoginPlayer;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
end;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Booleans[0] of
True: WithdrawTiara;
False:WithdrawTalisman;
end;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then EquipPlayer;
OpenBankFast('feb');
A:=A+1;
end;
end;
procedure LiveRandomAndDieRandom;
begin
if not (loggedin) then exit;
if FindFight then
begin
RunTo('N', Dist);
end;
FindNormalRandoms;
end;
procedure WithdrawPureEssence;
var
x, y: integer;
begin
if FindObj(x, y, 'ure', 103214, 30) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
if FindDTM(dtmPureEssence, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intPure := intPure + 1;
Exit;
end;
Players[CurrentPlayer].Strings[2] := 'Could not find Pure Essence';
if Players[CurrentPlayer].Strings[0] = 'c' then
begin
Pure:=False;
Exit;
end;
NextPlayer(False);
end;
procedure WithdrawRegularEssence;
var
x, y: integer;
begin
if FindDTM(dtmRuneEssence, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
wait(200+random(300));
if isuptext('une ess') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
CloseBank;
intReg := intReg + 1;
Exit;
end;
writeln('Make sure your essence is at the top slot, and is visible');
end;
NextPlayer(False);
end;
procedure WithdrawBothEssence;
begin
if not (loggedin) then exit;
case random(2) of
0: WithdrawRegularEssence;
1: WithdrawPureEssence;
end;
if Regular = False then
begin
WithdrawPureEssence;
Players[CurrentPlayer].strings[0] := 'b';
end;
if Pure = False then
begin
Players[CurrentPlayer].strings[0] := 'a';
WithdrawRegularEssence;
end;
end;
procedure WithdrawEssence;
var
x, y, lost, RCo: integer;
begin
if not (loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('Workshop') then exit;
OpenBankQuiet('feb');
case Players[CurrentPlayer].Strings[0] of
'a' : WithdrawRegularEssence;
'b' : WithdrawPureEssence;
'c' : WithdrawBothEssence;
end;
wait(20);
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
Exit;
end;
if not DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
RadialRoadWalk(RCo, 260, 280, 60, 0, 0);
FFlag(0);
Exit;
end;
if DTMRotated(dtmPoint1, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('found dtmPoint1');
Mouse(x, y, 1, 1, True);
FFlag(0);
end;
end;
procedure WalkToGateFromBank;
var
x, y, lost, RCo: integer;
begin
if not (loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
MakeCompass('N');
RadialRoadWalk(RCo, 160, 250, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(0);
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
RadialRoadWalk(RCo, 170, 220, 40, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(5);
B:=B+1;
end;
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
wait(200+random(300));
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindRoadColor > 0 then
begin
RCo := FindRoadColor;
MakeCompass('N');
RadialRoadWalk(RCo, 170, 200, 50, 0, 0);
FFlag(0);
Players[CurrentPlayer].loc := 'Gate';
Exit;
end;
Mouse(x, y, 1, 1, True);
FFlag(0);
if FindSymbol(x, y, 'Rare Trees') then exit;
if FindSymbol(x, y, 'Spinning wheel') then exit;
if FindSymbol(x, y, 'Water source') then exit;
if FindWaterColor > 0 then exit;
NextPlayer(False);
end;
end;
procedure WalkToRuinsFromGate;
var
x, y: integer; Point5, Point6, Point7 : Boolean;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
Point5 := True;
Point6 := True;
Point7 := True;
if not DTMRotated(DTMPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
if not FindSymbolIn(x, y, 'Rare Trees', MMX1, MMY1, 641, 6) then
if FindRoadColor > 0 then
if FindFallyRoadColor > 0 then
RadialRoadWalk(FindRoadColor, 180, 220, 20, 0, 0);
FFlag(0);
if FindSymbolIn(x, y, 'Rare Trees', MMX1, MMY1, MMX2/2, MMY2/2) then
begin
Mouse(x, y, 1, 1, True);
FFlag(0);
Point5 := False;
if DTMRotated(dtmPoint5, x, y, MMX1, MMY1, MMX2, MMY2) then
Point5 := True;
end;
end;
if Point5 = True then
begin
Mouse(x, y, 1, 1, True);
FFlag(5);
end;
if not DTMRotated(dtmPoint6, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
MakeCompass('N');
if FindSymbol(x, y, 'Water source') then
begin
Mouse(x, y+120, 3, 3, True);
FFlag(0);
end;
if FindSymbol(x, y, 'Spinning wheel') then
begin
Mouse(x, y+120, 3, 3, True);
FFlag(0);
end;
end;
if Point6 = True then
begin
Mouse(x, y, 1, 1, True);
FFlag(5);
end;
if not DTMRotated(dtmPoint7, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
writeln('Backup for this comes in v.95');
NextPlayer(False);
Point7 := False;
Exit;
end;
if Point7 = True then
begin
Mouse(x, y, 1, 1, True);
FFlag(5);
Exit;
end;
end;
procedure EnterRuins;
var
x, y: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if Players[CurrentPlayer].Booleans[0] = True then
begin
if FindObj(x, y, 'nter', 3026482, 50) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
D:=D+1;
Exit;
end;
end;
if Players[CurrentPlayer].Booleans[0] = False then
begin
if FindObj(x, y, 'talisman', 213442, 30) then
begin
Mouse(x, y, 1, 1, True);
wait(50+random(50));
end;
if DTMRotated(dtmPoint8, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('nter') then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
D:=D+1;
Exit;
end;
end;
end;
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
end;
procedure Craft;
var
x, y, I: integer;
begin
if not(loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if not IsMusicPlaying('serene') then exit;
if DTMRotated(dtmAirAltar, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
if isuptext('raft') then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
Flag;
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
E:=E+1;
Exit;
end;
end;
NextPlayer(False);
end;
procedure ExitRuins;
var
x, y, Lost : integer;
begin
Lost:=0;
repeat
Lost:=Lost+1;
wait(10);
if FindObj(x, y, 'ortal', 6458002, 40) then
begin //Copied King of Knives - I'll get the original version later
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(0);
Break;
end;
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
F:=F+1;
end;
procedure WalkToGateFromRuins;
var
RCo:Integer;
begin
if not (loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
MakeCompass('N');
RCo := FindRoadColor;
if RCo > 0 then
begin
RadialRoadWalk(RCo, 150, 180, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 50, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 1, 150, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
end;
LiveRandomAndDieRandom;
if FindFallyRoadColor > 0 then
begin
RCo := FindFallyRoadColor;
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
Exit;
end;
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 20, 60, 0, 0);
FFlag(10);
Exit;
end;
LiveRandomAndDieRandom;
NextPlayer(False);
end;
procedure WalkToBankFromGate;
var
x, y, Lost, RCo: integer;
begin
if not (loggedin) then exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
if FindFallyRoadColor > 0 then
RCo := FindFallyRoadColor;
RadialRoadWalk(RCo, 350, 20, 30, 0, 0);
LiveRandomAndDieRandom;
FFlag(10);
if not DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint4, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(0);
if not DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
RadialRoadWalk(RCo, 340, 50, 50, 0, 0);
FFlag(0);
end;
if DTMRotated(dtmPoint3, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(5);
Lost := 0;
repeat
if not DTMRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then
if FindFallyRoadColor > 0 then
begin
RadialRoadWalk(RCo, 350, 50, 50, 0, 0);
FFlag(0);
if FindSymbol(x, y, 'Bank') then break;
end;
if dtmRotated(dtmPoint2, x, y, MMX1, MMY1, MMX2, MMY2) then break;
Lost:=Lost+1;
wait(10);
until Lost = 1000;
if Lost = 1000 then
begin
Players[CurrentPlayer].Strings[2] := 'Lost';
NextPlayer(False);
Exit;
end;
Mouse(x, y, 1, 1, True);
LiveRandomAndDieRandom;
FFlag(0);
B:=B+1;
end;
end;
end;
procedure DepositRunes;
var
x, y: integer;
begin
if not(loggedin) then exit;
if not IsMusicPlaying('workshop') then Exit;
if Players[CurrentPlayer].Strings[1] = 'Inequipped' then exit;
OpenBankFast('feb');
if not FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindObj(x, y, 'ir rune', 14869221, 40) then
Mouse(x, y, 1, 1, True);
end;
if FindDTM(dtmAirRune, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if isuptext('ir rune') then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('ll');
end;
J:=J+1;
Exit;
end;
NextPlayer(False);
end;
procedure Progress;
var
I: integer;
begin//I need to know where it's breaking, and this was the most simple way.
writeln('Equipped ' + inttostr(a) + ' times');
writeln('Successfully walked to the gate from the bank ' + inttostr(b) + ' times');
writeln('Successfully walked to the ruins ' + inttostr(c) + ' times');
writeln('Successfully entered the ruins ' + inttostr(d) + ' times');
writeln('Successfully crafted ' + inttostr(e) + ' times');
writeln('Successfully left the ruins ' + inttostr(f) + ' times');
writeln('Successfully walked to the gate from the ruins ' + inttostr(g) + ' times');
writeln('Successfully walked to the bank ' + inttostr(h) + ' times');
writeln('Successfully deposited the runes ' + inttostr(j) + ' times');
for I := 0 to High(Players) do
begin
writeln(Players[I].Strings[2]);
end;
writeln('Did a total of ' + inttostr(SumB) + ' loads');
writeln('This is Jack L Krawl''s Air Crafter - 1/02/08');
end;
procedure NuxtPlayur;
var
A: integer;
begin
if Players[CurrentPlayer].integers[1] = Players[CurrentPlayer].Integers[0] then
begin
A:=A+1;
for A := A to High(Players) do
SumB:=SumB+Players[CurrentPlayer].Integers[1];
end;
if Players[CurrentPlayer].Active = False then
Fix;
end;
begin
SetupSRL;
SetupSRLMusic;
DeclarePlayers;
ItemDDTMs;
MotiDDTMs;
ActivateClient;
repeat
EquipPlayer;
WithdrawEssence;
WalkToGateFromBank;
WalkToRuinsFromGate;
EnterRuins;
Craft;
ExitRuins;
WalkToGateFromRuins;
WalkToBankFromGate;
DepositRunes;
Progress;
NuxtPlayur;
until SumA <= SumB;
Fix;
end.

LordGregGreg

2008-01-03 23:52:23

saw this a bit late, but its a
yes
from me

BobboHobbo

2008-01-04 00:18:09

I didnt chekc this thread for awhile but, you got a yes from me.

R0b0t1

2008-01-04 03:12:19

Whoever voted no is gunna get a pounding… :(

Naum

2008-01-04 05:23:58

I think someone should let him in now :)

GoF

2008-01-04 10:34:12

Yeees….

JAD

2008-01-04 11:57:20

From: NaumanAkhlaq
I think someone should let him in now :)


It took the admins (a while back) a while to accept me as members when I applied a while back too :p

They'll get around to it.

HyperSecret

2008-01-04 12:08:00

no for 1 reason only…i dont like when people edit their scripts inside of their thread…they should apply with a script working now one that they oftenly edit through the thread…but besides that most looks good

Jackrawl

2008-01-04 15:21:33

From: HyperSecret
no for 1 reason only…i dont like when people edit their scripts inside of their thread…they should apply with a script working now one that they oftenly edit through the thread…but besides that most looks good


I agree, I should have came in with a much better script, but I decided that it would be best if I took it to much more experienced people than myself. I've learned all I could from tutorials, and it just seemed like it would be more effective and interesting if I could learn methods used by different people than going through even more versions. o_O My folder is literally full of Air Betas. I've got five versions of 'Aer Faber's', four 'Air Crafter's' and two or three 'W16 Air Runners' lol

I'm glad it looks good considering how many times I've run through this XD

Thanks for all the yeses, I love you whether or not you posted, thanks for the noes, so long as you criticized!

Wizzup?

2008-01-04 15:40:51

In. :)