well me and in_jeopardy were working on this last night a bit, but hes not on atm and theres some things i wanna do, before i get kicked off the comp by mum lol.
here is the script so far:
SCAR Code:
program KebabBuyer;
{.include SRL\SRL.scar}
var
x,y: Integer
cx,cy: Integer;
KebabSign: Integer;
procedure LoadBmps;
begin
KebabSign:= BitmapFromString(5, 1, '621106000000000000000' +
'000000000');
end;
procedure FreeBmps;
begin
FreeBitmap(KebabSign);
end;
procedure StoreWalk;
begin
LoadBmps;
if(FindDeformed(x,y,KebabSign,553,6,720,160)) then
begin
Wait(100+random(10));
Mouse(x,y,1,1,true);
Writeln('Walking to Kebab Store');
Wait(13000+random(200));
end else
Writeln('Store Bitmap not found...');
killscript(0);
FreeBmps;
end;
procedure BuyKebabs;
begin
if(FindObj(cx, cy, 'Talk-to Karim', 7290216, 50)) then
begin
Mouse(cx, cy, 5, 5, true);
TalkToRand;
MouseBox(348, 582, 422, 597, 1);
TalkToRand;
end else
Writeln('Could not find Karim...');
killscript(0);
end;
begin;
SetupSRL;
ActivateClient;
Wait(1342 + random(321))
StoreWalk;
Wait(2132 + random(152))
BuyKebabs;
end.
Problems
- The script finds the KebabBmp, which is the kebab sign on minimap. It walks there but on the way it decides it cant find it, and executes script. but it doesnt write 'Store Bitmap not found...' in the debug box which is what it should do. But it does find it because it walks there in the first place, so wtf is going on?
- Often the talking to Karim doesnt work, the mouse just moves around in circles until the "Talk-to Karim" comes up in the top left, then it clicks on him. Any better ways of talking to him?
- What is the best way to click on the text box down the bottom when theres 2 options? I want it to click on Yes, which is the bottom option. We've done TalkToRand; for the click to continue parts.
- How can we check if the door to the place is open or shut? And then open it? Because if its shut the script messes up.
Any help greatly appreciated, I want this to turn into a good script