SRL Archive - RS3 Outdated / Broken Scripts

Google's AstralRcRunner


Google

2012-12-10 13:53:25

I have no need for this anymore and I know quite a few people here wanted it so here it is. Moved to public section.


progress report:
[BANANA]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=-=-=-=-=- ASTRAL RC RUNNER -=-=-=-=-=-=-=-=
=-=-=-=-=-=-=-=-By Google-=-=–=-=-=-=-=-=-=-=
TIME RUNNING: 11 Hours, 55 Minutes and 4 Seconds
RUNS DONE:664
ASTRALS MADE:69870
ASTRALS PER HOUR:5863
PROFIT:4017525
PROFIT PER HOUR:337097
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[/BANANA]

setup:
1) fill out the constants, includes, declareplayers
2) make sure to fill out totalruns correctly
3) have essence top right of bank
4) have energy potion (3)
5) have pouches to left side of inventory using slots [1, 5, 9, 13, 17]
6) have lunar group teleport on action bar slot [1], and contact repair on bar slot [2]

features:
*auto updater
*runs 24/7
*116k per hour
*6200 + runes per hour
*contact repair
*eating / drinking

bugs:
1) Sometime spams recoveries on 6 hour fix(rare)

*credits to dannyrs(banner) flight, ashaman, harry > map grabbers, updater etc | anything else I forgot.

footballjds

2012-12-10 14:04:03

Pouch support for all?

Google

2012-12-10 14:08:35

From: footballjds
Pouch support for all?


No massive support I didn't have any accounts with them when I was re-writing it. I can see if I can borrow someones account if you need the support. But as of now its just giant, large, med, small.

footballjds

2012-12-10 14:09:27

From: Google
No massive support I didn't have any accounts with them when I was re-writing it. I can see if I can borrow someones account if you need the support. But as of now its just giant, large, med, small.


what do you need? i have 10 in my bank, 1 partially used 9 un-touched. when they degrade they crumble to dust IIRC.

Google

2012-12-10 14:12:02

From: footballjds
what do you need? i have 10 in my bank, 1 partially used 9 un-touched. when they degrade they crumble to dust IIRC.


All I need is a bitmap for it unused and a used one then I can add.

footballjds

2012-12-10 14:14:15

From: Google
All I need is a bitmap for it unused and a used one then I can add.


I'll take a break from my waterfiend script. I'll edit in a few minutes.

edit added

Le Jingle

2012-12-10 14:25:12

the stack of 3 is unused and the the non-stacked is used, and does vanish upon degrade as footballjds pointed out.

looks like a well built script, I'll definitely give some feed back on it later today. I also noticed it says you load monkfish for lobster and monkfish ;P any who, very nice!

footballjds

2012-12-10 14:32:51

From: Le Jingle
the stack of 3 is unused and the the non-stacked is used, and does vanish upon degrade as footballjds pointed out.

looks like a well built script, I'll definitely give some feed back on it later today. I also noticed it says you load monkfish for lobster and monkfish ;P any who, very nice!


Thanks for clarifying :) Also if you're using a dtm make sure not to pick points that would get covered by the text if someone had say 100 pouches.

Thanks goooooooooogley

Google

2012-12-10 14:33:05

From: footballjds
Thanks for clarifying :) Also if you're using a dtm make sure not to pick points that would get covered by the text if someone had say 100 pouches.

Thanks goooooooooogley


Ah ok will do and using bitmap not a fan of dtm's.


From: Le Jingle
the stack of 3 is unused and the the non-stacked is used, and does vanish upon degrade as footballjds pointed out.

looks like a well built script, I'll definitely give some feed back on it later today. I also noticed it says you load monkfish for lobster and monkfish ;P any who, very nice!


Ah that is because for lobster i have it to writeln monkfish as well I will change that.


'lobster':
begin
writeln('you have choosen monkfish for your food'); [COLOR="Red"]< here[/COLOR]
writeln('if this is incorrect stop the script and fill out the setup');
food.fooddtm := BitmapFromString(4, 12, 'meJwTC1gkHrxSMnIbDw+vWMAS8ZDVktG7pBOPiwUukwhdJxW7Vzr5lHjQConwTVKx+2VSzoIVb+U3L+Q3ywcqFrAqF7CpFrCuBGoXtK0VcmgScu6AkMKuvSKeU0Ckx2RRrxmifvNBpO9csYBFQItAZOAyoMlAA0EoZLV46FqJsA0AQBou8A==');
end;

I finished writing the code for massive once I get home I'll upload it for you.

Google

2012-12-11 20:14:01

From: footballjds
Thanks for clarifying :) Also if you're using a dtm make sure not to pick points that would get covered by the text if someone had say 100 pouches.

Thanks goooooooooogley


sorry for late update busy with school papers|exams, give it a shot now no testing for the massive just added it give me feedback.

Thanks.

p.s just run the script from here and it should update.

Sirenia

2012-12-12 07:21:24

Is it worth craftin astrals anymore? They are like 80coins each :/

Justin

2012-12-12 07:29:15

From: Sirenia
Is it worth craftin astrals anymore? They are like 80coins each :/


Depends on the price on Pure Ess

Google

2012-12-12 13:38:13

it isn't really worth it anymore, going to throw this in the public section since no one has a use for it.

Olly

2012-12-13 12:28:18

Welcome leechers!

Google

2012-12-13 12:53:16

From: Ollybest
Welcome leechers!


method is only making 110k-170k now not really a big deal.

Olly

2012-12-13 13:04:11

From: Google
method is only making 110k-170k now not really a big deal.


Yeah I know, was just saying welcome to them :P

The Killer

2012-12-13 13:09:45

From: Ollybest
Welcome leechers!


why , thank you!! ;)
A well scripted script google, I understand why you would want to make it public (there's no point in it sitting in members section collecting dust right? :P)

Mat

2012-12-13 14:49:27

Nice script man going to use sometime :)
Mat

Google

2012-12-13 22:52:06

From: The Killer
why , thank you!! ;)
A well scripted script google, I understand why you would want to make it public (there's no point in it sitting in members section collecting dust right? :P)


eh I released it because I wanted people to get use out of it.

The Divided

2012-12-14 06:40:26

Great script man! Running it as we speak! Much love, really needed this.

Ubuntu

2012-12-14 16:47:47

Well gf astral prices :| . But nice script anyways. Might test it out one day when I get the requirements for astrals.

Hooker_Puncher

2012-12-27 07:46:53

I used this script a long time ago, when we needed to pay for it before simba was nuked and I can say it was epic :D

Mat

2012-12-29 08:30:35

Unbuntu gf prices? they die months ago..
When me and google were selling they were 800k+ ph now like 200k ph.

Mat

elmostreet

2012-12-30 23:24:55

It has a problem when going back into the bank wherein it get stuck. :(

nvm, I got it figured out. :)

Hunaja

2013-01-09 11:57:28

From: Mat
Unbuntu gf prices? they die months ago..
When me and google were selling they were 800k+ ph now like 200k ph.

Mat


wonder why the prices dropped in the first place

Syntax

2013-01-15 04:19:16

Errors with the script, doesn't withdraw the essence and fill the pouches. It thinks it withdraws the essence and goes onto clicking on the pouches.
I will post my edited side of the script (I changed the dtms and a few bitmaps so it worked with withdrawing the pouches etc). I also changed the positioning of the bank you had in grabessence procedure.
Google you've done a good job and it must've taken a hour or so to put write this script, I am thankful :)
However I'd just like to have posted a few bugs.
Here is my edited version:

program AstralRcRunnerGoogle;
{$define smart}
{$ifdef raymondpowns} function splittpa(arr : tpointarray; dist : integer) : t2dpointarray; begin splittpawrap(arr, dist, result); end; function splittpaex(arr : tpointarray; w, h : integer) : t2dpointarray; begin splittpaexwrap(arr, w, h, result); end; function cleartpafromtpa(arp, clearpoints : tpointarray) : tpointarray; begin cleartpafromtpawrap(arp, clearpoints, result); end; function tpatoatpaex(arp : tpointarray; w, h : integer) : t2dpointarray; begin tpatoatpaexwrap(arp, w, h, result); end; function tpatoatpa(arp : tpointarray; dist : integer) : t2dpointarray; begin tpatoatpawrap(arp, dist, result); end; function findgapstpa(tpa : tpointarray; minpixels : integer) : t2dpointarray; begin findgapstpawrap(tpa, minpixels, result); end; {$endif}
{$i srl/srl.simba}
{$i sps/sps.simba} {$i srl/srl/misc/smartgraphics.simba}

type foodinfo = record
fooddtm: integer;
end;
var
x, y, t, runs, giant, tele, large,
medium, small, runecount, runesperhour,
runstotal, waittime, waittele, timetele,
astral, count, air, cosmic, hpeat, pot,
vial, summ, contact, profit, decay, essused,
essloss, astralprofit, profitperhour, lunar,
home, new, mass, ess: integer;

status: string;

food: foodinfo;

walk, altar, bank, lodestone: tpointarray;
const
scriptversion = '2.2';
updatescript = true;
getmaps = true;
debug = true;
paint = false;
massive = true;
bunyip = false;
essprice = 119;
astralprice = 68;

procedure includes;
begin
hpeat := 900;
runstotal := 936; //436 is 6 hours roughly
waittime := 750 + random(225);
waittele := 965 + random(375);
timetele := 485 + random(265);
srl_sixhourfix := true;
smart_fixspeed := true;
end;
procedure declareplayers;
begin
howmanyplayers := 1;
numberofplayers(howmanyplayers);
currentplayer := 0;

with players[0] do
begin
name := '';
pass := '';
nick := '';
pin := '';
member := true;
active := true;
strings[0] := 'monkfish';
end;
end;
procedure downloadimage(imagename: string; location: string);
var
image, path: string;
fp: integer;
begin
image := getpage(location);
path := includepath + 'sps\img\runescape_other\' + imagename + '.png';
path := trim(path);
fp := createfile(path);
writefilestring(fp, image);
closefile(fp);
end;
function grabmap: boolean;
var
astralmap : string;
astralname: string;
begin
astralname := 'lunar';
astralmap := 'http://img713.imageshack.us/img713/1531/lunarq.png';
if getmaps then
begin
if (not fileexists(includepath + 'sps\img\runescape_other\lunar.png')) then
writeln('we do not have the map, downloading the file now');
downloadimage(astralname, astralmap);
end else
writeln('we already have the lunar map');

result := (fileexists(includepath + 'sps\img\runescape_other\lunar.png'));
end;
procedure mapchecker;
begin
if not grabmap then
raiseexception(ercustomerror, 'maps do not exist or its named incorrectly');
end;
procedure autoupdateme; var neifile: integer; onlineversion, newscript, neifeilnennen: string; begin writeln(#67#104#101#99#107#105#110#103#32#102#111#114#32#115#99#114#105#112#116#32#117#112#100#97#116#101#115#46#46#46); onlineversion := getpage(#104#116#116#112#58#47#47#103#105#116#115#103#111#111#103#108#101#46#103#111#111#103#108#101#99#111#100#101#46#99#111#109#47#103#105#116#47#118#101#114#115#105#111#110#46#116#120#116); writeln(onlineversion); writeln(scriptversion) if (trim(onlineversion) > scriptversion) then begin writeln(#78#101#119#101#114#32#115#99#114#105#112#116#32#118#101#114#115#105#111#110#32#111#110#108#105#110#101#33); writeln(#65#117#116#111#117#112#100#97#116#105#110#103#32#116#111#32#110#101#119#101#114#32#118#101#114#115#105#111#110#46); newscript := getpage(#104#116#116#112#58#47#47#103#105#116#115#103#111#111#103#108#101#46#103#111#111#103#108#101#99#111#100#101#46#99#111#109#47#103#105#116#47#65#115#116#114#97#108#85#112#100#97#116#101#46#115#105#109#98#97); neifeilnennen := scriptpath + #65#115#116#114#97#108#82#99#82#117#110#110#101#114#32#86 + onlineversion + #32#98#121#32#71#111#111#103#108#101#46#115#105#109#98#97; neifile := rewritefile(neifeilnennen, true); try writefilestring(neifile, newscript); except begin writeln(#70#97#116#97#108#32#101#114#114#111#114#32#119#114#105#116#105#110#103#32#116#111#32 + neifeilnennen + #33#33); terminatescript; end; end; closefile(neifile); writeln(#78#101#119#32#115#99#114#105#112#116#32#100#111#119#110#108#111#97#100#101#100#32#116#111#32 + neifeilnennen + #33#33#32#80#108#101#97#115#101#32#117#115#101#32#116#104#105#115#32#111#110#101#33#33); terminatescript; end else writeln(#89#111#117#32#104#97#118#101#32#116#104#101#32#108#97#116#101#115#116#32#118#101#114#115#105#111#110#32#111#102#32#116#104#101#32#115#99#114#105#112#116#33); end;
procedure loadfoodinfo;
begin
case lowercase(players[currentplayer].strings[0]) of

'lobster':
begin
writeln('you have choosen monkfish for your food');
writeln('if this is incorrect stop the script and fill out the setup');
food.fooddtm := BitmapFromString(4, 12, 'meJwTC1gkHrxSMnIbDw+vWMAS8ZDVktG7pBOPiwUukwhdJxW7Vzr5lHjQConwTVKx+2VSzoIVb+U3L+Q3ywcqFrAqF7CpFrCuBGoXtK0VcmgScu6AkMKuvSKeU0Ckx2RRrxmifvNBpO9csYBFQItAZOAyoMlAA0EoZLV46FqJsA0AQBou8A==');
end;

'monkfish':
begin
writeln('you have choosen monkfish for your food');
writeln('if this is incorrect stop the script and fill out the setup');
food.fooddtm := BitmapFromString(7, 6, 'meJzzCI5zC4wGIhf/SCsnHwiy9wi2cwsAIhsXPyAJFLFw8GzvmtPYMhUuDkRAcU/vPG+fguq6PggXgtw9sjy8cjp75pVVdgI1ApGZnXtxydTS8pnlFbMrq+eVlE3PL5hgamELAN1dKu4=');
end;

else
begin
writeln('please correctly fill out the food under declareplayers');
terminatescript();
end;
end;
end;
procedure spsvariables;
begin
lodestone := [point(85,144),point(89,146),point(91,146),point(95,145),point(99,145),point(100,145),point(105,145),point(107,145),point(109,145),point(112,145),point(114,145),point(116,146),point(117,146),point(119,146),point(123,146),point(124,146),point(125,146),point(128,146),point(130,146),point(131,146),point(133,145),point(133,144),point(135,143),point(138,141),point(141,140),point(141,137),point(141,135),point(141,131),point(141,129),point(140,129),point(139,129),point(138,129),point(138,129),point(138,129),point(139,129),point(143,129),point(143,129)];
walk := [point(346, 349), point(337, 351), point(330, 354), point(323, 356), point(311, 357), point(303, 358), point(278, 326), point(274, 319), point(269, 310), point(261, 305), point(256, 300), point(251, 296), point(242, 286), point(236, 278), point(226, 269), point(219, 262), point(209, 254), point(198, 244), point(193, 234), point(193, 224), point(189, 213), point(192, 198), point(191, 139), point(161, 139), point(138, 123), point(139, 125), point(140, 126)];
bank := [point(136, 128), point(138, 128), point(140, 127), point(142, 128)];
//altar :=[Point(157,142),Point(195,144),Point(203,196),Point(202,210),Point(202,225),Point(201,238),Point(204,250),Point(217,265),Point(231,274),Point(247,286),Point(258,295),Point(271,308),Point(282,321),Point(310,343),Point(330,347),Point(346,347),Point(360,348),Point(367,348),Point(362,347),Point(362,344),Point(364,343),Point(365,346),Point(365,348)];
altar := [point(157, 139), point(190, 141), point(188, 197), point(185, 204), point(187, 211), point(190, 218), point(194, 222), point(197, 227), point(200, 233), point(202, 238), point(202, 243), point(206, 247), point(209, 252), point(212, 255), point(217, 262), point(221, 266), point(225, 268), point(230, 271), point(238, 277), point(243, 281), point(249, 288), point(254, 292), point(262, 302), point(266, 307), point(270, 314), point(275, 321), point(277, 331), point(308, 344), point(323, 342), point(331, 342), point(338, 342), point(361, 345)];
end;
procedure script;
begin
giant := BitmapFromString(15, 12, 'meJx90PtKwzAUBvDhG+gLWAQdbk' +
'xaa7V07Zre1oXeNmuM1Tprd/P2/n/7SSCMKsJHSOF3zskp4Y1T1lb' +
'BDTo/PO7/ztHJADEzpgV0Qufh89Z/WntVO2HL8aK6ScoOQ6vLKD0d' +
'qge9nh3niBWl8IQ3KMEsVMEguFzFef9Ch1Qtf9+bAUWkxznUTSEVR' +
'QWWHlj6ay9GRsb4XDOEFBh3/lgvX9vV7q1ZreuXBp/soSpuy1mS+m' +
'HUadtutp2gMMny6YyG09j1fszIJDgx1MvY7vNr8/4BA4n+GIQRizs' +
'GLzDiJiUkggt+o1zTcCO8pLzneBKejR2Vs4GQ0kuM7eB129csgjUt' +
'24EPCo782XzfY4rjEoFlyT8eP+cbv5+GoA==');

decay := BitmapFromString(7, 13, 'meJzzj472DgvzDAlx9Q9w9vW1dXOzcHT0jYhERlbOLmZ2dgGxsf7R0UAuRL17UJC9h4ehmSUQ6Rub6xqYaOkZAk1w9PY2sbCBCMLFgQgiiCYOFMQUN7OyQxOHCGKKW9g6YooTIwgRhwsiKwYAcNJAIA==');
air := BitmapFromString(13, 7, 'meJxdjksKgDAQQ+8oWkopZSh+q9Y/4jF162UMCMNQeItMCJMQVd439/P+tO3Iep6PdT23/YJ2zrNflh1rEOOGJJAmUSXPEKZhWKQDrCV51nUv24FSRmtrjGMHU5N2kOeak/iJqUn7PyDLiiQpA3iLAYh9V/iu3Q==');
astral := BitmapFromString(4, 6, 'meJw7tvr4MRJRampmWnp2RmZuYmJqcnI6hAsASeUuIQ==');
cosmic := BitmapFromString(5, 9, 'meJwrr6gtr6iVOXMegkpKKkvLquHcoqJyoAgQQbgFBaVAESCCK4ALAhlZ2fk5OYV5ecUQ8YzMXIgIhJuWng0UgetKTc0EisC5ADbBRHE=');
vial := BitmapFromString(3, 25, 'meJwljrsSgjAURD/LwsIPoACGBPKAvEgCKpWdNIyNM1rR0PmxLqE7kz27N5fXen6+T49F1JQURZ5ltmtFU9Oy7LXuOK+K/Ldt6/ezzPM0jt5opNMwIEXlPkSnFCPkFgOKDamuIZg2gfdKCkSj75XggOgcBjml0dqWMdSDNXgBHLewjDXICTqAZM0OUsAHaCkTKAB8AG4BUMd1+Pje4SfYtT8t51Mn');
pot := BitmapFromString(4, 17, 'meJzLyUjPyUhPSUiICg/LTk8HouT4+KgwIDsNyE6Kj4sMDc1MTU1NTIiOCAeKtzdMrS3rrinpqihq62me314/q7l6an3FxBCvlmDP5gD3en+3OhS2dyuQHejRCGEDpYBsoFSoTztcGYgNVgZkh/l2wJUB2RBlQHa4bxdBNgClmVAu');
tele := BitmapFromString(5, 9, 'meJzbum3blKlTgWjl0oUnjh1JSkpqb28DcoEkEG3dtg0oCERbwcogbDQE1IgsBTENyICYAzQQYjLETLiByAgoCACoy1sL');
mass := BitmapFromString(24, 16, 'meJzF089LwmAYB3DpGh0stZBEMc' +
'sSTW2uTMec07WGptP5s8LEPAR5kDoEUSBJFIUeIuoQRfSX9pUXZDR' +
'b1iX48h7e9+Wz532fd1RMpDQJRHjt5D9mwmBQ588IV65PzdomTVYS' +
'HWozIWnvAfsxjzGaq6odQn1XoRZZE9Jk20ZKmXH51I46+IRa0zYFS' +
'5FsGYjR7p52ekYimMcnzEsByzKlc14sxasNnOsLFd4phsSMnxO9DI' +
'+yMWKnwxFAdKhYSoHGFmv8XlOoHW03WoyYCSckOiYEI9xKkP4RGVK' +
'sJEPDCGGI+Ojo+AjuDTsL18/5q8dc5yF72c9c9CiG/xVCitntf1R7' +
'75X7t/Lda+n2BU7y+Jw5aFHyvieRHudlkobiREr3CUFJSOrshj1sA' +
'/GJstXp1nnk5CyDvgtpNl+LlxoIX2mSwJFOu3ShviopRpNlzu5CRm' +
'pEGFysBsHkelyEwzVP3FR0wU9brDY45nkHQn4BdXcgaBEEzaK35FA' +
'yI7Y7/lRxMRgG5fRSQ4fc+SdcLvZi');
new := BitmapFromString(5, 15, 'meJyz9Au3DojUMbXSMjJX0zMCMuBsJQ0di8hU8/BkCFtBTdM2IQ/INfAJ13bxU7FyMg2JNwqI1nLyVjS1ldUztXL11nELAMoqm9vLG5rrmdtqGJgCVQIRUC/cZKB6BWMQA8o1Mtf1CDKwsocrAGoHcoHaIVygIchcIDKycYJwISLIKoEILg7hAgDufDAN');

large := DTMFromString('mwQAAAHic42RgYLjHysDwFIjvAvE1IL4KxDeB+BkQvwLiS0DcyMjAUA7EJUBcBsT1QNwLxN1A3ALEnUDs7mgGNI2JACYMGInAcAAAMsgNYw==');
medium := DTMFromString('mwQAAAHic42RgYOBgY2DgAmJ2IBYE4v+sDAwsQJoHiHmBmAGImxgZGIqBuAeIWxkh/Coo7gbiTiD2cbUCKmYigAkDRiIwHAAA4DAHAg==');
small := DTMFromString('mwQAAAHic42RgYDBiY2AwZoPQNkCsAcS6QGwOxBZArAPEjYwMDCVA3AXEzUDcAsQ1QFwLxJ1Q7OlsATSNiQAmDBiJwHAAADJsB3o=');
contact := DTMFromString('mlwAAAHicY2dgYBBkZGAQAGIZIJaDYn4gZgHiZ0B8B4gfAPErIP4Ixc+BePK5Nwy8vDwMPNzcDJxsbAycfOIMXNxcYD4XA27AiAdDAQAI4woh');
summ := DTMFromString('m1gAAAHic42JgYLjNxMBwHYhvAfF9IH4ExA+B+C4Q3wDiK0B8FYh/ANV+BuJPUBrE/wPEDIwMDP+B1G8g/gbEWdVKEEECmIuBOEDYJAhGAABANhKE');
lunar := DTMFromString('mbQAAAHicY2VgYPjMzsDwHojfAPEXIP4BxIuB4nOBeDkQrwbiJUDMa13G8P36fob9W+cxMGmHAXE4AytQHISRASMWDAYAQkgOjA==');
home := DTMFromString('mlwAAAHicfcWxCYAwGAXhSxHDbyDEkUUklahYKIKL2bmAM/gKWz34uACMBoNssssirRSZHHRSZJVDZunlvG6iBXLO1LpVnhSNJkU837kfbw8FLAuV');
ess := DTMFromString('m6wAAAHic42ZgYDAFYjsgdoZidSDWAGIDIDYHYhsgdoDy5wLxCiBeCMQzgXg2EC8B4tVQPAmIpwFxPxBnpCQDSSY8mBGKQWziASMJGAkAAB/ZCn4=');
//setbitmapname(food.fooddtm, 'food bitmap');
setbitmapname(giant, 'giant pouch bitmap');
setbitmapname(decay, 'giant decay bitmap');
setbitmapname(tele, 'teleport spell bitmap');
setbitmapname(pot, 'energy potion bitmap');
setbitmapname(vial, 'empty vial bitmap');
setbitmapname(air, 'air rune bitmap');
setbitmapname(astral, 'asral rune bitmap');
setbitmapname(cosmic, 'cosmic rune bitmap');
setbitmapname(mass, 'massive pouch bitmap');
setbitmapname(new, 'unused massive pouch bitmap');

setdtmname(large,'large pouch dtm');
setdtmname(medium, 'medium pouch dtm');
setdtmname(small, 'small pouch dtm');
setdtmname(contact, 'contact spell dtm');
setdtmname(summ, 'summoning icon dtm');
setdtmname(home, 'home icon dtm');
setdtmname(lunar, 'lunar icon dtm');
end;
procedure freescript;
begin
//freebitmap(food.fooddtm);
freebitmap(giant);
freebitmap(decay);
freebitmap(tele);
freebitmap(pot);
freebitmap(vial);
freebitmap(air);
freebitmap(astral);
freebitmap(cosmic);
freebitmap(mass);
freebitmap(new);
freebitmap(ess);

freedtm(large);
freedtm(medium);
freedtm(small);
freedtm(contact);
freedtm(summ);
freedtm(home);
freedtm(lunar);
end;
function sixhourcheck: boolean;
begin
if loggedin then
exit;

result := false;

if not loggedin then
begin

if debug then
writeln('we have hit the 6 hour mark, relogging in');

loginplayer;

exitsquealoffortune;

if debug then
writeln('ajusting the camera angle back to absolute north');

clicknorth(srl_angle_high);
end;

if loggedin then
result := true;
end;
procedure actionkey(text: string);
var
i: integer;
begin
for i := 1 to length(text) do
begin
{$ifdef simbamajor980}
sendkeys(text[i], 40 + random(40));
{$else}
sendkeys(text[i], 30 + random(30), 30 + random(30));
{$endif}
wait(40 + random(40));
end;
end;
function actionkeychange(text: string; time:integer):boolean;
var
i, t, first, second:integer;
begin
first := getxpbartotal; {property of google}
marktime(t);

for i := 1 to length(text) do
begin

repeat

{$ifdef simbamajor980}
sendkeys(text[i], 50 + random(40));
{$else}
sendkeys(text[i], 50 + random(30), 30 + random(30));
{$endif}
wait(50 + random(40));

sixhourcheck;
wait(10);

second := getxpbartotal;
if timefrommark(t) > time then
begin
result := false;
writeln('function is wrong');
exit;
end;
until(second > first);
result := true;
writeln('function is correct');
end;
end;
function sps_getmyposition(): tpoint;
var
minimap: tmufasabitmap;
smallmap: t3dintegerarray;
t, foundmatches: integer;
p: tpoint;
searches: extended;
begin
result := point(-1, -1);

if (not loggedin) then
exit;

if (sps_tolerance < 1.0) then
sps_tolerance := 600.0;

if (sps_matchespercent = 0.0) then
sps_matchespercent := 0.45;

if (inrange(round(rs_getcompassangledegrees), 10, 350)) then
makecompass('n');

t := getsystemtime();

minimap := sps_gatherminimap;
sps_filterminimap(minimap);
//drawbitmapdebugimg(minimap.index);
//displaydebugimgwindow(150, 150);

{$ifdef simbamajor990}
setlength(smallmap, 0); // using this instead of smallmap := [];
sps_bitmaptomap(minimap, sps_accuracy, smallmap);
{$else}
smallmap := [];
smallmap := sps_bitmaptomap(minimap, sps_accuracy);
{$endif}

foundmatches := sps_findmapinmap(p.x, p.y, sps_areamaps, smallmap, sps_tolerance);
searches := ((minimap.width / sps_accuracy) * (minimap.height / sps_accuracy));
{
writeln('fx: '+tostr(p.x)+' ~ on area: '+tostr(p.x * sps_accuracy + (minimap.width / 2)));
writeln('fy: '+tostr(p.y)+' ~ on area: '+tostr(p.y * sps_accuracy + (minimap.width / 2)));
writeln('matches: '+tostr(foundmatches));
writeln('searches: '+tostr(searches));
writeln('percent: '+tostr(foundmatches / searches));
}
if ((foundmatches / searches) > sps_matchespercent) then
result := sps_localtoglobal(sps_gettopleftcoords(sps_areas), // the top left of the total area
p.x * sps_accuracy + (minimap.width / 2),
p.y * sps_accuracy + (minimap.width / 2));

minimap.free;

t := (getsystemtime - t);
if (sps_debug) then
writeln('sps_getmypos: finished in '+tostr(t)+' ms. result = '+tostr(result));
end;
function sps_walkline(path: tpointarray): boolean;
var
i, h, t, d: integer;
p, mm: tpoint;
begin
h := high(path);
t := getsystemtime + 20000 + random(5000);

exitsquealoffortune;

while (not result) and (getsystemtime < t) do
begin
runenergy(20);

p := sps_getmyposition;
for i := h downto 0 do
begin
mm.x := mmcx + path[i].x - p.x;
mm.y := mmcy + path[i].y - p.y;

d := distance(mm.x, mm.y, mmcx, mmcy);

if (d < 10) then
break
else
if (d < 70) then
begin
if (sps_multimouse) then
multimouse(mm.x, mm.y, 25, 3, false)
else
mouse(mm.x, mm.y, 5, 5, mouse_left);

fflag(integer(i <> h) * 30);

t := getsystemtime + 20000 + random(1000);
break;
end;
end;

result := (i = h);
end;
end;
procedure smart_bigbox(dots: tpointarray);
begin
smart_drawdotsex(false, dots, clwhite);
end;
function energy: boolean;
begin
result := findcolorspiraltolerance(x, y, 255, 736, 104, 761, 121, 10);
end;
function hpfull: boolean;
begin
result := findcolorspiraltolerance(x,y,198578,706, 21,711, 22,10);
end;
function waitinvfull(waitperloop, maxtime:integer): boolean;
var
t: integer;
begin

t := (getsystemtime + maxtime);

ftab(25);

while (getsystemtime < t) do
if invcount = 28 then
begin
result := true;
break;
end;

wait(waitperloop);
end;
function waitfindchat(txt: string; action: fnct_ActionOptions; waitperloop, maxtime: integer): boolean;
var
t, i: integer;
begin

result := findNPCChatTextMulti([txt], action);

t := (getsystemtime + maxtime);

while (getsystemtime < t) do
begin

marktime(i);

repeat
clickmouse2(true);

if timefrommark(i) > maxtime then
begin
result := false;
exit;
end;

until(result)

end;
end;
function waitbitmap(bitmap: integer; var x, y: integer; xs, ys, xe, ye: integer; tol: integer; waitperloop, maxtime:integer): boolean;
var
t: integer;
begin
t := (getsystemtime + maxtime);

while (getsystemtime < t) do
begin
if (findbitmaptolerancein(bitmap, x, y, xs, ys, xe, ye, tol)) then
begin
result := true;
break;
end;

wait(waitperloop);
end;
end;
function methodfinder(var x, y: integer; color, tol: integer; hmod, smod: extended; uptext: tstringarray): boolean;
var
b: tbox;
cts,i: integer;
tpa,pbox: tpointarray;
atpa: t2dpointarray;
begin
result := false;

cts := getcolortolerancespeed;

colortolerancespeed(2);
setcolorspeed2modifiers(hmod, smod);

findcolorsspiraltolerance(mscx, mscy, tpa, color, msx1, msy1, msx2, msy2, tol);
colortolerancespeed(cts);

if (length(tpa) < 1) then
exit;

tpa := cleartpafromtpa(tpa, pbox);
atpa := splittpaex(tpa, 30, 30);

sortatpafromfirstpoint(atpa, point(mscx, mscy));

for i := 0 to high(atpa) do
begin
b := gettpabounds(atpa[i]);

with b do
begin

if debug then
smart_bigbox(tpa);

if debug then
smart_debugatpa(false, atpa);

middletpaex(atpa[i], x, y);
mmouse(x, y, 5, 5);

if waituptextmulti(uptext, 500) then
begin
smart_clearcanvasarea(inttobox(1, 49, 547, 384));
result := true;
getmousepos(x, y);
exit;
end;
end;
end;
end;
procedure waitmoving(time: integer);
var
t: integer;
begin
marktime(t);
while (ismoving or flagpresent) and (timefrommark(t) < time) do
wait(50+random(100));
end;
function increasedxp(time:integer):boolean;
var
t, first, second:integer;
begin
first := getxpbartotal; {property of google}
marktime(t);
repeat

sixhourcheck;
wait(10);

second := getxpbartotal;
if timefrommark(t) > time then
begin
result := false;
exit;
end;
until(second > first);
result := true;
end;
function waitxpchange(time, min: integer): integer;
var
xp: array[0..1] of integer;
diff, t: integer;
begin
result := 0;
togglexpbar(true);
xp[0] := getxpbartotal;
marktime(t);
while (timefrommark(t) < time) do
begin
wait(100);
xp[1] := getxpbartotal;
diff := xp[1] - xp[0];
if (diff >= min) then
begin
result := diff;
exit;
end;
end;
end;
function hplevel: integer;
var
colourstring: string;
begin
result := getmmlevels('hp', colourstring);
end;
procedure walkback;
label
start;
begin
start:

if debug then
writeln('script is starting up walking back to bank');

if sps_walkline(walk) then
status := 'walking to the bank'
else begin
status :='failed walking to bank';
writeln(status + ' + time running:' +timerunning);

if sixhourcheck then
goto start;

end;
writeln(status + ' + time running:' +timerunning);
end;
procedure walkthere;
label
start;
begin
start:

if debug then
writeln('walking to the altar');

if sps_walkline(altar) then
status := 'walking to the altar'
else begin
status :='failed walking to altar';
writeln(status + ' + time running:' +timerunning);

if sixhourcheck then
goto start;
end;
writeln(status + ' + time running:' +timerunning);
end;
procedure walkbank;
label
start;
begin
marktime(t);

repeat

sixhourcheck;

wait(10);

until(waitfinddtmex(summ, x, y, mmx1, mmy1, mmx2, mmy2, 50, 5000) or findsymbol(x, y, 'clothes shop')) or (findsymbol(x, y, 'bank')) or (timefrommark(t) > 10000)

if debug then
if finddtm(summ, x, y, mmx1, mmy1, mmx2, mmy2) then
writeln('we found the summoning icon, walking to bank');

if debug then
if findsymbol(x, y, 'bank') then
writeln('we found the bank icon, walking to bank');

if (timefrommark(t) > 10000) then
begin

start:

if debug then
writeln('10 seconds have gone by and we havent moved');

if debug then
writeln('going to attempt using the lodestone to get back to bank');

if waitfinddtmex(home, x, y, msx1, msy1, msx2, msy2, 50, 5000) then
mouse(x, y, 8, 8, mouse_left);

if waitfinddtmex(lunar, x, y, msx1, msy1, msx2, msy2, 50, 5000) then
mouse(x, y, 6, 6, mouse_left);

wait(randomrange(19000,20000));

if sps_walkline(lodestone) then
status := 'walking from lodestone to bank'
else
status := 'failed walking to bank from lodestone';
writeln(status + ' + time running:' +timerunning);

end else
writeln('teleporting was succesfull');

if sps_walkline(bank) then
status := 'walking to bank'
else begin
status :='failed walking to bank';
writeln(status + ' + time running:' +timerunning);

if sixhourcheck then
goto start;

end;
writeln(status + ' + time running:' +timerunning);
end;
procedure progressreport;
begin
runesperhour := round((runecount)/ (gettimerunning / 3600000.0));
essused := (runecount / 2);
essloss := (essused * essprice);
astralprofit := (runecount * astralprice)
profit := (astralprofit - essloss);
profitperhour := round((profit)/ (gettimerunning / 3600000.0));

writeln('(*-----------------------------*)');
writeln(' \ AstralRcRunner /');
writeln(' / '+scriptversion+' VERSION \');
Writeln('| TIME RUNNING:' + MsToTime(GetTimeRunning, Time_Bare) + ' |');
writeln('| RUNS DONE:' +inttostr(runs) +' |');
writeln('| ASTRALS MADE:' +inttostr(runecount) + ' |');
writeln('| ASTRALS/HOUR:' +inttostr(runesperhour) + ' |');
writeln('| PROFIT:' +inttostr(profit) + ' |');
writeln('| PROFIT/HOUR:' +inttostr(profitperhour) + ' |');
writeln('|______________________________|');
end;
procedure drawtextinfo;
var
//navbar: tpointarray;
rantime: extended;
loadingtime: integer;
tr, exp, ran, exph, prof, profh: string;
begin
//navbar := tpafrombox(inttobox(1, -50, 760, -5));

rantime := ((gettimerunning-loadingtime)/3600000.0);

tr := mstotime((gettimerunning-loadingtime), Time_Abbrev);;
ran := inttostr(runs);
exp := inttostr(runecount)
exph := inttostr(runesperhour)
prof := inttostr(profit);
profh := inttostr(profitperhour);

smartsetdebug(true);
//smart_drawdotsex(true, navbar, RGBtoColor(11, 16, 17));
smart_drawtextex(true, 0, -50, UpChars, 'TIMERUNING:', clwhite);
smart_drawtext(1, -39, UpChars, 'RUNS DONE:', clwhite);
smart_drawtext(1, -28, UpChars, 'ASTRAL CRAFTED:', clwhite);
smart_drawtext(1, -17, UpChars, 'ASTRALS PER HOUR:', clwhite);
smart_drawtext(170, -39, UpChars, 'GP MADE:', clwhite);
smart_drawtext(170, -28, UpChars, 'GP PER HOUR:', clwhite);

smart_drawtext(81, -50, UpChars, tr, clwhite);
smart_drawtext(72, -39, UpChars, ran, clwhite);
smart_drawtext(111, -28, UpChars, exp, clwhite);
smart_drawtext(120, -17, UpChars, exph, clwhite);
smart_drawtext(226, -39, UpChars, prof, clwhite);
smart_drawtext(250, -28, UpChars, profh, clwhite);
end;
function countastrals: integer;
begin
if findbitmaptolerancein(astral, x, y, mix1, miy1, mix2, miy2, 55) then
count := getamount(x, y);
result:= count;
end;
procedure dropvial;
begin
if findbitmaptolerancein(vial, x, y, mix1, miy1, mix2, miy2, 30) then
begin

if debug then
writeln('droping the vial');

mmouse(x,y,7,7);
clickmouse2(false);
waitoption('Drop',500);
end else
writeln('there was no vial to drop');
end;
procedure depositastrals;
begin
if findbitmaptolerancein(astral, x, y, mix1, miy1, mix2, miy2, 55) then
begin

if debug then
writeln('depositing the astrals');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 7, 7);
clickmouse2(false);
waitoption('Deposit-All',300);
end;
smart_clearcanvasarea(inttobox(536, 200, 730, 457));
end;
procedure boothscreen;
begin

if bankscreen then
exit;


sixhourcheck;
findspinticket;


if methodfinder(x, y, 5662320, 4, 0.12, 0.72, ['bank', 'booth', 'ooth', 'ank', 'bank booth']) then
begin

if debug then
writeln('we found the bank booth');

clickmouse2(true);

if debug then
smart_clearcanvasarea(inttobox(1, 49, 547, 384));

fflag(1);

marktime(t);

repeat

sixhourcheck;

if timefrommark(t) > 1000 then
break;

if bankscreen or pinscreen then
break;

until(false)

if (pinscreen) then
inpin(players[0] .pin);
end;
end;
procedure findaltar;
label
start;
begin
start:

if sixhourcheck then
walkthere;

if methodfinder(x, y, 8025208, 6, 0.47, 0.10, ['Altar','ltar','tar','Alt']) then
begin

if debug then
writeln('we found the altar');

clickmouse2(true);

if debug then
smart_clearcanvasarea(inttobox(1, 49, 547, 384));

if not didredclick then
goto start;
end else
goto start;

if debug then
writeln('crafting astrals');

fflag(1);

increasedxp(2000);
end;
procedure teleport;
begin
countastrals;
inc(runs);
incex(runecount, countastrals);

//wait(timetele);

actionkeychange('1',3000);
ftab(25);

{ if not increasedxp(1500) then
begin

if debug then
writeln('unsuccesfully teleported, trying again');

actionkey('1');
end; }

if clickcontinue(true, true) then
begin
writeln('the green button was found, blocking teleport');
clickcontinue(true, true);
end else
writeln('there was no green button found during teleport');

if debug then
progressreport;

if paint then
drawtextinfo;

end;
procedure takeessence;
begin
if FindDTM(ess, x, y, mix1, miy2, mix2, miy2) then
writeln('we found the essence');
wait(45 + random(15));
GetMousePos(x, y);
MMouse(x, y, 1, 1);
Mouse(x, y, 0, 0, false);
waitoption('All',1000);
Mouse(x, y, 0, 0, true);
end;
function giantdecay: boolean;
var
a : integer;
tpa : tpointarray;
atpa : t2dpointarray;
mp : tpoint;
tmpcts : integer;
box : tbox;
begin
tmpcts := getcolortolerancespeed;

colortolerancespeed(2);
setcolorspeed2modifiers(0.42, 0.08);
findcolorsspiraltolerance(mscx, mscy, tpa, 3356987, mix1, miy1, mix2, miy2, 10);

sorttpafrom(tpa, point(mscx, mscy));
atpa := tpatoatpaex(tpa, 20, 20);

for a := 0 to high(atpa) do
begin
mp := middletpa(atpa[a]);
box := inttobox((mp.x - 5), (mp.y - 5), (mp.x + 5), (mp.y + 5));
result := true;
end;
colortolerancespeed(tmpcts);
setcolorspeed2modifiers(0.2, 0.2);
end;
procedure clickdecay;
var
a, h: integer;
tpa : tpointarray;
atpa : t2dpointarray;
tmpcts : integer;
begin
if (bankscreen) then exit;

exitsquealoffortune;

tmpcts := getcolortolerancespeed;
colortolerancespeed(2);
setcolorspeed2modifiers(0.41, 0.12);
findcolorsspiraltolerance(mscx, mscy, tpa, 2764337, mix1, miy1, mix2, miy2, 7);
atpa := tpatoatpaex(tpa, 20, 20);
sortatpasize(atpa,true);

h := high(atpa);

for a := 0 to h do
begin
middletpaex(atpa[a], x, y);
mmouse(x, y, 5, 5);
if (waituptextmulti(['pouch', 'ouch', 'pou', 'po', 'ch'], 1000)) then
begin
clickmouse2(true);
//result := true
//exit;
end;
end;
colortolerancespeed(tmpcts);
setcolorspeed2modifiers(0.2, 0.2);
end;
procedure repairpouches;
begin

boothscreen;

wait(575 + random(185));
deposit(2, 4, true);
deposit(6, 8, true);

if findbitmaptolerancein(air, x, y, msx1, msy1, msx2, msy2, 35) then
begin

if debug then
writeln('withdrawing 2 air runes');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x,y,7,7);
clickmouse2(true);
wait(355 + random(215));
clickmouse2(true);

if debug then
smart_clearcanvasarea(inttobox(1, 49, 547, 384));

end else
writeln('unable to find air runes, update bitmap');

if findbitmaptolerancein(cosmic, x, y, msx1, msy1, msx2, msy2, 65) then
begin {property of google}

if debug then
writeln('withdrawing 1 cosmic rune');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x,y,7,7);
clickmouse2(true);
wait(355 + random(215));

if debug then
smart_clearcanvasarea(inttobox(1, 49, 547, 384));

end else
writeln('unable to find the cosmic runes, update bitmap');

if findbitmaptolerancein(astral, x, y, msx1, msy1, msx2, msy2, 65) then
begin

if debug then
writeln('withdrawing 1 astral rune');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x,y,7,7);
clickmouse2(true);

if debug then
smart_clearcanvasarea(inttobox(1, 49, 547, 384));


wait(675 + random(65));
end;
closebank;
wait(355 + random(215));

if not waitfinddtmex(contact, x, y, msx1, msy1, msx2, msy2, 50, 5000) then
exit;

if waitfinddtmex(contact, x, y, msx1, msy1, msx2, msy2, 50, 5000) then
begin

if debug then
writeln('found the contact spell');

actionkey('2');
wait(355 + random(215));

end else
writeln('unable to find the contact spell, update dtm');

if waitcolor(489,200,526601,1,7000) then
begin

wait(randomrange(400,500));

if debug then
writeln('found black bar, sliding down');

mousebox(486, 191, 488, 201,1);
end;

wait(waittime);

if debug then
writeln('clicking on the dark mage');

mousebox(414,153,446,189,1);
ftab(25);
marktime(t);

repeat

sixhourcheck;

clickcontinue(true,true);

until(findnpcchattext('repair',clickleft)) or (timefrommark(t) > 20000)

marktime(t);

repeat
sixhourcheck;

wait(50+random(10));

until(clickcontinue(true,true)) or (timefrommark(t) > 10000)

boothscreen;
end;
function replacepouch: boolean;
begin

if waitinvfull(50, 3000) then
deposit(2, 4, true);

if debug then
writeln('replacing the massive pouch');

repeat
wait(1)
sixhourcheck;
until(invcount < 23)

if findbitmaptolerancein(mass, x, y, msx1, msy1, msx2, msy2, 35) or findbitmaptolerancein(new, x, y, msx1, msy1, msx2, msy2, 35) then
begin

if debug then
writeln('found the new massive pouch, withdrawing');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 7, 7);
clickmouse2(true);

if debug then
smart_clearcanvasarea(inttobox(4, 9, 504, 331));

end else
writeln('unable to find the new massive pouch, update bitmap');

takeessence;

if waitbitmap(mass, x, y, mix1, miy1, mix2, miy2, 35, 50, 3000) or waitbitmap(new, x, y, mix1, miy1, mix2, miy2, 35, 50, 3000) then
begin

if debug then
writeln('the new massive pouch has appeared in the inventory, filling');

mmouse(x, y, 7, 7);
clickmouse2(false);
waitoption('Fill', 600)

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

end else
writeln('unable to find the new massive pouch in the inventory, update bitmap');

if findbitmaptolerancein(mass, x, y, mix1, miy1, mix2, miy2, 35) then
result := true;
end;
procedure fillpouches;
begin
if not bankscreen then
boothscreen;

if giantdecay then
repairpouches;

takeessence;

if findbitmaptolerancein(giant, x, y, mix1, miy1, mix2, miy2, 25) then
begin

if debug then
writeln('filling the giant pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(false);
waitoption('Fill',400);
end else
writeln('unable to find the giant pouch, update bitmap');

if debug then
smart_clearcanvasarea(inttobox(536, 200, 730, 457));

if not bankscreen then
boothscreen;

depositastrals;
takeessence;

if finddtm(large, x, y, mix1, miy1, mix2, miy2) then
begin

if debug then
writeln('filling the large pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(false);
waitoption('Fill',400);
end else
writeln('unable to find the large pouch, update dtm');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

if not bankscreen then
boothscreen;

if finddtm(medium, x, y, mix1, miy1, mix2, miy2) then
begin

if debug then
writeln('filling the medium pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(false);
waitoption('Fill',400);
end else
writeln('unable to find the medium pouch, update dtm');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

if finddtm(small, x, y, mix1, miy1, mix2, miy2) then
begin

if debug then
writeln('filling the small pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(false);
waitoption('Fill',400);
end else
writeln('unable to find the small pouch, update dtm');

if debug then
smart_clearcanvasarea(inttobox(536, 200, 730, 457));

takeessence;

if massive = false then
exit;

if massive = true then
begin

if not findbitmaptolerancein(mass, x, y, mix1, miy1, mix2, miy2, 35) then
begin
replacepouch;
end else

if waitbitmap(mass, x, y, mix1, miy1, mix2, miy2, 35, 50, 5000) then
begin

if debug then
writeln('filling the massive pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 8, 8);
clickmouse2(false);
waitoption('Fill', 700);

end else
writeln('unable to find the massive pouch, update bitmap');

if debug then
smart_clearcanvasarea(inttobox(536, 200, 730, 457));

takeessence;
end;
end;
procedure drink;
label
start;
begin
start:

if bankscreen then
wait(150 + random(75));

boothscreen;
writeln('searching for the energy potion (3)');

marktime(t);
repeat

if not bankscreen then
boothscreen;

wait(10);

until(findbitmaptolerancein(pot, x, y, msx1, msy1, msx2, msy2, 35)) or (timefrommark(t) > 6000)

if (timefrommark(t) > 6000) then
begin

if not bankscreen then
writeln('we arent on the bankscreen, reopening it');

goto start;

end else
writeln('update the potion bitmap');

if findbitmaptolerancein(pot, x, y, msx1, msy1, msx2, msy2, 35) then
begin

if debug then
writeln('withdrawing the energy potion(3)');

mmouse(x, y, 6, 6);
clickmouse2(true);
end else
writeln('could not find the potion, update bitmap');

closebank;

if debug then
writeln('waiting for the potion to show up in the inventory');

repeat

sixhourcheck;

wait(10);

until(findbitmaptolerancein(pot, x, y, mix1, miy1, mix2, miy2, 35))

if debug then
writeln('finding the potion in the inventory');

if debug then
writeln('drinking the potion');

if findbitmaptolerancein(pot, x, y, mix1, miy1, mix2, miy2, 35) then
mmouse(x, y, 7, 7);

marktime(t);

repeat

sixhourcheck;

clickmouse2(true);
wait(2137 + random(379));

until(timefrommark(t) > 20000) or (isuptextmulticustom(['vial','ial','al']))

if findbitmaptolerancein(vial, x, y, mix1, miy1, mix2, miy2, 25) or (isuptextmulticustom(['vial','ial','al'])) then
begin

if debug then
writeln('dropping the empty vial');

mmouse(x, y, 6, 6);
clickmouse2(false);
waitoption('Drop',400);
end else
writeln('could not find the vial');

boothscreen;
end;
procedure eatfood;
begin

if debug then
writeln('searching for the food');

repeat

sixhourcheck;

wait(10);

until(findbitmaptolerancein(food.fooddtm, x, y, msx1, msy1, msx2, msy2, 55))
if findbitmaptolerancein(food.fooddtm, x, y, msx1, msy1, msx2, msy2, 55) then
begin

if debug then
writeln('withdrawing food');

mmouse(x, y, 8, 8);
clickmouse2(false);
waitoption('Withdraw-5',100);
end else
writeln('was unable to find the food, update bitmap');

if debug then
writeln('finding the food in the inventory');

repeat

sixhourcheck;

wait(10);

until(findbitmaptolerancein(food.fooddtm, x, y, mix1, miy1, mix2, miy2, 35))
repeat

sixhourcheck;

if findbitmaptolerancein(food.fooddtm, x, y,mix1, miy1, mix2, miy2, 35) then
begin
mmouse(x, y, 7, 7);
clickmouse2(false);
waitoption('Eat',200);
wait(randomrange(1700,2000));
end;

until(hpfull) or (not(findbitmaptolerancein(food.fooddtm, x, y, mix1, miy1, mix2, miy2, 35)))

if findbitmaptolerancein(food.fooddtm, x, y, mix1, miy1, mix2, miy2, 35) then
if hpfull then
writeln('we are full hp depositing food');

if findbitmaptolerancein(food.fooddtm, x, y, mix1, miy1, mix2, miy2, 35) then
begin
mmouse(x, y, 6, 6);
clickmouse2(false);

if waitoptionmulti(['Deposit-All', 'Deposit'], 200) then
writeln('deposited the food');
end;
end;
procedure summoning;
begin
end;
procedure handlegoods;
begin
if sixhourcheck then
walkbank;

dropvial;
boothscreen;
depositastrals;

if energy then
drink;

if hplevel < hpeat then
eatfood;

if bunyip = true then
summoning;

fillpouches;

end;
procedure dowork;
begin

fflag(1);

sixhourcheck;
findspinticket;

findaltar;
waitmoving(15000);
wait(waittime);

if giantdecay then
if findbitmaptolerancein(decay, x, y, mix1, miy1, mix2, miy2, 25) then
mouse(x, y, 6, 6, mouse_left);

if findbitmaptolerancein(giant, x, y, mix1, miy1, mix2, miy2, 35) then
begin

if debug then
writeln('emptying the giant pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(true);
end else
writeln('unable to find the giant pouch, update bitmap');

findaltar;
wait(waittime);

if finddtm(large, x, y, mix1, miy1, mix2, miy2) then
begin

if debug then
writeln('emptying the large pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(true);
end else
writeln('unable to find the large pouch, update dtm');

if finddtm(medium, x, y, mix1, miy1, mix2, miy2) then
begin

if debug then
writeln('emptying the medium pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(true);
end else
writeln('unable to find the medium pouch, update dtm');

if finddtm(small, x, y, mix1, miy1, mix2, miy2) then
begin

if debug then
writeln('emptying the small pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 6, 6);
clickmouse2(true);
end else
writeln('unable to find the small pouch, update dtm');

findaltar;

wait(waittele);
findspinticket;

if massive = false then
teleport;

if massive = true then
begin

if findbitmaptolerancein(mass, x, y, mix1, miy1, mix2, miy2, 35) then
begin

if debug then
writeln('emptying the massive pouch');

if debug then
smart_drawcircle(false, point(x, y), 6, false, clwhite);

mmouse(x, y, 7, 7);
clickmouse2(true);

findaltar;
wait(waittele);
teleport;
end;
end;
end;
begin
cleardebug;
mapchecker;

if updatescript then
autoupdateme;

includes;
spsvariables;

setupsrl;
script;

sps_setup(runescape_other,['lunar']);

if debug then
sps_debug:= false;

declareplayers;
//loadfoodinfo;
loginplayer;

smartsetrefresh(35);

addonterminate('freescript');

mousespeed := 40;
clicknorth(srl_angle_high);
ftab(25);

findnormalrandoms;

smart_clearcanvas;

walkback;

repeat

sixhourcheck; handlegoods; sixhourcheck; walkthere; sixhourcheck; dowork; sixhourcheck; walkbank;

until(runs >= runstotal) or (allplayersinactive)
end.

Google

2013-01-16 17:51:58

I'm not sure if the instructions are on there but the ess needs to be in the top right corner of the bank I don't use a bitmap for them, faster that way.

Edit: Sorry the instructions are put on the first page under " Setup ".

Syntax

2013-01-19 04:52:30

From: Google
I'm not sure if the instructions are on there but the ess needs to be in the top right corner of the bank I don't use a bitmap for them, faster that way.

Edit: Sorry the instructions are put on the first page under " Setup ".

Script is 100% flawless, actually one of the better scripts I've used (color based). Been running 102 hours and no errors.

Sawyer

2013-01-20 12:30:16

What runes should we have in our inventory? I have all of the contact runes and tele runes, but it ended up banking them…

Google

2013-01-20 13:20:18

From: Blakebn2011
Script is 100% flawless, actually one of the better scripts I've used (color based). Been running 102 hours and no errors.


Thanks glad its working for you now.

From: Sawyer
What runes should we have in our inventory? I have all of the contact runes and tele runes, but it ended up banking them…

The OP has all the info you need, ill post it below. The only runes you need in your inventory is law runes.


setup:
1) fill out the constants, includes, declareplayers
2) make sure to fill out totalruns correctly
3) have essence top right of bank
4) have energy potion (3)
5) have pouches to left side of inventory using slots [1, 5, 9, 13, 17]
6) have lunar group teleport on action bar slot [1], and contact repair on bar slot [2]

Sawyer

2013-01-20 20:06:21

What about air or earth runes? I have an earth staff equipped and air and laws in my inv, but whenever the NPC contact spell is cast, it banks all of the laws and airs so it won't teleport.

Google

2013-01-24 09:35:50

From: Sawyer
What about air or earth runes? I have an earth staff equipped and air and laws in my inv, but whenever the NPC contact spell is cast, it banks all of the laws and airs so it won't teleport.


I have it set to deposit air, astrals and cosmics. You will have to use another staff for now.

Sawyer

2013-01-30 22:37:25

Alright, my bad earlier :P It runs VERY smoothly. All I can say is more Antiban? I also adjusted the mousespeed to be lower.

9falcao9

2013-01-31 13:02:50

it worked first for a moment but then it started doing some weird stuff

it crafts the runes @ altar - then teleports to lunar bank and acts like its doing the banking at the telespot or something weird - then it runs back to altar (without banking at all) and tries to craft without actually having any essences -> ends up being stuck at altar lol

any help? ^__^

krasniy

2013-02-02 19:01:24

From: 9falcao9
it worked first for a moment but then it started doing some weird stuff

it crafts the runes @ altar - then teleports to lunar bank and acts like its doing the banking at the telespot or something weird - then it runs back to altar (without banking at all) and tries to craft without actually having any essences -> ends up being stuck at altar lol

any help? ^__^


The profit in this is really poor…not worth worrying about at the moment…. nice script though….

epi

2013-02-11 22:39:16

just as a suggestion, you could make an option to not use super energies because with full agile and wicked gear, it is not needed and the bot gets tripped up saying it is tryin to withdraw super energy (3). Great script otherwise and great gp/xp ratio at 82+

Sawyer

2013-02-11 23:10:50

Everyone using this, please remember to sell the astrals at market price or above, or else the price of astral runes will crash for everyone. Plus, you'll make more money. :)

Flight

2013-02-12 00:23:33

From: krasniy
The profit in this is really poor…not worth worrying about at the moment…. nice script though….


Be sure to adjust the Pure Essence and Astral Rune price in the beginning. I made an Essence-mining script not too long ago that uses the Abyssal Titan method for around 2,200 Pure Essence per hour. Through testing I've mined around 80,000 essence, so when I run this script it's 100% profit. Using small/medium/large/giant pouches I craft 104 Astral runes every run; if I remember correctly it's close to 6,200 runes per hour, after I've implanted my own mouse-handling routines. But because I've mined my own essence, in theory, I make 600-700K profit per hour running this. It's not bad considering the flood of bots that rape every existing method of generating profit in Runescape…

From: epi
just as a suggestion, you could make an option to not use super energies because with full agile and wicked gear, it is not needed and the bot gets tripped up saying it is tryin to withdraw super energy (3). Great script otherwise and great gp/xp ratio at 82+


If you'd like to the script to simply rest as opposed to drinking potions you could add this bit to the script:

Inside the "handlegoods" procedure find this bit:

if energy then
drink;

Simply replace 'drink;' with 'RestUntil(95);', 95 being the energy to rest to; change this to whatever you want.

if energy then
RestUntil(95);

epi

2013-02-12 18:29:16

When this script is running right, its amazing but ive had a recurring thing where when it logs in or something, it opens mass amounts of tabs for RS membership. Also when I got back from practice, it was standing at the altar and just kept clicking the altar and trying to empty pouches. From my xp gained, this was going on for im guessing 8 hours lol. I'm a noob with this stuff but went over all the setup steps multiple times and i have everything filled out correctly. I'm using smart 7.2 if that helps


And thanks flight for the above post. It works:)


Edit: I spent 3 minutes to get SMART 8 and it looks like that might have solved my problem

Sawyer

2013-02-12 19:36:30

I use SMART 8 and added some custom fail safes into it, and it works flawlessly for me.

epi

2013-02-12 20:26:33

10 seconds have gone by and we havent moved
going to attempt using the lodestone to get back to bank

I was wrong. It still stops at altar and fails to teleport. It says the above on the debug printout thing and keeps trying to craft runes. Any help?

Sawyer

2013-02-12 20:31:42

Try adding the fail safe to walkback instead of using the loadstone. It works for me.

epi

2013-02-13 05:40:23

From: Sawyer
Try adding the fail safe to walkback instead of using the loadstone. It works for me.

Any help on that, like I said, I'm a noob. I can find it in the script but I have no idea what to type in to replace it

Sawyer

2013-02-13 07:55:25

Replace your teleport function with this and put hometeleport on your actionbar. That works for me.

-BTW Thanks Google for 99 Rc.



procedure teleport;
var
t:Integer;
begin

Marktime(t);
countastrals;
inc(runs);
incex(runecount, countastrals);
writeln('teleporting');

//wait(timetele);

actionkeychange('1',3000);
ftab(25);

{ if not increasedxp(1500) then
begin

if debug then
writeln('unsuccesfully teleported, trying again');

actionkey('1');
end; }


if clickcontinue(true, true) then
begin
writeln('the green button was found, blocking teleport');
clickcontinue(true, true);
begin
writeln('failsafe teleporting after green button finding');
actionkeychange('1',3000);
ftab(25);
wait(randomrange(2000, 3000));
if not(waitfinddtmex(summ, x, y, mmx1, mmy1, mmx2, mmy2, 50, 5000) or findsymbol(x, y, 'clothes shop')) or (findsymbol(x, y, 'bank')) then
begin
walkback;
end;
end;
end else
writeln('there was no green button found during teleport');


if debug then
progressreport;

if paint then
drawtextinfo;

end;

epi

2013-02-14 13:38:16

From: Sawyer
Replace your teleport function with this and put hometeleport on your actionbar. That works for me.

-BTW Thanks Google for 99 Rc.



procedure teleport;
var
t:Integer;
begin

Marktime(t);
countastrals;
inc(runs);
incex(runecount, countastrals);
writeln('teleporting');

//wait(timetele);

actionkeychange('1',3000);
ftab(25);

{ if not increasedxp(1500) then
begin

if debug then
writeln('unsuccesfully teleported, trying again');

actionkey('1');
end; }


if clickcontinue(true, true) then
begin
writeln('the green button was found, blocking teleport');
clickcontinue(true, true);
begin
writeln('failsafe teleporting after green button finding');
actionkeychange('1',3000);
ftab(25);
wait(randomrange(2000, 3000));
if not(waitfinddtmex(summ, x, y, mmx1, mmy1, mmx2, mmy2, 50, 5000) or findsymbol(x, y, 'clothes shop')) or (findsymbol(x, y, 'bank')) then
begin
walkback;
end;
end;
end else
writeln('there was no green button found during teleport');


if debug then
progressreport;

if paint then
drawtextinfo;

end;

Thanks so much dude!!! Script has been working flawlessly for 4 hours. 98 RC here I come!!

Sawyer

2013-02-14 23:21:12

No problem :) Congratulations on 99 in advance :)

epi

2013-02-16 09:28:33

I love this script. Thanks Google :)


(*—————————–*)
\ AstralRcRunner /
/ 2.2 VERSION \
| TIME RUNNING:13:43:15 |
| RUNS DONE:743 |
| ASTRALS MADE:77526 |
| ASTRALS/HOUR:5650 |
| PROFIT:5814450 |
| PROFIT/HOUR:423767 |
|______________________________|

Sawyer

2013-02-16 23:52:21

It is pretty good :P /

EDIT: I also came home from school today to find my character standing in varrock center with no pouches, 2 law runes, and all my wicked dropped..

Fate

2013-03-09 12:10:56

I've been using this script for awhile and it is amazing!

The only problem I have, is when it teleports back to the bank, it clicks teleport 2 or 3 times instead of once, wasting runes. Is there any way to fix this?

blockay

2013-03-09 23:16:33

thx so much for this script. made a few changes and im getting over 7k astrals per hour

ok spent a lot more time than i expected to trying to work out some bugs on ur script…

| ASTRALS/HOUR:7220 |

7 hours running..

:)
more updates..
| TIME RUNNING:00:40:06 |
| ASTRALS MADE:5246 |
| ASTRALS/HOUR:7848

Fate

2013-03-14 17:32:38

From: Fate
I've been using this script for awhile and it is amazing!

The only problem I have, is when it teleports back to the bank, it clicks teleport 2 or 3 times instead of once, wasting runes. Is there any way to fix this?


Something to add: When it teleports, I get this message in the debug

teleporting
function is wrong
there was no green button found during teleport

Then it displays the proggy and says "teleporting successful". Maybe this has something to do with the multi-teleport?

Sawyer

2013-03-14 21:40:34

Meh.. This script is the reason astrals crashed… from 110 to 98 in like a week. Sell higher please…

Stayon

2013-03-14 21:52:38

From: Sawyer
Meh.. This script is the reason astrals crashed… from 110 to 98 in like a week. Sell higher please…


Only 146 views :S. I think PB has one too.

Sawyer

2013-03-14 21:53:45

From: stayon
Only 146 views :S. I think PB has one too.

Aaahh. True. Pb tends to make scripts that crash prices. My bad.

the flea

2013-03-18 10:38:22

Running this script atm its nice.

A useful thing you might wish to add which I modified into the version I'm using is the repair pouch spell instead of NPC contact. It actually fixes the pouches more meaning they last longer and its faster to cast than NPC Contact

Edit: Only reason I stopped was to buy more ess, could easily have continued for that length again

Itankbots

2013-03-21 02:35:45

yeah PB has like 20 AStral rcers :/

They kill most prices, only time SRL has ever "crashed" item prices is when bot nuke happened and everyone came over here.

also @the flea, i dont think google is really active atm. so i dont think he will be adding that anytime soon (i could be wrong)

noob447

2013-03-23 12:36:01

Am I not putting the laws in the right slot of inv or something? It keeps depositing the Laws every time it banks and then I have no way to tele. It's also failing to perform the lodestone tele like it says it's trying.

Am I doing anything wrong?

miouou

2013-03-26 04:35:34

how do i add where it drags the bar down on the right to older versions of the script. that seem more stable to me

ZroyalT

2013-04-14 15:26:17

Hi, i noticed that every time i teleport, the spell is cast twice, probably because the script is not waiting long enough… I'm a beginner at all this, but if i put in one extra second to insure that i was already at the bank, would it be at the part '//wait(timetele+1000)'?

isak

2013-04-25 15:29:18

Hey, i have the same issue as ZroyalT. The script tends to teleport twice, and i think the reason might be that it clicks on the hotkey more than once… I've tried to set timetele to more than 1000 ms, so it will take more time to teleport, but the problem remains. Can somebody please help me with this issue - thanks in advantage.

iamorange12

2013-05-19 07:28:01

From: the flea
Running this script atm its nice.

A useful thing you might wish to add which I modified into the version I'm using is the repair pouch spell instead of NPC contact. It actually fixes the pouches more meaning they last longer and its faster to cast than NPC Contact

Edit: Only reason I stopped was to buy more ess, could easily have continued for that length again


@the flea
It's a long shot, but is there any chance you'd be willing to share that version with me? If not it's okay, it's worth asking.

Also, @Google, if there is anything I can do to help you with this script, I'd love to do it… I have limited coding knowledge, but I could always help with collecting colors/DTM's/bitmaps, etc., I just hate leeching this wonderful FREE script that you've contributed to the community, when you DID NOT HAVE TO but DID ANYWAY, without showing my thanks and/or helping you the creator, out in some way. If you do happen to be inactive when I finally learn to script fairly well… I plan on updating this and releasing it to the community again. Because by that time I'm sure the script will be outdated. :bart: If you aren't okay with that please let me know. (I figure the saying "mimicry is the sincerest form of flattery" might be true in your case, but it might not.)

Anyway, this script is still running wonderfully well as of Sunday, May 19th, 2013. There are a few VERY minor issues that the script gets itself into, but it seems to get itself back on track as well.

Thanks for reading the long post,

the flea

2013-05-19 16:03:03

sorry iamorange12 I don't have a copy of the script any more. I formatted the HDD on my computer and lost everthing apart from the essentials that I backed up like uni work and pictures. I'm not really interested in rune crafting either since I reached 99 so I doubt I will find the time put in any time to revive it for you either.

netz

2013-06-30 23:57:36

Can i do this without pouches?

And what it meant by "have lunar group teleport on action bar slot [1], and contact repair on bar slot [2]"..

Edit : Got it finally, thanks a lot for this script!