Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program nmz;
- {$DEFINE SMART}
- {$i AeroLib/AeroLib.Simba}
- {$i reflection/Reflection.simba}
- const
- Loginname = 'User';
- Password = 'Password';
- Skill := 6;// Ranged = 4 Attack = 0 Strengh = 2 Defence = 1 Magic = 6
- ScriptName = 'NMZ';
- v = '2';
- ScriptRev = '.1';
- RockCakeIntial := 65; // Will rock cake to - Absorbs + Overload (Speeds things up) (65-99)
- AbsorptionStartMin := 7; // How many absorbs to intially drink
- AssorpMin :=1; // Was included for training mage/low defence attire
- var
- locPlayer: TReflectLocalPlayer;
- mouse1: TReflectionMouse;
- tab1: TReflectionGameTab;
- timer1:TReflectTimer;
- lastpraytime, lastdrinktime, startingxp:Integer;
- theObject: TReflectObject;
- Temp: TReflectInvItem;
- procedure setupPlayer;
- begin
- locPlayer.Username := Loginname;
- locPlayer.Password := Password;
- locPlayer.Active := True;
- locPlayer.Create;
- locPlayer.Login;
- timer1.Start;
- lastpraytime := 0;
- lastdrinktime := 0;
- startingxp := locPlayer.GetSkillExp(skill);
- Wait(1000+Random(1500));
- Reflect.Compass.MakePitch(10);
- end;
- function Debugg (Action:string): boolean;
- begin
- Writeln(Action);
- end;
- Procedure Progress;
- var
- Graphic: TReflectionGraphics;
- S: TStringArray;
- BreakString: String;
- I: Integer;
- begin
- S := [ScriptName + ' v '+ v + ScriptRev,
- '',
- 'Time running: ' + Reflect.Time.msToTime(GetTimeRunning, TIME_SHORT),
- '',
- 'TOTAL XP DONE: ' + IntToStr(locPlayer.GetSkillExp(skill) - startingxp),
- ('XP/HR: ' + ToString((locPlayer.GetSkillExp(skill) - startingxp)/(GetTimeRunning / 3600000.0)))];
- graphic := Reflect.Smart.Graphics;
- graphic.clear;
- For I:=0 to High(S) do
- Graphic.DrawClippedText(S[I], 'UpChars07', Point(24+((I div 8)*200), 240+((I mod 8)*14)), clYellow);
- Graphic.DrawClippedText('Made by AFoolS', 'BigChars', Point(244, 300), clYellow);
- end;
- procedure antiban();
- begin
- Progress;
- wait(10+random(3000));
- case random(200) of
- 0..50:
- if (pointInBox(Reflect.Mouse.GetPoint, intToBox(0, 0, 763, 502))) then
- MMouseOffClient('rand');
- end;
- end;
- Function drink(Pot: String;n:integer):boolean;
- var
- potion: TReflectInvItem;
- strings: TStringArray := ['(1)', '(2)', '(3)', '(4)'];
- index: Integer;
- invBox: TBox;
- mousePoint: TPoint;
- begin
- if (getCurrentHealth() >= n) then begin
- Debugg('Drink ' + pot);
- if (Reflect.Gametab.Current <> Gametab_Inventory) then
- Reflect.Gametab.Open(Gametab_Inventory);
- for index := 0 to high(strings) do
- begin
- if (potion.Find(pot + strings[index])) then
- break;
- if (index = high(strings)) then
- exit;
- end;
- invBox := potion.GetBox;
- mousePoint := middleBox(invBox);
- Reflect.Mouse.Move(mousePoint, 5, 7);
- sleep(50 + random(120));
- case randomRange(0, 6) of
- 0..4: Reflect.Mouse.Click(MOUSE_LEFT);
- 5..6: begin
- Reflect.Mouse.Click(MOUSE_RIGHT);
- Reflect.Text.ChooseOption('Drink', 500);
- end;
- end;
- sleep(500 + random(2000));
- result := True;
- end;
- end;
- function QuickPray(Pray: Boolean): Boolean;
- var
- CCountPurple, CCountWhite: integer;
- begin
- Result := False;
- CCountPurple := CountColorTolerance(5056052, 550, 95, 565, 108, 45);
- CCountWhite := CountColorTolerance(9723486, 550, 95, 565, 108, 22);
- if ((CCountPurple < 1) and (CCountWhite < 1)) then begin
- Exit;
- end;
- if (Pray) then begin
- if (CCountWhite < 1) then
- TReflectionMouse.Move(550, 95, 565, 108, mouse_left);
- Result := True;
- end else
- begin
- if (CCountWhite > 1) then
- TReflectionMouse.Move(550, 95, 565, 108, mouse_left);
- Result := True;
- end;
- end;
- Function CheckInv(pot: String):boolean;
- var
- potion: TReflectInvItem;
- strings: TStringArray := ['(1)', '(2)', '(3)', '(4)'];
- index: Integer;
- begin
- for index := 0 to high(strings) do
- begin
- if (potion.Find(pot + strings[index])) then
- result :=true
- end;
- end;
- Function Absorption (i:integer) : boolean;
- var
- C:integer;
- begin
- sleep(200+random(500));
- C := 0;
- while (C < i) do begin
- drink('Absorption ',1);
- (C := C+1);
- end;
- end;
- procedure chancedrinkabsorp;
- begin
- if CheckInv('Absorption ') then
- if (timer1.ElapsedTime() - lastdrinktime) > RandomRange(150000,2500000) then begin
- lastdrinktime := timer1.ElapsedTime();
- Absorption(AssorpMin+random(3));
- AntiBan;
- end;
- end;
- procedure togglepray;
- begin
- lastpraytime := timer1.ElapsedTime();
- QuickPray(True);
- Wait(RandomRange(500,1200));
- QuickPray(False);
- end
- procedure checkpray;
- begin
- if (timer1.ElapsedTime() - lastpraytime) > 35000 then
- begin
- togglepray;
- Wait(RandomRange(1,1500));
- end;
- end;
- function RockCake(i:integer): Boolean;
- var
- Temp: TReflectInvItem;
- theObject: TReflectObject;
- Color_yellow: TColEx;
- foundPnt: Tpoint;
- begin
- if (getCurrentHealth() >= (i+1)) then begin
- if (Reflect.Gametab.Current <> Gametab_Inventory) then
- Reflect.Gametab.Open(Gametab_Inventory);
- if Temp.Find('Dwarven rock cake') then begin
- repeat
- if theObject.Find(objGame, 'Rewards chest',30) then exit;
- Reflect.Mouse.Move(Temp.GetPoint, 3, 3);
- sleep(10+random(100));
- Reflect.Mouse.Click(Mouse_Right);
- sleep(10+random(100));
- Result := Reflect.Text.ChooseOption('Guzzle');
- sleep(300+random(300));
- until (getCurrentHealth() <= i+1);
- end;
- end;
- end;
- Procedure Main;
- Begin
- Writeln(getCurrentHealth()); //To check HP is being recognised
- if locPlayer.IsLoggedIn and not theObject.Find(objGame, 'Rewards chest',30) and getCurrentHealth() > 52 then begin
- Absorption(AbsorptionStartMin+random(5));
- RockCake(RockCakeIntial+random(5));
- drink('Overload ',50); //Rock Cake at n+1
- RockCake(1);
- end;
- togglepray;
- While not theObject.Find(objGame, 'Rewards chest',20) and CheckInv('Overload ') do begin
- AntiBan;
- chancedrinkabsorp;
- checkpray;
- if getCurrentHealth() = 2 then begin RockCake(1);end;
- drink('Overload ',50);
- end;
- while not theObject.Find(objGame, 'Rewards chest',20) and not CheckInv('Overload ') do begin
- while (getCurrentHealth() < (51)) do begin
- chancedrinkabsorp;
- wait(500 + random(2000));
- end;
- AntiBan;
- ChanceDrinkAbsorp;
- CheckPray;
- if RockCake(1) then begin Writeln('Final Rock Cake'); end;
- end;
- end;
- begin
- InitAL;
- Reflect.Setup;
- setupPlayer;
- main();
- Writeln('Logging out');
- wait(5000+random(10000));
- locPlayer.logout;
- TerminateScript;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement