for some reason i get logged out whenever a random event start
Printable View
for some reason i get logged out whenever a random event start
Love the Script Mate will post flawless 6 hour proggy if I get around to it :P
Why doesn't Cepha add it then?
Btw, hoping to post a 1 hour proggy soon. (as long as i dont get any randoms)
Right, I reset the script, all of a sudden its adding fires now, but once its added about 8 - 12, it'll bank and repeat the process. I haven't entered anything wrong, as I only had to enter my login details, so I can't understand why this is.
This is my assumption but I am not certain if it will work but I believe to fix supporting the random events, we need to add this:
Simba Code:FindNormalRandoms;
In the coding, right after "repeat" from line 430
Simba Code:begin
SetupLogin;
SMART_ClearCanvas;
AddOnTerminate('EndDTM');
StartDTM;
repeat
FindNormalRandoms;
if not BankScreen then
begin
FindChest;
OpeningBank;
end;
BonBon;
if WaitingLogsFinish then
begin
IncEx(Players[CurrentPlayer].Integers[3], 28);
end;
PlayerStats;
until not LoggedIn;
end.
I am probably wrong but wte, someone needs to test this.. I just read a few scripts and they had it near the end of the coding after repeat
Probably because of the level up thing, it covered the bank screen and caused the script to not find bank screen.
Thanks, and I got your PM too :)
Thanks, will add to the first post when you have a good one :)
Script terminates if it couldn't find the bank screen for 5 seconds.
I will try to add it after my exam tomorrow, but expect some delay as I'm still studying now until my exam starts later, that means I have not sleep for more than 1 day. Human needs rest lol
Please post what logs you're using. Probably it couldn't detect the log accurately, as I only use willows to test the script.
Ceph, use the proggies from my thread please. and can you use the pic at the top for a bot ( i tried for that) and add imanoobot's name. Also, does it have random event support?
Here is hour:
http://i.imgur.com/agMXa.png
I am doing maples, since I am wearing the fire ring I avg 172 - 173xp per log burned, so 903 x 172xp = 155,316xp per hour :)
Anyways just stopped it, I will now run my testing of adding the randoms events thing... will report back if it works or not
Also we need to add support for clicking the received squeal of fortune / spin tickets... will look around other scripts to see what they added to make it work.
Thanks man for this awesome script, can you please support Soul Wars chest, to prevent random events?
:spot:
loll i just got my 99 fm 2 weeks ago thx for the time I lost :P
the script doesn't finish all the logs only somethings. idk why
I Think it does only some spirits per hour. Proggies show that it does about 5-10 an hour.
Yeah script is specially made for fc w100 bonfire
SH&T! It looks liek the random events it is working, but teh stupdi simba random handler didn't knew how to exit the random, I tried helpingit but as soon as it returned... Simba was still trying to exit teh random...in other words I did not manage to see if the scritp continueed working after finishing the random event.
Anyways here is where I placed the random code thing(how I said the 1st time was wrong, but I was very close). This is my lines from 425 till 444
Simba Code:begin
SetupLogin;
SMART_ClearCanvas;
AddOnTerminate('EndDTM');
StartDTM;
repeat
if not BankScreen then
begin
FindNormalRandoms;
FindChest;
OpeningBank;
end;
BonBon;
if WaitingLogsFinish then
begin
IncEx(Players[CurrentPlayer].Integers[3], 28);
end;
PlayerStats;
until not LoggedIn;
end.
I had to wait about 3hrs to even test this... but the Simba Random Handler failed my testing lol At least it did execute the random event and did not stop the script :)
Will be babysitting again to see if I get another random to insure it is working this way.
Here is the console so you can see it did executed the random event - almost at the bottom you can noticed I tried helping the random to leave the portal, but it kept on loop keeping me stuck the random handler
http://i.imgur.com/0dwdA.png
*edit*
LOL at all my typos.. I can't see well my black keyboard :P
I forgot to mention something important about this line(what I added above)
That also supports clicking the Squeal of Fortune/Spin tickets we get randomly on our inventories... So in other words with this we have everything supported so far now :)Simba Code:FindNormalRandoms;
nice blink so im guessing ceph will be adding ur additions to script?
Just came back for a look.
Simba Code:Procedure OpeningBank;
begin
if not LoggedIn then
TerminateScript;
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if WaitFunc(@BankScreen, 100, 5000) then
begin
if not InvEmpty then
begin
DepositAll;
end;
writeln('Withdrawing logs');
MouseBankSlot(LOGS_BANKSLOT, mouse_Right);
WaitOption('All', 3000);
CloseBank;
end;
FindNormalRandoms;
end;
and
Simba Code:Function FindChest :Boolean;
var
a, Tries: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
begin
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.12);
if not FindColorsTolerance(TPA, 6451582, MSX1, MSY1, MSX2, MSY2, 7) then
begin
writeln('Cant find chest');
repeat
wait(1000);
Inc(Tries);
until (FindColorsTolerance(TPA, 6451582, MSX1, MSY1, MSX2, MSY2, 7)) or (Tries = 5);
end;
if (Tries = 5) then
begin
writeln('Cant find bank chest after 5 seconds');
writeln('TERMINATOR APPEARS');
writeln('Script terminated');
TerminateScript;
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 25, 25);
SortATPAFromSize(ATPA, 1000, true);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
{$IFDEF SMART}
SMART_DrawDotsEx(false, ATPA[a], clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 2, 2);
if WaitUptext('Open', 500) then
begin
writeln('Found Bank!');
ClickMouse2(mouse_Left);
if WaitFunc(@DidRedClick, 10, 3000) then
begin
writeln('Clicked bank chest');
if (WaitFunc(@BankScreen, 10, 5000)) or (WaitFunc(@PinScreen, 10, 5000)) then
begin
writeln('Bank opened');
Result := True;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
end else
begin
writeln('Cant find bank screen');
FindNormalRandoms;
if not FindNormalRandoms then
TerminateScript;
end;
end;
end;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
I dont like adding things to the main loop :p
Hope that helps. And for other replies, I will reply when I'm home after my exam.
EDIT: Also, spin ticket detection is already added since v1. If you noticed, there's already quite a lot FindNormalRandoms in the script. The point I didn't add it after it can't find the bank screen is because the random handler always fail. It's better to logout after you get into the random, instead of staying there, doing a lot of mistakes, stuck inside.
The full code already added the changes CephaXz just posted above
Shantay w100 bonfire v4u2.simba
Simba Code:program BurnBurnBurn;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/paintsmart.simba}
var
x, y, Logs, CollectedRewards: Integer;
const
{Which slot in bank is your log is?}
LOGS_BANKSLOT = 1;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;// declare players
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
if not LoggedIn then
begin
repeat
LoginPlayerToLob;
until LobbyScreen;
OpenWorldScreen;
if not WorldScreen then
OpenWorldScreen;
if WorldScreen then
begin
writeln('picking world 100');
SelectWorld(100);
LogInPlayer;
end;
end;
repeat
wait(500);
until LoggedIn;
if LoggedIn then
begin
ClickNorth(SRL_ANGLE_HIGH);
ExitSquealOfFortune();
end;
if not IsXPBarOpen then
ToggleXPBar(True);
end;
Procedure StartDTM;
begin
Logs := DTMFromString('mwQAAAHic42RgYHBiYmCwZoLQ3kDsA8SBULYLVO4pUN0dIL4NxDeA+CEQPwPiN0D8Dog/ArGJngCQZMKL/zMQBoxEYDgAAI5rDB0=');
end;
Procedure EndDTM;
begin
FreeDTM(Logs);
end;
Function NotFindInvLogs: Boolean;
begin
Result := not FindDTM(Logs, x, y, MIX1, MIY1, MIX2, MIY2);
end;
Function FoundInvLogs: Boolean;
begin
if FindDTM(Logs, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 3, 3);
Result := True;
end;
end;
Procedure OpeningBank;
begin
if not LoggedIn then
TerminateScript;
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if WaitFunc(@BankScreen, 100, 5000) then
begin
if not InvEmpty then
begin
DepositAll;
end;
writeln('Withdrawing logs');
MouseBankSlot(LOGS_BANKSLOT, mouse_Right);
WaitOption('All', 3000);
CloseBank;
end;
FindNormalRandoms;
end;
Function RewardsCollected :Boolean;
begin
Result := IsChatBoxTextAnyLine('spirit', clBlack);
end;
Function FindSpirit :Boolean;
var
a: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
begin
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.52, 0.55);
if FindColorsTolerance(TPA, 4021133, 202, 129, 325, 230, 14) then
begin
if Length(TPA) < 350 then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end else
begin
writeln('OMG SPIRIT?');
end;
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 20, 20);
SortATPAFromSize(ATPA, 1000, true);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
{$IFDEF SMART}
SMART_DrawDotsEx(false, ATPA[a], clYellow);
{$ENDIF}
Mouse(MP.X, MP.Y, 2, 2, mouse_Right);
if WaitOption('ollec', 3000) then
begin
WaitFunc(@RewardsCollected, 10, 3000);
writeln('Collect rewards');
writeln('Back to BonBon');
Result := True;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
end;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
Function FindChest :Boolean;
var
a, Tries: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
begin
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.12);
if not FindColorsTolerance(TPA, 6451582, MSX1, MSY1, MSX2, MSY2, 7) then
begin
writeln('Cant find chest');
repeat
wait(1000);
Inc(Tries);
until (FindColorsTolerance(TPA, 6451582, MSX1, MSY1, MSX2, MSY2, 7)) or (Tries = 5);
end;
if (Tries = 5) then
begin
writeln('Cant find bank chest after 5 seconds');
writeln('TERMINATOR APPEARS');
writeln('Script terminated');
TerminateScript;
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 25, 25);
SortATPAFromSize(ATPA, 1000, true);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
{$IFDEF SMART}
SMART_DrawDotsEx(false, ATPA[a], clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 2, 2);
if WaitUptext('Open', 500) then
begin
writeln('Found Bank!');
ClickMouse2(mouse_Left);
if WaitFunc(@DidRedClick, 10, 3000) then
begin
writeln('Clicked bank chest');
if (WaitFunc(@BankScreen, 10, 5000)) or (WaitFunc(@PinScreen, 10, 5000)) then
begin
writeln('Bank opened');
Result := True;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
end else
begin
writeln('Cant find bank screen');
FindNormalRandoms;
if not FindNormalRandoms then
TerminateScript;
end;
end;
end;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
procedure AntiBan;
var r: Integer;
begin
if not LoggedIn then Exit;
r := (RandomRange(1, 14));
if (r = 4) then
begin
writeln('Doing antiban');
case Random(20) of
0:
begin
PickUpMouse;
end;
1:
begin
RandomRClick;
end;
2:
begin
HoverSkill('firemaking', false);
GameTab(tab_Inv);
end;
3:
PickUpMouse;
4:
MMouse(MIX1, MIY1, MIX2, MIY2);
5:
MMouse(MMX1, MMY1, MMX2, MMY2);
end;
end;
end;
function AddingScreen :Boolean;
begin
Result := CountColorTolerance(4543066, 17, 355, 484, 456, 2) > 2000;
end;
Procedure BonBon;
begin
if not LoggedIn then
TerminateScript;
if not GameTab(tab_Inv) then
GameTab(tab_Inv);
if WaitFunc(@FoundInvLogs, 10, 5000) then
begin
ClickMouse2(mouse_Left);
if WaitFunc(@AddingScreen, 10, 5000) then
begin
writeln('Found add to bonfire screen');
MouseBox(323, 411, 389, 448, mouse_Left);
writeln('BONBONBONBON-ing');
end;
end else
begin
writeln('Out of logs');
TerminateScript;
end;
end;
Function FindXPNumber :boolean;
begin
Result := CountColorTolerance(14474460, 375, 7, 421, 21, 10) > 30;
end;
Function WaitingLogsFinish :Boolean;
var
Time, ReBonBon: Integer;
begin
if not LoggedIn then
TerminateScript;
MarkTime(Time);
repeat
if not LoggedIn then
TerminateScript;
if FindNormalRandoms then
begin
writeln('Found random');
BonBon;
end;
AntiBan;
if FindSpirit then
begin
Inc(CollectedRewards);
BonBon;
end;
WaitFunc(@NotFindInvLogs, 100, 4000);
if not FindXPNumber then
begin
if NotFindInvLogs then
Break;
writeln('Cant find XP');
writeln('Redoing BonBon');
repeat
BonBon;
WaitFunc(@FindXPNumber, 10, 2000);
Inc(ReBonBon);
until (FindXPNumber) or (ReBonBon = 5);
end;
if (ReBonBon = 5) then
begin
writeln('Failed finding fire for 10 seconds... Banking');
Exit;
end;
until (NotFindInvLogs) or (TimeFromMark(Time) > 270000);
If NotFindInvLogs then
begin
Result := True;
writeln('Finished bonbon');
Exit;
end;
end;
procedure testing;
begin
if FindXPNumber then
writeln('Found')
else
writeln('Not found');
end;
procedure PlayerStats;
var
Wet, Wst, Cst, Srt, Tih, Tim, Tis, Awt, Sec, sst: Integer;
begin
Cst := GetSystemTime;
Srt := (cst - sst) / 1000;
Tih := srt / 3600;
tim := (srt / 60) - tih * 60;
Tis := srt - tim * 60 - tih * 3600;
Awt := wet - wst
Sec := GetTimeRunning div 1000 + 1;
Writeln('#######################################################');
Writeln(' Shantay Bank Chest Bonfire ');
Writeln('#######################################################');
Writeln('Logs / Hour : ' + IntToStr(Round(3600 * Players[CurrentPlayer].Integers[3] / Sec)));
Writeln('Logs Done : ' + IntToStr(Players[CurrentPlayer].Integers[3]));
Writeln('Fire Spirit : ' + IntToStr(CollectedRewards));
Writeln('Running for : ' + TimeRunning);
Writeln('-------------------------------------------------------');
end;
begin
SetupLogin;
SMART_ClearCanvas;
AddOnTerminate('EndDTM');
StartDTM;
repeat
if not BankScreen then
begin
FindChest;
OpeningBank;
end;
BonBon;
if WaitingLogsFinish then
begin
IncEx(Players[CurrentPlayer].Integers[3], 28);
end;
PlayerStats;
until not LoggedIn;
end.
Quote:
EDIT: Also, spin ticket detection is already added since v1. If you noticed, there's already quite a lot FindNormalRandoms in the script. The point I didn't add it after it can't find the bank screen is because the random handler always fail. It's better to logout after you get into the random, instead of staying there, doing a lot of mistakes, stuck inside.
The latest version didn't have any FindNormalRandoms
*LOL*
Ignore me, I just noticed it did have them LOL
At line 346, but no clue why it wasn't working(it didn't click any spin tickets & terminated instantly when any random events happened)... By me adding it to the main loop it did worked that way
Anyways I am gonna test in a bit(need to buy allot more logs) now the new changes you mentioned above
think you gotta make it wait a bit longer if it doesnt see xp, cause it clicks on the maple right before it adds it to the bonfire making it stop. then it once again clicks on addlog to bonfire, which makes it slower xp. I'm using maples btw
also it'll only do about 12 logs then bank
Also, might be scripting it to have new constant for people to fill in what logs they are using, since I only test the script using willows, and other people have problem with the log detection, making them bank before logs run out.
*And don't expect me to do this in few seconds. Don't like to see post like "Y SCRIPTZ STILL NO FINIZ BERN LUGZ N BANK?!". lol :p
Read posts above to know what situation I am in now.
@blinkblink
Was going to show you that there's quite a few of them in the script already lol, for the purpose of spin ticket
It works good for some people. Come back after 24 hours if you want it work better.
Some people reported that it banks before the logs run out. 90% is because it couldn't detect the logs in the inventory, which only willows will work 100% since logs DTM is made out from willow log. Might make a DTM for every log, so people are happy lol :tongue:
Smart. I hope people actually know this :\
That is why the default number is 1.
Thanks for the script. Works great with maples!
Thanks for this script. I tested it out for an hour and it works great, the bad thing is that I already have 99 firemaking and I axidently forgot the proggy. Other than, this is working great for me atm.
Willow Support is Flawless,
I can confirm Spirit Support
I have no banking issues ( no banking early)
TBH I would add other bank support cause There like 1000000000000 people at shanty bank LOL
Nice script though :D
ah i've fixed my previous problems!
tips:
turn all chat option to on (game especially)
turn the xp counter to fire making
flawless script :)
################################################## #####
Shantay Bank Chest Bonfire
################################################## #####
Logs / Hour : 1371
Logs Done : 56
Fire Spirit : 1
Running for : 2 Minutes and 26 Seconds
-------------------------------------------------------
random added yet?