Theron
2015-01-15 22:54:53
Have your preset_1 set up with the bars you will be smithing.
By default, it makes the last thing you selected or your highest item at the anvil (will include option to change item later on)
Start with a full inventory of bars in the Varrock West Bank.
It should change the angle to west and view to highest possible, if this doesn't occur on log-in, you will need to do this manually or it cannot find the banker.
Having some banking issues, any advice would be helpful.
edit 1: Replaced bank colors. Colors are working better, however when it opens the bank, the debug says bank not found, even though the bank is open. It doesn't carry on to using presets.
edit 2: Replaced how it clicked the bank, it's sloppy, but functional. Seems very botlike at the moment, would appreciate any help on getting it to run more smoothly.
Thanks to @The Mayor for his tutorials and @KeepBotting for talking me through things on Skype, regardless of how stupid or simple of a question. xD
By default, it makes the last thing you selected or your highest item at the anvil (will include option to change item later on)
Start with a full inventory of bars in the Varrock West Bank.
It should change the angle to west and view to highest possible, if this doesn't occur on log-in, you will need to do this manually or it cannot find the banker.
program VWBSmither;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'UN';
password := 'PW';
isActive := true;
isMember := false;
end
currentPlayer := 0;
end;
procedure walkToTheAnvil();
var
myPoint: TPoint;
begin
minimap.findSymbol(myPoint, MM_SYMBOL_ANVIL, minimap.getBounds());
mouse(myPoint, MOUSE_LEFT);
minimap.waitPlayerMoving();
end;
procedure clickAnvil();
var
x, y: integer;
begin
if mainscreen.findObject(x, y, 4737619, 3, ['nvil'], MOUSE_RIGHT) then
begin
writeLn('We right clicked an avil!');
chooseOption.select(['Smith Anvil']);
end;
end;
procedure makePlatebodies();
begin
if productionScreen.isOpen(5000) then // If productionScreen is open within 5 seconds
begin
productionScreen.clickStart(); // Click the start button
if progressScreen.isOpen(5000) then // if progressScreen is open within 5 seconds
begin
writeLn('The progressScreen is open!');
repeat
wait(1000);
until (not progressScreen.isOpen()); // Repeat waiting 1 second until it's not open anymore
end;
end;
end;
procedure clickTheBank();
var
myPoint: TPoint;
begin
minimap.findSymbol(myPoint, MM_SYMBOL_BANK, minimap.getBounds());
mouse(myPoint, MOUSE_LEFT);
minimap.waitPlayerMoving();
end;
procedure findColorz();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn() then
exit;
findColorsSpiralTolerance(x, y, TPA, 5845056, mainScreen.getBounds(), 7, colorSetting(2, 0.25, 1.03));
smartImage.debugTPA(TPA);
writeLn('TPA length is ' + toStr(length(TPA)));
if (Length(TPA) < 1) then
exit;
ATPA := TPA.toATPA(30, 30);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if mainscreen.findObject(x, y, 5845056, 7, ['ank'], MOUSE_RIGHT) then
smartImage.clear;
chooseOption.select(['Bank Banker'])
end else
writeLn('Couldn''t find the bank for some reason!');
end;
procedure usePreset();
begin
if bankScreen.isOpen() then
bankScreen.clickButton(BANK_BUTTON_PRESET_1)
end;
{Main Loop}
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();
repeat
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitTreasure();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_WEST);
end;
walkToTheAnvil();
clickAnvil();
makePlatebodies();
clickTheBank();
findColorz();
usePreset();
until (false);
end.Having some banking issues, any advice would be helpful.
edit 1: Replaced bank colors. Colors are working better, however when it opens the bank, the debug says bank not found, even though the bank is open. It doesn't carry on to using presets.
edit 2: Replaced how it clicked the bank, it's sloppy, but functional. Seems very botlike at the moment, would appreciate any help on getting it to run more smoothly.
Thanks to @The Mayor for his tutorials and @KeepBotting for talking me through things on Skype, regardless of how stupid or simple of a question. xD