Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program HyperStunAlch;
- {$DEFINE SMART}
- {$i AeroLib/AeroLib.Simba}
- const
- SPELLTYPE = 'Camelot Teleport'; //choose spell
- ALCH = true; //alch as well - true or false
- STODO = 1000; //number of spells to do
- ATODO = 1000; //number of alch's to do
- P_USERNAME = 'tomastoth@gmail.com';
- P_PASSWORD = 'Ilovevejka1995';
- P_PIN = '';
- //change for NPC of your choice, don't forget your
- //safe spot!
- NPC_COL = 2106677;
- NPC_TOL = 7;
- NPC_HUE = 0.57;
- NPC_SAT = 1.95;
- VERSION = '1.2';
- var
- x, y, cs1, cs2, spellDTM, spellXP, XPGAIN,
- NCAST, CASTPH, XPPH : Integer;
- position : TPoint;
- procedure declarePlayer();
- begin
- Me.Name := P_USERNAME;
- Me.Pass := P_PASSWORD;
- Me.Pin := P_PIN;
- Me.Active := True;
- Me.Member := True;
- end;
- procedure customMouse(point: TPoint);
- begin
- case random(0, 6) of
- 0..2: BrakeMMouse(point, random(5), random(5), true);
- 3: BrakeMMouse(point, random(5), random(5), false);
- 4..5: MissMouse(point, random(5), random(5));
- 6: HumanMMouse(point, random(5), random(5));
- end;
- end;
- procedure loading();
- begin
- case lowercase(SPELLTYPE) of
- 'confuse':
- begin
- x := 618 + randomRange(-5, 5);
- y := 230 + randomRange(-5, 5);
- spellXP := 13;
- end;
- 'weaken':
- begin
- x := 570 + randomRange(-5, 5);
- y := 253 + randomRange(-5, 5);
- spellXP := 20;
- end;
- 'curse':
- begin
- x := 666 + randomRange(-5, 5);
- y := 253 + randomRange(-5, 5);
- spellXP := 29;
- end;
- 'vulnerability':
- begin
- x := 598 + randomRange(-5, 5);
- y := 400 + randomRange(-5, 5);
- spellXP := 76;
- end;
- 'stun':
- begin
- x := 618 + randomRange(-5, 5);
- y := 420 + randomRange(-5, 5);
- spellXP := 90;
- end;
- end;
- end;
- //Borrowed (and altered slightly) from ghoul script by jstemper - https://villavu.com/forum/showthread.php?t=114297
- function findObject(COL, TOL : Integer; HUE, SAT: Extended): Boolean;
- var
- NPC: TColEx;
- TPA: TPointArray;
- ATPA: T2DPointArray;
- I: Integer;
- box: TBox;
- begin
- NPC.Create(Col, Tol, Hue, Sat);
- if not NPC.FindAllIn(Area_MS, TPA) then
- Exit(False);
- ATPA := ClusterTPA(TPA, 10);
- SortATPAFromMidPoint(ATPA, Point(MSCX, MSCY));
- if (length(ATPA) <= 0) then
- begin
- result := False;
- exit;
- end;
- for i := 0 to high(ATPA) do
- begin
- position:= middleTPA(ATPA[i]);
- customMouse(position);
- fastClick(MOUSE_LEFT);
- break;
- end;
- end;
- procedure antiban();
- begin
- if not isLoggedIn() then Exit;
- case random(500) of
- 20..25: hoverSkill(SKILL_MAGIC, false);
- 60..63: MMouseOffClient('top');
- 101..104: MMouseOffClient('right');
- 222..228: MMouseOffClient('left');
- 444..449: MMouseOffClient('rand');
- end;
- end;
- procedure highAlch();
- begin
- if not isLoggedIn() then Exit;
- if not (getCurrentTab() = TAB_MAGIC) then
- FTab(TAB_MAGIC);
- customMouse(point(724, 321 + randomRange(-5, 5)));
- fastClick(MOUSE_LEFT);
- wait(randomRange(50, 150));
- customMouse(point(714, 326 + randomRange(-5, 5)));
- fastClick(MOUSE_LEFT);
- wait(randomRange(50, 150));
- end;
- procedure castSpell();
- var
- SPELLTYPE : Integer;
- begin
- if not isLoggedIn() then Exit;
- if not (getCurrentTab() = TAB_MAGIC) then
- FTab(TAB_MAGIC);
- customMouse(point(x, y));
- fastClick(MOUSE_LEFT);
- findObject(NPC_COL, NPC_TOL, NPC_HUE, NPC_SAT);
- if ALCH then
- begin
- highAlch;
- inc(cs2);
- end else
- wait(randomRange(1700, 1850));
- inc(cs1);
- end;
- procedure proggy();
- begin
- XPGAIN := ((spellXP * cs1) + (cs2 * 65));
- XPPH := round((XPGAIN * 60) / (getTimeRunning() / 60000));
- NCAST := cs1 + cs2;
- CASTPH := round((NCAST * 60) / (getTimeRunning() / 60000));
- OS_Smart.__Graphics.Clear;
- OS_Smart.__Graphics.DrawClippedText('HyperStunAlch V' + VERSION, 'SmallChars', Point(8, 278), clWhite);
- OS_Smart.__Graphics.DrawClippedText('Time Running: ' + timeRunning(), 'SmallChars', Point(8, 294), clWhite);
- OS_Smart.__Graphics.DrawClippedText('Spells cast: ' + intToStr(NCAST) + ' p/h: ' + intToStr(CASTPH), 'SmallChars', Point(8, 310), clWhite);
- OS_Smart.__Graphics.DrawClippedText('XP Gained: ' + intToStr(XPGAIN) + ' p/h: ' + intToStr(XPPH), 'SmallChars', Point(8, 326), clWhite);
- end;
- begin
- declarePlayer;
- initAL;
- loginPlayer(false);
- loading;
- repeat
- castSpell;
- proggy;
- antiban;
- until (not isLoggedIn) or (cs1 = STODO) or (cs2 = ATODO);
- writeln('Number of spells requested have been completed');
- writeln('Thank you for using the script!');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement