k..well i need some help with my script, obviously.
its usable as it is, but i'd like to expand on it, first of all, heres the script
SCAR Code:
program merchhelper;
{.include srl/srl.scar}
{.include srl/srl/skill/buysell.scar}
{.include srl/srl/misc/trade.scar}
var
x,y: integer;
const
message = 'green:slide:Selling chaos 130 ea - drizzt';
fixedprice = false; //must be true for priceofobj to do its thing
priceofobj = '1350000'; //only works with fer-X, offers an amount
offertype= 'fer-X'; //fer-X, fer-All, fer, fer-5, fer-10, get it?
function Findit(color,x1,y1,x2,y2: Integer; Nick: string): boolean;
begin
if Findcolor(x,y,color,x1,y1,x2,y2) then
begin
MMouse(x,y,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,445,231,456) then
begin
mouse(x,y,0,10,true);
Result:=true
end
begin
Result := true;
end
end;
begin
setupsrl;
activateclient;
mouse(314,492,10,10,true);
repeat
repeat
sendkeys(message);
wait(500);
sendkeys(chr(13));
wait(2350+random(2500));
until (tradethefool = true)
if tradescreen = true then
begin
mouse(577,228,5,5,false);
wait(250);
chooseoption(offertype);
if fixedprice = true then
begin
wait(1250);
typesend(Priceofobj);
end
repeat
wait(500);
until (tradescreen = false) and (tradescreen2 = false);
end
until (not(loggedin))
end.
i would like to make the script so i could have two seperate setups, one for buying, one for selling, and just press a hotkey to switch between the two.
i think i'd need a case statement in here? idk how to make those, so if someone would steer me in the direction of a good tut that explains them, or if you could explain how to fix my script yourself, it would be greatly appreciated