shstiger2009
2012-07-07 00:46:19
How Long have You Played Runescape?
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Minoring in Computer Science in college, possibly going for Masters in Comp Engineering. Can't decide yet. :D
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
Made changes from what Brandon said, was planning to do that anyway. Thanks for the input!
XP/hr is nice as well :D
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Minoring in Computer Science in college, possibly going for Masters in Comp Engineering. Can't decide yet. :D
Are you a member of any other communities?
No
Tell us about yourself…
From: shstiger2009
Well I applied to members right when I joined way back, anxious like everyone is when they make a first script. It was a terrible script, and then I basically gave up after transferring colleges to LSU (Geaux Tigers!) because of lack of free time. I stayed very active on the forums, became friends with some of the community, and started scripting again now that the summer is here. I've learned a bunch! :)
(Also the Member Tool said to apply, as well as a few other members, haha!)
Please show us one (or multiple) of your scripts.
program ShstigerChinnerAFKv1;
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i SRL/SRL/misc/paintsmart.simba}
//You should probably babysit this.
//Wear Ring Of Life if you aren't going to babysit.
//Look at inventory setup in the thread for best performance.
//Go to Ape Atoll Dungeon. BEFORE going in, wield your Greegree.
//Run to wherever you want to run the script.
//*MAKE SURE you have FULL hp BEFORE starting script* Enjoy.
const
DrinkPrayer = 300; //Level to drink prayer flasks.
WhenToEat = 500; //Shouldn't need to eat honestly, but will if you have sharks.
WhichXPBar = 1; //For progress report
RangePotMins = 13; //Minutes in between drinking range potions.
MinsPerAntiban = 2; //Don't really need much (very AFKable)
TooLowLevel = 100; //If your prayer level or HP goes below this, you
// SHOULD teleport via Teletab and logout. Wear Ring of Life just in case!
var
StartXP: Int64;
LProc: String;
X, Y, T, RedChin, Shark, Prayer, RangePot, AntiPoison, DrinkRange,
AntibanAFK, VarrockTele, ExtremeRange, Eat: Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Member := True;
Active := True;
end;
end;
Procedure CallStuff;
begin
RedChin := DTMFromString('mlwAAAHicY2dgYFjAxMAwHYhnM0HYS4B4FRCvBuKDjAwMR4D4GBCfgeITQHwIiB0UOIG6mbBiESCJCzPiwVAAAOvQCv0=');
AntiPoison := DTMFromString('mWAAAAHicY2FgYIhmYWAIBeI4IE4G0UwQnADEsUC8QjwEqIoJjiWBJDJmRMMgAAAYBASI');
Shark := DTMFromString('mlwAAAHicY2dgYChkYmAoB+IqIK4B4gYoOxOIZRkZGKSBWB6IlYBYG4h1gFgNiEMdDRimVacy9JcmMHQXxTG4m2kwxHmYMvDx8TFwAc3FhRnxYCgAAFFKC0Y=');
Prayer := DTMFromString('mggAAAHicY2NgYGADYgEg5gViDiBmYYAAGM0KxOxQDGIbzi8DkkwYWA5IYsOMODAEAACm8QJc==');
RangePot := DTMFromString('mbQAAAHicY2VgYOAEYkEgFgFiXiBmBWJ2BggAsbmgamxm7QeSTChYBKoPGTNiwWAAAJlHAms=');
VarrockTele := DTMFromString('mlwAAAHicY2dgYJjGwsDQAcQ9QDwZiGcB8QIgXgKimRgYFgLxCjQMEpdRPA7UzYQViwBJXJgRD4YCAJ5+CnE=');
ExtremeRange := DTMFromString('mggAAAHicY2NgYHjPyMDwFIhfAvEHIP4KxD+AWAeItYBYH4gNgFgPiDWBuHWKLlAXEwYWAZLYMCMODAEAa+EIhw==');
end;
Procedure FreeStuff;
begin
FreeDTM(RedChin);
FreeDTM(AntiPoison);
FreeDTM(Shark);
FreeDTM(Prayer);
FreeDTM(RangePot);
FreeDTM(VarrockTele);
FreeDTM(ExtremeRange);
end;
Function PoisonCheck: Boolean;
begin
Result := FindColorSpiralTolerance(X, Y, 3140371, 695, 22, 712, 38, 10);
end;
Procedure Antiban;
begin
WriteLn('AntiBanned');
case Random(99) of
1..37: RandomMovement;
38..50: RandomRClick;
51..85: PickUpMouse;
86..99: HoverSkill(Skill_Range,False);
end;
end;
Procedure ItsGeauxTime;
begin
if (not(FindDTM(RedChin, X, Y, MIX1, MIY1, MIX2, MIY2))) then Exit;
if FindDTM(RedChin, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['ield', 'hinch', 'chinchomp'], 600)) then
Wait(RandomRange(150, 40));
ClickMouse2(True);
end;
end;
Function HPLevel: Integer;
var
ColourString: String;
begin
Result:= GetMMLevels('HP', ColourString);
end;
Function PrayerLevel: Integer;
var
ColourString: String;
begin
Result:= GetMMLevels('Prayer', ColourString);
end;
Function IsPrayerOn: Boolean;
var
TPA: TPointArray;
CTS: Integer;
begin
if (PrayerLevel < 2) then
Result:= False
else
begin
CTS:= GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.11, 1.02);
Result:= FindColorsSpiralTolerance(723, 70, TPA, 8767378, 708, 53, 737, 85, 27);
SetToleranceSpeed2Modifiers(0.2, 0.2);
end;
ColorToleranceSpeed(CTS);
end;
Function OutOfPrayer: Boolean;
var
TPA: TPointArray;
CTS: Integer;
begin
CTS:= GetColorToleranceSpeed;
ColorToleranceSpeed(2);
if (PrayerLevel = 0) then
Result:= True
else
Result:= not(FindColorsSpiralTolerance(723, 70, TPA, 6236988, 706,
55, 739, 81, 26) or IsPrayerOn);
ColorToleranceSpeed(CTS);
end;
Procedure TurnPrayerOn;
begin
if (GetCurrentTab <> Tab_Inv) then
GameTab(Tab_Inv);
wait(1000);
begin
if IsPrayerOn then
exit;
repeat
if OutOfPrayer then
break;
if PrayerLevel < 3 then
break;
MouseBox(706, 55, 739, 87, 1);
Wait(1500);
FindNormalRandoms;
Until(IsPrayerOn);
end;
MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
end;
Function FindPrayerPot(Var FX, FY: Integer; Drink: Boolean): Boolean; //By Brandon
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 1.24);
if not(FindColorsTolerance(arP, 8824896, MIX1, MIY1, MIX2, MIY2, 18)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 34) and (R <= 128) and (G >= 114) and (G <= 217) and (B >= 84) and (B <= 171) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 8.44) and (X <= 33.93) and (Y >= 13.25) and (Y <= 52.86) and (Z >= 10.69) and (Z <= 44.80) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
SortATPASize(ararP, False);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (WaitUptextMulti(['rayer flask', 'lask', 'rayer pot', 'yer poti', 'prayer pot'], 500)) then
begin
if Drink then
begin
ClickMouse2(MOUSE_LEFT);
Wait(1000);
Result:= (not OutOfPrayer);
if Result then
TurnPrayerOn;
end else
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Exit;
end;
GetMousePos(fx, fy);
MMouse(MICX, MICY, 0, 0);
end;
Function GotPrayer: Boolean;
var
Prayer, X, Y: Integer;
begin
Result:= FindPrayerPot(X, Y, False);
if (not Result) then
begin
MMouse(MSCX, MSCY, 0, 0);
Wait(500);
Prayer:= DTMFromString('mggAAAHicY2NgYGADYgEg5gViDiBmYYAAGM0KxOxQDGIbzi8DkkwYWA5IYsOMODAEAACm8QJc==');
Result:= FindDTM(Prayer, X, Y, MIX1, MIY1, MIX2, MIY2);
end;
end;
Function MorePrayerPoints: boolean;
begin
MarkTime(T);
repeat
if ((OutOfPrayer) or (PrayerLevel <= DrinkPrayer)) and (FindDTM(Prayer, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
if (GetCurrentTab <> Tab_Inv) then
GameTab(Tab_Inv);
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['rink', 'rayer', 'lask', 'rayer flask', 'rayer pot'], 600)) then
begin
Wait(RandomRange(550, 40));
ClickMouse2(True);
Wait(2000 + Random(500));
Result:= (not OutOfPrayer);
if Result then
TurnPrayerOn;
end;
end;
until((TimeFromMark(T) > 5000) or (PrayerLevel >= DrinkPrayer));
Result:= IsPrayerOn or (not OutOfPrayer) or GotPrayer;
TurnPrayerOn;
end;
Function RenewPrayer: boolean;
var
Prayer, X, Y, T: Integer;
begin
MarkTime(T);
LProc:= 'RenewPrayer';
repeat
if (OutOfPrayer or (PrayerLevel <= DrinkPrayer)) then
begin
if (GetCurrentTab <> Tab_Inv) then
GameTab(Tab_Inv);
Prayer:= DTMFromString('mggAAAHicY2NgYGADYgEg5gViDiBmYYAAGM0KxOxQDGIbzi8DkkwYWA5IYsOMODAEAACm8QJc==');
if (not FindPrayerPot(X, Y, True)) then
if FindDTM(Prayer, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 0, 0);
if (WaitUptextMulti(['rayer ', 'Prayer flask', 'lask'], 500)) then
begin
ClickMouse2(True);
Wait(1000);
Result:= (not OutOfPrayer);
if Result then
TurnPrayerOn;
end;
end else
Result:= False;
FreeDTM(Prayer);
end else
Break;
until((TimeFromMark(T) > 5000) or (Result));
T:= 0;
Wait(1000);
Result:= IsPrayerOn or (not OutOfPrayer) or GotPrayer;
TurnPrayerOn;
end;
Procedure Proggy;
var
XP, XpHr: Integer;
begin
XP := GetXPBar(WhichXPBar) - StartXP;
begin
XpHr := ((3600*XP)/(PlayerWorked(0)/1000));
ClearDebug;
writeln(' TigerChinner v1.2');
writeln(' Time Running: ' + MsToTime(PlayerWorked(0), Time_Abbrev));
writeln(' Gained XP: ' + ToStr(XP));
writeln(' XP per hour: ' + ToStr(XpHr));
writeln('');
end;
end;
Procedure PrintSmart;
var
XP, XpHr: Integer;
Exp, ExpHr: String;
begin
XP := GetXPBar(WhichXPBar) - StartXP;
XpHr := ((3600*XP)/(PlayerWorked(0)/1000));
Exp := ToStr(XP) + ' XP Gained';
ExpHr := ToStr(XpHr) + ' XP/Hour';
SMART_ClearCanvas;
SMART_DrawText(10, 303, SmallChars, Exp, clWhite);
SMART_DrawText(10, 320, SmallChars, ExpHr, clWhite);
end;
Procedure GottaEat;
begin
MarkTime(Eat);
if (FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
repeat
FindNormalRandoms;
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['hark', 'Eat', 'shark'], 600)) then
Wait(RandomRange(850, 40));
ClickMouse2(True);
Wait(1000 + Random(500));
if (not FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2)) then
break;
until((TimeFromMark(Eat) > 3000) or (HPLevel >= WhenToEat));
end;
end;
Function HPChecking: Boolean;
begin
if (HPLevel < WhenToEat) and (FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
repeat
FindNormalRandoms;
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['hark', 'Eat', 'shark'], 600)) then
Wait(RandomRange(850, 40));
ClickMouse2(True);
Wait(1000 + Random(500));
if (not FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2)) then
break;
until ((HPLevel > WhenToEat));
end;
Result := (HPLevel > WhenToEat);
end;
Function PrayerFailSafe: Boolean;
begin
Result := True;
if ((OutOfPrayer) or (PrayerLevel <= DrinkPrayer)) then
begin
Result := False;
FindNormalRandoms;
writeln('Attempting to restore prayer. Make sure you have potions!');
Result := MorePrayerPoints;
Wait(1000 + Random(500));
end;
end;
Procedure DrinkRangePot;
begin
if (TimeFromMark(DrinkRange) > RangePotMins * 60 * 1000) then
Writeln('Taking a shot of ranging potion.')
else
Exit;
begin
if FindDTM(RangePot, X, Y, MIX1, MIY1, MIX2, MIY2) or FindDTM(ExtremeRange, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['rink', 'anging', 'otion', 'xtreme'], 600)) then
Wait(RandomRange(1500, 40));
ClickMouse2(True);
MarkTime(DrinkRange);
end;
end;
end;
Procedure HealPoison;
begin
if (PoisonCheck) and (FindDTM(AntiPoison, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['rink', 'nti', 'oison'], 600)) then
Wait(RandomRange(850, 40));
ClickMouse2(True);
Wait(2000 + Random(500));
end;
end;
Procedure PrayerTooLow;
begin
if ((PrayerLevel < TooLowLevel) or (HPLevel < TooLowLevel)) and (FindDTM(VarrockTele, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(x, y, 3, 3);
if (WaitUptextMulti(['reak', 'arrock', 'arrock tele', 'eleport'], 600)) then
ClickMouse2(True);
Wait(5000 + Random(1000));
Writeln('We teleported and logged out.');
repeat
Logout;
until (not(LoggedIn));
FreeStuff;
TerminateScript();
end else
begin
if ((PrayerLevel < TooLowLevel) or (HPLevel < TooLowLevel)) then
begin
writeln('Your prayer level is too low, logging out!');
Logout;
FreeStuff;
TerminateScript();
end else
if ((PrayerLevel > TooLowLevel) and (HPLevel > TooLowLevel)) then
writeln('Your HP and Prayer levels are fine.');
end;
end;
Procedure MainLoop;
begin
if (HPLevel < WhenToEat) then
begin
GottaEat;
end else
begin
PrayerTooLow;
FindNormalRandoms;
if HPChecking then
if PrayerFailSafe then
if (PrayerLevel >= DrinkPrayer) then
begin
DrinkRangePot;
HealPoison;
if (TimeFromMark(AntibanAFK) > MinsPerAntiban * 60 * 1000) then
begin
Antiban;
MarkTime(AntibanAFK);
end;
FindNormalRandoms;
TurnPrayerOn;
ItsGeauxTime;
Proggy;
PrintSmart;
end;
end;
end;
begin
Smart_Server := 27;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
CallStuff;
DeclarePlayers;
LoginPlayer;
AddOnTerminate('FreeStuff')
ClearDebug;
SetAngle(SRL_ANGLE_HIGH);
StartXP := GetXPBar(WhichXPBar);
Writeln('Wear a Ring of Life for safety!')
Writeln('Waiting for a few seconds in case you forgot.')
Wait(2000 + Random (2000))
Writeln('Script starting.')
repeat
FindNormalRandoms;
MainLoop;
until(not (LoggedIn));
FreeStuff;
TerminateScript();
end.Made changes from what Brandon said, was planning to do that anyway. Thanks for the input!
XP/hr is nice as well :D