Shuttleu
2008-04-20 14:36:22
<!– BEGIN TEMPLATE: formanswers –>
shuttleu - SRL Member Application Form
shuttleu
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
php, html
Other Communitys
How Long have You Played Runescape
2 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
i have been learning how to script for about 6 months and i am into the advanced section.
i have made one script from scratch and i have fixed up and updated quite a few old scripts.
i have helped people in the SRL FAQ area i have also helped in the scripts request area as well.
i have been recommended to become a srl member by other srl members.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
shuttleu - SRL Member Application Form
shuttleu
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
php, html
Other Communitys
How Long have You Played Runescape
2 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
i have been learning how to script for about 6 months and i am into the advanced section.
i have made one script from scratch and i have fixed up and updated quite a few old scripts.
i have helped people in the SRL FAQ area i have also helped in the scripts request area as well.
i have been recommended to become a srl member by other srl members.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{.Script Info:
# ScriptName = CMHT
# Author = shuttleu
# Description = Tans cow hides in al-kharid
# Version = v 2.5
# Date = 20/04/08
# Comments =
/Script Info}
program New;
{-------------------------------------------------------------------------------]
[ __ __ ___ _ _ ________ ]
[ | \ / |/ _ \| | | |___ ___| ]
[ | \/ | / \_| |__| | | | ]
[ | |\ /| | | _| __ | | | ]
[ | | \/ | | \_/ | | | | | | ]
[ |_| |_|\___/|_| |_| |_| ]
[ Master Crafter Hide Tanner V2.5 ]
[ by shuttleu ]
[ ]
[===============================================================================]
[ ]
[ NAME : MCHT (Master Crafter Hide tanner) ]
[ AUTHOR : shuttleu ]
[ CATEGORY : Crafting ]
[ DESCRIPTION : Tans hides in al-kharid. ]
[ MEMBERS ONLY : No ]
[ MULTIPLAYER : Yes ]
[ SCAR VERSION : 3.15 ]
[ SRL VERSION : 4 #rev 15 ]
[ RELEASE DATE : 20/04/2008 ]
[ ]
[===============================================================================]
[ ]
[ 01. Use the offcial runescape client (or SMART), with low detail and very ]
[ bright. Set your screen resolution to 32bit true colour. ]
[ 02. Setup lines 45 to 55 (or more thean 55 if you have more than one player. ]
[ 03. Put money in first bank slot and cowhide in anyother slot as long as it ]
[ is at the top ]
[ 03. Position your runescape characters in the bank at al-kharid ]
[ 04. Drag the crosshair over the runescape client and press play. ]
[ 05. Enjoy the script and please post progress/feedback :D ]
[ ]
[-------------------------------------------------------------------------------}
{.include srl/srl/misc/smart.scar}
{.include SRL\SRL.scar}
var
x, y, cactus, randomtime, running, randomtime1, break1, breakwait1, loads: integer;
const
maxloads = 100; // maximum amount of loads to do before the script finishes
break = 10;
breakwait = 5;
world = 6; // world number for smart to load
SRL_ID = '4968';
SRL_PASS = 'katrin';
procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:= 0; // CurrentPlayer = Array Index
Players[0].Name:= 'scardivi10'; // Your username
Players[0].Pass:= 'iluvrose'; // Your password
Players[0].Nick:= 'card'; // Few letters From Your Name
Players[0].Pin:= '0000'; // Bank pin (if you have one, otherwise leave as 0000)
Players[0].integers[0]:= 100; // Amount of loads to do before the script changes player
Players[0].strings[0]:= 'soft'; // type of lether to make the hides into (soft or hard)
Players[0].Active:= True; // If You use This Player Set True
end;
{======================================================================================]
DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU HAVE PERMISSION FROM SHUTTLEU FIRST!!!
[======================================================================================}
{*******************************************************************************
function WhichDDTM(DDTM: string): Integer
By: shuttleu
Description: stores all the DTMs and declares one when needed
*******************************************************************************}
function WhichDDTM(DDTM: string): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPointss: array [0..4] of TDTMPointDef;
dtmSubPointsz: array [0..5] of TDTMPointDef;
HideDTM, shopDTM, softDTM, coinsDTM: TDTM;
begin
case DDTM of
'hide':
begin
dtmMainPoint.x:= 375;
dtmMainPoint.y:= 155;
dtmMainPoint.areasize:= 1;
dtmMainPoint.areashape:= 0;
dtmMainPoint.color:= 11974335;
dtmMainPoint.tolerance:= 30;
dtmSubPointsz[0].x:= 368;
dtmSubPointsz[0].y:= 161;
dtmSubPointsz[0].areasize:= 1;
dtmSubPointsz[0].areashape:= 0;
dtmSubPointsz[0].color:= 13092814;
dtmSubPointsz[0].tolerance:= 30;
dtmSubPointsz[1].x:= 384;
dtmSubPointsz[1].y:= 146;
dtmSubPointsz[1].areasize:= 1;
dtmSubPointsz[1].areashape:= 0;
dtmSubPointsz[1].color:= 10527149;
dtmSubPointsz[1].tolerance:= 30;
dtmSubPointsz[2].x:= 385;
dtmSubPointsz[2].y:= 161;
dtmSubPointsz[2].areasize:= 1;
dtmSubPointsz[2].areashape:= 0;
dtmSubPointsz[2].color:= 11382456;
dtmSubPointsz[2].tolerance:= 30;
dtmSubPointsz[3].x:= 366;
dtmSubPointsz[3].y:= 149;
dtmSubPointsz[3].areasize:= 1;
dtmSubPointsz[3].areashape:= 0;
dtmSubPointsz[3].color:= 65536;
dtmSubPointsz[3].tolerance:= 30;
dtmSubPointsz[4].x:= 383;
dtmSubPointsz[4].y:= 146;
dtmSubPointsz[4].areasize:= 1;
dtmSubPointsz[4].areashape:= 0;
dtmSubPointsz[4].color:= 10395563;
dtmSubPointsz[4].tolerance:= 30;
dtmSubPointsz[5].x:= 381;
dtmSubPointsz[5].y:= 167;
dtmSubPointsz[5].areasize:= 1;
dtmSubPointsz[5].areashape:= 0;
dtmSubPointsz[5].color:= 65536;
dtmSubPointsz[5].tolerance:= 30;
hideDTM.MainPoint:= dtmMainPoint;
hideDTM.SubPoints:= dtmSubPointsz;
result:= AddDTM(HideDTM);
end;
'soft':
begin
dtmMainPoint.x:= 375;
dtmMainPoint.y:= 155;
dtmMainPoint.areasize:= 1;
dtmMainPoint.areashape:= 0;
dtmMainPoint.color:= 608333;
dtmMainPoint.tolerance:= 30;
dtmSubPointsz[0].x:= 368;
dtmSubPointsz[0].y:= 161;
dtmSubPointsz[0].areasize:= 1;
dtmSubPointsz[0].areashape:= 0;
dtmSubPointsz[0].color:= 674898;
dtmSubPointsz[0].tolerance:= 30;
dtmSubPointsz[1].x:= 384;
dtmSubPointsz[1].y:= 146;
dtmSubPointsz[1].areasize:= 1;
dtmSubPointsz[1].areashape:= 0;
dtmSubPointsz[1].color:= 539970;
dtmSubPointsz[1].tolerance:= 30;
dtmSubPointsz[2].x:= 385;
dtmSubPointsz[2].y:= 161;
dtmSubPointsz[2].areasize:= 1;
dtmSubPointsz[2].areashape:= 0;
dtmSubPointsz[2].color:= 607047;
dtmSubPointsz[2].tolerance:= 30;
dtmSubPointsz[3].x:= 366;
dtmSubPointsz[3].y:= 149;
dtmSubPointsz[3].areasize:= 1;
dtmSubPointsz[3].areashape:= 0;
dtmSubPointsz[3].color:= 65536;
dtmSubPointsz[3].tolerance:= 30;
dtmSubPointsz[4].x:= 383;
dtmSubPointsz[4].y:= 146;
dtmSubPointsz[4].areasize:= 1;
dtmSubPointsz[4].areashape:= 0;
dtmSubPointsz[4].color:= 539970;
dtmSubPointsz[4].tolerance:= 30;
dtmSubPointsz[5].x:= 381;
dtmSubPointsz[5].y:= 167;
dtmSubPointsz[5].areasize:= 1;
dtmSubPointsz[5].areashape:= 0;
dtmSubPointsz[5].color:= 65536;
dtmSubPointsz[5].tolerance:= 30;
softDTM.MainPoint:= dtmMainPoint;
softDTM.SubPoints:= dtmSubPointsz;
result:= AddDTM(softDTM);
end;
'hard':
begin
dtmMainPoint.x:= 375;
dtmMainPoint.y:= 155;
dtmMainPoint.areasize:= 1;
dtmMainPoint.areashape:= 0;
dtmMainPoint.color:= 11974335;
dtmMainPoint.tolerance:= 30;
dtmSubPointsz[0].x:= 368;
dtmSubPointsz[0].y:= 161;
dtmSubPointsz[0].areasize:= 1;
dtmSubPointsz[0].areashape:= 0;
dtmSubPointsz[0].color:= 13092814;
dtmSubPointsz[0].tolerance:= 30;
dtmSubPointsz[1].x:= 384;
dtmSubPointsz[1].y:= 146;
dtmSubPointsz[1].areasize:= 1;
dtmSubPointsz[1].areashape:= 0;
dtmSubPointsz[1].color:= 10527149;
dtmSubPointsz[1].tolerance:= 30;
dtmSubPointsz[2].x:= 385;
dtmSubPointsz[2].y:= 161;
dtmSubPointsz[2].areasize:= 1;
dtmSubPointsz[2].areashape:= 0;
dtmSubPointsz[2].color:= 11382456;
dtmSubPointsz[2].tolerance:= 30;
dtmSubPointsz[3].x:= 366;
dtmSubPointsz[3].y:= 149;
dtmSubPointsz[3].areasize:= 1;
dtmSubPointsz[3].areashape:= 0;
dtmSubPointsz[3].color:= 65536;
dtmSubPointsz[3].tolerance:= 30;
dtmSubPointsz[4].x:= 383;
dtmSubPointsz[4].y:= 146;
dtmSubPointsz[4].areasize:= 1;
dtmSubPointsz[4].areashape:= 0;
dtmSubPointsz[4].color:= 10395563;
dtmSubPointsz[4].tolerance:= 30;
dtmSubPointsz[5].x:= 381;
dtmSubPointsz[5].y:= 167;
dtmSubPointsz[5].areasize:= 1;
dtmSubPointsz[5].areashape:= 0;
dtmSubPointsz[5].color:= 65536;
dtmSubPointsz[5].tolerance:= 30;
hideDTM.MainPoint:= dtmMainPoint;
hideDTM.SubPoints:= dtmSubPointsz;
result:= AddDTM(HideDTM);
end;
'coins':
begin
dtmMainPoint.x:= 579;
dtmMainPoint.y:= 230;
dtmMainPoint.areasize:= 1;
dtmMainPoint.areashape:= 0;
dtmMainPoint.color:= 1413040;
dtmMainPoint.tolerance:= 30;
dtmSubPointss[0].x:= 580;
dtmSubPointss[0].y:= 236;
dtmSubPointss[0].areasize:= 1;
dtmSubPointss[0].areashape:= 0;
dtmSubPointss[0].color:= 1413040;
dtmSubPointss[0].tolerance:= 30;
dtmSubPointss[1].x:= 571;
dtmSubPointss[1].y:= 236;
dtmSubPointss[1].areasize:= 1;
dtmSubPointss[1].areashape:= 0;
dtmSubPointss[1].color:= 1817060;
dtmSubPointss[1].tolerance:= 30;
dtmSubPointss[2].x:= 576;
dtmSubPointss[2].y:= 223;
dtmSubPointss[2].areasize:= 1;
dtmSubPointss[2].areashape:= 0;
dtmSubPointss[2].color:= 1413040;
dtmSubPointss[2].tolerance:= 30;
dtmSubPointss[3].x:= 584;
dtmSubPointss[3].y:= 228;
dtmSubPointss[3].areasize:= 1;
dtmSubPointss[3].areashape:= 0;
dtmSubPointss[3].color:= 1413040;
dtmSubPointss[3].tolerance:= 30;
dtmSubPointss[4].x:= 587;
dtmSubPointss[4].y:= 234;
dtmSubPointss[4].areasize:= 1;
dtmSubPointss[4].areashape:= 0;
dtmSubPointss[4].color:= 1817060;
dtmSubPointss[4].tolerance:= 30;
coinsDTM.MainPoint:= dtmMainPoint;
coinsDTM.SubPoints:= dtmSubPointss;
result:= AddDTM(coinsDTM);
end;
'shop':
begin
dtmMainPoint.x:= 16;
dtmMainPoint.y:= 323;
dtmMainPoint.areasize:= 1;
dtmMainPoint.areashape:= 0;
dtmMainPoint.color:= 790030;
dtmMainPoint.tolerance:= 30;
dtmSubPointsz[0].x:= 503;
dtmSubPointsz[0].y:= 323;
dtmSubPointsz[0].areasize:= 1;
dtmSubPointsz[0].areashape:= 0;
dtmSubPointsz[0].color:= 790030;
dtmSubPointsz[0].tolerance:= 30;
dtmSubPointsz[1].x:= 503;
dtmSubPointsz[1].y:= 24;
dtmSubPointsz[1].areasize:= 1;
dtmSubPointsz[1].areashape:= 0;
dtmSubPointsz[1].color:= 790030;
dtmSubPointsz[1].tolerance:= 30;
dtmSubPointsz[2].x:= 16;
dtmSubPointsz[2].y:= 24;
dtmSubPointsz[2].areasize:= 1;
dtmSubPointsz[2].areashape:= 0;
dtmSubPointsz[2].color:= 790030;
dtmSubPointsz[2].tolerance:= 30;
dtmSubPointsz[3].x:= 260;
dtmSubPointsz[3].y:= 40;
dtmSubPointsz[3].areasize:= 1;
dtmSubPointsz[3].areashape:= 0;
dtmSubPointsz[3].color:= 2070783;
dtmSubPointsz[3].tolerance:= 30;
dtmSubPointsz[4].x:= 145;
dtmSubPointsz[4].y:= 43;
dtmSubPointsz[4].areasize:= 1;
dtmSubPointsz[4].areashape:= 0;
dtmSubPointsz[4].color:= 2070783;
dtmSubPointsz[4].tolerance:= 30;
dtmSubPointsz[5].x:= 362;
dtmSubPointsz[5].y:= 43;
dtmSubPointsz[5].areasize:= 1;
dtmSubPointsz[5].areashape:= 0;
dtmSubPointsz[5].color:= 2070783;
dtmSubPointsz[5].tolerance:= 30;
shopDTM.MainPoint:= dtmMainPoint;
shopDTM.SubPoints:= dtmSubPointsz;
result:= AddDTM(shopDTM);
end;
end;
end;
{*******************************************************************************
function AutoTannerSymb; Integer;
By: ACA V2 (Nielsie95 and Sumilion)
Description: Returns the color of the tanner symbol.
*******************************************************************************}
function AutoTannerSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
if not (FindColorsTolerance(arP, 1256009, MMX1, MMY1, MMX2, MMY2, 33)) then
begin
Writeln('Failed to find the tanner color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
if (rs_OnMinimap(arP[i].x, arP[i].y)) then
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 51) and (R <= 95) and (G >= 23) and (G <= 60) and (B >= 1) and (B <= 36) then
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 3.52) and (H <= 8.91) and (S >= 42.13) and (S <= 92.61) and (L >= 10.57) and (L <= 23.75) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 1.73) and (X <= 6.32) and (Y >= 1.37) and (Y <= 5.58) and (Z >= 0.21) and (Z <= 2.24) then
begin
Result := arC[i];
Writeln('TannerColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the tanner color.');
end;
{*******************************************************************************
function AutoFurnaceSymb; Integer;
By: ACA V2 (Nielsie95 and Sumilion)
Description: Returns the color of the furnace symbol.
*******************************************************************************}
function AutoFurnaceSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
if not (FindColorsTolerance(arP, 1072113, MMX1, MMY1, MMX2, MMY2, 28)) then
begin
Writeln('Failed to find the furnace color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
if (rs_OnMinimap(arP[i].x, arP[i].y)) then
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 226) and (R <= 256) and (G >= 72) and (G <= 109) and (B >= 0) and (B <= 32) then
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 4.76) and (H <= 6.48) and (S >= 88.91) and (S <= 100.02) and (L >= 44.69) and (L <= 56.10) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 34.05) and (X <= 46.71) and (Y >= 21.08) and (Y <= 32.05) and (Z >= 2.29) and (Z <= 4.87) then
begin
Result := arC[i];
Writeln('FurnaceColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the furnace color.');
end;
{*******************************************************************************
function AutoBankSymb; Integer;
By: ACA V2 (Nielsie95 and Sumilion)
Description: Returns the color of the bank symbol.
*******************************************************************************}
function AutoBankSymb: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
if not (FindColorsTolerance(arP, 1364967, MMX1, MMY1, MMX2, MMY2, 30)) then
begin
Writeln('Failed to find the bank color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
if (rs_OnMinimap(arP[i].x, arP[i].y)) then
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 214) and (R <= 248) and (G >= 194) and (G <= 228) and (B >= 0) and (B <= 40) then
begin
ColorToHSL(arC[i], H, S, L);
if (H >= 13.89) and (H <= 15.16) and (S >= 82.91) and (S <= 99.09) and (L >= 42.33) and (L <= 55.90) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 47.53) and (X <= 65.86) and (Y >= 53.46) and (Y <= 74.70) and (Z >= 7.83) and (Z <= 12.89) then
begin
Result := arC[i];
Writeln('Bank Color = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the bank color.');
end;
{*******************************************************************************
function FindCactus(sx, sy, ex, ey : integer) : boolean
By: shuttleu
Description: Returns true if cactus is found within specified area.
*******************************************************************************}
function FindCactus(sx, sy, ex, ey : integer) : boolean;
begin
cactus := BitmapFromString(7, 8, 'beNpjYIADUy9pm2h' +
'ZIANI+piKYAoC2UAEYaMJQpTBEUQjsiADEsAUQbYIuyAAF28T3A==' +
'');
if FindDeformed(x, y, cactus, sx, sy, ex, ey) then
begin
FreeBitmap(cactus);
Writeln('Found cactus');
Result:= True;
end else
begin
FreeBitmap(cactus);
Writeln('Could not find cactus');
Result:= False
end;
end;
{*******************************************************************************
function FindObjCustom1(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray;
Tolerance: Integer): Boolean;
By: Stupid3ooo and Starblaster100
Description: Finds Object with custom amount of colors and custom amount of Uptext
Use: FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5)
*******************************************************************************}
//Taken from SRL rev#14
function FindObjCustom1(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
var
a, b, c, i, x1, y1, x2, y2: Integer;
Start: Boolean;
begin
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
begin
Start := True;
Break;
end;
end;
if(Start)then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if not(LoggedIn)then break;
a := a + 1;
if (a = 1) then
c := c + 1
else if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
begin
MMouse(cx, cy, 0, 0)
if (IsUpTextMultiCustom(Text)) then
begin
Result := True;
Exit;
end;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
{*******************************************************************************
function ShopScreen
By: shuttleu
Description: returns true if the shop screen is open.
*******************************************************************************}
function ShopScren : Boolean;
begin
if findDTM(whichDDTM('shop'), x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found shop screen');
Result := True;
end else
begin
Writeln('Cannot find shop screen');
Result := False;
end;
end;
{*******************************************************************************
procedure Error(where: string)
By: shuttleu
Description: Gives a little error message.
*******************************************************************************}
procedure Error(where: string; reason: string);
begin
Writeln('Failed while '+where+'. Reason : '+reason);
end;
{*******************************************************************************
procedure Banking
By: shuttleu
Description: Opens the al-kharid bank and deposits everything and withdraws
cowhides.
*******************************************************************************}
procedure Banking;
begin
FFlag(0);
repeat
FindNormalRandoms;
FindObjCustom1(x, y, ['ank', 'oot'], [737364, 670799], 30)
Writeln('found bank');
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y ,1, 1, false);
ChooseOption('ickly');
Wait(2000 +random(1000));
until Bankscreen or Pinscreen;
if Pinscreen then
begin
Inpin(players[currentplayer].pin);
end;
FixBank;
DepositAll;
if Players[currentplayer].strings[0]= 'soft' then
begin
Withdraw(1, 1, 27);
end;
if Players[currentplayer].strings[0]= 'hard' then
begin
Withdraw(1, 1, 81);
end;
if not(FindDTM(WhichDDTM('hide'), x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
CloseBank;
Error('withdrawing cowhides', 'No cowhides left in the bank');
NextPlayer(false);
end;
if FindDTM(WhichDDTM('hide') ,x, y, MSX1, MSY1, MSX2, MSY2) then
begin
repeat
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 2, 2, false);
Wait(500 +random(500));
ChooseOption('Withdraw All');
Wait(1000 +random(1000));
until FindDTM(WhichDDTM('hide'), x, y, MIX1, MIY1, MIX2, MIY2);
end;
CloseBank;
FindNormalRandoms;
end;
{*******************************************************************************
procedure WalkToTanner
By: shuttleu
Description: Walks from the bank in al-kharid to the tan shop in al-kharid
using symbols and then color.
*******************************************************************************}
procedure WalkToTanner;
begin
FindNormalRandoms;
begin
if FindCactus(628, 2, 712, 100) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Unable to find cactus by bitmap, now trying color');
if RadialWalk(cactuscol , 10, 100, 70, x, y) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Error('walking to tanner', 'could not find cactus by bitmap or color');
Logout;
NextPlayer(False);
end;
end;
if FindSymbol(x, y, 'furnace') then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Unable to find furnace by symbol, now trying color');
if RadialWalk(AutoFurnaceSymb , 311, 383, 70, x, y) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Error('walking to tanner', 'could not find furnace by symbol or color');
Logout;
NextPlayer(False);
end;
end;
if FindSymbol(x, y, 'tanner') then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 2, 2, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Unable to find tanner by symbol, now trying color');
if RadialWalk(AutoTannerSymb , 286, 396, 70, x, y) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Error('walking to tanner', 'could not find tanner by symbol or color');
Logout;
NextPlayer(False);
end;
end;
end;
end;
{*******************************************************************************
procedure WalkToBank
By: shuttleu
Description: Walks from the tan shop in al-kharid to the bank in al-kharid
using the DTMs.
*******************************************************************************}
procedure WalkToBank;
begin
FindNormalRandoms;
begin
if findsymbol(x, y, 'furnace') then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 2, 2, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Unable to find furnace by symbol, now trying color');
if RadialWalk(AutoFurnaceSymb , 226, 135, 70, x, y) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Error('walking to bank', 'could not find furnace by symbol or color');
Logout;
NextPlayer(False);
end;
end;
if FindCactus(553, 102, MMX2, MMY2) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 2, 2, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Unable to find cactus by bitmap, now trying color');
if RadialWalk(cactuscol , 107, 217, 70, x, y) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Error('walking to bank', 'could not find cactus by bitmap or color');
Logout;
NextPlayer(False);
end;
end;
if FindSymbol(x, y, 'bank') then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 2, 2, true);
wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Unable to find bank by symbol, now trying color');
if RadialWalk(AutoBankSymb , 288, 180, 70, x, y) then
begin
MMouse(x, y, 1, 1);
Wait(500 +random(500));
Mouse(x, y, 1, 1, true);
Wait(3000);
FindNormalRandoms;
FFlag(0);
end else
begin
Error('walking to bank', 'could not find bank by symbol or color');
Logout;
NextPlayer(False);
end;
end;
if Players[currentplayer].strings[0] = 'soft' then
begin
ReportVars[1] := ReportVars[1] + CountItemsDtm('inv', WhichDDTM('soft'));
end;
if Players[currentplayer].strings[0] = 'hard' then
begin
ReportVars[2] := ReportVars[2] + CountItemsDtm('inv', WhichDDTM('hard'));
end;
end;
end;
{*******************************************************************************
procedure TanHides
By: shuttleu
Description: Tans the cow hides into hard or soft leather.
*******************************************************************************}
procedure TanHides;
begin
repeat
if FindObjCustom1(x, y, ['alk', 'llis'], [4944848, 4680900], 30) then
FindNormalRandoms;
MMouse(x, y, 1, 1);
Wait(250 +random(250));
Mouse(x, y, 1, 1, False);
ChooseOption('rade');
Wait(1000 +random(1000));
until Shopscren;
if Players[currentplayer].strings[0]= 'soft' then
begin
Mouse(59, 74, 60, 68, false);
Wait(1000 +random(500));
ChooseOption('All');
end;
if Players[currentplayer].strings[0]= 'hard' then
begin
Mouse(170, 80, 60, 68, false);
Wait(1000 +random(500));
ChooseOption('All');
end;
repeat
Wait(500)
until not ShopScreen;
end;
{*******************************************************************************
procedure SetTimes
By: shuttleu
Description: Sets the break times
*******************************************************************************}
procedure SetTimes;
begin
break1:= break * 60000
breakwait1:= break1 * 60000
end;
{*******************************************************************************
procedure Timer
By: shuttleu
Description: Resets the timer if user has already taken a break.
*******************************************************************************}
procedure Timer;
begin
if TimeFromMark(running) > break1 then
begin
MarkTime(running);
end;
end;
{*******************************************************************************
main loop
By: shuttleu
Description: Where the script all comes together.
*******************************************************************************}
begin
SmartSetupEx(world, False, True);
While Not (SmartReady) Do
Wait(100);
SetTargetDC(SmartGetDC);
If Not (LoggedIn) Then
While Not (SmartGetColor(386, 249) = 65535) Do
Wait(100);
ActivateClient;
SetupSrl;
ScriptId := '781';
SRLID := SRL_ID;
SRLPassword := SRL_PASS;
DeclarePlayers;
loads:= 0;
SetTimes;
MarkTime(running);
if not Loggedin then LoginPlayer;
repeat
SrlRandomsReport;
SetAngle(True);
MakeCompass('n');
timer;
Banking;
ReportVars[0] := ReportVars[0] + 1;
WalkToTanner;
TanHides;
WalkToBank;
if TimeFromMark(running) > break1 then
begin
randomtime:= random(300000);
randomtime1:= randomtime / 60000;
logout;
Writeln('Taking a break for '+inttostr(breakwait)+' minuites and a random '+inttostr(randomtime1)+' minuites');
LoginPlayer;
end;
loads:= loads + 1;
if loads= Players[currentplayer].integers[0] then
begin
Logout;
NextPlayer(True);
loads:= 0;
end;
until loads= maxloads
Logout;
end.
——————————————————
<!– END TEMPLATE: formanswers –>