Can you help me make this more stable, and loop friendly?
This is a personal script that goes to furnace in alkarid and smelts cballs. everything works but returning to bank and looping. Any tips? Editted out some of the code to be discreet.
Any tips on making it better? I tried using the option to findcustobj for clicking the furnace but i went with static coords on screen >.< any ideas on improving that?Code:program cballworking3; {$DEFINE SMART8} {$I SRL-OSR/SRL.Simba} {$I SRL-OSR/SRL/Misc/Debug.Simba} var x, y, i: integer; TPA : TPointArray; Status:string; const AccountLogin = ''; AccountPass = ''; CharacterName = ''; version = '1.0'; procedure DeclarePlayer; begin HowManyPlayers := 1; NumberOfPlayers(HowManyPlayers); CurrentPlayer := 0; Players[0].Name := AccountLogin; Players[0].Pass := AccountPass; Players[0].Nick := CharacterName; Players[0].Active := True; end; Procedure openBank; begin until (BankScreen); end; Procedure closeBank; begin end; procedure Iswithdraw; begin openBankScreen; wait(800 + random(800)); if bankscreen then begin writeln('banking'); wait(800 + random(800)); Deposit(2, 28, TRUE); wait(500 + random(500)); begin MMouse(142, 75, 2, 2); wait(1200 + random(500)); begin clickMouse2(mouse_right); chooseOptionMulti(['All']); writeln('WithDrawing'); wait(800 + random(800)); closeBank; end; end; end; end; procedure WalkingToFurnace; var i,x,y:Integer; begin makecompass('N'); begin RadialWalk(5012609,10,76,44,1,1); //click mm kebab wait(2000); RadialWalk(1732602,1,76,60,1,1); //click mm furnace wait(2000); makecompass('W'); end; end; procedure SmeltCBall; var pX, pY: integer; begin wait(5000); Status := ('Doing Procedure clbar') InvMouse(2, 1); Writeln('clbar'); begin Wait(1200 + Random(100)); MMouse(260, 95, 5, 5); ClickMouse2(true); wait(2000); begin //personal code here not ready to be released begin If FindSymbol(x,y,'Bank') then begin Mouse(x,y,1,1,true); FFlag(0); Writeln('Successfully completed Walking 1.'); wait(10000); end else Writeln('Walking failed!'); makecompass('S'); RadialWalk(5012609,5,76,35,1,1); end; end; end; end; end; begin SetupSRL; activateclient; DeclarePlayer; LoginPlayer; wait(500); repeat walkingtofurnace; SmeltCBall; Iswithdraw; until(false) end.


Reply With Quote





should i do print function instead?
