Thanks to the wonderful people in IRC chat, i have found the issue, and have fixed my script. thank you guys.
Code:
//start in al karid bank
program New;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Cooking.scar}
Var cooksym, banksym, count, x, y:integer;
Tpoint:TPoint;
const
trips=10; //how many trips you want to do
procedure AntiBan;
begin
FindNormalRandoms;
case random(32) of
0: Gametab(1+random(13));
1: wait(1000 + random(3000));
4: RandomMovement;
5: HoverSkill('cooking', false);
6: RandomRClick;
7: ExamineInv;
end;
gametab(tab_inv);
FindNormalRandoms;
end;
procedure bank;
begin
OpenBankFast('akb')
wait(500)
deposit(1, 28, true)
wait(500)
withdraw(6, 1, 28)
wait(500)
end;
procedure walktorange;
begin
findbitmap(cooksym, x, y)
mouse(x, y, 5, 5, true)
wait(6000)
end;
procedure cook;
begin
TPoint:=itemcoords(1)
mouse(TPoint.x, TPoint.y, 5, 5, True)
FindRange(x, y)
mouse(x, y, 5, 5, true)
wait(500)
mouse(256, 664, 5, 5, false)
wait(250)
mouse(236, 708, 5, 5, True)
wait(25000)
Antiban
Wait(20000)
Antiban
Wait(20000)
end;
procedure walktobank;
begin
findbitmap(banksym, x, y)
mouse(x, y, 5, 5, true)
wait(6000)
end;
begin
banksym:=LoadSymbolBitmapcolor('Bank')
cooksym:=LoadSymbolBitmapColor('Cook')
repeat
bank
antiban
walktorange
cook
walktobank
inc(count)
antiban
until(count=trips)
//LOGOUT
end.