IceTruckKiller
2013-03-30 17:33:01
Ok here is my code, No idea why but it won't bank, it doesn't even open the bank.
Here is my source code and the method where I think it's causing the problem
All help is greatly appreciated.
Here is my source code and the method where I think it's causing the problem
program EnchantingSapphire;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.simba}
{$i srl/srl/skill/magic.simba}
var
i,x:integer;
const
LVL_1_ENCHANT = 5;
procedure CastSpell(NAME: Integer);
begin
if (not inRange(name, 0, 62)) and (not GameTab(Tab_Magic)) then
Exit;
Mouse((570 + (name mod 7) * 24), (238 + (name div 7) * 24), 6, 6, Mouse_Left);
end;
procedure enchant;
var
i: Integer;
begin
Ftab(tab_Magic);//selects the magic tab, using F keys
for i:= 2 to 28 do //loops to do each inventory item
begin
CastSpell(LVL_1_ENCHANT); //finds the spell name and clicks on it once
Writeln('Casting spell');
Wait(RandomRange(100, 350));
InvMouse((i), 1); //clicks the invent slot (i = invent slot and 1 is the input click)
Wait(RandomRange(1200, 1500));
end;
Writeln('Finished Enchanting');
end;
procedure doBank();
begin
Wait(RandomRange(350, 1000));
writeln('Banking');
if OpenBank('wvb', True, False) then
begin
Wait(RandomRange(1000, 1700));
Deposit(2,28,True)
Wait(RandomRange(600, 1300));
WithdrawEx(8,1,27,['apphire race','ace','re ac']);
Wait(RandomRange(750, 1235));
writeln('Finished Banking');
CloseBank; //closes bank
end;
end;
begin
SetupSRL;
activateclient;
ClearDebug;
writeln('Start script with a full inv of un-enchanted braces, runes in slot 1 ');
x:=0
while x<1000 do
begin
enchant();
doBank();
x:=x+1;
end;
end.
All help is greatly appreciated.