karibo
10-29-2008, 03:02 PM
put a copy of the script you are using and i might be able to help you.:)
kk
program UDL1;
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Misc\Users.Scar}
const
SRLID1 = '';
SRLPassword1 = '';
var
LoadsDone, TotalLoads, TotalWillows, NestsFound, EntsFound, Responded, Replaced, StrangeFruit, Levels: Integer;
procedure SetUpScript;
begin
SRLPlayerForm(True, ['Is Axe Wielded?'], ['Pin Number?', 'Loads To Do'], [], []);
ActivateClient;
if (not (SRLID1 = '')) then
SRLID := SRLID1
else
SRLID := '3211';
if (not (SRLPassword1 = '')) then
SRLPassword := SRLPassword1
else
SRLPassword := 'thebest1';
WriteLn('Good Luck!');
Disguise('Ultimate Delux [UDL] Version 1');
LogInPlayer;
end;
procedure PlayersPreferance;
begin
Players[CurrentPlayer].Integers[2] := GetSkillLevel('Woodcutting');
MakeCompass('N');
SetAngle(True);
Wait(150 + Random(50));
SetRun(True);
Wait(50 + Random(25));
GameTab(4);
end;
function FindBlackMessage(Msg: string): Boolean;
begin
Result := IsBlackText(Msg, 8);
Result := IsBlackText(Msg, 7);
Result := IsBlackText(Msg, 6);
end;
function SearchBirdsNest: Boolean;
var
CTS, I, X, Y: Integer;
NestATPA: T2DPointArray;
NestTPA: TPointArray;
Nest: TPoint;
Timer: LongInt;
begin
if (FindText(X, Y, 'nest falls', SmallChars, 0, 400, 495, 460)) then
begin
MarkTime(Timer);
repeat
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
X := MSCX;
Y := MSCY;
FindColorsSpiralTolerance(X, Y, NestTPA, 3952984, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 15);
NestATPA := TPAtoATPAEx(NestTPA, 5, 5);
for I := 0 to Length(NestATPA) - 1 do
begin
if (TimeFromMark(Timer) >= (10000)) then
Exit;
Nest := MIddleTPA(NestATPA[I]);
X := 0;
Y := 0;
MMouse(Nest.X, Nest.Y, 5, 5);
Wait(250);
if (isUpText('ird')) then
begin
Mouse(Nest.X, Nest.Y, 5, 5, True);
Result := True;
Inc(NestsFound);
ReportVars[6] := ReportVars[6] + 1;
Wait(250 + Random(150));
case (Random(8)) of
1: TypeSend('Found a Birds nest!');
2: TypeSend('Cool, I got a nest.');
3: TypeSend('Sweet! Found the nest!');
4: TypeSend('...');
5: TypeSend('Whew, got the nest.');
end;
Exit;
end;
end;
until (TimeFromMark(Timer) >= (10000)) or (Result);
Exit;
end
else
Exit;
end;
function Find2TPApoints(TPA1, TPA2: TPointArray; W, H: Integer): TPointArray;
var
I1, I2, L1, L2, R: LongInt;
begin
L1 := High(TPA1);
L2 := High(TPA2);
R := 0;
for I1 := 0 to L1 do
begin
for I2 := 0 to L2 do
begin
if (ABS(TPA1[I1].x - TPA2[I2].X) <= W) and (ABS(TPA1[I1].y - TPA2[I2].y) <= H) then
begin
Inc(R);
SetLength(Result, R + 1);
Result[r].x := ((TPA1[I1].x + TPA2[I2].X) div 2);
Result[r].y := ((TPA1[I1].y + TPA2[I2].Y) div 2);
end;
end;
end;
end;
function ItemCoordsDtm(Area: string; DTM: Integer): TPointArray;
var
StartX, StartY, Rowsize, Colsize, ColNumber, RowNumber, col, row: Integer;
X1, Y1, X2, Y2: Integer;
Itemx, Itemy: Integer;
I: Integer;
begin
SetArrayLength(Result, 0);
if (CheckArea(Area)) then
begin
Areainfo(Area, StartX, StartY, Rowsize, Colsize, ColNumber, RowNumber);
for row := 0 to RowNumber - 1 do
for col := 0 to ColNumber - 1 do
begin
X1 := StartX + col * Colsize;
Y1 := StartY + row * Rowsize;
X2 := X1 + Colsize;
Y2 := Y1 + Rowsize;
if (FindDTM(DTM, Itemx, Itemy, X1, Y1, X2, Y2)) then
begin
I := GetArrayLength(Result);
SetArrayLength(Result, I + 1);
Result[I].x := X1;
Result[I].y := Y1;
end;
end;
end;
end;
function CountItemsDtm(Area: string; DTM: Integer): Integer;
var
Coords: TPointArray;
begin
Coords := ItemCoordsDtm(Area, DTM);
Result := GetArrayLength(Coords);
end;
function FindStrangePlant: Boolean;
var
l, SPX, SPY, StartSPF, FruitCount, FruitDTM: Integer;
TPA1, TPA2, TPA3: TPointArray;
begin
if (not (LoggedIn)) then
Exit;
Result := False SPX := MSCX;
SPY := MSCY;
if (FindColorTolerance(SPX, SPY, 945749, MSCX - 100, MSCY - 110, MSCX + 100, MSCY + 90, 4)) and (FindColorTolerance(SPX, SPY, 743503, MSCX - 100, MSCY - 110, MSCX + 100, MSCY + 90, 4)) then
begin
FindColorsSpiralTolerance(SPX, SPY, TPA1, 945749, MSX1, MSY1, MSX2, MSY2, 4);
FindColorsSpiralTolerance(SPX, SPY, TPA2, 743503, MSX1, MSY1, MSX2, MSY2, 4);
SetLength(TPA1, HIgh(TPA1) + 1);
SetLength(TPA2, HIgh(TPA2) + 1);
TPA3 := Find2TPApoints(TPA1, TPA2, 18, 18);
l := HIgh(TPA3);
if (l >= 0) then
begin
if (FindObjTPA(SPX, SPY, 945749, 4, - 1, 18, 18, 4, ['trange'])) then
begin
WriteLn('Found Strange Plant attempting to Pick fruit.');
FruitDTM := DTMFromString('78DA63E4646060E0654001B30A8E30B0016 94' + '620FE0F048CDC400633031A60442281B40090E026A0860748 8812' + '50C30A244408A861C67433BA1A008467066B');
FruitCount := CountItemsDtm('Inv', FruitDTM);
Result := True;
MarkTime(StartSPF);
repeat
if (FindObjTPA(SPX, SPY, 945749, 4, - 1, 18, 18, 4, ['trange'])) then
begin
MMouse(SPX, SPY, 1, 1);
Wait(250 + Random(250));
if (isUpText('trange')) then
begin
Wait(250 + Random(250));
Mouse(SPX, SPY, 1, 1, false);
Wait(250 + Random(250));
ChooseOptIon('ick');
Wait(500 + Random(600));
if Pos('ready to', GetBlackChatMessage) > 5 then
Wait(2000 + Random(1000))
else if (Pos('fruit from', GetBlackChatMessage) > 5) or (CountItemsDtm('Inv', FruitDTM) > FruitCount) then
begin
Result := True;
WriteLn('Picked Fruit From Strange Plant. Waiting for Plant to die.');
FreeDTM(FruitDTM);
Inc(StrangeFruit);
ReportVars[5] := ReportVars[5] + 1;
repeat
BoredHuman;
Wait(2000 + random(1000));
until (not (FindObjTPA(SPX, SPY, 945749, 4, - 1, 18, 18, 4, ['trange']))) or (FindFight);
Exit;
end
else if (Pos('unable', GetBlackChatMessage) > 5) then
begin
Result := False;
WriteLn('The plant is not after you. Waiting for plant to go.');
FreeDTM(FruitDTM);
repeat
BoredHuman;
Wait(2000 + random(1000));
until (not (FindObjTPA(SPX, SPY, 945749, 4, - 1, 18, 18, 4, ['trange']))) or (FindFight);
Exit;
end;
end;
end
else
Break;
until (TimeFromMark(StartSPF) >= (120000)) or (FindFight);
WriteLn('Failed to Pick Fruit From Strange Plant.');
FreeDTM(FruitDTM);
end;
end;
end;
end;
function TeleportDraynor: Boolean;
var
Glory, X, Y: Integer;
begin
Wait(250 + Random(250));
GameTab(5);
Glory := DTMFromString('78DA63AC6762601061644006D522F319528 03' + '448F43F10303601D5FC6540038C0C5C5035605E17500D0B23 7E35' + '5544A869C6740F567344F1AB01006C2A0A27');
if (FindDTM(Glory, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(Glory);
MMouse(X, Y, 3, 3);
if (not (IsUpText('('))) then
Exit
else
Mouse(X, Y, 5, 5, False);
Wait(250 + Random(250));
ChooseOption('perate');
end
else
begin
FreeDTM(Glory);
Exit;
end;
Wait(1500 + Random(500));
if (FindText(X, Y, 'aynor', NPCCHARS, MCX1, MCY1, MCX2, MCY2)) then
begin
Mouse(X, Y, 5, 5, True);
Result := True;
WriteLn('We have teleported to Draynor.');
Exit;
end
else
Exit;
end;
function TextCoord(Text: Integer): TPoint;
begin
Result.X := 11;
Result.Y := 346 + (14 * (Text - 1));
end;
function GetBlackMessage(Msg: string): Boolean;
begin
Result := IsBlackText(Msg, 8);
Result := IsBlackText(Msg, 7);
end;
function GetBlueText(ChatLine: Integer): string;
var
TP: TPoint;
begin
TP := TextCoord(ChatLine);
Result := Trim(GetTextAtEx(TP.X - 2, TP.Y - 2, 0, SmallChars, False, False, 0, 1, 16711680, 80, False, tr_AllChars));
end;
function IsBlueText(Text: string; ChatLine: Integer): Boolean;
begin
Result := (Pos(Text, GetBlueText(ChatLine)) <> 0);
end;
function GetBlueChatMessage: string;
begin
Result := GetBlueText(8);
end;
function FindBlueChatMessage(ChatMsg: string): Boolean;
begin
Result := IsBlueText(ChatMsg, 8);
Result := IsBlueText(ChatMsg, 7);
Result := IsBlueText(ChatMsg, 6);
end;
procedure RespondToPlayers;
var
TheOldMessage, CurrentMessage, I: Byte;
Levels, Macro: TStringArray;
begin
Levels := ['vl', 'evel', 'Wc', 'wc', 'oodcutting', 'oodcut'];
Macro := ['acro', 'Macro', 'Bot', 'bot', 'Auto', 'auto'];
for I := 0 to 5 do
begin
if (FindBlueChatMessage(Levels[I])) then
begin
CurrentMessage := 0;
if (CurrentMessage = TheOldMessage) then
Exit;
case (Random(5)) of
1: TypeSend('Mine is ' + IntToStr(Players[CurrentPlayer].Integers[2]) + '.');
2: TypeSend(IntToStr(Players[CurrentPlayer].Integers[2]) + ', you?');
3: TypeSend(IntToStr(Players[CurrentPlayer].Integers[2]));
4: TypeSend('I have ' + IntToStr(Players[CurrentPlayer].Integers[2]) + ' Woodcutting.');
5: TypeSend('1, jokes! ' + IntToStr(Players[CurrentPlayer].Integers[2]) + '.');
end;
TheOldMessage := CurrentMessage;
WriteLn('Responded [Levels]');
ReportVars[7] := ReportVars[7] + 1;
Inc(Responded);
Exit;
end;
Wait(150 + Random(50));
if (FindBlueChatMessage(Players[CurrentPlayer].Nick)) then
begin
CurrentMessage := 1;
if (CurrentMessage = TheOldMessage) then
Exit;
case (Random(5)) of
1: TypeSend('?');
2: TypeSend('Im too busy');
3: TypeSend('What?');
4: TypeSend('...');
5: TypeSend(' ');
end;
TheOldMessage := CurrentMessage;
WriteLn('Responded [Players Nick]');
ReportVars[7] := ReportVars[7] + 1;
Inc(Responded);
Exit;
end;
Wait(150 + Random(50));
if (FindBlueChatMessage(Macro[I])) then
begin
CurrentMessage := 2;
if (CurrentMessage = TheOldMessage) then
Exit;
case (Random(5)) of
1: TypeSend('Leave me alone, just how I roll ;p');
2: TypeSend('... Go away much?');
3: TypeSend('No I am not, beep! ;p');
4: TypeSend('Autos arent real, theyre asIans who play too much.');
5: TypeSend('Rofl, autos arent real, theyre virus.');
end;
TheOldMessage := CurrentMessage;
WriteLn('Responded [Macro]');
ReportVars[7] := ReportVars[7] + 1;
Inc(Responded);
Exit;
end;
end;
Exit;
end;
procedure ReactToEnt;
var
MS: Integer;
begin
MS := MouseSpeed;
MouseSpeed := RandomRange(75, 100);
Mouse(MMCX - 10, MMCY - 10, 5, 5, True);
FFlag(5);
Wait(50 + Random(25));
MouseSpeed := MS;
end;
function FindEnt: Boolean;
var
X, Y: Integer;
begin
Result := FindColorTolerance(X, Y, 647908, 80, 6, 127, 20, 50);
if (Result) and (IsUpText('Chop')) then
begin
Inc(EntsFound);
ReportVars[4] := ReportVars[4] + 1;
end;
end;
procedure FindRandoms;
begin
if (not (IsUpText('illow'))) or (InvFull) then
Exit;
if (FindEnt) then
ReactToEnt;
FindNormalRandoms;
if (FindFight) then
RunTo('E', True);
Wait(250 + Random(250));
SearchBirdsNest;
FindStrangePlant;
Wait(250 + Random(250));
RespondToPlayers;
SRLRandomsReport;
end;
procedure FindLevelUp;
begin
if (not (LoggedIn)) then
Exit;
if (FindNPCChatText('gratu', Nothing)) then
begin
ReportVars[3] := ReportVars[3] + 1;
Inc(Levels);
end;
end;
procedure RandomHuman;
begin
if (not (IsUpText('illow'))) or (InvFull) then
Exit;
case (Random(80)) of
8: RandomRClick;
17: HoverSkill('Woodcutting', False);
21: HoverSkill('Firemaking', False);
26: RandomMovement;
29: BoredHuman;
34: PickUpMouse;
38:
begin
Gametab(1 + Random(12));
Wait(5020 + Random(915));
Gametab(4);
end;
44: SleepAndMoveMouse(3000);
55: PickUpMouse;
end;
GameTab(4);
Exit;
end;
function LoadDTM(WhatDTM: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array [0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
case (WhatDTM) of
0:
begin
dtmMainPoint.x := 603;
dtmMainPoint.y := 107;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 603;
dtmSubPoints[0].y := 107;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 618;
dtmSubPoints[1].y := 80;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 55;
dtmSubPoints[2].x := 609;
dtmSubPoints[2].y := 83;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 55;
dtmSubPoints[3].x := 619;
dtmSubPoints[3].y := 72;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 55;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
1:
begin
dtmMainPoint.x := 587;
dtmMainPoint.y := 107;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 587;
dtmSubPoints[0].y := 107;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 564;
dtmSubPoints[1].y := 100;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 7301745;
dtmSubPoints[1].Tolerance := 40;
dtmSubPoints[2].x := 568;
dtmSubPoints[2].y := 116;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 7301745;
dtmSubPoints[2].Tolerance := 40;
dtmSubPoints[3].x := 570;
dtmSubPoints[3].y := 122;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 7301745;
dtmSubPoints[3].Tolerance := 40;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
2:
begin
dtmMainPoint.x := 652;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 652;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 644;
dtmSubPoints[1].y := 50;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 55;
dtmSubPoints[2].x := 644;
dtmSubPoints[2].y := 42;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 55;
dtmSubPoints[3].x := 635;
dtmSubPoints[3].y := 53;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 55;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
3:
begin
dtmMainPoint.x := 639;
dtmMainPoint.y := 38;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 639;
dtmSubPoints[0].y := 38;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 644;
dtmSubPoints[1].y := 70;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 7301745;
dtmSubPoints[1].Tolerance := 40;
dtmSubPoints[2].x := 585;
dtmSubPoints[2].y := 57;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 7301745;
dtmSubPoints[2].Tolerance := 40;
dtmSubPoints[3].x := 592;
dtmSubPoints[3].y := 72;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 7301745;
dtmSubPoints[3].Tolerance := 40;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
WriteLn(IntToStr(WhatDTM) + ' DTM has been loaded.');
Exit;
end;
function MMDTMRotated(DTM: Integer; var X, Y: Integer; X1, Y1, X2, Y2: Integer): Boolean;
begin
if (DTMRotated(DTM, X, Y, MMX1, MMY1, MMX2, MMY2)) then
if (rs_OnMiniMap(X, Y)) then
Result := True;
end;
function IsAxeBroken: Boolean;
var
Dragon, Broken, X, Y: Integer;
begin
if (GetBlackMessage('an axe')) then
begin
if (Players[CurrentPlayer].Booleans[0] = True) then
GameTab(5);
if (Players[CurrentPlayer].Booleans[0] = False) then
GameTab(4);
Broken := DTMFromString('78DA63CC666260B8C580025A92051824813 42' + '310FF0702C662A09A3B0C6880118904D2A54035B709A82903 AAB9' + '4F404D3250CD47FC6A00A1090BB2');
if (FindDTM(Broken, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(Broken);
Result := True;
Wait(250 + Random(150));
Mouse(X, Y, 3, 3, True);
Wait(150 + Random(50));
GameTab(4);
end
else
begin
Dragon := DTMFromString('78DA632C61626078C48001FE03312388060 2C' + '622A09A37E82A1819B8A06AC0BC2A6CE6A0A94904AA794B40 4D31' + '50CD4DFC6A00B38F0BE6');
if (FindDTM(Dragon, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(Dragon);
Result := True;
Wait(250 + Random(150));
Mouse(X, Y, 3, 3, True);
Wait(150 + Random(50));
GameTab(4);
end
else
begin
FreeDTM(Dragon);
WriteLn('False Alarm.');
Wait(150 + Random(50));
GameTab(4);
Exit;
end;
end;
WriteLn('Found Broken Axe.');
Exit;
end;
end;
function WieldAxe: Boolean;
var
Dragon, Axe, X, Y: Integer;
begin
GameTab(4);
Wait(250 + Random(25));
Axe := DTMFromString('78DA63CC666260B8CD80025A92051824813 42' + '310FF0702C672A09A7B0C6880118904D2A540353708A82901 AA79' + '48404D3250CD47FC6A00A3CD0BB6');
if (FindDTM(Axe, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(Axe);
Result := True;
WriteLn('Wielded the Axe.');
Wait(250 + Random(100));
Mouse(X, Y, 3, 3, True);
Exit;
end
else
FreeDTM(Axe);
Dragon := DTMFromString('78DA63F4626260F062644007FF811824FA1 F0' + '8186D806ABCD1D530327041D580793E4035AE44A80926A0C6 04A8' + '2606BF1A00225D081C');
if (FindDTM(Dragon, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(Dragon);
Result := True;
WriteLn('Wielded the Dragon Axe.');
Wait(250 + Random(100));
Mouse(X, Y, 3, 3, True);
Exit;
end
else
FreeDTM(Dragon);
Exit;
end;
function WalkTo(Where: string): Boolean;
var
DTM0, DTM1, DTM2, DTM3, X, Y, Tries: Integer;
begin
if (not (LoggedIn)) then
Exit;
SetRun(True);
Wait(250 + Random(100));
MakeCompass('N');
X := MMCX;
Y := MMCY;
case (Where) of
'DTree':
begin
DTM0 := LoadDTM(0);
if (MMDTMRotated(DTM0, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
FreeDTM(DTM0);
WriteLn('Found DDTM 0!');
Wait(200 + Random(150));
Mouse(X, Y, 5, 5, True);
Result := True;
Flag;
Exit;
end
else
begin
FreeDTM(DTM0);
DTM1 := LoadDTM(1);
if (MMDTMRotated(DTM1, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
FreeDTM(DTM1);
WriteLn('Found DDTM 1!');
Wait(200 + Random(150));
Mouse(X, Y, 5, 5, True);
Result := True;
Flag;
Exit;
end
else
begin
FreeDTM(DTM1);
if (RadialRoadWalk(FindWaterColor, 200, 220, 60, 1, 1)) then
begin
Result := True;
WriteLn('Detected Water Color!');
Flag;
Exit;
end
else
begin
while (Tries <= 15) do
begin
if (FindSymbol(X, Y, 'Fish')) then
begin
Result := True;
WriteLn('Found Fish Symbol!');
Wait(200 + Random(150));
Mouse(X, Y, 5, 5, True);
Flag;
Exit;
end;
Inc(Tries);
end;
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;
end;
end;
'DBank':
begin
DTM2 := LoadDTM(2);
if (MMDTMRotated(DTM2, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
FreeDTM(DTM2);
WriteLn('Found DDTM 2!');
Wait(200 + Random(150));
Mouse(X, Y, 3, 3, True);
Result := True;
Flag;
Exit;
end
else
begin
FreeDTM(DTM2);
DTM3 := DTMFromString('78DA636C67626008644001FFFFFD63F80FA 41' + '9416C2060AC01AAF182C8B140D5FCF9C304A619A17CB09A20 4C35' + '22E86AC2F09B0300F8811153');
if (MMDTMRotated(DTM3, X, Y, MMX1, MMY1, MMX2, MMY2)) then
begin
FreeDTM(DTM3);
WriteLn('Found DDTM 3!');
Wait(200 + Random(150));
Mouse(X, Y, 5, 5, True);
Result := True;
Flag;
Exit;
end
else
begin
FreeDTM(DTM3);
while (Tries <= 15) do
begin
if (FindSymbol(X, Y, 'Bank')) then
begin
WriteLn('Found Bank Symbol!');
Wait(200 + Random(150));
Mouse(X, Y, 5, 5, True);
Result := True;
Flag;
Exit;
end;
Inc(Tries);
end;
if (RadialRoadWalk(FindRoadColor, 0, 30, 60, 2, 2)) then
begin
WriteLn('Detected Road Color!');
FFlag(10);
Mouse(640, 110, 3, 3, True);
Flag;
Result := True;
Exit;
end
else
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;
end;
end;
end;
WriteLn(Where + ' does not exist! Please check your spelling.');
Exit;
end;
function FindTree(var X, Y: Integer): Boolean;
var
T2DPoint: T2DPointArray;
TPAPoint: TPointArray;
TPoint: TPoint;
CTS, I: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
X := MSCX;
Y := MSCY;
FindColorsSpiralTolerance(X, Y, TPAPoint, 4612180, MSX1, MSY1, MSX2, MSY2, 15);
T2DPoint := TPAtoATPAEx(TPAPoint, 40, 25);
for I := 0 to Length(T2DPoint) - 1 do
begin
TPoint := MIddleTPA(T2DPoint[I]);
X := 0;
Y := 0;
MMouse(TPoint.X, TPoint.Y, 5, 5);
Wait(250 + Random(75));
if (isUpText('illow')) and (not (FindEnt)) then
begin
ColorToleranceSpeed(CTS);
GetMousePos(X, Y);
Result := True;
Exit;
end;
end;
ColorToleranceSpeed(CTS);
Exit;
end;
function FindTreeEx(var X, Y: Integer): Boolean;
var
T2DPoint: T2DPointArray;
TPAPoint: TPointArray;
TPoint: TPoint;
CTS, I: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(X, Y, TPAPoint, 4612180, MSCX - 50, MSCY - 50, MSCX + 50, MSCY + 50, 25);
T2DPoint := TPAtoATPAEx(TPAPoint, 10, 10);
for I := 0 to Length(T2DPoint) - 1 do
begin
TPoint := MIddleTPA(T2DPoint[I]);
X := 0;
Y := 0;
MMouse(TPoint.X, TPoint.Y, 5, 5);
Wait(200 + Random(75));
if (isUpText('illow')) then
begin
ColorToleranceSpeed(CTS);
GetMousePos(X, Y);
Result := True;
Exit;
end;
FindNormalRandoms;
end;
ColorToleranceSpeed(CTS);
Exit;
end;
procedure ChopDownWillow;
var
X, Y, Color1, Color2, NewColor1, NewColor2: Integer;
Timer: LongInt;
Tries: Byte;
begin
if (not (LoggedIn)) then
Exit;
repeat
if (IsAxeBroken) then
Exit;
FindNormalRandoms;
if (FindTree(X, Y)) then
begin
MarkTime(Timer);
Tries := 0;
Mouse(X, Y, 5, 5, True);
Color1 := GetColor(MSCX - 25, MSCY - 25);
Color2 := GetColor(MSCX + 25, MSCY + 25);
Flag;
Wait(500 + Random(250));
FindNormalRandoms;
NewColor1 := GetColor(MSCX - 25, MSCY - 25);
NewColor2 := GetColor(MSCX + 25, MSCY + 25);
if not ((NewColor1 = Color1) and (NewColor2 = Color2)) then
FindTreeEx(X, Y);
MMouse(X, Y, 5, 5);
if (FindEnt) then
ReactToEnt;
Wait(250 + Random(250));
FindNormalRandoms;
Wait(500 + Random(250));
repeat
FindRandoms;
Wait(250 + Random(250));
RandomHuman;
MMouse(X, Y, 5, 5);
Wait(500 + Random(250));
until (TimeFromMark(Timer) >= (10000 + Random(5000))) or (not (IsUpText('illow'))) or (InvFull);
end
else
begin
FindNormalRandoms;
Inc(Tries);
Wait(1000 + Random(250));
if (Tries >= 10) then
begin
if (TeleportDraynor) then
begin
WalkTo('DBank');
Exit;
end
else
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;
end;
Wait(250 + Random(150));
FindLevelUp;
until (InvFull) or (not (LoggedIn));
WriteLn('FInished chopping Willows.');
Exit;
end;
function CountDTM(DTM: Integer): Integer;
var
I, X, Y: Integer;
TB: Tbox;
begin
GameTab(4);
for I := 1 to 28 do
begin
TB := InvBox(I);
if ExistsItem(I) then
if FindDTM(DTM, X, Y, TB.X1, TB.Y1, TB.X2, TB.Y2) then
Inc(Result);
end;
end;
function BankItems: Boolean;
var
DragonAxe, BrokenAxe, Replacement, Willow, EXPs, X, Y: Integer;
begin
if (not (LoggedIn)) then
Exit;
Wait(250 + Random(50));
if (not (OpenBank('db', True, True))) then
if (not (OpenBankQuiet('db'))) then
if (not (OpenBankGlass('db', True, True))) then
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
Flag;
Wait(1000 + Random(500));
if (PinScreen) then
begin
InPin(IntToStr(Players[CurrentPlayer].Integers[0]));
WriteLn('Entered Players Pin Number.');
Wait(1750 + Random(250));
end;
if (BankScreen) then
begin
if (IsAxeBroken) then
begin
BrokenAxe := DTMFromString('78DA63CC666260B8C580025A92051824813 42' + '310FF0702C662A09A3B0C6880118904D2A54035B709A82903 AAB9' + '4F404D3250CD47FC6A00A1090BB2');
if (FindDTM(BrokenAxe, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(BrokenAxe);
Wait(250 + Random(50));
Mouse(X, Y, 3, 3, True);
WriteLn('Deposited the Broken Axe.');
end
else
begin
FreeDTM(BrokenAxe);
DragonAxe := DTMFromString('78DA632C61626078C48001FE03312388060 2C' + '622A09A37E82A1819B8A06AC0BC2A6CE6A0A94904AA794B40 4D31' + '50CD4DFC6A00B38F0BE6');
if (FindDTM(DragonAxe, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
FreeDTM(DragonAxe);
Wait(250 + Random(50));
Mouse(X, Y, 3, 3, True);
WriteLn('Deposited the Dragon Axe.');
end
else
FreeDTM(DragonAxe);
Wait(250 + Random(50));
FIxBank;
Replacement := DTMFromString('78DA63CC666260B8CD80025A92051824813 42' + '310FF0702C672A09A7B0C6880118904D2A540353708A82901 AA79' + '48404D3250CD47FC6A00A3CD0BB6');
if FindDTM(Replacement, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
FreeDTM(Replacement);
Wait(500 + Random(500));
Mouse(X, Y, 3, 3, True);
end
else
begin
FreeDTM(Replacement);
WriteLn('Failed to Find an Axe In the Bank.');
WriteLn('Make sure It is on the fIrst slot.');
CloseBank;
Wait(250);
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
WriteLn('Replaced the Old Axe wIth a New Axe.');
Inc(Replaced);
CloseBank;
Wait(500 + Random(250));
WieldAxe;
Exit;
end;
end;
Willow := DTMFromString('78DA63B463626078CA800242BCE51858813 42' + '310FF07024607A09A3B0C6880118904D23E40350F09A8B105 AAF9' + '48408D3150CD0BFC6A001AAD0A8C');
EXPs := CountDTM(Willow);
ReportVars[2] := ReportVars[2] + (EXPs * 68);
ReportVars[1] := ReportVars[1] + EXPs;
TotalWillows := TotalWillows + EXPs;
Wait(50 + Random(25));
if FindDTM(Willow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
FreeDTM(Willow);
Mouse(X, Y, 3, 3, False);
Wait(175 + Random(50));
ChooseOptIon('t-All');
Result := True;
end
else
begin
FreeDTM(Willow);
Deposit(2, 28, True);
Result := True;
Wait(150 + Random(50));
end;
Wait(500 + Random(250));
if (Players[CurrentPlayer].Booleans[0] = False) then
begin
Deposit(2, 28, True);
end
else
Deposit(1, 28, True);
WriteLn('Finished Banking.');
CloseBank;
ReportVars[0] := ReportVars[0] + 1;
Inc(TotalLoads);
Inc(LoadsDone);
Exit;
end;
end;
procedure ProgressReport;
begin
ClearDeBug;
WriteLn(' _________________________________________________ ');
WriteLn('/ \');
WriteLn('| [UDL] Draynor Willow Whacker! |');
WriteLn('|________________________________________ _________|');
WriteLn('| | |');
WriteLn('| Time Running | ' + TimeRunning);
WriteLn('| Loads Done | ' + IntToStr(TotalLoads));
WriteLn('| Total Willows | ' + IntToStr(TotalWillows));
WriteLn('| Total EXP | ' + IntToStr(TotalWillows * 68));
WriteLn('| Total Levels | ' + IntToStr(Levels));
WriteLn('|________________________________________ _________|');
WriteLn('| |');
WriteLn('| Ents Found | ' + IntToStr(EntsFound));
WriteLn('| Plants Found | ' + IntToStr(StrangeFruit));
WriteLn('| Nests Found | ' + IntToStr(NestsFound));
WriteLn('| Response Made | ' + IntToStr(Responded));
WriteLn('| Axes Replaced | ' + IntToStr(Replaced));
WriteLn('|________________|_______________________ _________|');
WriteLn('| |');
WriteLn('| Version 1.0 |');
WriteLn('|________________________________________ _________|');
end;
procedure ScriptPause;
begin
ProgressReport;
end;
procedure MainLoop;
begin
LogInPlayer;
PlayersPreferance;
repeat
repeat
WalkTo('DTree');
ChopDownWillow;
WalkTo('DBank');
BankItems;
ProgressReport;
until (LoadsDone >= Players[CurrentPlayer].Integers[1]) or (not (LoggedIn));
NextPlayer(Players[CurrentPlayer].Active);
LoadsDone := 0;
until (Players[HowManyPlayers - 1].Active = False);
end;
begin
SetUpSRL;
ScriptID := '1014';
SetUpScript;
repeat
MainLoop;
until (False);
end.
Well actually now the login just says wrong login while I triple checked it and my pass should be right :/
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.