on my new autotrader i kind of got stuck, here is my script
SCAR Code:
program AutoTrader;
{.include srl/srl.scar}
{.include srl/srl/skill/buysell.scar}
{.include srl/srl/misc/trade.scar}
var
x,y,z,a,AmountToGive,NumOfChaos,RunesBought: integer;
const
Message = ('buying chaos 110 ea - drizzt');
ItemToBuy = ('aos'); //letters to make the isuptext work
PricePerItem = (110);
RuneToBuy = ('chaos');
amounttobuy = (10000);
function Findit(color,x1,y1,x2,y2: Integer; Nick: string): boolean;
begin
if Findcolor(z,a,color,x1,y1,x2,y2) then
begin
MMouse(z,a,0,0)
Wait(50+Random(50));
if (IsUpText(nick)) then
begin
Result := True;
end
end
end;
Function TradetheFool: Boolean;
begin
if Findcolor(x,y,8388736,10,442,201,456) then
begin
mouse(x,y,0,10,true);
end
wait(1000);
if checkarea('tradescreen') = true then
begin
Result := true;
writeln('ooh we gots a seller');
end
else result := false;
end;
begin
setupsrl;
activateclient;
RunesBought := 0
repeat
Typesend(message);
if Tradethefool = true then
begin
wait(5000);
if Findit(1681119,301,75,345,111,itemtobuy) = true then
begin
amount('tradescreen',1) := numofchaos;
AmountToGive := (NumOfChaos * PricePerItem);
mouse(z,a,2,2,false);
chooseoption('er-X');
wait(750);
typesend(inttostr(AmountToGive));
wait(4000+random(500));
end
if PlayerAccepted = true then
begin
Accept;
CheckItem(true,ItemToBuy + inttostr(numofchaos));
Accept;
RunesBought := (RunesBought + NumOfChaos);
end
else Decline;
end
until (not(loggedin)) or (runesbought >= amounttobuy);
end.
it says "Line 56: [Error] (15791:25): Identifier expected in script"
and i can't find what i'm missing, so someone help me out?