Log in

View Full Version : Help!!!!



groaning dragon
08-27-2007, 08:56 AM
OK, i admit im new, and im trying to learn, im currently trying to run my first ever script.... i have been trying and trying for literally 7 hours straight!, i have made it through many errors and finally im at the end of the night, adn i need a little help, hopefully this will be the LAST error i will have to deal with before it works.....

the error says

Line 141: [Error] (16369:4): Unknown identifier 'doctors' in script C:\Program Files\SCAR 3.06\includes\SRL\scripts\SRL Rimmington Miner 0.21 rev 130 pub .scar

someone please help me out? im donating 30$ to each site that helps me... i really appreciate everything guys,,.

Scar NEWB, trying to become pro!

:confused:



here is the script ---------------------
{================================================= ========================]
[ SRL Rimmington miner 0.26. ]
[ ]
[ NAME : SRL Rimmington 0.26 ]
[ WRITER : WT-Fakawi (Fawki) ]
[ CATEGORY : Miner ]
[ DESCRIPTION : See below. ]
[ USAGE : Miner/banker for any ore at Rimmington mine. ]
[ AUTOCOLOR : Yes ]
[ NOTES : Stable? ]
[ CONTACT : WTFakawi@hotmail.com ]
[ SRL REV. : #429 ]
[================================================== =======================]
[ This Script mines any ore at Rimmington and banks at Falador. ]
[================================================== =======================]
[ Instructions. ]
[================================================== =======================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color. ]
[ 3. Set Playernames and Passwords in DeclarePlayers. ]
[ 4. Set NumberOfPlayers. ]
[ 5. Position your chars at Falador east bank leftmost bankslot. ]
[ 6. Make sure your Players have Pickaxes wielded. ]
[ 7. For some random Guard killing unblank line #356 ]
[ 6. If script cant find colors align MM North as much as possible. ]
[================================================== =======================}

program RimmingtonMiner;

{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Fighting.scar}
{.include SRL/SRL/skill/Mining.scar}
{.include SRL/SRL/misc/FaladorColorFinder.scar}
{.include SRL/SRL/misc/PlayerForm.scar}
var
FB1, FB2, FB3, TotalOres, TheOre, Clay: integer;


//******************** Set These Constants if Needed **********************//

const
MaxWait = 8; // Ore click interval. In seconds.
Loads = 700; // Number of loads before switching Player.
Road2Color = 0; // Color of Road Outside Falador

const
MSClayColor = 8435411;
MSTinColor = 10461099;
MSCopperColor = 4948692;
MSIronColor = 2701145;
MSGoldColor = 1683673;

//************************************************** ***********************//
const
VersionNumber = '0.26';
//************************************************** ***********************//

Procedure DeclarePlayers;
begin
SetUpPlayers;
end;

//************************************************** ***********************//

procedure PlayerStats;

var
Active: string;
var
i: Integer;
begin
writeln('***************************************** *****');
writeln('Name : ' + Players[CurrentPlayer].Name);
writeln('Number : ' + inttostr(CurrentPlayer));
writeln('Mining Level : ' + inttostr(Players[CurrentPlayer].Level[15]));
writeln('Select Skill : ' + Players[CurrentPlayer].Skill);
writeln('Worked for : ' + inttostr(Players[CurrentPlayer].Worked)+' minutes.');
writeln('Banked : ' + inttostr(Players[CurrentPlayer].Banked) + ' times.');
writeln('Killed : ' + inttostr(Players[CurrentPlayer].Killed) + ' guards.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : ' + Active);
writeln('Location : ' + Players[CurrentPlayer].loc);
writeln('***************************************** *****');

for i := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active=True then Active:='True' else Active:='False';
writeln( (inttostr(i)) + ' : ' + Players[i].name + ' = ' + Active + '. - Lvl : ' + inttostr(Players[i].Level[15])+
'. - B :' + inttostr(Players[i].Banked) + ' Times.'+
' - : ' + IntToStr(Players[i].Worked) + ' mins.' + ' - Loc: ' + Players[i].loc);
end
writeln('***************************************** *****');
end;

//************************************************** ***********************//

procedure ProgressReport;
begin
begin
WriteLn(' ');
WriteLn('<============== -' + VersionNumber + '- Progress Report ===============>');
writeln('Worked for ' + TimeRunning);
WriteLn('Banked ' + IntToStr(banks) + ' loads[s].');

if (Players[1].Skill= 'clay') then
begin
WriteLn('Banked ' + IntToStr(TotalOres) + ' Clay ores.');
WriteLn('Gained ' + floattostr(5*TotalOres) + 'xp.');
end;

if (Players[CurrentPlayer].Skill= 'tin') then
begin
WriteLn('Banked ' + IntToStr(TotalOres) + ' Tin ores.');
WriteLn('Gained ' + floattostr(17.5*TotalOres) + 'xp.');
end;

if (Players[CurrentPlayer].Skill= 'copper') then
begin
WriteLn('Banked ' + IntToStr(TotalOres) + ' Copper ores.');
WriteLn('Gained ' + floattostr(17.5*TotalOres) + 'xp.');
end;

if (Players[CurrentPlayer].Skill= 'iron') then
begin
WriteLn('Banked ' + IntToStr(TotalOres) + ' Iron ores.');
WriteLn('Gained ' + floattostr(35*TotalOres) + 'xp.');
end;

if (Players[CurrentPlayer].Skill= 'gold') then
begin
WriteLn('Banked ' + IntToStr(TotalOres) + ' Gold ores.');
WriteLn('Gained ' + floattostr(65*TotalOres) + 'xp.');
end;

WriteLn('Random Event Report:');
if(fights > 0) then WriteLn(' Fought ' + IntToStr(fights) + ' Time[s].');
if(fights > 0) then WriteLn(' Killed ' + IntToStr(NPCS) + ' Guard[s].');
if(talks > 0) then WriteLn(' Talked to ' + IntToStr(talks) + ' Random event[s].');
if(lamps > 0) then WriteLn(' Used lamps ' + IntToStr(lamps) + ' Time[s].');
if(doctors > 0) then WriteLn(' Solved ' + IntToStr(doctors) + ' Fords[s].');
if(frogs > 0) then WriteLn(' Solved ' + IntToStr(frogs) + ' Frog[s].');
if(Attaches > 0)then WriteLn(' Attached ' + IntToStr(Attaches) + ' Pickaxe[s].');
if(newboxes > 0) then WriteLn(' Solved ' + IntToStr(newboxes) + ' Box[es].');
if(demons > 0) then WriteLn(' Solved ' + IntToStr(demons) + ' Demon[s].');
if(logs > 0) then WriteLn(' Logged in ' + IntToStr(logs) + ' Time[s].');
WriteLn('<================================================== ===>');
end;
PlayerStats;
end;

//************************************************** ***********************//

Procedure FillMem;
begin

FB1 := DTMFromString('78DA636C66626008634001972E5E66F80FA 41' +
'981F83F1030B601D5C4A0AAF9F38789810BAA0604189B8850 D345' +
'580D00CA7B110D');
FB2 := DTMFromString('78DA63EC61626008614001478F1E65F80FA 41' +
'981F83F1030F602D544A1AAF9F38789810BAA0604182712A1 662A' +
'504D247E3500C2961107');
FB3 := DTMFromString('78DA636C646260086140038C0CFFC12403C 37' +
'F206004A9894255F1E70F130317540D58472B504D3401359D 4035' +
'31F8D50000978B0E8E');
end;

//************************************************** ***********************//

Procedure SetOreColors;
begin
if Players[CurrentPlayer].Skill= 'clay' then TheOre:=MSClayColor;
if Players[CurrentPlayer].Skill= 'tin' then TheOre:=MSTinColor;
if Players[CurrentPlayer].Skill= 'copper' then TheOre:=MSCopperColor;
if Players[CurrentPlayer].Skill= 'iron' then TheOre:=MSIronColor;
if Players[CurrentPlayer].Skill= 'gold' then TheOre:=MSGoldColor;
end;


//************************************************** ***********************//

Procedure SetUp;
begin
Fillmem;
SetupSRL;
SetupSRLMining;
SetUpPlayers;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); x gh0stface// Screenname for FIRST Player in case of already loggedin.
LoginPlayer;
end;

//************************************************** ***********************//

procedure RunAway;
begin
SetRun(true);
MouseFindFlag(648, 35, 1, -1);
Flag;
wait(8000 + random(2000));
MouseFindFlag(648, 135, 1, 1);
Flag;
end;

//************************************************** ***********************//

procedure FindRandoms;
begin
FindNormalRandoms;
Wait ( 1 );
Respond;
Wait ( 1 );
if FindFight then RunAway;
if (InBlack or NoGameTab) then begin Logout; exit;end;
end;

//************************************************** ***********************//

Function FindRimmingtonGas: Boolean;
begin
if (FindGas(x, y) or GasCheck(x, y)) then
begin
Result:=True
Mouse(252, 174, 0, 0, True);
MarkTime(Mark);
repeat
FindRandoms;
Wait(1000);
until(TimeFromMark(Mark) >= 10000);
end
end;

//************************************************** ***********************//

Function WeAreInRimmington:Boolean;

begin
if FindSymbol(x, y, 'mining site') then
begin
Players[CurrentPlayer].Loc:='Rimmington';
Result:=true;
end
else Result := False;
end;

//************************************************** ***********************//

procedure WalkToOre;
begin
if Players[CurrentPlayer].Skill= 'copper' then Mousefindflag(MMCX, MMCY-20, 1, 1);
if Players[CurrentPlayer].Skill= 'iron' then Mousefindflag(MMCX-28, MMCY, 1, 1);
if Players[CurrentPlayer].Skill= 'tin' then Mousefindflag(MMCX + 30, MMCY + 15, 1, 1);
if Players[CurrentPlayer].Skill= 'clay' then Mousefindflag(MMCX + 35, MMCY + 5, 1, 1);
if Players[CurrentPlayer].Skill= 'gold' then Mousefindflag(MMCX, MMCY + 30, 1, 1);
Flag;
end;

//************************************************** ***********************//

procedure CleanWalk;

var
xw, yw, i: Integer;
begin
for i:=1 to 5 do RadialWalk(RoadColor, 140, 270, 45, 0, -1);
MarkTime(Mark);
repeat
if (not (Loggedin) or (TimeFromMark(Mark)>120000))then break;
RadialWalk(Road2Color, 140, 270, 45, 0, -1);
FindRandoms;
until FindColor(xw, yw, WaterColor, 680, 55, 708, 150); // Walk to small blue lake
end;

//************************************************** ***********************//

procedure KillWalk;
var i:integer;
begin
for i:=1 to 5 do RadialWalk(RoadColor, 140, 270, 45, 0, -1);
wait(2000);
if (FightNPC(2902883, 5066067, 8224391, 1319982, 1560272, 2506835, 15, 5000)) then
begin
Wait(5000 + Random(5000));
Players[CurrentPlayer].Killed:=Players[CurrentPlayer].Killed + 1;
end;
CleanWalk;
end;

//************************************************** ***********************//

Procedure WalkToRimmington;
var
tx, ty: integer;
begin
If not LoggedIn then Exit;
Players[CurrentPlayer].Loc:='FalToRim';
//* IF YOU HAVE STRONG PLAYERS USE LINE BELOW
// if Random(6)=1 then KillWalk else CleanWalk; // once every 6 times attack guard
CleanWalk;

RadialWalk(Road2Color, 190, 270, 65, 0, -1);
RadialWalk(Road2Color, 190, 270, 65, 0, -1);

MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>120000) then begin Logout; Exit; end;
RadialWalk(Road2Color, 150, 270, 60, -1, -1);
until (FindSymbol(tx, ty, 'water') or
FindSymbol(tx, ty, 'store') or
FindSymbol(tx, ty, 'cookery'));

Wait(5000);

RadialWalk(Road2Color, 110, 20, 60, -1, -1);

MouseFindNoFlag(678, 20, -1, 2); // one 'blind' click.

FFlag(10);

FindSymbol(tx, ty, 'mining spot');
Mouse(tx, ty, 0, 0, True);
Flag;
WalkToOre;
SetRun(True);
Players[CurrentPlayer].Loc:='Rimmington';
end;

//************************************************** ***********************//

Procedure WalkToFalador;

var
xw, yw:integer;
begin
If not LoggedIn then Exit;

MouseFindFlag(607, 34, 1, 1); // one 'blind' click.

FFlag(10);

Players[CurrentPlayer].Loc:='RimToFal';
MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>120000) then begin Logout; Exit; end;
RadialWalk(Road2Color, 450, 300, 65, -1, 1);
FindRandoms;
Until FindColor(xw, yw, WaterColor, MMX1, MMY1, MMX2, MMY2); // walk to lake

MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>120000) then begin Logout; Exit; end;
Wait(1000);
FindRandoms;
RadialWalk(Road2Color, 400, 320, 40, -1, 1);
Until FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMCY); // walk up to bank

MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>120000) then begin Logout; Exit; end;
Wait(1000);
FindRandoms;
RadialWalk(RoadColor, 400, 320, 40, -1, 1);
Until FindColor(x, y, BankColor, MMX1, MMY1, MMX2, MMY2); // walk up to bank

MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>120000) then begin Logout; Exit; end;
Wait(1000);
FindRandoms;
RadialWalk(RoadColor, 420, 300, 10, -1, 1);
Until DTM3Flag(FB1, FB2, FB3, True); // finds the bank

Flag;

end;

//************************************************** ***********************//

procedure MineIt;
var SysTime:integer;
begin
If not LoggedIn then Exit;
if(FindObj(x, y, 'Mine', TheOre, 5))then
begin
if not FindRimmingtonGas then
begin
Mouse(x, y, 5, 0, true);
if(FlagPresent)then
begin
Flag;
Wait(500 + Random(500));
end;
MarkTime(SysTime);
repeat
if (not(Loggedin)) then break;
Wait(500 + Random(500));
FindRandoms;
Respond;
FindPick;
if FindRimmingtonGas then break;
until(not(GetColor(109, 430) =0 ) and (not(GetColor(195, 426) = 0))) or
(TimeFromMark(SysTime)>=MaxWait*1000)
end;
end;
end;

//************************************************** ***********************//

procedure Bank;

begin
If not LoggedIn then Exit;
if TheOre=MSClayColor then TotalOres:=TotalOres + (CountItemBmpTol(Clay, 50))
else TotalOres:=TotalOres + (CountItemBmpTol(Ore, 50));

if (NoPick=true) and (EquipPick=true) then
begin
if InventoryFull then
begin
if(FindBitmapSpiralTolerance(Ore, x, y, 559, 210, 735, 460, 25))then
begin
Mouse(x, y, 5, 5, false);
ChooseOption(x, y, 'Drop');
end;
end;
GameTab(5);
Mouse(593, 303, 0, 0, true);
Wait(Random(1000) + 2000);
GameTab(4);
end;

MarkTime(Mark);
repeat
if (not(Loggedin)) then break;
OpenBank;
until((BankScreen) or (TimeFromMark(Mark)>60000));

if(BankScreen)then
begin
if(NoPick=true)then
begin
ClickAllItemsColorWait('All', 65536, 1000 + Random(100));
Withdraw(1, 1, 1);
end else
begin
if(EquipPick=false)then
Deposit(2, 28, 2);
if(EquipPick=true)then
ClickAllItemsColorWait('All', 65536, 1000 + Random(100));
end;
CloseWindow;
if(NoPick=true)and(EquipPick=true)then
begin
FindPickHeadColor;
ClickItemColor(hc1, true);
end;
Banks:=Banks + 1;
Players[CurrentPlayer].Banked:=Players[CurrentPlayer].Banked + 1;
Players[CurrentPlayer].loc:='Falador';
NoPick:=false
end;
end;

//************************************************** ***********************//
//
// Main EventLoop
//
//************************************************** ***********************//

begin

Setup;
FindFaladorBasicColors;

repeat

SetChat('on', 1);
SetChat('off', 2);
SetChat('off', 3);
FixChat;
SetChat('on', 1);

if Players[CurrentPlayer].loc='Falador' then
begin
SetOreColors;
FindPickHeadColor;
Players[CurrentPlayer].Level[15]:=GetSkillLevel('mine');
Gametab(4);
PerfectNorth;

WalkToRimmington;
end;

if Players[CurrentPlayer].Loc='Rimmington' then
begin
MarkTime(Mark);
repeat
MineIt;
Wait(100);
FindRandoms;
if (not(Loggedin)) then break;
until(InventoryFull)or(NoPick=True)or(TimeFromMark (Mark)>1800000)

SetRun(False);
PerfectNorth;
WalkToFalador;
Bank;
FindRandoms;
ProgressReport;
PerfectNorth;
end;

if ((LoggedIn) and (Players[CurrentPlayer].Banked mod Loads = 0)) then
begin
SetChat('off', 1);
repeat
Wait(1000);
FindRandoms;
until(not(LoggedIn));
NextPlayer(True);
end;

if (not(Loggedin)) then NextPlayer(False);

until(False);

end.

solemn wishes
08-27-2007, 10:22 AM
hiya mate,

Your problem is that this script had not been updated to using the New SRL (Rev 4) thus it will not work (full stop).

I reccomend you download the srl 4 beta, or wait if you cannot yet (might be community members only atm) then once you have find a script that has been updated in srl 4.

Many variables, antirandom check changes and globals where removed. And this was all in responce to the new runescape interface, which required all new cords for openinventory functions and other stuff.

hope this helps.