View Full Version : help me fix my script ?
sjlou
12-07-2011, 10:46 PM
it doesnt free the DTM's when (Lob = Players[CurrentPlayer].Integers[1])
if FindDTM(Lobs,x,y, MiX1, MiY1, MiX2, MiY2) or (not FindDTM(Lobs,x,y, MiX1, MiY1, MiX2, MiY2)) then //counts and withdraw lobsters if needed
begin
Lob:= CountItemsIn('inv','dtm',Lobs,[]);
if (Lob = Players[CurrentPlayer].Integers[1])then
begin
writeln('got enough lobsters');
exit;
end
else
if (Lob < Players[CurrentPlayer].Integers[1]) then
getlob:= ( Players[CurrentPlayer].Integers[1] - lob);
begin
WithdrawItem(Lobs, 'dtm', getlob, 'Lobster', [0])
Wait(2000);
end;
end;
freedtm(DHide);
freedtm(DBone);
freedtm(lobs);
freedtm(Frune);
freedtm(Arune);
freedtm(Lrune);
CloseBank;
end;
PM, or show full script please :)
~Home
sjlou
12-07-2011, 11:06 PM
scripy isnt finished yet :stirthepot:
ill post de whole procedure
procedure Dobank;
var
x,y,I,DHide,DBone,
GetLob,Lobs,Lob,
Frune,Arune,Lrune:integer;
begin
if OpenBankFast('VEB') then
Wait(2000);
DHide := DTMFromString('mbQAAAHicY2VgYHBhYmCwB2JLIHYFYi8gfg wUvwXEL4D4DQOEz2HFycDlzcPA6cTFwGHLycBuysHABRRHx4xY MBgAADpgB5k=');
DBone := DTMFromString('mbQAAAHicY2VgYChiYmBIBuIsIC6D4hdA8a dAfAeIHwDxayDeum4tw4SuToYFM2cyrF22lGHe9OkMXEBxdMyI BYMBAD/BEC8=');
Lobs := DTMFromString('mWAAAAHicY2FgYBBmhGB2IJYA4ulAsQUMEH oiEC8OEGNYEyrBsCpEnOFQgjSDCFAMGTOiYRAAAH5aB3U=');
Frune := DTMFromString('mWAAAAHicY2FgYNgBxDuB+AgQbwTiHCAuBe IsKHuWvChDeHAww6TubjBbBCiGjBnRMAgAABcqCTc=');
Arune := DTMFromString('mbQAAAHicY2VgYBBiZGDgBGJhIJaC4gygeC YQl0DpUiC+dvYsGMdGRjI01lQzVBQXMYgAxdExIxYMBgDTjAu9 ');
Lrune := DTMFromString('mbQAAAHicY2VgYLBlZGAwAWJ7IHaD4iygeD YQVzJA2EVALKN4FozdXVzAdH1VFYMIUBwdM2LBYAAAWJQJOg== ');
if FindDTM(DHide,x,y, MiX1, MiY1, MiX2, MiY2) then //counts and depost dragon hides
begin
DHides:= CountItemsIn('inv','dtm',DHide,[]);
Mouse(x,y,5,5,false);
WaitOptionMulti(['Deposit-All', 't-A'], 1000);
end;
if FindDTM(DBone,x,y, MiX1, MiY1, MiX2, MiY2) then //counts and depost dragon Bones
begin
DBones:= CountItemsIn('inv','dtm',DBones,[]);
Mouse(x,y,5,5,false);
WaitOptionMulti(['Deposit-All', 't-A'], 1000);
end;
if not FindDTM(Frune,x,y, MiX1, MiY1, MiX2, MiY2) and FindDTM(Arune,x,y, MiX1, MiY1, MiX2, MiY2) and
FindDTM(Lrune,x,y, MiX1, MiY1, MiX2, MiY2) then
begin
WithdrawItem(Frune, 'dtm', 10, 'Fire', [0])
WithdrawItem(Arune, 'dtm', 30, 'Air', [0])
WithdrawItem(Lrune, 'dtm', 10, 'Law', [0])
tele:= 0;
end;
if CountItemsIn('inv','dtm',Lobs,[]) > 0 then //counts and withdraw lobsters if needed
begin
Lob:= CountItemsIn('inv','dtm',Lobs,[]);
if (Lob = Players[CurrentPlayer].Integers[1])then
begin
writeln('got enough lobsters');
exit;
end
else
if (Lob < Players[CurrentPlayer].Integers[1]) then
getlob:= ( Players[CurrentPlayer].Integers[1] - lob);
begin
WithdrawItem(Lobs, 'dtm', getlob, 'Lobster', [0])
Wait(2000);
end;
end;
freedtm(DHide);
freedtm(DBone);
freedtm(lobs);
freedtm(Frune);
freedtm(Arune);
freedtm(Lrune);
CloseBank;
end;
sjlou
12-08-2011, 11:29 AM
come one..can someone help me out ?
KingKong
12-08-2011, 11:52 AM
if (Lob = Players[CurrentPlayer].Integers[1])then
begin
writeln('got enough lobsters');
exit;
end
theres no freedtm there, the script exits(because of exit) therefore the freedtms is never reached.
sjlou
12-08-2011, 12:03 PM
if (Lob = Players[CurrentPlayer].Integers[1])then
begin
writeln('got enough lobsters');
exit;
end
theres no freedtm there, the script exits(because of exit) therefore the freedtms is never reached.
so this should do it ?
procedure Dobank;
var
x,y,I,DHide,DBone,
GetLob,Lobs,Lob,
Frune,Arune,Lrune:integer;
begin
if OpenBankFast('VEB') then
Wait(2000);
DHide := DTMFromString('mbQAAAHicY2VgYHBhYmCwB2JLIHYFYi8gfg wUvwXEL4D4DQOEz2HFycDlzcPA6cTFwGHLycBuysHABRRHx4xY MBgAADpgB5k=');
DBone := DTMFromString('mbQAAAHicY2VgYChiYmBIBuIsIC6D4hdA8a dAfAeIHwDxayDeum4tw4SuToYFM2cyrF22lGHe9OkMXEBxdMyI BYMBAD/BEC8=');
Lobs := DTMFromString('mWAAAAHicY2FgYBBmhGB2IJYA4ulAsQUMEH oiEC8OEGNYEyrBsCpEnOFQgjSDCFAMGTOiYRAAAH5aB3U=');
Frune := DTMFromString('mWAAAAHicY2FgYNgBxDuB+AgQbwTiHCAuBe IsKHuWvChDeHAww6TubjBbBCiGjBnRMAgAABcqCTc=');
Arune := DTMFromString('mbQAAAHicY2VgYBBiZGDgBGJhIJaC4gygeC YQl0DpUiC+dvYsGMdGRjI01lQzVBQXMYgAxdExIxYMBgDTjAu9 ');
Lrune := DTMFromString('mbQAAAHicY2VgYLBlZGAwAWJ7IHaD4iygeD YQVzJA2EVALKN4FozdXVzAdH1VFYMIUBwdM2LBYAAAWJQJOg== ');
if FindDTM(DHide,x,y, MiX1, MiY1, MiX2, MiY2) then //counts and depost dragon hides
begin
DHides:= CountItemsIn('inv','dtm',DHide,[]);
Mouse(x,y,5,5,false);
WaitOptionMulti(['Deposit-All', 't-A'], 1000);
end;
if FindDTM(DBone,x,y, MiX1, MiY1, MiX2, MiY2) then //counts and depost dragon Bones
begin
DBones:= CountItemsIn('inv','dtm',DBones,[]);
Mouse(x,y,5,5,false);
WaitOptionMulti(['Deposit-All', 't-A'], 1000);
end;
if not FindDTM(Frune,x,y, MiX1, MiY1, MiX2, MiY2) and FindDTM(Arune,x,y, MiX1, MiY1, MiX2, MiY2) and
FindDTM(Lrune,x,y, MiX1, MiY1, MiX2, MiY2) then
begin
WithdrawItem(Frune, 'dtm', 10, 'Fire', [0])
WithdrawItem(Arune, 'dtm', 30, 'Air', [0])
WithdrawItem(Lrune, 'dtm', 10, 'Law', [0])
tele:= 0;
end;
if CountItemsIn('inv','dtm',Lobs,[]) > 0 then //counts and withdraw lobsters if needed
begin
Lob:= CountItemsIn('inv','dtm',Lobs,[]);
if (Lob = Players[CurrentPlayer].Integers[1])then
begin
writeln('got enough lobsters');
freedtm(DHide);
freedtm(DBone);
freedtm(lobs);
freedtm(Frune);
freedtm(Arune);
freedtm(Lrune);
CloseBank;
exit;
end
else
if (Lob < Players[CurrentPlayer].Integers[1]) then
getlob:= ( Players[CurrentPlayer].Integers[1] - lob);
begin
WithdrawItem(Lobs, 'dtm', getlob, 'Lobster', [0])
Wait(2000);
end;
end;
freedtm(DHide);
freedtm(DBone);
freedtm(lobs);
freedtm(Frune);
freedtm(Arune);
freedtm(Lrune);
CloseBank;
end;
KingKong
12-08-2011, 12:26 PM
yep thats gonna free the dtms.
You could failsafe your banking. Instead of this
if OpenBankFast('VEB') then
Wait(2000);
You could use somet like this
if OpenBankFast('VEB') then
Begin
inc(ii);
Repeat
Wait(0);
Inc(I);
Until (BankScreen) or (I >= 5000)
If (I >= 5000)and (ii <= 3)then
If (ii >= 3)then
Begin
Writeln('failed banking 3 times in a row');
TerminateScript;
End else
I:=0;
Bank;
End;
sjlou
12-08-2011, 01:33 PM
i know, im not done yet :p
ill add them later
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.