SRL Archive - Archive

undorak7 - SRL Member Application


Lipcot

2014-12-11 12:45:05

How Long have You Played Runescape?
8 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
This one only


Are you a member of any other communities?
Powerboat


Tell us about yourself…
From: undorak7
I'm an 18 year old guy from Argentina, im currently studying bussines administration on one of the biggest universities ( or college, as you wish) on my country. I've been head of my school and have played rugby for about 6 years now. I would define myself as a cool nerd. From the outside, i look like really cool guy, plays rugby, gets good girls and stuff. But when im alone i like coding, history and learning stuff nobody cares about (in my country atleast). Im good by nature, i mean, i can't do harm on purpose to anyone, unless you provoke me.
I've lived 3 years in brazil from around 4 to 7 years old, and that made me grow up in a different environment than all my friends here, so im kind of a toad of another pond here, i've always had a different thought process than them.
I'm a scottish and gale descendant, so my customs are different from the majority of the people in my country. In my family we take values(honesty, honor, etc ,etc) really seriously.

I think this is enough about me, dont want to bore you all :)



Please show us one (or multiple) of your scripts.
program Nature_Spirit_Graahk;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

{===============================================================================
[Undorak's Nature Graahk]

[This Version of the script is to be used for SRL member application]
[Future Version will probably be released after SRL application Result]
[This must be edited for multiplayer use if wanted]
===============================================================================}

{==============================================================================}
{================================ Setup ==================================}
{==============================================================================}
const

Debug := true;
DrawOnSmart := true;
ShowScriptPaint := true;

{Account info}
Login := '';
Password := '';
DesiredWorld := '';

{Breaks}
DoBreaks := True; // Do we break? (recommended)
BreakIn := 80; // How much time between breaks? (minutes)
BreakRandomness := 10; // How much randomness to BreakIn ? (minutes)
BreakForMin := 7; // Minimum time to break for (minutes)
BreakForMax := 15; // Maximum time to break for (minutes)

DoSleep := True; // Do we Sleep?
SleepIn := 14; // How long until a long break? (hours)
SleepRandomness := 30; // How much randomness to SleepnIn ? (minutes)
SleepForMin := 4; // Minimum Sleep time (hours)
SleepForMax := 8; // Maximum sleep time (hours)

{Action Bar}
actionbar_SmallPouch := 6;
actionbar_MediumPouch := 7;
actionbar_LargePouch := 8;
actionbar_GiantPouch := 9;
actionbar_RoD := 4; //Ring Of Duelling Slot
actionbar_RepairSpell := 2; //Supports ONLY NPC contact.

{Bank}
RoDSlot:= 1; // in which bank slot do we have the RoD?
sumPouchSlot := 3; // in which bank slot do we have the graahk pouch?
Bank_presetCrafting := 1; // preset with pouches + pure ess
Bank_presetRepairing := 2; // preset with repair runes

{Colors}
GraahkHue := 0.18;
GraahkSat := 2.84;
GraahkColor := 5740000;
GraahkTol := 11;

AltarHue := 0.12;
AltarSat := 3.56;
AltarColor := 5233055;
AltarTol := 10;

CraftAltarHue := 1.39;
CraftAltarSat := 0.73;
CraftAltarColor := 5853270;
CraftAltarTol := 2;

YellowBirdHue := 0.03;
YellowBirdSat := 2.44;
YellowBirdColor := 3469039;
YellowBirdTol := 6;

ObeliskHue := 0.10;
ObeliskSat := 2.01;
ObeliskColor := 6666190;
ObeliskTol := 9;

ActionBarGPouchHue := 0.10;
ActionBarGPouchSat := 1.21;
ActionBarGPouchColor := 3491664;
ActionBarGPouchTol := 10;

RingInPackHue := 0.2;
RingInPackSat := 0.14;
RingInPackColor := 1076494;
RingInPackTol := 15;

MageHeadHue := 0.00;
MageHeadSat := 1.47;
MageHeadColor := 1184276;
MageHeadTol := 2;

{==============================================================================}
{============================= End Setup ===============================}
{========================= Do not touch below this ============================}
{==============================================================================}

var
{Break Vars}

Sbreaks, Breaks, Sleeptime, Breaktime, TimeOnBreak: integer;
breakTimer, TimeOnBreakTimer, SleepTimer: TTimeMarker;

{Proggy}

Natint, NatsMade, profit, profitPerHour, Trips, PaintBMP: integer;
NatRune, CurrentStatus, TimeTilNextBreak: string;

{Other Globals}

RingCharges: Integer;
FamiliarDying, RechargeSumm, PouchRepairment, TripIsReady, FirstTrip: boolean;

{==============================================================================}
{==============================================================================}
{==============================================================================}
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := login;
password := password;
isActive := true;
isMember := true;
World := desiredworld;
end;
currentPlayer := 0;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Prints Progress report on Debug -----------------------------------------}
{------------------------------------------------------------------------------}
procedure progressReport();
begin

profit := (NatsMade * (Natint));
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));
TimeOnBreak := round(TimeOnBreakTimer.getTime() / 60000);

if not Debug then
clearDebug();

{================================ Report ======================================}
writeLn('========================================================');
writeLn('Undoraks Nature Graahk');
writeLn('Time Run: ' + timeRunning);
writeLn('Runes Crafted: ' + intToStr(NatsMade) + ' Profit Made: ' + intToStr(profit));
writeLn('Money P/H: ' + intToStr(profitPerHour));
writeLn('Time on Break: ' + intToStr(TimeOnBreak) + ' minutes ');
writeLn('Normal Breaks Taken: ' + intToStr(breaks) + ' Long Breaks Taken:' + intToStr(sbreaks));
writeLn('========================================================');
{==============================================================================}

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Prints Progress report on screen and Debug ------------------------------}
{------------------------------------------------------------------------------}
procedure paintOnSmart();
var
doingString, moneyphString, timeString, natsString: string;
begin

if not isLoggedIn() then
exit;

TimeString := mstoTime(getTimeRunning(), TIME_BARE);
DoingString := 'Crafting Nats with Graahk';
NatsString:= (intToStr(NatsMade));
MoneyphString:= (intToStr(profitPerHour));

progressreport;
smartImage.clear;

smartImage.drawBitmap(PaintBMP, Point(2, 462));
//smartImage.drawText(DoingString, point(176, 514), upChars, false, 16777215);
smartImage.drawText(TimeString, point(161, 519), upChars, false, 16777215);
smartImage.drawText(TimeTilNextBreak, point(201, 536), upChars, false, 16777215);
smartImage.drawText(NatsString, point(194, 554), upChars, false, 16777215);
smartImage.drawText(MoneyphString, point(211, 573), upChars, false, 16777215);
smartImage.drawText(CurrentStatus, point(145, 502), upChars, false, 16777215);

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7-------------------------------------------------------------}
{Use: Performs a random antiban(short duration) -------------------------------}
{------------------------------------------------------------------------------}
procedure antiban(rand: integer);
begin
mousespeed := 25 + random(5);
case random(rand) of
0..12: smallRandomMouse(500 + random(150));
13..25: sleepAndMoveMouse(randomRange(600, 5500));
26..28: wait(randomRange(5000, 7000));
29..40: pickUpMouse();
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7-------------------------------------------------------------}
{Use: Performs a random antiban(long duration) --------------------------------}
{------------------------------------------------------------------------------}
procedure longAntiban(rand: integer);
begin

case random(rand) of
1..40: begin
CurrentStatus := 'Doing Long Antiban';
paintOnSmart;
writeLn('Simulating Checking Social Networks');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(30000, 40000));
pickUpMouse();
end;
41..61: begin
CurrentStatus := 'Doing Long Antiban';
paintOnSmart;
writeLn('Simulating Bored Human');
mouseOffClient(OFF_CLIENT_RANDOM);
wait(randomRange(6000, 8000));
pickUpMouse();
mousespeed:= 19 + random(3);
smallRandomMouse(1000 + random(500));
end;
62..102: begin
CurrentStatus := 'Doing Long Antiban';
paintOnSmart;
writeLn('Simulating Small afk');
sleepAndMoveMouse(750 + random(500));
wait(randomRange(5000, 8000));
pickUpMouse();
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Example: ---------------------------------------------------------------------}
{Uterminate('Problem Teleporting', ['DTM outdated', 'risons', 'unkown']) ------}
{------------------------------------------------------------------------------}
procedure Uterminate(problem: string; reason: TStringArray);
var
i: integer;
begin

Writeln('******************************************************');
Writeln(problem);
Writeln('Possible reasons are:');
for i := 0 to high(reason) do
begin
writeln(tostr(i) + '. ' + reason[i]);
end;
Writeln('Terminating script NOW!');
Writeln('******************************************************');
TerminateScript;

end;
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------}
procedure freeStuff;
begin
writeLn('Freeing Stuff');
smartImage.clear;
smartimage.clear;
progressreport;
FreeBitmap(PaintBMP);
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7-------------------------------------------------------------}
{Use: Clicks an object and performs antiban -----------------------------------}
{------------------------------------------------------------------------------}
function undorakObjectFinder(hue, sat: extended; W, H, filterATPAmin, filterATPAmax, colour, tolerance, clickType: integer; mouseOverText, chooseOptions: array of string; bounds: Tbox): boolean;
var
x, y, i: integer;
p: Tpoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin

if not isLoggedIn then
exit;

mainScreen.setAngle(MS_ANGLE_HIGH); //Just to be sure

//if minimap.waitPlayerMoving() then
//begin

if not (findColorsSpiralTolerance(x, y, TPA, colour, bounds, tolerance, colorSetting(2, hue, sat))) then
exit(false);

ATPA := TPA.cluster(W, H);
ATPA.filterBetween(0,4);
ATPA.filterBetween(filterATPAmin,filterATPAmax);
ATPA.sortFromMidPoint(mainscreen.playerPoint);

Antiban(1000);

if drawOnSmart then
smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
if random(10) = 1 then
missMouse(middleTPA(ATPA[i]), true)
else mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(mouseOverText, 500) then
begin
if random(20) = 4 then
begin
fastClick(MOUSE_RIGHT);
Result := chooseOption.select(chooseoptions);
break;
end;
fastClick(clickType);
result := True;
break;
end;
end;

if drawOnSmart then
smartImage.clearArea(mainscreen.getBounds());

Antiban(300);
claimSpinTicket();
closeAdWindow();
//end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks in the actionbar if GIANT POUCH is degraded ----------------------}
{------------------------------------------------------------------------------}
function checkPouch: boolean;
var
x, y: integer;
TPA: TPointArray;
begin

result := false;

if bankscreen.isOpen then // If its open we cant see the actionbar
bankscreen.close;

if not (findcolorsspiralTolerance(x, y, TPA, ActionBarGpouchColor, actionBar.getSlotBox(Actionbar_GiantPouch), ActionBarGpouchTol, colorsetting(2, ActionBarGpouchHue, ActionBarGpouchSat))) then
begin
writeln('Giant Pouch is Degraded!');
PouchRepairment := true;
result := true;
end else writeLn('Giant Pouch is CHARGED');

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks in the actionbar if RoD is degraded ------------------------------}
{------------------------------------------------------------------------------}
function checkRing: boolean;
var
x, y, ringDTM: integer;
begin
ringDTM := DTMFromString('mggAAAHicY2NgYOAHYh4gZgFiASgfBJiBWBCIOYGYiwEBxGdJMSyfKMnQViLC8PKUEoNQtSgDGxcPWA02zIgDQwAAxQMGaw==');

result := false;

if (findDTM(ringDTM, x, y, actionbar.getSlotBox(actionbar_RoD))) then
begin
writeLn('Ring has charges');
result := true;
end else
begin
ringCharges := 0;
writeLn('Ring has run out of charges!');
end;

freeDTM(ringDTM);

end;
{------------------------------------------------------------------------------}
{Credits: Clarity--------------------------------------------------------------}
{Use: Checks for the Familiar 'buff' in the actionbar -------------------------}
{Note: Familiar 'buff' must be moved to the actibonar bounds ------------------}
{------------------------------------------------------------------------------}
function familiarExpired: boolean;
var
x, y, familiarDTM: Integer;
begin
familiarDTM := DTMFromString('mrAAAAHic42BgYPACYisoDoNifyB2AWJPIJ7OyMDQA8QroBjEnsYIEZ8AYq/dzhA1TRIF12+9xaDv78OgLMrAwAo0gxkPZiSAYQAA9vYQYw==');
result := (not findDTM(familiarDTM, x, y, actionbar.getBounds()));
writeln('Familiar Expired: ' + toStr(result) );
if result then familiarDying := true;
freeDTM(familiarDTM);
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks if we are in CW bank ---------------------------------------------}
{------------------------------------------------------------------------------}
function atBank: boolean;
var
point: TPoint;
begin

if bankscreen.isopen then
bankscreen.close;

result := false;

if minimap.findSymbol(point, MM_SYMBOL_BANK, minimap.getBounds()) then
result := true;

WriteLn('At Bank: ' + ToStr(result));

end;
{------------------------------------------------------------------------------}
{Credits: Clarity -------------------------------------------------------------}
{Edited By: Undorak7 ----------------------------------------------------------}
{Use: Repairs runecrafting pouches --------------------------------------------}
{Note: Used Clarity's because lazy of getting DTM's BMP's ---------------------}
{------------------------------------------------------------------------------}
function repairPouches: boolean;
var
chatheadDTM, contactInterface, x, y, tries: integer;
scrollpoint: Tpoint;
scrollbox: Tbox;
failsafe: TTimeMarker;
label
retry;
begin

retry:

CurrentStatus := ('Reparing Pouches');
PaintOnSmart();

chatheadDTM := DTMFromString('mlwAAAHicY2dgYJAAYhEglgdifiCWBWJdBghQhtJyUHlDINYBYj0gXtO/h0FN14BhzYS9DJunHmG4t7OPob2limHhvMlgc9AxF5RmxIOhAABwMw39');
contactInterface := BitmapFromString(66, 9, 'meJyNVdFOwzAMzNYNtahFVTcmNDY' + 'JDXhAfeP7+Rje+Qlu3GS556Q0iqrW9jkX55yOl11K6ev7BzNNx+f7' + 'frzs3k79875JYbRNBftjf3MNbWWu5m69rVZ4RhTsdHX3tYcQBQvSR' + 'j5Y6PXYwgWshyAeE0Z4PYov9skwsZv345zHkm0JBTIg7Nl6VwkFni' + '+HJsvQyuXt3mKFlZL64BJVUsqi/B7/dZEq9ZCFYCFf6lh8po2Kyma' + 'zAcjQ1ZhLUEh+6Lc3tl3NwnqGx2EjlGJC2WNUppdcrLmPBBnCbeNL' + 'UCR5nV2NLpPV2X2IKWUzwaSpfsQyXwThgxVNqAtR3II1i1QVlqeHN' + 'WY2IUfkfNXYnxJKPH1Z4lmgAfHkxeVzUjMlVVt74l1uDF5csig+EY' + 'Yr1HYhOXmhzZ9FSRvsMmM1g5ppVdkFh4gqHu44/V9EPURNlgjwZHk' + '7ZS9SUVEMwJHJcUv7iN2q9wsEDy/N');
scrollBox := IntToBox(291 + random(15), 184 + random(15), 497 - random(15), 330 - random(15));
scrollPoint := scrollBox.getrandomPoint;

if not bankscreen.isopen then
begin
if bankscreen.open(BANK_CHEST_CW) then
wait(randomrange(1000, 2000));
end;

failsafe.start();
if bankscreen.isOpen(500) then
begin
repeat
sendKeys(toStr(bank_PresetRepairing), 100, 200);
wait(randomrange(250, 750));
until (not bankscreen.isOpen) or (failsafe.getTime() > 180000);
sendKeys(toStr(actionBar_RepairSpell), 100, 200);
wait(randomrange(450, 1500));
if findBitmapIn(contactInterface, x, y, mainscreen.getBounds()) then
begin
repeat
inc(tries);
mouseScroll(scrollPoint, 2 + random(2), true);
if findDTM(chatheadDTM, x, y, mainscreen.getBounds()) then
break;
wait(randomrange(400, 750));
until tries = 10 or findDTM(chatheadDTM, x, y, mainscreen.getBounds()) or (failsafe.getTime() > 9000);
Mouse((IntToBox(x + 360 - 15, y + 50 - 15, x + 360 + 15, y + 50 + 15).getrandompoint), MOUSE_LEFT, MOUSE_HUMAN);
antiban(800);
begin
repeat
conversationBox.continue(true, true);
antiban(400);
wait(gaussRangeInt(250, 600));
until conversationBox.findOption(['ouches']) or (failsafe.getTime() > 60000);
if failsafe.getTime() > 60000 then
if tries <=2 then goto retry;
conversationBox.selectOption(1);
repeat
conversationBox.continue(true, true);
antiban(1200);
wait(gaussRangeInt(150, 600));
until (not conversationBox.isOpen()) or (failsafe.getTime() > 180000);
antiban(800);
wait(gaussRangeInt(150, 600));
pouchrepairment := false;
writeln('Pouches repaired');
if bankscreen.open(BANK_CHEST_CW) then
begin
if bankscreen.isOpen then
begin
failsafe.start();
repeat
sendKeys(toStr(bank_PresetCrafting), 100, 200);
wait(gaussRangeInt(300, 700));
until (not bankscreen.isOpen) or (failsafe.getTime() > 180000);
end;
end;
freeBitmap(contactInterface);
freeDTM(chatheadDTM);
end;
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Gets a new ring from bank -----------------------------------------------}
{Note: Bank must be open already ----------------------------------------------}
{------------------------------------------------------------------------------}
function newRing: Boolean;
var
attempts: integer;
label
retry;
begin

CurrentStatus := ('Getting New Ring Of Duelling');
PaintOnSmart();

retry:

result:= false;
inc(attempts);
if bankscreen.isopen(1000) then
begin
bankscreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomrange(750, 1050));
bankscreen.withdraw(RoDSlot, 1, ['ing', 'Ring', 'Duelling', 'uelling']);
antiban(800);
wait(randomrange(400, 700));
bankscreen.close;
if not bankscreen.isopen(1000) then
begin
wait(randomrange(300, 600));
if UndorakObjectFinder(RingInPackHue, RingInPackSat, 5, 5, 0, 4, RingInPackColor, RingInPackTol, MOUSE_LEFT, ['Wear','ear','Ring', 'ing'], ['Wear','ear'], tabbackpack.getSlotBox(1)) then
begin
wait(randomrange(400, 750));
RingCharges := 8;
result := true;
Writeln('Got a new Ring Of Duelling');
end else
begin
Writeln('Failed getting new RoD');
bankscreen.open(BANK_CHEST_CW);
if attempts <= 3 then
goto retry;
if attempts > 3 then
Uterminate('Failed Getting new RoD', ['Misslicking due to color change','Run out of RoD','Unknown']);
end;
end;
end else
begin
if bankscreen.open(BANK_CHEST_CW) then
begin
if attempts <= 3 then goto retry;
if attempts > 3 then
Uterminate('Failed Getting new RoD', ['Misslicking due to color change','Run out of RoD','Unknown']);
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Opens CW bank -----------------------------------------------------------}
{Note: If its not on screen, it will move downwards or look for symbol --------}
{------------------------------------------------------------------------------}
function openBank: boolean;
var
attempts: integer;
symbolLocation: Tpoint;
moveBox: Tbox;
label
retry;
begin

retry:

if not isLoggedIn then
exit;

if not atbank then
exit(false);

result := false;

moveBox := inttobox(231, 333, 366, 382);

if bankscreen.open(BANK_CHEST_CW) then
begin
antiban(800);
if bankscreen.isOpen then
begin
writeln('Opened Bank succesfully');
if (RingCharges = 0) then
begin
NewRing;
Bankscreen.open(BANK_CHEST_CW);
if bankscreen.isOpen(1000) then
begin
antiban(800);
sendKeys(toStr(bank_PresetCrafting), 100, 200);
Wait(randomrange(500, 750));
end;
end else Writeln('Ring is Charged');
if pouchrepairment = true then
begin
RepairPouches;
Bankscreen.open(BANK_CHEST_CW);
if bankscreen.isOpen(1000) then
begin
sendKeys(toStr(bank_PresetCrafting), 100, 200);
Wait(randomrange(500, 750));
end;
end else writeln('Pouches are ok');
Result := true;
end else result := false;
end else
begin
Mouse(movebox.getRandomPoint, MOUSE_LEFT);
inc(attempts);
wait(randomrange(550, 1000));
minimap.waitPlayerMoving;
if attempts <= 3 then
begin
writeLn('Trying to find bank chest again!');
goto retry;
end else
begin
if minimap.findSymbol(symbolLocation, MM_SYMBOL_BANK, minimap.getBounds()) then
begin
MOUSE(point(symbolLocation.x-(random(-5,5)), symbolLocation.y-(random(-5,-5))), MOUSE_LEFT, MOUSE_HUMAN);
if attempts <= 4 then
begin
writeLn('trying one more time');
goto retry;
end else
begin
Uterminate('Could not find CASTLE WARS bank', ['We are somewhere with bank symbols but not castle wars', 'SRL function: bankscreen.open(bank_chest_CW) is not working properly', 'Unkown']);
end;
end else Uterminate('Could not find CASTLE WARS bank', ['We are somewhere with bank symbols but not castle wars', 'SRL function: bankscreen.open(bank_chest_CW) is not working properly', 'Unkown']);
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Gets preset 1 from bank -------------------------------------------------}
{Note: Bank must be open ------------------------------------------------------}
{------------------------------------------------------------------------------}
function preset1: boolean;
var
failSafe: TTimeMarker;
begin

failsafe.start();
repeat
sendKeys(toStr(bank_PresetCrafting), 100, 200);
wait(gaussRangeInt(300, 700));
until (not bankscreen.isOpen) or (failsafe.getTime() > 30000);

if (failsafe.getTime() > 30000) then
result := false
else result := true;

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Opens bank, retrieves summ pouch and renews familiar --------------------}
{Note: it will finish with backpack full --------------------------------------}
{------------------------------------------------------------------------------}
function restoreFamiliar: boolean;
var
x, y: integer;
TPA: TPointArray;
begin

result := false;

if openbank then
begin
bankscreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
wait(randomrange(1000, 2000));
bankscreen.withdraw(sumPouchSlot, 1, ['Spirit', 'pirit', 'graahk', 'pouch']);
wait(randomrange(1000, 2000));
bankscreen.close;
end;

if not gameTabs.isTabActive(TAB_BACKPACK) then
gameTabs.openTab(TAB_BACKPACK);

wait(randomrange(1000, 2000));
Mouse(tabbackpack.getSlotBox(1).getrandompoint, MOUSE_LEFT);
wait(randomrange(4000, 5000));
writeln('Succesfully renewed familiar');
if (findcolorsspiraltolerance(x, y, TPA, Graahkcolor, Mainscreen.getBounds(), GraahkTol, colorSetting(2, Graahkhue, GraahkSat))) then
begin
result := true;
writeln('Succesfully renewed familiar');
end else writeln('failed To renew Familiar');

if openbank then
preset1;

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks if summoning points are under 35% --------------------------------}
{------------------------------------------------------------------------------}
function RechargeSummoning: boolean;
var
Percentage: integer;
begin
percentage := actionbar.getSummoningPercent();

If percentage <= 35 then
result:= true
else result := false;

RechargeSumm := result;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Does preset1 and fills all pouches --------------------------------------}
{------------------------------------------------------------------------------}
function ReadyTrip: boolean;
var
countA, CountB, CountC, x, y: integer;
TPA: TpointArray;
label
full;
label
full2;
begin

if not isLoggedIn then
exit;

CurrentStatus := ('Filling Pouches for next trip');
PaintOnSmart();

if TripIsReady then
begin
Writeln('Pouches Are full already');
exit(true);
end;

if tabbackpack.isfull then goto full;

if openbank then
begin
if bankscreen.isopen(1000) then
begin
wait(randomrange(300, 700));
if preset1 then
begin
if bankscreen.isOpen(100) then //In case of false positive
begin
antiban(400);
Mouse((inttobox(184, 567, 208, 584)).getrandompoint, MOUSE_LEFT);
end;
wait(randomrange(300, 750));
full:
countA := Tabbackpack.count;
sendKeys(toStr(actionBar_GiantPouch), 100, 200);
tabBackpack.waitForShift(1000);
countB := Tabbackpack.count;
if CountA = CountB then
begin
case random(1, 2) of
0..1: MOUSE(actionBar.getSlotBox(Actionbar_GiantPouch).getrandompoint, MOUSE_LEFT);
2..2: MOUSE(TabBackpack.getSlotBox(5).getrandompoint, MOUSE_LEFT);
end;
wait(randomrange(300, 750));
end;
if bankscreen.isOpen(500) then
wait(randomrange(1000, 2000));
if not (findcolorsspiralTolerance(x, y, TPA, ActionBarGpouchColor, actionBar.getSlotBox(Actionbar_GiantPouch), ActionBarGpouchTol, colorsetting(2, ActionBarGpouchHue, ActionBarGpouchSat))) then
begin
PouchRepairment := True;
repairpouches;
writeln('Continuing Ready trip.');
end;
result := true;
end else result := false;
end else writeln('Bank didnt open');
end else result := false;

if tabbackpack.isfull then goto full2;

if openbank then
begin
wait(randomrange(500, 1000));
if preset1 then
begin
wait(randomrange(500, 850));
full2:
sendKeys(toStr(actionBar_SmallPouch), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
sendKeys(toStr(actionBar_MediumPouch), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
sendKeys(toStr(actionBar_LargePouch), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
end;
if openbank then
begin
if preset1 then
begin
writeln('Trip is ready');
longAntiban(5000);
TripIsReady := True;
result:= true;
end else
begin
writeln('We could not prepare for trip');
exit(false);
end;
end else Result := false;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks if Small pouch is filled -----------------------------------------}
{Note: I use this to determine that all pouches were filled -------------------}
{------------------------------------------------------------------------------}
function pouchesFilled: Boolean;
label
full;
begin

if not isLoggedIn then
exit;

if tabbackpack.isfull then goto full;

if openbank then
begin
if preset1 then
begin
full:
Mouse(tabbackpack.getSlotBox(2).getrandompoint, MOUSE_MOVE);
if isMouseOverText(['Empty','mpty'], 500) then
begin
writeln('Pouches Are already filled');
TripIsReady := True;
end else TripIsReady := False;
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Finds the Graahk and teleports ------------------------------------------}
{------------------------------------------------------------------------------}
function teleToAltar: boolean;
var
attempts: integer;
label
retry;
begin
retry:

CurrentStatus := 'Teleporting To Altar';
PaintOnSmart();

result := false;

if not isLoggedIn then
exit;

if not TripIsReady then
exit;

if not checkRing then
begin
newRing;
if openbank then
preset1;
end;

if familiarExpired then
begin
writeln('Familiar expired, restoring it before Travelling')
if restoreFamiliar then
begin
Writeln('restored familiar correctly')
end;
end;

inc(attempts);

if TripIsReady then
begin
if UndorakObjectFinder(GraahkHue, GraahkSat, 20, 10, 0, 10, GraahkColor, GraahkTol, MOUSE_LEFT, ['Interact', 'Spirit', 'nteract'], ['Interact', 'nteract'], mainscreen.getbounds()) then
begin
wait(randomrange(500, 750));
minimap.waitPlayerMoving;
antiban(400);
wait(randomrange(500, 750));
if conversationBox.selectOption(2) then
begin
antiban(400);
writeln('Teleported from Graahk');
wait(randomrange(4500, 6000));
longantiban(5000);
result:= true;
end;
end else
begin
writeln('We Could not find the Graahk calling him.');
longantiban(1000);
MOUSE((inttobox(440, 400, 450, 412)).getrandompoint, MOUSE_RIGHT, MOUSE_ACCURATE);
if chooseoption.optionsExist(['Call', 'all'], 80) then
begin
chooseoption.select(['Call', 'all'], 500);
if attempts <= 5 then goto retry;
end;
result := false;
end;
end else ReadyTrip;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Runs to the Altar -------------------------------------------------------}
{Note: Checks for summoning points, if true, recharges them -------------------}
{------------------------------------------------------------------------------}
procedure ToAltar();
var
attempts: integer;
PathToAltar: TpointArray;
PathToObelisk: TpointArray;
label
retry;
begin

retry:

if not isLoggedIn() then
exit;

if not TripIsReady then exit;

CurrentStatus := ('Running to Altar');
PaintOnSmart();

PathToAltar := [Point(196, 204), Point(211, 202), Point(230, 200), Point(252, 199), Point(273, 193), Point(292, 189), Point(309, 185), Point(333, 181), Point(348, 171), Point(360, 160), Point(371, 143), Point(388, 129), Point(401, 116), Point(430, 114), Point(450, 112), Point(472, 114), Point(494, 125), Point(506, 138)];
PathToObelisk := [Point(196, 204), Point(211, 202), Point(230, 200), Point(252, 199), Point(273, 193), Point(292, 189), Point(309, 185), Point(333, 181), Point(348, 171), Point(360, 160), Point(371, 143), Point(388, 129), Point(401, 116), Point(430, 114)];
RechargeSummoning;

if not RechargeSumm then
begin
if sps.walkPath(PathToAltar) then
begin
writeln('Running to Altar');
longantiban(5000);
end else
begin
if not sps.blindWalk(Point(500, 288)) then
begin
if attempts <= 3 then goto retry;
uTerminate('Failed running to altar', ['Sps map failed','We were not in altar zone','Colours changed','Unknown']);
end;
end;
end else
begin
if sps.walkPath(PathToObelisk) then
begin
Writeln('Going to Recharge Summ points at obelisk');
if UndorakObjectFinder(ObeliskHue, ObeliskSat, 10, 15, 0, 5, ObeliskColor, ObeliskTol, MOUSE_LEFT, ['Small','mall','Obelisk','Renew','enew'], ['Small','mall','Obelisk','Renew','enew'], mainscreen.getbounds()) then
begin
Writeln('Recharged Summoning Points succesfully');
RechargeSumm := False;
minimap.waitplayermoving;
wait(randomrange(1000, 3000));
if sps.walkPath(PathToAltar) then
begin
writeln('Running to Altar');
end else
begin
if not sps.blindWalk(Point(509, 278)) then
begin
if attempts <= 3 then goto retry;
uTerminate('Failed running to altar', ['Sps map failed','We were not in altar zone','Colours changed','Unknown']);
end;
end;
end;
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks if we are at altar -----------------------------------------------}
{Note: Searches for the yellow birds on top of the pillars --------------------}
{------------------------------------------------------------------------------}
function AtAltar: Boolean;
var
x, y: integer;
TPA: TPointArray;
begin

wait(100);

if findColorsSpiralTolerance(x, y, TPA, YellowBirdColor, mainScreen.getBounds(), YellowBirdTol, colorSetting(2, YellowBirdHue, YellowBirdSat)) then
begin
writeln('We are at Altar');
result:= true;
end else
begin
Writeln('Could not find yellow birds.');
result:= false;
end;

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Enters the nature atlar -------------------------------------------------}
{------------------------------------------------------------------------------}
function enterAltar: Boolean;
var
symbolLocation: Tpoint;
failsafe: TTimeMarker;
begin
result := false;

if not isLoggedIn then
exit;

CurrentStatus := ('Entering Altar');
PaintOnSmart();

if undorakObjectFinder(AltarHue, AltarSat, 20, 20, 0, 10, AltarColor, AltarTol, Mouse_LEFT, ['nter','uins','Mysterious'], ['nter','uins','Mysterious'], mainscreen.getbounds()) then
begin
wait(500);
minimap.isPlayerMoving;
result:= True;
if not ataltar then
begin
repeat
wait(randomrange(1000, 1500));
longantiban(4000);
until ataltar = true or (failsafe.getTime() > 30000);
wait(randomrange(250, 500)); //wait for freeze/lag
end;
end else
begin
if minimap.findSymbol(symbolLocation, MM_SYMBOL_RUNECRAFTING, minimap.getBounds()) then
begin
MOUSE(symbollocation, MOUSE_LEFT, MOUSE_HUMAN);
end;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Clicks the nature altar (make runes) ------------------------------------}
{Note: increases values for proggy --------------------------------------------}
{------------------------------------------------------------------------------}
function craftRunes: boolean;
var
NatAmount, Attempt: integer;
label
retry;
begin
retry:

if not isLoggedIn then
exit;

inc(attempt);
wait(100);

CurrentStatus := ('Crafting Runes');
PaintOnSmart();

if UndorakObjectFinder(CraftAltarHue, CraftAltarSat, 20, 20, 0, 10, CraftAltarColor, CraftAltarTol, MOUSE_LEFT, ['Altar','ltar','rune'], ['Altar','ltar','rune'], mainscreen.getbounds()) then
begin
wait(randomrange(750, 1050));
minimap.waitPlayerMoving;
wait(randomrange(500, 700));
NatAmount := getItemAmount(tabBackpack.getSlotBox(1));
inc(trips);
NatsMade := NatsMade + NatAmount;
if NatAmount > 1 then
TripIsReady := False;
Result:= true;
paintonsmart;
if NatAmount >= 100 then
begin
writeln('Succesfully crafted ' + intToStr(NatAmount) + ' Nature Runes');
progressreport;
end else
begin
writeln('Something went wrong, we did less than 100 runes');
TripIsReady := False;
Result:= True;
end;
longantiban(5000);
end else
begin
writeln('Did not click the altar, Trying one more time');
if attempt <= 6 then goto retry;
result := false;
end;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Teleports to bank using Ring Of Duelling --------------------------------}
{Note: DTM taken from Clarity's Mud rune script. Credits to him. --------------}
{------------------------------------------------------------------------------}
function teleToBank: boolean;
var
x, y, ringDTM, attempts: integer;
TPA: TPointArray;
failsafe: TTimeMarker;
label
retry;
begin
retry:

if not isLoggedIn then
exit;

CurrentStatus := ('Status: Teleporting To Bank');
PaintOnSmart();

failsafe.start();
inc(attempts);

repeat
antiban(800);
sendKeys(toStr(actionBar_RoD), 100, 200);
if not conversationBox.isOpen(random(2000, 3000)) then
begin
antiban(400);
Mouse((actionBar.getSlotBox((actionbar_RoD)).getRandomPoint), Mouse_LEFT);
conversationBox.isOpen(random(2000, 3000));
wait(randomrange(500, 1000));
end;
until conversationBox.isOpen() or (failsafe.getTime() > 30000);

if (not conversationBox.isOpen) then
begin
writeln('Conversation Box didnt open, something is wrong!');
if attempts <= 3 then goto retry;
if attempts > 3 then
Uterminate('Something went wrong with bank teleporting', ['Ring DTM is outdated', 'Started script with 1 charge in ring', 'Unknown']);
end;

wait(randomrange(250, 550));
antiban(400);

repeat
sendKeys('2', 100, 200);
wait(randomrange(500, 1000));
if (not conversationBox.isOpen) then
break;
until (failsafe.getTime() > 95000) or (not conversationBox.isOpen);

repeat
wait(randomrange(500, 1000));
antiban(400);
until atbank or (failsafe.getTime() > 120000);

wait(randomrange(2000, 3000)); //lag or freeze wait

if atBank then
writeln('At Bank')
else if attempts <= 3 then goto retry;

checkRing;

checkPouch;

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Logs in and sets FirstTrip ----------------------------------------------}
{------------------------------------------------------------------------------}
procedure customLogIn;
begin
wait(3000); //lag
players[currentPlayer].login();
writeln('waiting a bit');
wait(randomrange(4000, 5000));
exitSquealOfFortune();
minimap.clickCompass();
mainScreen.setAngle(MS_ANGLE_HIGH);
mainscreen.setZoom(true);
FirstTrip := True;
TripIsReady := false;
ringcharges := 0;
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Performs break with User's data -----------------------------------------}
{------------------------------------------------------------------------------}
procedure doBreak();
var
timeleft: integer;
totalBreak: extended;
timeInBreak: TTimemarker;
begin

TimeOnBreakTimer.start();

if not isLoggedIn() then
exit;

totalbreak := randomrange((BreakForMin*60000), (BreakForMax*60000));
CurrentStatus := ('Status: doing small break');
paintOnSmart;
clearDebug();

writeLn('Breaking For: ' + toStr(round((totalBreak/60000))) + ' Minutes');
players[currentPlayer].exitToLobby();
mouseOffClient(OFF_CLIENT_RANDOM);
timeinbreak.start();

repeat
wait(60000);
timeleft := round((round(totalBreak) - timeInBreak.getTime())/60000);
writeln('Break Time Left: ' + intToStr(timeleft) + ' minutes');
until timeinbreak.getTime() >= totalBreak;

writeln('Finished break, logging in again');
inc(breaks);
TimeOnBreakTimer.pause();

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Performs sleep break with User's data -----------------------------------}
{------------------------------------------------------------------------------}
procedure sleepBreak;
var
timeleft: integer;
totalBreak: extended;
timeInBreak: TTimemarker;
begin

TimeOnBreakTimer.start();
CurrentStatus := ('Status: Sleeping Break');
PaintOnSmart();
clearDebug();

totalBreak := randomrange((SleepForMin*60*60000), (SleepForMax*60*60000));
writeLn('Sleeping For aproximately: '+ toStr(round((totalBreak/60/60000))) + ' Hours');

players[currentPlayer].logout;
mouseOffClient(OFF_CLIENT_RANDOM);
timeinbreak.start();

repeat
wait(300000);
timeleft := round((round(totalBreak) - timeInBreak.getTime())/60/60000);
if timeleft > 1 then
begin
writeLn('Sleep Time Left : ' + intToStr(timeleft) + ' Hours');
end else
begin
timeleft := round((round(totalBreak) - timeInBreak.getTime())/60000);
writeln('Break Time Left: ' + intToStr(timeleft) + ' minutes');
end;
until timeinbreak.getTime() >= totalBreak;

writeln('Finished break, logging in again');
inc(Sbreaks);
TimeOnBreakTimer.pause();

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Checks for breaktimes and Gives time until break ------------------------}
{------------------------------------------------------------------------------}
procedure breakHandler;
begin

if DoBreaks then
if breakTimer.getTime() >= breaktime then
begin
doBreak();
breakTimer.reset();
breaktime := (BreakIn*60000) + randomrange((BreakRandomness * -60000), (BreakRandomness * 60000));
writeLn('We are breaking again in: ' + intToStr(round(breaktime/60000)) + ' minutes');
breakTimer.start();
if not isLoggedIn() then
customlogin;
end else
begin
writeLn('Time til next break: ' + intToStr(round((breaktime - breakTimer.getTime())/60000)) + ' minutes');
TimeTilNextBreak := (intToStr(round((breaktime - breakTimer.getTime())/60000))) + ' minutes';
end;

if DoSleep then
if sleeptimer.getTime() >= sleeptime then
begin
SleepBreak;
sleeptimer.reset();
sleeptimer.start();
SleepTime := (BreakIn*60000) + randomrange((BreakRandomness * -60000), (BreakRandomness * 60000));
writeLn('We are sleeping again in: ' + intToStr(round(SleepTime/60/60000)) + ' hours');
if not isLoggedIn() then
customlogin;
end else
begin
writeLn('Time til next sleep: ' + intToStr(round((SleepTime - sleepTimer.getTime())/60/60000)) + ' hours');
end;

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Gets prices from GE -----------------------------------------------------}
{------------------------------------------------------------------------------}
procedure getPrice();
var
p : string;
begin
writeln('Recieving GE Prices');
p := getPage('http://services.runescape.com/m=itemdb_rs/Nature_rune/viewitem.ws?obj=561');
NatRune := between('Current Guide Price <span>', '</span>', p);
writeln('Nature Rune: ' +toStr(Natrune));
NatRune := replace(Natrune, ',', '', [rfReplaceAll]);
Natint := strToInt(NatRune);
wait(1000);
end;
{------------------------------------------------------------------------------}
{Credits: By Kevin, modified by Clarity --------------------------------------}
{Use: Downloads needed files --------------------------------------------------}
{------------------------------------------------------------------------------}
procedure checkForFiles(filePath, message, link: string);
var
progFile: longInt;
fileName: string;
begin
fileName := AppPath + filePath;
try
if not fileExists(fileName) then
begin
writeLn('-- INSTALLATION STATUS: ' + message + ' does not exist - Downloading now.');
progFile := createFile(fileName);
end
else
begin
writeLn('-- INSTALLATION STATUS: ' + message + ' exists.');
exit;
end;
closeFile(progFile);
progFile := rewriteFile(fileName, false);
writeFileString(progFile, getPage(link));
writeLn('-- INSTALLATION STATUS: ' + message + ' has been downloaded.');
finally
if (progFile > 0) then
closeFile(progFile);
end;
end;
{------------------------------------------------------------------------------}
{Credits: ClarityMudRunes -----------------------------------------------------}
{Use: Checks if we need to download anything ----------------------------------}
{------------------------------------------------------------------------------}
procedure proggyImages;
begin
writeLn('Checking if we need to download anything');
if not directoryExists(appPath + 'scripts/UndorakGraahk/') then
begin
try
createDirectory(appPath + 'scripts/UndorakGraahk/');
writeLn('Created a new folder in Simba/Scripts/');
except
end;
end;
checkForFiles('scripts/UndorakGraahk/scriptpaint.png', 'ScriptPaint', 'http://i.imgur.com/HTjTLiV.png');
end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Sets everything up! -----------------------------------------------------}
{------------------------------------------------------------------------------}
procedure setup;
begin
smartPlugins := ['d3d9.dll'];
clearDebug();
smartEnableDrawing := true;
smartShowConsole := false;
setupSRL();
declarePlayers();

If Not Debug Then
DisableSRLDebug := True;

SPS.setup('NATS_MAP2', RUNESCAPE_OTHER);
GetPrice();

if showScriptPaint then
begin
proggyImages;
PaintBMP := loadBitmap(appPath + '/Scripts/UndorakGraahk/ScriptPaint.png');
fastReplaceColor(PaintBMP, 0, 1);
end;

if DoBreaks then
begin
breaktime := (BreakIn*60000) + randomrange((BreakRandomness * -60000), (BreakRandomness * 60000));
writeLn('We are going to break in: ' + intToStr(round(breaktime/60000)) + ' minutes');
end;

if DoSleep then
begin
sleeptime := (SleepIn*60*60000) + randomrange((SleepRandomness * -60000) , (SleepRandomness * 60000));
writeLn('We are sleeping in: ' + intToStr(round(SleepTime/60/60000)) + ' hours');
end;

addOnTerminate('freeStuff');
RingCharges := 8;
FirstTrip := True;
breakTimer.start();
sleeptimer.start();

end;
{------------------------------------------------------------------------------}
{Credits: Undorak7 ------------------------------------------------------------}
{Use: Makes things tidy :)-----------------------------------------------------}
{------------------------------------------------------------------------------}
procedure mainloop();
begin
repeat

if not isLoggedIn() then
customlogin;

breakHandler;

if not atbank then
teletobank;

if FirstTrip then
begin
minimap.clickCompass();
mainScreen.setAngle(MS_ANGLE_HIGH);
mainscreen.setZoom(true);
if openbank then
newRing;
if familiarexpired then
RestoreFamiliar;
if openbank then
preset1;
if checkPouch then
begin
if openbank then
repairPouches;
end;
if not pouchesFilled then
Readytrip;
FirstTrip := False;
writeln('First trip ready');
end;

if Readytrip then
begin
if teletoaltar then
begin
ToAltar;
EnterAltar;
if CraftRunes then
TeleToBank;
end else TeleToBank;
end;

until (false);
end;
{------------------------------------------------------------------------------}
{----------------------------------------------------------------------}
{--------------------------------------------------------------}
{------------------------------------------------------}
{----------------------------------------------}
{---------------------------------------}
{-------------------------------}
{--------MainLoop-------}
begin

Setup;
paintonsmart;
MainLoop;

end.
{--------The End--------}

Ian

2014-12-11 13:07:01

Yes! :)

Kevin

2014-12-11 13:21:50

I like you (you fit all community requirements for the members position), and I like your script. It looks more than complex enough, as well as fitting all our generic requirements.

However, as much as every other aspect tells me to vote yes (because reasonably I should), I can't commit myself to encouraging someone who uses goto commands. I won't vote at this moment because I honestly think you otherwise deserve the yes, and I will give you a chance to fix those to simple loops instead, at which point I guarantee a yes from myself.

Good luck from the rest (I expect resounding yes votes, to be fair) :)

Lipcot

2014-12-11 13:34:53

From: BMWxi
Yes! :)


From: Kevin
I like you (you fit all community requirements for the members position), and I like your script. It looks more than complex enough, as well as fitting all our generic requirements.

However, as much as every other aspect tells me to vote yes (because reasonably I should), I can't commit myself to encouraging someone who uses goto commands. I won't vote at this moment because I honestly think you otherwise deserve the yes, and I will give you a chance to fix those to simple loops instead, at which point I guarantee a yes from myself.

Good luck from the rest (I expect resounding yes votes, to be fair) :)


thank you both!

well, i had my doubts about goto commands but as i had seen them on other scripts, i decided to use them :(. Thought they were ok by SRL standards, and they are so comfortable heh. Will definetly stop using them now that it know :)

3Garrett3

2014-12-11 13:35:34

I didn't have a lot of time to look over the script, but you've done a couple things kinda funky here..

I would have appreciated it if you used the playerform, it would show your understanding of it and make me feel better about your knowledge in implementing it. I also miss the days of thinking it was weird if people didn't have multiplayer setups, but I guess that's old news now.

You've got a lot of spots where you have:


begin
Writeln('...');
end;

Why?

You're also missing indents and proper standards in some spots, which is kinda strange.

I see that you use DTMs, Bitmaps, TPAs, etc. So I'll have to look in depth before I decide my vote, but above is just the couple things that stuck out as weird to me.

Edit:

The writeln thing I'm talking about is like this:


if familiarExpired then
begin
writeln('Familiar expired, restoring it before Travelling')
if restoreFamiliar then
begin
Writeln('restored familiar correctly')
end;
end;

Like that's a lot of weirdness to me.


if familiarExpired then
if restoreFamiliar then
Writeln('restored familiar correctly')
else
Writeln('did not restore familiar correctly');

Makes a lot more sense to me anyway. Just a little thing though obviously.

Lipcot

2014-12-11 13:47:33

From: 3Garrett3
I didn't have a lot of time to look over the script, but you've done a couple things kinda funky here..

I would have appreciated it if you used the playerform, it would show your understanding of it and make me feel better about your knowledge in implementing it. I also miss the days of thinking it was weird if people didn't have multiplayer setups, but I guess that's old news now.

You've got a lot of spots where you have:


begin
Writeln('...');
end;

Why?

You're also missing indents and proper standards in some spots, which is kinda strange.

I see that you use DTMs, Bitmaps, TPAs, etc. So I'll have to look in depth before I decide my vote, but above is just the couple things that stuck out as weird to me.

Edit:

The writeln thing I'm talking about is like this:


if familiarExpired then
begin
writeln('Familiar expired, restoring it before Travelling')
if restoreFamiliar then
begin
Writeln('restored familiar correctly')
end;
end;

Like that's a lot of weirdness to me.


if familiarExpired then
if restoreFamiliar then
Writeln('restored familiar correctly')
else
Writeln('did not restore familiar correctly');

Makes a lot more sense to me anyway. Just a little thing though obviously.


Well, that about writeLN you are totally right hehe, missed that :). This is a script i finished some time ago, and i just gave it a quick glance at it and sent it, im with final exams and i wont finish with them until the 19th. I got anxious and made the submit, maybe should've checked it some more! probably when i wrote that i was expecting to add something else rather than just writeLn, but forgot :/.

in regards the multiplayer, i've never used it, i have implemented it in one other script but dont find it useful (since i had only one acc to make this) If this script does not exist in SRL member section i will adapt it for user use.
in regards to the SRL playerform, i have added it succesfully to my comp script, but totally dislike it, if find it disturbing to have to click on the SRL playerform each time i run the script.. i like just clicking the play button and done. If it was needed i could upload my Cabbage script also to show i understand the playerform :)

thx for the feedback!

3Garrett3

2014-12-11 13:54:31

From: undorak7
Well, that about writeLN you are totally right hehe, missed that :). This is a script i finished some time ago, and i just gave it a quick glance at it and sent it, im with final exams and i wont finish with them until the 19th. I got anxious and made the submit, maybe should've checked it some more! probably when i wrote that i was expecting to add something else rather than just writeLn, but forgot :/.

in regards the multiplayer, i've never used it, i have implemented it in one other script but dont find it useful (since i had only one acc to make this) If this script does not exist in SRL member section i will adapt it for user use.
in regards to the SRL playerform, i have added it succesfully to my comp script, but totally dislike it, if find it disturbing to have to click on the SRL playerform each time i run the script.. i like just clicking the play button and done. If it was needed i could upload my Cabbage script also to show i understand the playerform :)

thx for the feedback!


I don't think we need the cabbage script, I trust that if you've used it once then you're probably good. I'm going to look through the code in a bit more detail shortly and then I'll make my vote, but everything is good so far to me. I'll just edit this post when I do vote.

Good luck!

Edit:

A few weird things here or there, but you mentioned that you're trying to apply during exams and I feel your pain. Nothing sticks out as bad though, so YES.

King

2014-12-11 14:14:10

Looking through the code, I do not see much that stick out to me. I really dislike goto commands, however, I believe you chose those for ease rather than lack of knowledge. It fits the requirements from my perspective and you seem like a nice guy. Looking through forum posts I see you are helpful as well. Good luck with finals, Yes from me.

NKN

2014-12-11 14:46:10

Voted yes.

The non-goto users are just haters, ok?

(I use them slightly too.)

masterBB

2014-12-11 15:58:31

We only hate on the goto users because we really care about you guys :s

source: http://xkcd.com/292/

A tad heavy on the begins and ends, but I voted yes ;)

rj

2014-12-11 16:00:25

yes

Lipcot

2014-12-11 17:09:06

From: masterBB
We only hate on the goto users because we really care about you guys :s

source: http://xkcd.com/292/

A tad heavy on the begins and ends, but I voted yes ;)


image is so illustrative, its exactly what happened to me, but the dinosaur part :P.

I think my problem with begins/ends is that when i code, i do everything really in an unorganized way, so i go back and forth, and maybe i forget to add stuff and delete and i always do begin end in case i add anyithing later on and im my mind im like 'yeah, i'll totally correct this later if i dont add anything', but i forget heheh, will have to change my ways to make things in a more organized way :)

BTW the goto is considered kind of like cheating isnt it? because i dont really see a "bad" thing on it, but its kind of cutting corners

The Mayor

2014-12-11 17:13:33

It's pretty cluttered in places, but you clearly meet the requirements. Can you put this in a loop to avoid repetitive code? I will vote yes if you can ;)


sendKeys(toStr(actionBar_SmallPouch), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
sendKeys(toStr(actionBar_MediumPouch), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
sendKeys(toStr(actionBar_LargePouch), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));

masterBB

2014-12-11 17:29:56

From: undorak7
BTW the goto is considered kind of like cheating isnt it? because i dont really see a "bad" thing on it, but its kind of cutting corners


It is not cheating, and there are cases where it is actually really a good option.

A long long time ago, when languages were based on assembly, goto statements were the only way to go to skip to another line. They were used to create loops, functions etc. But as languages evolved other statements were created. For example: for, while, function and exit. These did the job so much better.

Nowadays there are many cons for using goto and labels. It is often not clear what happens with variables declared in a smaller scope the goto leaves or enters. It is not possible to enter or leave stuff like loops or try-catch statements. One has to be careful with goto statements, since it no longer follows the normal path through your code. It kinda breaks the flow of your script, making it harder to read, maintain and debug.

If possible, use normal structures over goto statements, it is just so much nicer.

Kevin

2014-12-11 17:33:39

From: undorak7
image is so illustrative, its exactly what happened to me, but the dinosaur part :P.

I think my problem with begins/ends is that when i code, i do everything really in an unorganized way, so i go back and forth, and maybe i forget to add stuff and delete and i always do begin end in case i add anyithing later on and im my mind im like 'yeah, i'll totally correct this later if i dont add anything', but i forget heheh, will have to change my ways to make things in a more organized way :)

BTW the goto is considered kind of like cheating isnt it? because i dont really see a "bad" thing on it, but its kind of cutting corners


You could honestly replace each goto I've looked at with about 1 line of extra code and turning the labels into for loop starts instead.

It is kind of cheating because GOTOs are actually fairly dangerous, and in the case of compiled languages, can be literally dangerous to a computer in extreme circumstances. Djikstra's Letter to the Editor on GOTO

Lipcot

2014-12-11 18:59:42

From: The Mayor
….


something like this?



var
i: integer;
TSA : TStringArray;

TSA.append(tostr(actionbar_smallpouch));
TSA.append(tostr(actionbar_mediumpouch));
TSA.append(tostr(actionbar_largepouch));
for i := 0 to high(TSA) do
begin
writeln(TSA);
writeLn('sending keys');
sendKeys((TSA[i]), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
end;


didn't test it, but it should work.. i did it like this, but could've done it as an integer array also i think. If you were expecting something else tell me and i'll try doing it in another way, this was the first that popped up into my mind :p

From: masterBB
…


well then thank you for the lesson :)

From: Kevin
….


wow! i wouldn't had expected that! will definetly stay off those diabolic "goto's". thx!!

The Mayor

2014-12-11 19:37:00

From: undorak7
something like this?



var
i: integer;
TSA : TStringArray;

TSA.append(tostr(actionbar_smallpouch));
TSA.append(tostr(actionbar_mediumpouch));
TSA.append(tostr(actionbar_largepouch));
for i := 0 to high(TSA) do
begin
writeln(TSA);
writeLn('sending keys');
sendKeys((TSA[i]), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
end;


didn't test it, but it should work.. i did it like this, but could've done it as an integer array also i think. If you were expecting something else tell me and i'll try doing it in another way, this was the first that popped up into my mind :p


Yea something like that ;) Could simply do:


var
pouchKeys: TIntegerArray;
begin
pouchKeys := [actionBar_SmallPouch, actionBar_MediumPouch, actionBar_LargePouch];

for i := 0 to high(pouchKeys) do
begin
sendKeys(toStr(pouchKeys[i]), 100, 200);
antiban(4000);
tabBackpack.waitForShift(1500);
wait(randomrange(200, 500));
end;

end;

Anyway, I already voted yes!

Lipcot

2014-12-11 22:22:13

From: The Mayor

Anyway, I already voted yes!


Cool! thanks a lot :)

BTW you are the reason why i started here(begginers tut) so double thanks!

Frement

2014-12-11 22:26:28

I actually like the goto's you used. Shame on you Kevin for hating them! Yes from me :)

Incurable

2014-12-12 04:47:18

A great attitude and a solid scripting ability, that's a yes from me. :)

John

2014-12-12 07:20:46

Voted yes, definitely worthy of SRL member.

Just out of plain interest, do you have any progress reports for this script?

Kyle

2014-12-12 09:30:34

When in doubt, "goto it out!" Definitely a yes from me!!

Ross

2014-12-12 12:34:29

I will only vote yes if you release this to SRL Mems+ and continue supporting it :)

bonsai

2014-12-12 14:51:50

I added my yes to the perfect tally.

I have to admit, I'm not a huge fan of the script. It's ok, but it looks like a basic 'mayor tut' script that grew with the clarity/bob stuff.

If I knew that you worked like a dog on it and this was a serious achievement for you, I would give you a crapload of credit. You've made a number of basic scripts and I think you know this isn't super clean or conquering any complicated challenge.

Having said that, I think you're a lovable guy and a good community member. I did review your posts and there's a lot of NOTA in there :) but there's also a great deal of helping others and being encouraging.

I wasn't surprised to read your comment about your family having strong values. I think you're actions on the forum have demonstrated that.

Enslaved

2014-12-12 18:08:05

Yes, but no more of this goto nonsense!

Lipcot

2014-12-12 21:54:32

From: John
Voted yes, definitely worthy of SRL member.

Just out of plain interest, do you have any progress reports for this script?


only this one from just now hah :P. I'm having trouble with my simba and relogging, plus my connection has been DC'ing way to much lately, so the best i've got was a 6 hour i think… But 1.3m p/h with breaks is ok i think?


From: Ross
I will only vote yes if you release this to SRL Mems+ and continue supporting it :)


Well its the idea :) , I would've believed this script already existed on SRL membs+! but yeah!

From: bonsai
I added my yes to the perfect tally.

I have to admit, I'm not a huge fan of the script. It's ok, but it looks like a basic 'mayor tut' script that grew with the clarity/bob stuff.

If I knew that you worked like a dog on it and this was a serious achievement for you, I would give you a crapload of credit. You've made a number of basic scripts and I think you know this isn't super clean or conquering any complicated challenge.

Having said that, I think you're a lovable guy and a good community member. I did review your posts and there's a lot of NOTA in there :) but there's also a great deal of helping others and being encouraging.

I wasn't surprised to read your comment about your family having strong values. I think you're actions on the forum have demonstrated that.


Well, i admit i got kinda lazy on some things on this script… Everything i took from clarity (except the Proggy image donwload) i could've done it by myself, but … why reiinveent the wheel if its already made? so i used the same stuff. I realize know that i have made a great mistake, i should've atleasst asked for his permission, i completely forgot about doing so! I credited him everywhere though, but hey, not cool what i did. So if i am to release this i will first ask clarity, and if not i'll just make my own procedure's for repair pouch and check summoning..

In regards to the Mayors tut, the script seems basic because i think there isn't much complicated things to do… i mean, this level of scripting for this script is more than enough to get it working! i don't think i could've showed many more skills with nature running, but yeah, its pretty basic.

I've been working lately on a Friend's Gilded altar script. its functional right now but needs lot of enhancing. that will prove to be more complicated and show some better skills probably :) .

I'm really looking forward to learning new stuff and advancing in my coding skills, since i'm starting to really really like it :)

From: Enslaved
Yes, but no more of this goto nonsense!


Noted! hahah i cant believe it Goto's are so hated!

PD: thanks a lot to everyone who has voted!

John

2014-12-12 22:36:51

From: undorak7
only this one from just now hah :P. I'm having trouble with my simba and relogging, plus my connection has been DC'ing way to much lately, so the best i've got was a 6 hour i think… But 1.3m p/h with breaks is ok i think?



Yeah that's good :)
Any idea how many runes an hour you craft?

Incurable

2014-12-12 23:29:17

From: John
Yeah that's good :)
Any idea how many runes an hour you craft?


Unless my math is stupidly wrong, 3500/hr.

John

2014-12-12 23:47:08

From: Incurable
Unless my math is stupidly wrong, 3500/hr.


Oh damn, I didn't see 'Runes Crafted'.

Daniel

2014-12-13 00:13:41

Your goto's are fine and nothing to worry about.

The Mayor

2014-12-14 14:42:15

From: Daniel
Your goto's are fine and nothing to worry about.


Shall we make him wait until Christmas :stirthepot:

Lipcot

2014-12-14 14:53:37

From: Daniel
Your goto's are fine and nothing to worry about.


Great then :) i see Goto's are a very controvertial thing around here!

From: The Mayor
Shall we make him wait until Christmas :stirthepot:


:santa: dissaproves!

King

2014-12-14 18:42:54

From: undorak7
Great then :) i see Goto's are a very controvertial thing around here!



:santa: dissaproves!


Yes, they depend on the person you are asking. If used correctly, they are fine, but used incorrectly they can cause issues. Yours are fine as they work well, however just be careful with em.

The Mayor

2014-12-17 18:08:45

@Daniel; @Coh3n; @Hobbit; @core;

Lipcot

2014-12-18 20:47:01

From: The Mayor
@Daniel; @Coh3n; @Hobbit; @core;


your mallevolous plans of making me wait till christmas are turning so real now! :stirthepot:

The Mayor

2014-12-18 23:28:02

From: undorak7
your mallevolous plans of making me wait till christmas are turning so real now! :stirthepot:


That's what happens when there are no active admins on the forums :p

Daniel

2014-12-19 04:41:00

In. Congratulations :)

From: The Mayor
That's what happens when there are no active admins on the forums :p


FYI, I'm now waiting at least a week before promoting members in case of things like this.