SRL Archive - OSR Help

Can someone repair this script for me please


wadeal

2007-04-17 09:46:08

This is a tut island runner i found somewhere,, it gets all the way to the mage part and stuffs up here, all i think needs fixing is the clicking on the spell (wind strike?). I dont know scar, im sorry, just hope someone can fix it for me, below in the nex post is the DPInclude it refers to.

Thanks, Wadeal


program DPProg;
{.include DPInclude.scar}
var FishingSymbol,Arrow,RedArrow,MovingOn,FirstKill,MovingAround:integer;
FindYourNextInstructor, GainedXp,TalkToChef, Emotes, QuestGuide,Combat:integer;
Attacking, Finantial,Prayer, YourFinalInstructor ,AlmostDone,pros1,pros2,mine1,mine2:integer;




Procedure DeclarePlayers;
begin
HowManyPlayers:=6;

NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Active:=true;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Active:=true;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Active:=true;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Active:=true;

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Active:=true;

Players[5].Name :='';
Players[5].Pass :='';
Players[5].Active:=true;











CurrentPlayer := -1
repeat
CurrentPlayer:=CurrentPlayer+1;
until(not(Players[CurrentPlayer].Active=false));
end;


procedure PickChar;
var i:integer;
begin
for i:=1 to 20+random(10) do begin


end;

for i:=1 to 20+random(10) do begin


end;
end;

Function ChatBmp(bmp:integer):boolean;
begin
Result:=findbitmapspiraltolerance(bmp,x,y,2, 342,510, 464,5);
end;

procedure SpecialLogin;
begin
MMouse(458, 291,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
Writeln(Players[CurrentPlayer].Name);
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(100));
TypeSend(Players[CurrentPlayer].Pass);
Wait(100 + Random(100));
MMouse(305, 323,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(5000+random(500));
end;

function DPAtObjColEdited(ObjCol,Tolerance:integer;UpText,Option:string):boolean;
var re2:boolean;
begin
FindObj(x,y,UpText,ObjCol,Tolerance);
wait(100);
if(IsUpText(UpText)) then begin
Mouse(x,y,0,0,false);
wait(100+random(50));
re2:=ClickText(Option,MSX1,MSY1,MSX2,MSY2);
wait(50+random(50));
DPFlag;
wait(900+random(200));
end;
Result:=re2;
end;

procedure TiAtObj(objcol,tol:integer;uptext,opt:string);
begin
repeat
wait(100);
until(DPAtObjColEdited(objcol,tol,uptext,opt));
end;

procedure WalkToArrow;
begin
repeat
wait(100);
until(FindBitmapToleranceIn(Arrow,x,y,MMX1,MMY1,MMX2,MMY2,5));
Mouse(x+2,y+6,0,0,true);
wait(100);
Flag;
wait(900+random(200));
end;

procedure WalkToArrow2;
begin
repeat
wait(100);
until(FindBitmapToleranceIn(Arrow,x,y,MMX1,MMY1,MMX2,MMY2,5));
Mouse(x+5,y+20,0,0,true);
wait(100);
DPFlag;
wait(900+random(200));
end;

procedure WalkToRedArrow;
begin
repeat
wait(100);
until(FindBitmapToleranceIn(RedArrow,x,y,MMX1,MMY1,MMX2,MMY2,5));
Mouse(x,y+8,0,0,true);
wait(100);
DPFlag;
wait(900+random(200));
end;

procedure DoorWait;
begin
wait(500+random(100));
end;

begin
FishingSymbol:= BitmapFromString(2, 4, 'A3ADB5A3ADB507B0F5015DF3015DF30' +
'15DF3015DF3015DF3');
Arrow:=BitmapFromString(3, 9, 'z78DA73737573713272C34FBAB8399A' +
'3B11209DDD1C4DDC08904E6E96C62628A4A39BB9A1237E120025A' +
'628BD');
RedArrow:=BitmapFromString(3, 4, 'z78DA7373330002378A49003C8E0F91' +
'');
MovingOn:=BitmapFromString(28, 1, 'z78DA73727474B27074B27434B5307' +
'402B30D80C0CDCD09491C2A02518344628A63518969260E11FCE2' +
'00CD652733');
FirstKill:= BitmapFromString(81, 1, 'z78DA73727474B27074B27434B5307' +
'482B0C1A40110B8B9E114717274B534C2A5925AE2B854524E52E4' +
'3648588149A838920879E228369268028A080E5F0000C90C7304');
MovingAround:=BitmapFromString(31, 1, 'z78DA73B27434B5307402930640E0E' +
'6E684578428958E8E4E168E10921233514C40321342020048D42A' +
'55');

GainedXp:=BitmapFromString(72, 2, 'z78DA73B27434B5307402930660E06' +
'46469696E8A2282A466A0C4B1A8747474B270849028B248E2C490' +
'50BD1011FCB623EBA5DC5F982E27C2045CA40112C0691A52CC52E' +
'47E0A520831B14942AC619A4F56A852940EF1AA04009BC7BE28');
FindYourNextInstructor:=BitmapFromString(52, 2, 'z78DA33303030707333C0413A393A3' +
'A5938628A383939BA5A1A1910A1171749895E62CC74B27434B530' +
'4426718923CBE277038A2C38048821B1A847320DEA060C5B70D98' +
'EDFEFE4851B79F61210C711C2002CFA92A5');
TalkToChef:=BitmapFromString(151, 2, 'z78DAB555410E80200CFB929210E1' +
'B825FEFF4B1EE681647496193CF4B0D55AE81655449BA86197DAC' +
'E033CD63526E4988ECADDCB881366D8F51C1D7D3ACFDE39AA43CF' +
'00997763B58FFB0C7D2E9C82D6C969EEC35C3AAB3932297B57C82' +
'D336FB1FE043D3FAC5075B765683719E604C126A27BF8759638BB' +
'5C25CC979F04BEFBD64BEF5735CCE9ECDB442AC754BEF1B4F8FFC' +
'BE45B8B49313A1E1F8FE68FA9');
Emotes:=BitmapFromString(56, 4, 'z78DAA593B11280200C437F4907EF7' +
'06C07FEFF93F084211C340475C850726D7854BFED4AA75735F364' +
'4DDFCAF17C393B7A14853EAD03760EEABAB3CB267488EED25594B' +
'98A52320ACFEA9938311566E6347806854F70533CD559F1578EDE' +
'FA0F4FEE5C70DEE549EBD1AC05814F9BBFCB13FD8A4ADB4BF34C9' +
'C34CFB8B17CE23825CA3F3995FFF702080C3705');
QuestGuide:=BitmapFromString(153, 5, 'z78DAC557410E84200CFC926B6256' +
'8E90ECFFBFB409E15003AD33A5A887C654A5D3D2616AC9B99C79A' +
'B57A9F7904DF9383FB4C5D7576CC329D6EC91D3B92CB0C1A864F5' +
'ECDAF6FE3DA5EFD1EC93FBA5ADA921A97E757F7D68E1378928F31' +
'543BE2DF997F686AADE2FE1A3D639B1FDCFE60273EA6556E27B61' +
'3FC5B9B91AA7625B95C449E26425797685B1923D1FCC3AD83DB37' +
'5171DCBD5B1D2AFE1BC7050B252F07460811CED8876DD625909C5' +
'52BA6E8016EE01FB2B96BF3892817AFAB4DE55819BACC95C34F5B' +
'FF123BCF09D2DE62486F46D94274A25673818ACBFC05E107E570F' +
'5C76599B4C948838B6C19BF04C4EC70D453EE5EFA73E4D7790EE4' +
'2E60AFB0F51AB15FC173940084FB32C2B9FD1CAE5AC74F96FB412' +
'D0EE191EB1EAC9C67D97957F5261191E');
Combat:=BitmapFromString(28, 1, 'z78DA73B27434B5307402930640E0E' +
'6E6E4E8E864E1884C522E8E2202B191447100249427C7');
Attacking:=BitmapFromString(48, 1, 'z78DA73B27434B53074727474B270C' +
'4451A00819B1B7E12AA1E6C1A540462320649942C86EDB85C4540' +
'25A68D78C531DD060090C94284');
Finantial:=BitmapFromString(27, 2, 'z78DA73B27434B5307442220D80C0C' +
'D0D4242C51D1D9D2C1CA124921A271C7A718A239B8383C4A21287' +
'F9B8ECA2C885C8FE455683E9772417020024E34A5B');
Prayer:=BitmapFromString(24, 2, 'z78DA73B27434B53074C2200D80C0C' +
'D0D423A393A3A5938629298B238D5239909B505973832498CC978' +
'DD46AAFB31C5012AD4442E');
YourFinalInstructor:=BitmapFromString(12, 7, 'z78DA73727474B2707442220D80C0C' +
'D0D423A593A9A5A1842485CE2C8B24E384C1B74E2B8DC0F11A1D8' +
'1C5CBAB09018BAB0E845B685183389B01100171D7761');
AlmostDone:=BitmapFromString(39, 2, 'z78DA73B27434B5303400023737274' +
'747270B4708499E087E712A98E3E4E86A690421A1B248220448B2' +
'FC45AA5F28320787CB49F529009A7D7030');
pros1:=BitmapFromString(132, 4, 'z78DAC556CB0E843008FC25D6C4AC' +
'3DB6C9FEFF2FEDC1268BC1C14188CB81C3405B5E238AFC64B4BE6' +
'EAF5D0BC0AD15F930DADE50F5AE0019BD8FADEF9AF1993A91573E' +
'237125ECAF32E2EBC3D40D56CF3D0BFD47FFB4C56AA1659E6262B' +
'66F997AE6910BBDB4F65EA726B8E0BF02E331BD403DA2F02023EE' +
'455E8013D91DACEA54419582F889A79A64C40BCD8E0BABB9F3044' +
'7B795F634B335EEF964780A3BA53DD3BC40B73DC417227EFFEB5D' +
'8533569F0B615E64F0C48C05D8E1FE998479A136CE4D5EA09DFE0' +
'8C7FFB047DC0AA4E6DF7CE1FD89E57D8AF74590175F2FEDBD98');
mine1:= BitmapFromString(194, 2, 'z78DACD94C10AC02008865F690B62' +
'7554D8FBBFD2607530C4D2B2B11D3C7CD8BF34FD11E1CE01BBF17' +
'83F4E245E09002628B17242E6B8350EF433C47496C889C4A54CAB' +
'4EC343CE579CD36FDE42CA74EAAD6FEDFA38F93AD64923A7BE9C5' +
'87E96EF11DF35693745CEFF6555E8729C72127EC3267675A8DAC0' +
'8BF49DA137A1F93FF022CDD67BEDA3AFBEB946A993DB7C98EBEFA' +
'8BAE1EA8AF49EB37156179C41CFD733BDBCE801981A11E0');
pros2:=BitmapFromString(157, 3, 'z78DAC595410EC3200C04BFD4468A' +
'1A8E46EAFFBF5429E4600486B1495B0E165AAF9C857871CEF24E5' +
'B16C9873CCE55F61652E149F6E3596285007E2C923A9692896650' +
'53AFE02942776231BF8D5B9CA5FAA0BB1047F56D67AFE255A1C13' +
'9B3C5274CA5245673ACB9CA72B75A88FE4743CE8A5B1D3DE3742B' +
'615EC896D26B77F8F4D657E5376EB5F40475AE7797E55CDEDB7FF' +
'22061129F7638E03E75768C905794B8984F373E0D09B3CA16879E' +
'D1AC8CCF75AF4EA2B6C53B59F0DD898B87DDC27147E780194D6A9' +
'ACCC6171DE6D05F5E3FB6FC0FD64E7253');
mine2:= BitmapFromString(194, 1, 'z78DAA593510A00210844AFB4BBB0' +
'509F0A7BFF2B056D1F868D8CD5C710AFC1545455BEFA5CFD68BF5' +
'B457CA1225A049111E727463D474EEF999C55DE725B1DAF34F79E' +
'D8C9C7674856A9DC50B7AD1F746FB36A132DDBFF4D4EFC38554A6' +
'83C81FC242F78B859FC0E26B612281FE13C2BDED900BD2407EE');


DPSetup;
DeclarePlayers;
repeat
SpecialLogin;
begin //Logged In when in this block
MMouse(260, 286,5,5);
wait(200+random(100));
Mouse(260, 286,5,5,true);
wait(500+random(500));
PerfectNorth;
//in starting house
WalkToArrow;
repeat
TiAtObj(397186,10,'une','alk-');
until(DPInNpcTalk);
DPTalkNpc;
GameTab(11);
repeat
TiAtObj(397186,10,'une','alk-');
until(DPInNpcTalk);
DPTalkNpc;
Mouse(714, 228,1,1,true);
repeat
TiAtObj(1791600,10,'oor','pen');
DoorWait;
until(ChatBmp( MovingAround));
//outside starting house
WalkToArrow;
//near fish pond
repeat
TiAtObj(3817064,10,'urv','alk-');
until(DPInNpcTalk);
DPTalkNpc;
GameTab(4);
repeat
TiAtObj(1397318,10,'ree','down');
wait(8000+random(1000));
until(DPInNpcTalk);
//staring fire
Mouse(648, 76,1,1,true);
wait(100);
DPFlag;
Repeat
Mouse(628, 228,2,2,true);
wait(500+random(500));
Mouse(660, 227,2,2,true);
wait(10000+random(1000));

until(ChatBmp(GainedXp));
GameTab(2);
repeat
TiAtObj(3817064,10,'urv','alk-');
until(DPInNpcTalk);
DPTalkNpc;
DPToDeformed(FishingSymbol,0,-5);
//fishing
GameTab(4);
TiAtObj(15780000,10,'ishi','Net');
wait(6000+random(1000));
TiAtObj(15780000,10,'ishi','Net');
wait(6000+random(1000));
//cooling fish
DPToDeformed(FishingSymbol,5,-15);
Mouse(708, 229,2,2,true);
TiAtObj(5161203,10,'ire','ire');
wait(1500+random(500));
Mouse(582, 266,2,2,true);
TiAtObj(5161203,10,'ire','ire');
wait(1500+random(500));
//to gate
Mouse(635, 83,1,1,true);
wait(100);
DPFlag;
wait(300+random(100));
WalkToArrow;
//open gate
repeat
TiAtObj(540510,10,'ate','pen');
DoorWait;
until(ChatBmp(FindYourNextInstructor));
WalkToArrow;
repeat
TiAtObj(1660014,10,'oor','pen');
DoorWait;
DoorWait;
until(ChatBmp(TalkToChef));
repeat
TiAtObj(14671843,10,'alk-','alk-');
until(DPInNpcTalk);
DPTalkNpc;
//make bread
Mouse(626, 267,2,2,true);
wait(500+random(500));
MMouse(667, 266,2,2);
wait(100);
Mouse(667, 266,2,2,true)
wait(500+random(100));
WalkToArrow;
//Cook on range
Mouse(713, 266,2,2,true);
TiAtObj(1518023,10,'ange','ange');
wait(2000+random(200));
GameTab(13);
//leaving cooking area
WalkToArrow;
repeat
TiAtObj(1858937,10,'oor','pen');
DoorWait;
Until(ChatBmp(Emotes));
GameTab(12);
Mouse(623, 281,1,1,true);
wait(1000+random(100));
GameTab(11);
wait(1000+random(500));
Mouse(647, 431,1,1,true);
wait(500+random(100));
WalkToRedArrow;
WalkToRedArrow;
WalkToArrow;
//outside quest place

repeat
TiAtObj(1461090,10,'oor','pen');
DoorWait;
until(ChatBmp(QuestGuide));
WalkToArrow;
repeat
TiAtObj(4024613,10,'uest','alk-');
until(DPInNpcTalk);
DPTalkNpc;
GameTab(3);
repeat
TiAtObj(4024613,10,'uest','alk-');
until(DPInNpcTalk);
DPTalkNpc;
WalkToArrow;
TiAtObj(532037,10,'adde','own');
wait(2000+random(1000));
Mouse(647, 151,1,1,true);
wait(100);
DPFlag;
WalkToArrow;
repeat
TiAtObj(7878515,10,'ini','alk-');
until(DPInNpcTalk);
DPTalkNpc;
repeat
WalkToArrow;
TiAtObj(6710894,5,'ock','Pros');
wait(3000+random(1000));
until(ChatBmp(pros1));
repeat
WalkToArrow;
TiAtObj(4546685,5,'ock','Pros');
wait(3000+random(1000));
until(ChatBmp(pros2));
WalkToArrow;
repeat
TiAtObj(7878515,10,'ini','alk-');
until(DPInNpcTalk);
DPTalkNpc;
repeat
WalkToArrow;
TiAtObj(6710894,5,'ock','Mine');
wait(3000+random(1000));
until(ChatBmp(mine1));
repeat
WalkToArrow;
TiAtObj(4546685,5,'ock','Mine');
wait(3000+random(1000));
until(ChatBmp(mine2));
WalkToArrow;
GameTab(4);
Mouse(670, 300,2,2,true);
TiAtObj(2894896,10,'urn','urn');
wait(3000+random(1000));
WalkToArrow;
WalkToArrow;
repeat
TiAtObj(7878515,10,'ini','alk-');
until(DPInNpcTalk);
DPTalkNpc;
WalkToArrow;
Mouse(627, 301,1,1,true);
TiAtObj(4737103,10,'nvi','nvi');
MMouse(35, 62,1,1);
wait(100);
ClickMouse(35, 62,true);
wait(2000+random(1000));
WalkToArrow;
WalkToArrow;
repeat
TiAtObj(9342618,10,'ate','Open');
DoorWait;
until(ChatBmp(Combat));
WalkToArrow;
//starting combat part
repeat
TiAtObj(6654901,10,'omb','alk-');
until(DPInNpcTalk);
DPTalkNpc;
GameTab(5);
Mouse(653, 432,1,1,true);
DoorWait;
Mouse(629, 297,1,1,true);
DoorWait;
Mouse(485, 41,1,1,true);
WalkToArrow;
repeat
TiAtObj(6654901,10,'omb','alk-');
until(DPInNpcTalk);
DPTalkNpc;
Mouse(595, 303,1,1,true);
DoorWait;
GameTab(4);
Mouse(629, 297,1,1,true);
DoorWait;
Mouse(712,300,1,1,true);
DoorWait;
Mouse(558, 189,1,1,true);
GameTab(4);
WalkToArrow;
repeat
TiAtObj(9474203,10,'ate','Open');
DoorWait;
until(ChatBmp(Attacking));
Repeat
TiAtObj(7371129,10,'ian','tta');
wait(5000+random(1000));
until(FindBitMapToleranceIn(FirstKill,x,y,116, 358,448, 418, 20));
Mouse(674, 86,1,1,true);
wait(10);
DPFlag;
wait(300+random(100));
TiAtObj(9474203,10,'ate','Open');
DoorWait;
WalkToArrow;
repeat
TiAtObj(6654901,10,'omb','alk-');
until(DPInNpcTalk);
DPTalkNpc;
Mouse(627, 301,1,1,true);
DoorWait;
Mouse(710, 301,1,1,true);
DoorWait;
Mouse(654, 69,1,1,true);
wait(100);
DPFlag;
Wait(900+random(200));
Repeat
TiAtObj(7371129,10,'ian','tta');
wait(5000+random(1000));
until(FindBitMapToleranceIn(MovingOn,x,y,179, 344,341, 397,20));
Mouse(645, 49,1,1,true);
wait(100);
DPFlag;
Mouse(645, 49,1,1,true);
wait(100);
DPFlag;
Mouse(649, 95,1,1,true);
wait(100);
DPFlag;
wait(500+random(500));
TiAtObj(2114653,10,'adde','limb');
wait(2000+random(1000));
//out of fighting
//time to go to bank
WalkToArrow;
TiAtObj(607324,10,'ooth','Use');
DPTalkNpc;
Mouse(254, 398,1,1,true);
DoorWait;
Mouse(486, 41,1,1,true);
DoorWait;
//going to finantial place
repeat
WalkToArrow;
TiAtObj(1791857,10,'pen','pen');
DoorWait;
until(ChatBmp(Finantial));
DoorWait;
repeat
TiAtObj(2302757,10,'ina','alk-');
until(DPInNpcTalk);
DPTalkNpc;
repeat
WalkToArrow;
WalkToArrow;
TiAtObj(1791857,10,'oor','pen');
DoorWait;
until(ChatBmp(Prayer));
DoorWait;
Mouse(640, 151,1,1,true);
wait(100);
DPFlag;
wait(600+random(100));
WalkToArrow;
wait(300+random(100));
if(DPAtObjCol(3823739,10,'arg','pen')) then begin
DoorWait;
WalkToArrow;
end;
Repeat
TiAtObj(2508906,10,'Ta','ro');
until(DPInNpcTalk);
DPTalkNpc;
GameTab(6);
Repeat
TiAtObj(2508906,10,'Ta','ro');
until(DPInNpcTalk);
DPTalkNpc;
Mouse(586, 484,1,1,true);
wait(600+random(500));
Mouse(613, 485,1,1,true);
wait(600+random(500));
Repeat
TiAtObj(2508906,10,'oth','alk-');
until(DPInNpcTalk);
DPTalkNpc;
repeat
WalkToArrow;
TiAtObj(2386826,10,'oor','pen')
DoorWait;
until(ChatBmp(YourFinalInstructor));
Mouse(700, 109,1,1,true);
wait(100);
DPFlag;
wait(600+random(100));
WalkToArrow;
Repeat
TiAtObj(9658898,10,'agi','alk-');
until(DPInNpcTalk);
DPTalkNpc;
GameTab(7);
DPTalkNpc;
TiAtObj(9658898,10,'agi','alk-');
TiAtObj(9658898,10,'agi','alk-');
TiAtObj(9658898,10,'agi','alk-');

repeat
WalkToArrow2;
Mouse(589, 226,1,1,true);
TiAtObj(15724529,10,'ick','ick');
DoorWait;
until(ChatBmp(AlmostDone));
Repeat
TiAtObj(9658898,10,'agi','alk-');
until(DPInNpcTalk);
DPTalkNpc;
Mouse(258, 398,1,1,true);
wait(600+random(500));
DPTalkNpc;
wait(1000+random(500));
GameTab(4);
MMouse(626, 336,1,1);
wait(200+random(100));
HoldMouse(626,336,true);
MMouse(584, 228,1,1);
wait(200+random(100));
releasemouse(584,228,true);

wait(1000+random(500));
MMouse(668, 336,1,1);
wait(200+random(100));
HoldMouse(668, 336,true);
MMouse(627, 228,1,1);
wait(200+random(100));
releasemouse(627, 228,true);
wait(1000+random(500));
Mouse(589, 43,1,1,true);
wait(2000);
DPFlag;
wait(1000+random(1000));
Logout;
end;
repeat
wait(100+random(100));
until(not(DPInFight));
DPNextPlayer(LoggedIn);
Logout;
wait(10+random(50));
until(false);
end.

wadeal

2007-04-17 09:47:11

Heres the DPInclude

{.include srl/srl.scar}
{.include srl/srl/extended/xmapwalk.scar}
{.include srl/srl/misc/amount.scar}
{.include srl/srl/skill/woodcutting.scar}


const
////////////////////
//////SETUP/////////
////////////////////

MSMouseWait = 200 ;//Amount of time to wait for mouse clicks on the main screen
InvMouseWait = 300 ;//Amount of time to wait for mouse clicks on the inventory
ChatMouseWait = 200 ;//Amount of time to wait for mouse clicks on the chat screen
OtherMouseWait = 0 ;//Amount of time to wait for other mouse clicks
WorldLoadingTimeOut = 20000 ;//Maximum amount of time to load a world

////////////////////
/////END SETUP//////
////////////////////

////////////////////
///OTHER CONSTS/////
////////////////////

max1=116; //My area vars
may1=50;
max2=380;
may2=266;

BankSymbolCol=4758447;

////////////////////
//END OTHER CONSTS//
////////////////////

var
road1,road2,road3,road4,road5,DeadBmp,WaterSymbol,FlagBmp,m1bmp,BlueBubble,RedBubble:integer;
BubbleMark:Longint;






procedure dpm(mx,my,rx,ry:integer;left:boolean;area:string);
var WaitMs:integer;
begin
if(area = 'inv') then begin
WaitMs :=InvMouseWait;
end else begin
if(area = 'ms') then begin
WaitMs :=MSMouseWait;
end else begin
if(area = 'chat') then begin
WaitMs :=chatMouseWait;
end else begin
WaitMs :=OtherMouseWait;
end;
end;
end;
WaitMs := WaitMs + random(WaitMs / 5);

MMouse(mx,my,rx,ry);
getmousepos(x,y);
wait(WaitMs);
Mouse(x,y,0,0,left);
end;

function dpmText(mx,my,rx,ry:integer;left:boolean;area,text:string):boolean;
var WaitMs:integer;
begin
if(area = 'inv') then begin
WaitMs :=InvMouseWait;
end else begin
if(area = 'ms') then begin
WaitMs :=MSMouseWait;
end else begin
WaitMs :=OtherMouseWait;
end;
end;
WaitMs := WaitMs + random(WaitMs / 5);

MMouse(mx,my,rx,ry);
getmousepos(x,y);
wait(WaitMs);
Result:=IsUpText(text);
if(Result) then Mouse(x,y,0,0,left);
end;

procedure DPSetupNoLogout;
begin
SetupSRL;
MouseSpeed:=1;
RoadColor:=0;
Road1:= BitmapFromString(7, 7, 'z78DA33B334333233341B25F1920018' +
'BF3CDF'); //used
Road2:= BitmapFromString(5, 7, 'z78DA337731373137351F46240010BE' +
'2E37'); //used
Road3:= BitmapFromString(7, 8, 'z78DA337533B500C251924A240020D7' +
'4A99'); //used
Road4:= BitmapFromString(6, 6, 'z78DA3373310381614702002A1C2F89' +
''); //used
Road5:= BitmapFromString(6, 5, 'z78DA333337333075331B522400D3B5' +
'2725');//used
WaterSymbol:=BitmapFromString(7, 6, 'z78DA8DCE310AC0300C03C02F352484' +
'7894ACF6FF4FEAE045C54B1761EC43F8E8E8DE6BEDEB199E0982F' +
'4ACBD22A1AC79CC491108C44796E9B2F24F676FF6DFDC74D9AF6E' +
'5CBE58533B7B');
FlagBmp:=BitmapFromString(1, 2, 'FF0000FF0000');
m1bmp:=BitmapFromString(4, 3, 'z78DA33753135313137C5411A60005C' +
'E20023EC0E8F');
DeadBmp:=BitmapFromString(30, 1, 'z78DA7373330002B721450200CCCB2' +
'6E9');
// BlueBubble:=BitmapFromString(10, 1, 'z78DA3330363035373500932606260' +
// '66E6EC824A6B801927A0080CA0CA9');
// RedBubble:=BitmapFromString(10, 1, 'z78DA3373323034307436000164D20' +
// 'C431C22824C020073030C22');

ActivateClient;
wait(500);
end;

procedure DPSetup;
begin
DPSetupNoLogout;
if(LoggedIn) then Logout;
end;

function DPEnemyDead:boolean;
begin
Result:=FindBitMapIn(DeadBmp,x,y,116, 50,380,266);

end;

procedure DPFlag;
var FlagMark:longint;
begin
MarkTime(FlagMark);
wait(50+random(10));
repeat
wait(10);
until(not(FindBitmapIn(FlagBmp,x, y, 559, 0, 735, 166)) or (TimeFromMark(FlagMark)>45000) );
wait(300+random(50));
end;

Procedure DPSCSSOpenWorld(world:integer);
var
LaunchMark:LongInt;
begin
SCSSLoadWorld(world, True);
MarkTime(LaunchMark);
wait(4000+random(500));
repeat
wait(100);
if(TimeFromMark(LaunchMark)>WorldLoadingTimeOut)then
DPSCSSOpenWorld(world);
until(getcolor(310, 244)=65535);
end;


procedure DPFightMode(fightmode:integer);
begin
if(not(fightmode=1)) then begin
Mouse(558, 190,3,3,true);
if(fightmode=2) then MMouse(691, 272,5,5);
if(fightmode=3) then MMouse(609, 322,5,5);
if(fightmode=4) then MMouse(690, 323,5,5);
wait(200+random(300));
getmousepos(x,y);
ClickMouse(x,y,true);
end;
end;

procedure FalsePlayers;
var
i:integer;
Active:string;
begin
writeln('****False Players****');
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then Active:='True' else Active:='False';
if((Active = 'False') and not((Players[i].Name) = '')) then writeln(Players[i].Name);
end;
writeln('*********************');
end;

Function DPInFight:boolean;
begin
//if(FindBitMapIn(BlueBubble,x,y,max1,may1,max2,may2) or FindBitMapIn(RedBubble,x,y,max1,may1,max2,may2)) then MarkTime(BubbleMark);
if(FindColor(x,y,65899,max1,may1,max2,may2) or FindColor(x,y,7668995,max1,may1,max2,may2)) then MarkTime(BubbleMark);
Result:=TimeFromMark(BubbleMark)<700;
end;

Function DPInFightHealthBar:boolean;
begin
Result:=FindColor(x,y,65280,max1,may1,max2,may2) or FindColor(x,y,255,max1,may1,max2,may2);
end;

procedure DPFindRandoms;
begin
CloseWindow;
FindTalk;
FindMime ;
FindMaze ;
FindQuiz ;
FindDemon ;
FindScapeRune;
FindTalk ;
FindLamp(LampSkill);
if(FindNewBox) then SolveBox;
if(NoGameTab ) then begin WriteLn('No Gametab'); Logout; End;


end;


procedure DPFindRandsFight(RunDir:string);
begin
if(not(LoggedIn)) then Exit;
DPFindRandoms;
if(FindFight) then begin
RunAwayDirection(RunDir);
wait(5000);
RunBack;
end;
end;

{*******************************************************************************
function FindObj(var cx, cy: Integer; Text: String; color, tolerance: Integer): Boolean;
By: Stupid3ooo
Description: Finds Object.
*******************************************************************************}

function DPFindObj(var cx, cy: Integer; Text: String; color, tolerance: Integer): Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
if (FindMSColorTol(x, y, color, tolerance)) 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;
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;
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end;
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end;
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;
if (FindColorTolerance(x, y, color, x1, y1, x2, y2, tolerance)) then
begin
x:=x+0;
y:=y+0;
MMouse(x, y, 0, 0)
cx := x; cy := y;
wait(100+random(10));
if (IsUpText(Text)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;

function DPFindObjMultiText(var cx, cy: Integer; Text1,Text2,Text3: String; color, tolerance: Integer): Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
if (FindMSColorTol(x, y, color, tolerance)) 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;
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;
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end;
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end;
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;
if (FindColorTolerance(x, y, color, x1, y1, x2, y2, tolerance)) then
begin
x:=x+0;
y:=y+0;
MMouse(x, y, 0, 0)
cx := x; cy := y;
wait(100+random(10));
if (IsUpText(Text1) or IsUpText(Text2) or IsUpText(Text3)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;

function DPClickMenuOption(MenuOption:string):boolean;
var
mx1,my1,mx2,my2:integer;
TempRe,TR2:boolean;
begin
if(FindBitMapIn(m1bmp,mx1,my1,1,1,753, 485)) then begin
mx1:=mx1;
my1:=my1+18;
//if FindBitMapIn(m2bmp,mx2,my2,mx1+10,my1+20,753, 485) then begin
//Writeln('Found Menu Box');
TempRe:=ClickText(MenuOption,mx1,my1,760, 502);
TR2:=true;
// end;
end;
if(not(TR2)) then begin
writeln('Didn?t Find Menu Box');
TempRe:= ClickText(MenuOption,1,1,753, 485);
end;
Result:=TempRe;
end;


function DPAtObjCol(ObjCol,Tolerance:integer;UpText,Option:string):boolean;
var
re2:boolean;
begin
if(DPFindObj(x,y,UpText,ObjCol,Tolerance)) then begin
Mouse(x,y,0,0,false);
wait(100+random(50));
re2:=DPClickMenuOption(Option);
if(re2) then begin
wait(50+random(50));
DPFlag;
wait(600+random(200));
end;
end;
Result:=re2;
end;

function DPAtObjCol2(ObjCol,Tolerance:integer;UpText:string):boolean;
var
re2:boolean;
begin
if(DPFindObj(x,y,UpText,ObjCol,Tolerance)) then begin
ClickMouse(x,y,true);
re2:=true;
if(re2) then begin
wait(50+random(50));
DPFlag;
wait(600+random(200));
end;
end;
Result:=re2;
end;

function DPAtObjColMulti(ObjCol,Tolerance:integer;UpText1,UpText2,UpText3,Option:string):boolean;
var
re2:boolean;
begin
if(DPFindObjMultiText(x,y,UpText1,UpText2,UpText3,ObjCol,Tolerance)) then begin
Mouse(x,y,0,0,false);
wait(100+random(50));
re2:=DPClickMenuOption(Option);
if(re2) then begin
wait(50+random(50));
DPFlag;
wait(600+random(200));
end;
end;
Result:=re2;
end;

function DPInNpcTalk:boolean;
begin
Result:=FindColor(x,y, 16711680, 183, 445, 374, 453) or FindColor(x,y, 16777215, 183, 445, 374, 453) ;
end;

Function DPAtObjDeformed(BMP:integer;UpText,Option:string):boolean;
begin
Result:=FindObjectDeformed(x,y,UpText,UpText,BMP,MSX1,MSY1,MSX2,MSY2);
if(Result) then begin
Mouse(x,y,0,0,false);
wait(100+random(50));
Result:=DPClickMenuOption(Option);
if(not(Result)) then MMouse(x-100,y-100,50,50);
wait(50+random(50));
DPFlag;
wait(900+random(200));
end;
end;

Function DPOpenBank:boolean;
begin
Result:=DPAtObjCol(5591128,20,'oot','quickly');
if(Result=false) then Result:=DPAtObjCol(606551,20,'oot','quickly');
if(Result=false) then Result:=DPAtObjCol(606551,500,'oot','quickly');
end;

procedure DPDeposit(slot, toslot, thetype: Integer);
var
slotnumber, col, row,wx,wy: Integer;
begin
if (BankScreen) then
begin
slotnumber := slot;
while (slotnumber < toslot) do
begin
if ((slotnumber mod 4) = 0) then
col := 3
else
col := (slotnumber mod 4) - 1;
row := (slotnumber - 1) / 4;
if (FindColor(x, y, 65536, (571 + 47 * col), (215 + 36 * row), (601 + 47 * col), (245 + 36 * row))) then
begin
if (thetype = 1) then
dpm(x, y, 5, 5, True,'inv');
if (thetype = 2) then
begin
dpm(x, y+5, 2, 2,false,'inv');
wait(10);
if (ChooseOption(x, y, 'All')) then
Wait(700 + Random(100));
end;
end;
slotnumber := slotnumber + 1;
end;
end;
end;

Function DPBanking(StartSlot:integer):boolean;
begin
if(DPOpenBank) then begin
Result:=true;
DPDeposit(StartSlot,28,2);
wait(500+random(500));
MMouse(486, 40,5,5);
getmousepos(x,y);
wait(250+random(50));
ClickMouse(x,y,true);
wait(200+random(100));
end;
end;

procedure DPNextPlayer(Active: Boolean);
begin
if not Active then begin
Players[CurrentPlayer].Active := False;
end;
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
CurrentPlayer := 0;
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
begin
CurrentPlayer := 0;
Wait(300); // Everybody False. Endless Loop.
end;
end;
end;

procedure DPLoginPlayer;
var
ClickHereToPlay, tx, ty, CHx, CHy, c: Integer;
begin
ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
'067D37AC3D95AADF2F50962C79');
if (not (LoggedIn)) then
begin
Wait(100);
MMouse(458, 291,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
Writeln(Players[CurrentPlayer].Name);
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(100));
TypeSend(Players[CurrentPlayer].Pass);
Wait(100 + Random(100));
MMouse(305, 323,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
MarkTime(Mark);
repeat
Wait(1000);
if TimeFromMark(Mark) > 20000 then
begin
writeln('20 seconds have passed, Nextplayer');
MMouse(462, 334,10,1);
wait(200+random(100));
getmousepos(x,y);
ClickMouse(x,y,true);
wait(200+random(200));
DPNextPlayer(False);
DPLoginPlayer;
FreeBitmap(ClickHereToPlay);
Exit;
end;
until (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 20));
Wait(1000 + Random(500));
Mouse(CHx, CHy, 50, 20, True); // Clicks randomly on the button
repeat
Wait(100+random(1000));
c := c + 1;
until (LoggedIn) or (c >= 600);
end;
if NickNameBMP <> 0 then
FreeBitmap(NickNameBMP);
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); // Screenname
FreeBitmap(ClickHereToPlay);
end;

function DPLoginPlayer2:boolean;
var
ClickHereToPlay, tx, ty, CHx, CHy, c: Integer;
begin
ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
'067D37AC3D95AADF2F50962C79');
if (not (LoggedIn)) then
begin
Wait(100);
MMouse(458, 291,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
Writeln(Players[CurrentPlayer].Name);
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(100));
TypeSend(Players[CurrentPlayer].Pass);
Wait(100 + Random(100));
MMouse(305, 323,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
MarkTime(Mark);
repeat
Wait(1000);
if TimeFromMark(Mark) > 40000 then
begin
writeln('40 seconds have passed, False');
MMouse(462, 334,10,1);
wait(200+random(100));
getmousepos(x,y);
ClickMouse(x,y,true);
wait(200+random(200));
FreeBitmap(ClickHereToPlay);
Exit;
end;
until (getcolor(364, 340)= 16777215);
Wait(1000 + Random(500));
Mouse(364, 340, 5, 5, True); // Clicks randomly on the button
repeat
Wait(100+random(1000));
c := c + 1;
until (LoggedIn) or (c >= 600);
end;
if NickNameBMP <> 0 then
FreeBitmap(NickNameBMP);
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); // Screenname
FreeBitmap(ClickHereToPlay);
Result:=true;
end;

procedure DPLoginPlayerSpecific(uname,pword:string);
var
ClickHereToPlay, tx, ty, CHx, CHy, c: Integer;
begin
ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
'067D37AC3D95AADF2F50962C79');
if (not (LoggedIn)) then
begin
Wait(100);
MMouse(458, 291,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
Writeln(uname);
TypeSend(uname);
Wait(100 + Random(100));
TypeSend(pword);
Wait(100 + Random(100));
MMouse(305, 323,10,5);
getmousepos(x,y);
wait(200+random(200));
ClickMouse(x,y,true);
wait(200+random(500));
MarkTime(Mark);
repeat
Wait(1000);
until (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 20));
Wait(1000 + Random(500));
Mouse(CHx, CHy, 50, 20, True); // Clicks randomly on the button
repeat
Wait(100+random(1000));
c := c + 1;
until (LoggedIn) or (c >= 600);
end;
FreeBitmap(ClickHereToPlay);
end;

function DPFindAxeHeadColor: Boolean;
begin
GameTab(4);
GameTab(4);

begin
Head := GetColor(590, 220);
Head2 := GetColor(587, 219);
Head3 := GetColor(588, 218);
Result:= true;
end;
end;

Procedure DPSetupPlayer;
begin
PerfectNorth;
SetRun(true);
SetChat('Off',2);
SetChat('Off',3);
DPFindAxeHeadColor;
end;

procedure DPGetRoadColor;
begin
FindBitmapsProgressiveTol(road1, road2, road3, road4, road5, 100, 1, 603, 26, 677, 130);
RoadColor:=GetColor(x+1,y+1);
writeln('RoadColor: '+inttostr(RoadColor));
end;

function DPRadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer):boolean;
var
i,X1,Y1:integer;
begin
for i := StartRadial to EndRadial do
begin
x1 := Round(Radius * Sine(i)) + 646;
y1 := Round(-Radius * Cose(i)) + 84;
if FindColor(X, Y, TheColor, X1, Y1, X1 + 1, Y1 + 1) then
begin
Mouse(x,y,0,0,true);
Result := True;
FFlag(10);
Exit;
end;
end;
end;

function DPLinearRoadWalk(Degrees,Radius:integer):boolean ;
var i:integer;
begin
DPGetRoadColor;
i:=0;
repeat
i:=i+10;
until(DPRadialWalk(RoadColor,Degrees-i,Degrees+i,Radius) or (i>180));
if(not(i>180)) then Result:=true;
if(Result) then writeln('Degrees Difference: '+inttostr(i)) else writeln('Couldn"t find road in specified radius');
wait(1500+random(500));
DPFlag;
wait(100+random(100));
end;



procedure DPToDeformed(bitmap,xdiff,ydiff:integer);
var dx,dy:integer;
begin
if(not(LoggedIn)) then Exit;
FindDeformed(dx,dy,bitmap,576, 3,727, 160);
wait(50+random(50));
Mouse(dx+xdiff,dy+ydiff,0,0,true);
wait(200+random(100));
DPFlag;
wait(100+random(100));
end;

procedure DPToDeformedArea(bitmap,xdiff,ydiff,a,b,c,d:integer);
var dx,dy:integer;
begin
if(not(LoggedIn)) then Exit;
FindDeformed(dx,dy,bitmap,a,b,c,d);
wait(50+random(50));
Mouse(dx+xdiff,dy+ydiff,0,0,true);
wait(200+random(100));
DPFlag;
wait(100+random(100));
end;

function DPAtInvItemDeformed(BMP:integer;Option:string):boolean;
begin
FindDeformed(x,y,BMP,556, 205 ,742, 464);
MMouse(x+1,y+1,0,0);
getmousepos(x,y);
wait(100+random(100));
Mouse(x,y,0,0,false);
wait(100+random(100));
if(ChooseOption(x,y,Option)) then begin
wait(1000+random(500));
Result:=true;
end;
end;

function DPIsInLumby:boolean;
var SAcc:extended;
begin
//result:=FindSymbol(x,y,'water') and (FindSymbol(x,y,'guide'));
FindDeformedBitmapToleranceIn(WaterSymbol, x, y, 596, 14, 697, 76, 50, 0, True, SAcc);
if(SAcc>(0.5)) then begin
FindDeformedBitmapToleranceIn(WaterSymbol, x, y, 575, 75, 704, 156, 50, 0, True, SAcc);
if(SAcc>(0.5)) then Result:=true;
end;
end;

procedure DPTalkNpc;
var i:integer;
begin
while(FindColor(x,y,16711680,98, 446,435, 449) or FindColor(x,y,16777215,98, 446,435, 449)) do begin dpm(304, 447,20,1,true,'chat');
wait(1000+random(100));
end;
end;

function DPFindEnt: Boolean;
var
i : Integer;
begin
if(Option2('Chop'))then
begin
//if(FindColorTolerance(x, y, 250065, 84, 92, 19, 40))then
if(FindColorTolerance(x, y, 383705, 9, 9, 233, 24, 20))or
(FindColorTolerance(x, y, 65535, 9, 9, 233, 24, 20))then
begin
for i := 1 to 2 do
begin
Mouse(648, 83, 1, 1, True)
Flag;
end;
WriteLn('Found ent! Waiting for it to go away');
Wait(40000 + random(5000));
Result := True;
EntsAvoided := EntsAvoided + 1;
end;
end;
end;

procedure DPDropAllItemsExceptFirst;
var
rx, ry, m, n : Integer;
begin
Status('Dropping Logs');
Gametab(4)
begin
for M:=1 to 7 do
begin
for n:=1 to 4 do
begin
rx := 544 + (n * 42)
ry := 192 + (m * 36)

if(not((M=1)and(n=1)))
then
begin
mmouse(rx, ry, 5, 5)
wait(100 + random(100));
getmousepos(x, y)
mouse(x, y, 0, 0, false);
wait(100 + random(50));
if(ClickText('Drop', MIX1, MIY1, MIX2, MIY2))then
begin
wait(150 + random(210));
end else
mmouse(233, 123, 50, 50)
end;
end;
end;
end;
end;



Procedure DPRotateScreen;
begin
KeyDown(VK_LEFT);
Wait(500 + random(200));
KeyUp(VK_LEFT);
end;

function DPHaveLostHead:boolean;
begin
GameTab(4);
if not (GetColor(590,220) = Head) then
if not (GetColor(587,219) = Head2) then
if not (GetColor(588,218) = Head3) then
result:=true;
end;

procedure DPFindHead;
var tries:integer;
begin
if(not(DPHaveLostHead)) then Exit;
Writeln('Axe head has been lost, trying to find it now...');
Wait(2000+random(1000));
repeat
tries:=tries+1;
If(not(DPAtObjCol2(Head,30,'ead'))) then DPRotateScreen;
until(AttachHead or (tries>9));
PerfectNorth;
end;

procedure PickUpItem(ItemColor,ItemTol:integer);
begin
x:=266;
y:=163;
if(FindColorSpiralTolerance(x,y,ItemColor,max1,may1,max2,may2,ItemTol)) then if(dpmText(x,y,0,0,true,'Take','ms')) then DPFlag;
end;

function DPToNearestYellowDot(Offset:Boolean):boolean;
begin
x:=648;
y:=83;
Result:=FindColorSpiralTolerance(x,y,62965,565, 13,728, 159,5);
if(Result) then begin
if(Offset) then Mouse(x,y+6,0,0,true) else Mouse(x,y,0,0,true);
DPFlag;
end;
end;

procedure DPToColorArea(color,a,b,c,d:integer);
var CurTol:integer;
begin
CurTol:=-1;
repeat
CurTol:=CurTol+1;
until(FindColorTolerance(x,y,color,a,b,c,d,CurTol));
dpm(x,y,4,4,true,'mm');
DPFlag;
end;

procedure DPToBank;
begin
DPToColorArea(BankSymbolCol,566, 13,724, 154);
end;

Function DPFindDefSpAcc(var dx,dy:integer; bitmap:integer;acc:extended;tol,range ,a,b,c,d:integer):boolean;
var RetAcc,RetAngle:extended;
begin
//FindDeformedBitmapToleranceRotationIn(bitmap,x, y,a,b,c,d,tol,range, RetAcc,0.087,0.0, 6.3,RetAngle);
FindDeformedBitmapToleranceIn(bitmap, dx, dy,a,b,c,d,tol,range,true, RetAcc);
result:=acc>=RetAcc;
writeln(inttostr(trunc(RetAcc*100)));
end;

Function DPIsColorTol(cx,cy,col,tol:integer):boolean;
begin
result:=findcolortolerance(x,y,col,cx,cy,cx,cy,tol);
end;

function DPHaveFishingEquip:boolean;
begin
result:=DPIsColorTol(579, 218,6437,15) or DPIsColorTol(588, 215,65536,15);
end;

procedure DPUpdateMMColor(var col:integer);
var CurTol:integer;
begin
CurTol:=-1;
repeat
CurTol:=CurTol+1;
until(FindColorTolerance(x,y,col,564, 6,728, 166,CurTol));
col:=getcolor(x,y);
end;

me_ntal

2007-04-17 09:52:02

Um my best advice if it isnt your scipt just use Nielsie95's Tutorial Island Runner

nielsie95

2007-04-17 10:02:44

This one is already posted at the Tutorial Island Section, it's from DontPanic and he says it's outdated..

3Garrett3

2007-04-17 15:20:27

Ya, its outdated, sometimes it doesnt work, and nielsies is tank, so use it