SCAR Code:
//Boker's First Script
//Buys Oaks - Yews from lumbrige shop and burns
//Thank You srl tuts.. XD
//Need lvl 15 to use Oak+
program Firemaking;
{.include srl/srl.scar}
////////////////////////////////////////////////////////////////////////////////
var
x,y:integer;
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length
CurrentPlayer:= 0; // CurrentPlayer
Players[0].Name :='---'; //username
Players[0].Pass :='---'; //password
Players[0].Nick :='---'; //3-4 letters of username don't use first letter
Players[0].Active :=True //is this player active true/false?
end;
////////////////////////////////////////////////////////////////////////////////
Var
OakDTM,WillowDTM,YewDTM,MapleDTM,LogDTM : Integer;
procedure LoadDTMs;
begin
LogDTM := DTMFromString('78DA638C676060F0634001EEA69C0C0F81342' + //Logs
'310FF0702C64420239C010D302291403A0C48441050E30F248208' +
'A8C905128104D464821C49404D3A9008C5AF06005AEA0A55');
OakDTM := DTMFromString('78DA8DD13B0A80301045D1491344145410FF1' +
'FC4A5B82097E28EF5A60B163E077227C5214D5C6B66E144739D87' +
'A56CC7B919577199EC352E2A3BBC3108B3924E989DD4C2E46414C' +
'69346988D94C224A4FF610A6116920B33132F4CF898ECDB3C7206' +
'078E');
WillowDTM := DTMFromString('78DA63946460609062400151818A0C5C409A1' +
'188FF0301A3049021C7800618914820CD07241408A861C3B40B43' +
'8D0A909020A006648F0C116AF809A801795290801A65202142400' +
'D3B613500B5D706BB');
MapleDTM := DTMFromString('78DA631466606090604001B99EBC0C5C409A1' +
'188FF030123485E86010D302291405A11488813500332839F801A' +
'4E22EC62C67433861A903DF204D4C8020969026AD88184007E350' +
'0A1120663');
YewDTM := DTMFromString('78DA631461606010634001B16E9C0C5C409A1' +
'188FF0301A3149021C9800618914820AD04248409A801C94B1350' +
'03B2588A801A164C3763A89105127C04D47000097EFC6A009B370' +
'60A');
end;
////////////////////////////////////////////////////////////////////////////////
function BestLogs : Integer; //1-Normal, 2-Oak, 3-Willow, 4-Yew.
var FMLevel : Integer;
begin
FMLevel := GetSkillLevel('firemaking');
if (FMLevel >= 60) then
begin
Result := 4;
Exit;
end;
if (FMLevel < 60) and (FMLevel >= 30) then
begin
Result := 3;
Exit;
end;
if (FMLevel < 30) and (FMLevel >= 15) then
begin
Result := 2;
Exit;
end;
if (FMLevel < 15) then
begin
Result := 1;
Exit;
end;
end;
////////////////////////////////////////////////////////////////////////////////
Procedure DoChats;
Begin
SetChat('On', 1);
SetChat('On', 1);
SetChat('Friends', 2);
SetChat('Friends', 2);
SetChat('On', 3);
SetChat('On', 3);
End;
////////////////////////////////////////////////////////////////////////////////
Procedure Findkeeper;
begin
if (not(loggedIn))then exit;
begin
if FindObjCustom(x, y, ['shop', 'assistant', 'shopkeeper'], [6057862,6057862], 5) then
Mouse(x, y, 4, 4, False);
Wait(2500)
if (ChooseOption('Trade'))then
Wait(2220)
begin
Mouse(166,76,20,8,true);
Wait(225)
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
function BuyLogs : Integer;
var x, y, OakDTM, WillowDTM, YewDTM, MapleDTM, LogDTM : Integer;
begin
Mouse(x, y, 2, 2, False);
Wait(50 + Random(100));
case BestLogs of
1: LogDTM := 'buy 50';
2: OakDTM := 'buy 50';
3: WillowDTM := 'buy 50';
4: YewDTM := 'buy 50';
Exit;
end;
Result := 0;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
begin
SetupSrl;
LoadDTMs
DeclarePlayers;
LoginPlayer;
ClearDebug;
DoChats;
Findkeeper;
BestLogs;
BuyLogs
end.
////////////////////////////////////////////////////////////////////////////////
Thats what i have so far finds shop keeper opens to Player Stock but it will not buy...
and the "case" gets error ever time
SCAR Code:
////////////////////////////////////////////////////////////////////////////////
function BuyLogs : Integer;
var x, y, OakDTM, WillowDTM, YewDTM, MapleDTM, LogDTM : Integer;
begin
Mouse(x, y, 2, 2, False);
Wait(50 + Random(100));
case BestLogs of
1: LogDTM := 'buy 50';
2: OakDTM := 'buy 50';
3: WillowDTM := 'buy 50';
4: YewDTM := 'buy 50';
Exit;
end;
Result := 0;
end;
////////////////////////////////////////////////////////////////////////////////
Line 124: [Error] (14805:23): Type mismatch
line 22=