Citrus
2015-05-02 15:25:50
do it urself ya lazy punks.
script uses chatbox.getxpbar(), so put the thing in in the thing
doesn't do chronicles. doesn't prioritize enriched wisps. boohoo
read what others have to say about this script:
complain below
script uses chatbox.getxpbar(), so put the thing in in the thing
doesn't do chronicles. doesn't prioritize enriched wisps. boohoo
program Citrus_DIY_Div;
{$DEFINE SMART}
{$i srl-6/srl.simba}
const
playerName = ['noob123'];
playerFile = 'default';
desiredWorld = 9001;
runtime = 999; //in minutes
//where to click if the rift isn't in sight
RIFT_OFFSET_X = 0; //offset from the div symbol on the minimap
RIFT_OFFSET_Y = 0; //offset from the div symbol on the minimap
//where to click if no wisps are in sight
WISP_OFFSET_X = 0; //offset from the div symbol on the minimap
WISP_OFFSET_Y = 0; //offset from the div symbol on the minimap
//where to click if the div symbol isn't in sight
RECOVERY_OFFSET_X = 0; //offset from the CENTER of the minimap
RECOVERY_OFFSET_Y = 0; //offset from the CENTER of the minimap
WAIT_TIME = 0000; //time to wait before looking for another wisp
//set one to true, the others to false
ENERGY = false;
EXPERIENCE = false;
ENHANCED = true;
//DIY
WISP_COLOR = 0;
WISP_TOL = 0;
WISP_HUE = 0.00;
WISP_SAT = 0.00;
//this should work for all rifts, but if not you can cry about it
RIFT_COLOR = 8449399;
RIFT_TOL = 11;
RIFT_HUE = 1.33;
RIFT_SAT = 2.13;
col = TColor($aaff00); //this is for fabText and can be ignored. or not. up to you
//some colors I've used. because I'm nice
{
//vibe
WISP_COLOR = 10066517;
WISP_TOL = 25;
WISP_HUE = 0.22;
WISP_SAT = 0.55;
}
{
//spark
WISP_COLOR = 10391893;
WISP_TOL = 23;
WISP_HUE = 0.23;
WISP_SAT = 0.71;
}
{
//glow
WISP_COLOR = 14722356;
WISP_TOL = 22;
WISP_HUE = 0.14;
WISP_SAT = 1.22;
}
{
//bright
WISP_COLOR = 11970163;
WISP_TOL = 19;
WISP_HUE = 0.28;
WISP_SAT = 0.58;
}
(*{////the rest is just junk. i wouldn't bother looking at it////}*)
var
startXP, currentXP: integer;
//credit to whomever i stole this from
procedure declarePlayers();
var
i: integer;
begin
players.setup(playerName, playerFile);
currentPlayer := 0;
for i := 0 to high(players) do
begin
players[i].world := desiredWorld;
players[i].isActive := true;
writeLn('Logging in...');
end;
begin
if (not players[currentPlayer].login()) then
exit;
writeLn('Just logged in, waiting a bit...');
wait(randomRange(3000, 5000));
exitTreasure();
writeLn('Setup complete - player is logged in.');
end;
end;
//credit to whomever i stole this from
procedure initPlayer();
begin
writeLn('Checking camera...');
if (minimap.getAngleDegrees() > 7) then
minimap.clickCompass()
else
writeLn('Camera already facing north');
mainScreen.setAngle(MS_ANGLE_HIGH);
writeLn('Setting run.');
if not (minimap.isRunEnabled()) then
minimap.toggleRun(true);
writeLn('Setting gametab.');
if (not gameTabs.isTabActive(TAB_BACKPACK)) then
gameTabs.openTab(TAB_BACKPACK);
end;
//this is secret. don't look at it. stop it. ty obs for idea
procedure instaMouse(p: TPoint; button: integer);
var
x, y: integer;
begin
if (button = MOUSE_MOVE) then
begin
moveMouse(p.x, p.y);
exit();
end;
holdMouse(p.x, p.y, button);
wait(gaussRangeInt(60, 120));
getMousePos(x, y);
releaseMouse(x, y, button);
end;
/////////simplified version of fabText for the proggy/////////
procedure TMufasaBitmap.fabText(txt: string; pnt: TPoint; font: string; color: TColor; shiftPerc: extended; leftToRight, shadow, random: boolean);
var
i, j, a, b, len: integer;
step, deg, h, s, l: extended;
aH: TExtendedArray;
tpa, tpaShadow, temp: TPointArray;
atpa: T2DPointArray;
rainbow: TColorArray;
hit: boolean;
begin
tpa := tpaFromText(txt, font);
offsetTPA(tpa, pnt);
tpaShadow := copyTPA(tpa);
offsetTPA(tpaShadow, point(1, 1));
self.drawTPA(tpaShadow, __SHADOW_COLOR);
a := tpa.getBounds.x1;
b := tpa.getBounds.x2+1;
tpa.sortByXValue(true);
setLength(atpa, (b-a));
for j := a to b do
begin
hit := false;
for i := 0 to high(tpa) do
begin
if j = tpa[i].x then
begin
atpa[j-a].append(tpa[i]);
hit := true;
end
else if hit then break;
end;
end;
colorToHSL(color, h, s, l);
len := length(atpa);
if len < 1 then exit();
deg := 5;
if len = 2 then aH := [h-deg, h+deg];
if len = 3 then aH := [h-deg, h, h+deg];
if len < 4 then exit();
step := (deg/((len-((len mod 2)+2))/2));
for i := 0 to (len-1) do
begin
if leftToRight then
aH.append((h-deg)+(i*step))
else
aH.append((h+deg)-(i*step));
end;
setLength(rainbow, (high(aH)+1));
for i := 0 to high(aH) do
rainbow[i] := hslToColor(aH[i], s, l);
for i := 0 to high(atpa) do
self.drawTPA(atpa[i], rainbow[i]);
end;
//progress is overrated
procedure progress();
begin
smartImage.clear();
currentXP := chatBox.getXPBar() - startXP;
smartImage.fabText(msToTime(getTimeRunning(), TIME_BARE), point(mainscreen.x1+2, mainscreen.y1), loginchars, col, 5, true, true, false);
smartImage.fabText('xp: ' + intToStr(currentXP), point(mainscreen.x1+2, mainscreen.y1+15), loginchars, col, 5, true, true, false);
smartImage.fabText('per hr: ' + intToStr(round((currentXP)/(getTimeRunning()/3600000))), point(mainscreen.x1+2, mainscreen.y1+30), loginchars, col, 5, true, true, false);
smartImage.fabText('Citrus DIY Div', point(mainscreen.x1+2, mainscreen.y2-27), bigchars, col, 5, true, true, false);
end;
//this one doesn't run
procedure run(rift: boolean);
var
p: TPoint;
riftOff, wispOff, recOff: TPoint;
begin
if not isLoggedIn() then exit();
if (not tabBackPack.isFull()) and rift then exit();
riftOff := point(RIFT_OFFSET_X, RIFT_OFFSET_Y);
wispOff := point(WISP_OFFSET_X, WISP_OFFSET_Y);
recOff := point(RECOVERY_OFFSET_X, RECOVERY_OFFSET_Y);
if minimap.findSymbol(p, MM_SYMBOL_DIVINATION, minimap.getBounds()) then
begin
if rift then p.offSet(riftOff)
else p.offSet(wispOff);
instaMouse(p, MOUSE_LEFT);
end
else
begin
p := minimap.getCenterPoint();
p.offSet(recOff);
instaMouse(p, MOUSE_LEFT);
end;
wait(randomRange(333, 444));
minimap.waitPlayerMoving();
end;
//disposes of your precious memories
function rift(): boolean;
var
x, y, i: integer;
tpa: TPointArray;
atpa: T2DPointArray;
begin
if not isLoggedIn() then exit();
if (not tabBackPack.isFull()) then exit(false);
result := false;
findColorsSpiralTolerance(x, y, tpa, RIFT_COLOR, mainScreen.getBounds(), RIFT_TOL, colorSetting(2, RIFT_HUE, RIFT_SAT));
atpa := tpa.cluster(10);
atpa.filterBetween(0, 100);
atpa.sortFromMidPoint(mainscreen.playerPoint);
if length(atpa) < 1 then exit(false);
for i := 0 to high(atpa) do
begin
instaMouse(middleTPA(atpa[i]), MOUSE_RIGHT);
if ENHANCED then
begin
if (getItemAmount(tabBackPack.getSlotBox(1)) > 300) then
begin
if chooseOption.select(['hanced']) then
begin
tabBackPack.waitCount(1, 44444);
wait(randomRange(1234, 2345));
exit(true);
end;
end else
begin
if chooseOption.select(['to exper', 'vert to ex', 'o ex']) then
begin
tabBackPack.waitCount(1, 44440);
wait(randomRange(1234, 2345));
exit(true);
end;
end;
end;
if EXPERIENCE then
begin
if chooseOption.select(['to exper', 'vert to ex', 'o ex']) then
begin
tabBackPack.waitCount(1, 44440);
wait(randomRange(1234, 2345));
exit(true);
end;
end;
if ENERGY then
begin
if chooseOption.select(['o energy', 'vert to en']) then
begin
tabBackPack.waitCount(1, 44440);
wait(randomRange(1234, 2345));
exit(true);
end;
end;
end;
end;
//what are we even doing right now?
procedure check();
var
c, k: integer;
t: longword;
begin
if not isLoggedIn() then exit();
wait(randomRange(345, 567));
minimap.waitPlayerMoving();
c := getItemAmount(tabBackPack.getSlotBox(1));
k := tabBackPack.count();
t := getTimeRunning() + WAIT_TIME;
while (c <= getItemAmount(tabBackPack.getSlotBox(1))) or (k <= tabBackPack.count()) do
begin
if tabBackPack.isFull() then exit();
if getTimeRunning() > t then exit();
if c < getItemAmount(tabBackPack.getSlotBox(1)) then
begin
c := getItemAmount(tabBackPack.getSlotBox(1));
t := getTimeRunning() + WAIT_TIME;
k := tabBackPack.count();
progress();
end;
if k < tabBackPack.count() then
begin
c := getItemAmount(tabBackPack.getSlotBox(1));
t := getTimeRunning() + WAIT_TIME;
k := tabBackPack.count();
progress();
end;
end;
end;
//0 mana 1, 1 = infinite value
function wisp(): boolean;
var
x, y, i: integer;
tpa: TPointArray;
atpa: T2DPointArray;
begin
if not isLoggedIn() then exit(false);
if tabBackPack.isFull() then exit(false);
result := false;
repeat
inc(i);
findColorsSpiralTolerance(x, y, tpa, WISP_COLOR, mainScreen.getBounds(), WISP_TOL, colorSetting(2, WISP_HUE, WISP_SAT));
mainscreen.filterPointsPlayer(tpa);
atpa := tpa.cluster(5);
atpa.sortFromMidPoint(mainscreen.playerPoint);
if length(atpa) < 1 then continue;
instaMouse(middleTPA(atpa[0]), MOUSE_RIGHT);
if chooseOption.select(['arvest']) then exit(true);
until i > 2;
end;
//i got nothing
procedure mainLoop();
begin
repeat
if wisp() then check()
else run(false);
until tabBackPack.isFull();
while (not rift()) do run(true);
end;
begin
clearDebug();
smartEnableDrawing := true;
smartShowConsole := false;
setupSRL();
disableSrlDebug := true;
mouseSpeed := randomRange(25, 30);
startXP := chatBox.getXPBar();
declarePlayers();
initPlayer();
repeat
if not isLoggedIn() then
begin
declarePlayers();
initPlayer();
end;
mainLoop();
until getTimeRunning() > (runtime*60000);
end.
read what others have to say about this script:
"this script sucks" -evilcitrus
"instabaned" -jagix
"0/69 not enough rainbows" -teric
"11/10 mouse never moves" -obsclarety
"this lecher nub has 50 private scrips and no release" -hacker
"i taught him everthing he knows. im so disapointed" -meyer
"you realy need to eat something other than popcorn" -shut up mom
"can i have my sign bback now?" -friendly neighberhood hobo
"get the hel out of my hous!!1!" -unfrendly neighborhood neighbor
"lame. those quotes are low quality" -no lifter
"Good script!" -unknown
complain below