My first script
Please test and review version 0.1!
Code:program GoblinDecimator; {$DEFINE SMART} {$i SRL/srl.simba} Const //SRL Stats SRLStats_Username = ''; SRLStats_Password = ''; //Break settings BreakIn = 180; //How long before we take a break? (minutes) BreakFor = 13; //How long will we break for? (minutes) Bir = 7; //Random minutes to add/subtract from how long until we break Bfr = 3; //Random minutes to add/subtract from break duration Procedure DeclarePlayers; begin HowManyPlayers := 1; NumberOfPlayers(HowManyPlayers); CurrentPlayer := 0; with Players[0] do begin Name := ''; Pass := ''; Pin := ''; BoxRewards := ['XP','xp','lamp']; LampSkill := Skill_Runecrafting; Active := True; end; end; procedure StatsGuise(wat:String); Begin Status(wat); Disguise(wat); End; Procedure Antiban; Begin Case Random(192) Of 0: HoverSkill('Attack', False); 1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End; 2: RandomAngle(1); 3: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End; 4: HoverSkill('random', False); 5: HoverSkill('Defense', False); 6: HoverSkill('Constitution', False); 7: HoverSkill('Strength', False); End; End; Procedure FailSafe(Reason:String); begin Players[CurrentPlayer].Loc:=Reason; Logout; TerminateScript; end; function InFight: Boolean; begin Result := srl_InFight; end; Function AttackGoblins:Boolean; Var x,y:Integer; begin SetAngle(SRL_ANGLE_HIGH); if InFight then begin repeat FindNormalRandoms; until ((not LoggedIn) or (not InFight)) end; If FindObjEx(x,y, ['Attack'], [4430477, 4033671, 1858905, 3253129], 10, 50, 1, 5, 690, 400) then Begin StatsGuise('Attacking Goblin'); GetMousePos(x,y); Case Random(1) of 1:begin Mouse(x,y,5,5,True); ChooseOption('Attack') end; End; End; end; begin SetupSRL; DeclarePlayers; SetAngle(SRL_ANGLE_HIGH) if not (LoggedIn) then LoginPlayer; Wait(4000+random(400)) repeat Antiban; AttackGoblins; until(false); end.
Credit to Gucci for goblin finding method.



Reply With Quote






