Simba Code:
program WineMaker;
{$DEFINE SMART}
{$I AEROLIB/AEROLIB.SIMBA}
var
JOW, grape, x, y, failed: Integer;
WinesMade, xp, XPGained, expHour, winesHour: Integer;
FailSafeTimer: Timer;
const
Username = '';
Password = '';
Pin = '';
Procedure DeclarePlayer;
begin
Me.Name := Username;
Me.Pass := Password;
Me.Pin := Pin;
Me.Member := True;
Me.Active := True;
end;
Procedure levelCheck();
begin
if continueChat(False) then Exit;
end;
Procedure DTMz;
begin
JOW := DTMFromString('mlwAAAHicY2dgYOACYj4gFgNiISDmYIAAFqg4A1SNOBBLA7EAEDMCcVtNDZSFidkZcAPsOiAYCgDeDwJB');
grape := DTMFromString('mggAAAHicY2NgYGABYnYg5gJibiBmZoAAHigNEhcAYiEg5gTibM5AIMmIgdkZsANMlRAMAQBpNwFC');
addOnTerminate('FreeIt');
end;
Procedure FreeIt;
begin
freeDTM(JOW);
freeDTM(grape);
end;
Procedure Antiban;
begin
case Random(310) of
0..150:
if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
begin
MMouseOffClient('random');
end else
exit;
201..210:
if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
begin
HoverSkill(SKILL_COOKING, false);
FTab(TAB_INV);
MMouseOffClient('Random');
end else
exit;
211..300:
if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
begin
Wait(RandomRange(2000, 4000));
PickUpMouse;
HumanRandomMouse();
end else
exit;
301..310:
if pointInBox(getMousePnt(), intToBox(1, 1, 766, 505)) then
begin
CheckMovingObjs(True);
end else
exit;
end;
end;
Procedure mouseBoxHover(x1, y1, x2, y2: Integer; Dist: Integer);
var
PT : TPoint;
begin
getMousePos(pt.x,pt.y);
PT := randomPointBoxEx(pt,inttobox(x1,y1,x2,y2),Dist);
brakeMMouse(PT, 0, 0, True);
wait(randomRange(50,150));
end;
//Creds to Hoodz
procedure openBank();
var
TPA: TPointArray;
ATPA: T2DPointArray;
I: Integer;
spot: TPoint;
t: Timer;
tCol : TColEx;
begin
if (isBankOpen()) then
exit;
tCol.create(3425887, 21, 0.04, 0.09);
if (not tCol.findAllIn(AREA_MS, TPA)) then
exit;
ATPA := FloodFillTPA(TPA);
if (length(ATPA) <= 0) then
exit;
SortATPAfromFirstPoint(ATPA, Point(275, 155));
for I := 0 to high(ATPA) do
begin
if (length(ATPA[I]) < 36) then
continue;
spot := middleTPA(ATPA[I]);
HumanMMouse(spot, 1,1);
if (waitUptextMulti(['ank', 'est'], 300)) then
begin
fastClick(MOUSE_LEFT);
break;
end else
if WaitUpTextMulti(['Use', '->', ' Bank'], 300) then
begin
HumanMMouse(Point(633, 362), 50, 50);
FastClick(MOUSE_LEFT);
exit;
end;
end;
t.start();
while ((not isBankOpen()) and (not Interfaces[PINSCREEN].isVisible())) and (t.TimeElapsed() < 3000) do
sleep(random(150, 250));
end;
Procedure banking;
var
g: Timer;
begin
if Interfaces[PINSCREEN].isVisible() then
inPin(Pin);
if isBankOpen() then
if getCurrentBankTab() <> 0 then
SwitchBankTab(0);
begin
QuickDeposit('inv');
if FindDTM(Grape, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Withdraw', 'Grapes'], 400) then
fastClick(Mouse_Right);
waitOption('Withdraw-14 ', 250);
end else
begin
WriteLn('Ran out of supplies, logging off.');
CloseInterface();
LogoutPlayer();
TerminateScript;
end;
if FindDTM(JOW, x, y, msx1, msy1, msx2, msy2) then
begin
HumanMMouse(Point(x, y), 5, 2);
if WaitUpTextMulti(['Withdraw', 'Jug of ', 'Water'], 400) then
fastClick(Mouse_Right);
waitOption('Withdraw-14 ', 250);
end else
begin
WriteLn('Ran out of supplies, logging off.');
CloseInterface();
LogoutPlayer();
TerminateScript;
end;
end;
CloseInterface();
FailSafeTimer.start();
end;
Procedure MakeWines;
begin
if isBankOpen() then
exit;
if not GameTab(TAB_INV) then
fTab(Tab_inv);
Wait(RandomRange(100, 400));
if FindDTM(Grape, x, y, mix1, miy1, mix2, miy2) then
begin
HumanMMouse(Point(x, y), 3, 3);
if waitUpTextMulti(['Use', ' Grapes', 'apes', 'Use Grapes'], 500) then
FastClick(Mouse_LEFT);
if FindDTM(JOW, x, y, mix1, miy1, mix2, miy2) then
begin
HumanMMouse(Point(x, y), 4, 5);
If WaitUpTextMulti(['Use', 'Grapes', ' Jug', 'water'], 500) then
FastClick(Mouse_LEFT);
end;
end else
exit;
end;
Procedure doInterface;
begin
MouseBoxHover(32, 390, 293, 445, randomrange(5, 10));
Wait(RandomRange(100, 250));
if WaitUpText('ake', 400) then
begin
FastClick(Mouse_RIGHT);
WaitOption('Make All', 200);
end else
begin
inc(Failed);
if (Failed > 5) then
Failed := 0;
exit;
end;
While (getInvCount > 14) do
begin
if ContinueChat(False) then
begin
exit;
end else;
antiban;
end;
WinesMade := WinesMade + 14;
xp := 200;
wait(randomrange(250, 500));
exit;
end;
Procedure Progress;
begin
XPGained := (xp * WinesMade);
expHour := Round((XPGained) / (GetTimeRunning / 3600000.0));
winesHour := Round((WinesMade) / (GetTimeRunning / 3600000.0));
ClearDebug;
WriteLn('Running for: ' + MsToTime(GetTimeRunning, 3));
WriteLn('Wines made: ' + toStr(WinesMade));
WriteLn('Exp gained: ' + toStr(XPGained));
WriteLn('Exp p/hr: ' + toStr(expHour));
WriteLn('Wines p/hr: ' + toStr(winesHour));
WriteLn('*Note* Exp rates may be inaccurate if you dont have 68 cooking.');
end;
Procedure MainLoop;
begin
if isLoggedIn then
setAngle(ANGLE_HIGH);
repeat
MouseSpeed := RandomRange(15, 22);
if getInvCount <= 14 then
openBank;
if isBankOpen() then
Banking;
if isInvFull then
MakeWines;
if (FailSafeTimer.timeElapsed > 90000) then
openBank;
doInterface;
Progress;
until not isLoggedIn;
end;
begin
InitAL();
DTMz;
DeclarePlayer;
LoginPlayer(false);
while isLoggedIn() do
MainLoop;
end.