SRL Archive - Archive

mormonman - SRL Member Application Form


mormonman

2009-02-24 00:11:50

<!– BEGIN TEMPLATE: formanswers –>
mormonman - SRL Member Application Form
mormonman

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
Small amounts of PHP and Delphi

Other Communitys
Scunerape, RsBot

How Long have You Played Runescape
5 years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

I have been learning scripting and other programming the whole time I have been here. I have tried to be helpful to all. Thank you!

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

{to do list:

}
program StickSmither;
{.Include SRL/SRL/Misc/Smart.scar}
{.Include SRL/SRL.SCAR}
{.Include SRL/SRL/Skill/Smithing.scar}

Type
Bar = Record
Kind, Anvil : String;
Col : Integer;
Up : TStringArray;
end;

Item = Record
Name : String;
Bars : Integer;
Up : TStringArray;
Scroll : Boolean;
end;

//idea from text.scar
ScreenChoice = (BankScreen, SmithingScreen);

var Hammer : Boolean; x, y, a, Loads, AllLoads, LevelsGained : Integer; Bars : Bar; Items : Item; MySRL, MySRLx : String;

const

{ // SRL-Stats \\ }
YourSRLID = ''; // SRL-Stats I.D.
YourSRLPassword = ''; // SRL-Stats PW
{ \\ SRL-Stats // }
Debug = False; //leave as false
{SMARTSETUP}
//Signed
Signed = True;
//World(Doesn't matter if Signed)
SmartWorld = 8;
//Members
Members = False;
{END of SMARTSETUP}

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Pin := '0000'; //Leave '0000' if you don't have one.
Players[0].Active := True;
Players[0].Integers[0] := 5; //Loads to do before switching(5-8 recommended).
Players[0].Integers[2] := 2; //Rounds of Loads to do before setting player false.
Players[0].Strings[0] := ''; //Bar Type. Choices: bronze, iron, steel,
// mithril, adamant, rune.
Players[0].Strings[1] := ''; // Item To Smith. Choices: Dagger, Axe,
// Med Helm, Bolts, Sword, Nails,
// Arrowtips, Scimitar, Knife,
// Longsword, Full Helm, Square,
// Warhammer, BattleAxe, Chain, Skirt,
// Kite, TwoHand, Legs, PlateBody,
// Dart, Mace, Claws.

end;

////////////Don't Touch Anything Below This!!//////////////

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// Start of Script \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}


procedure SetVars;
begin
Case lowercase(Players[CurrentPlayer].Strings[0]) of
'bronze' :
begin
Bars.Kind := 'Bronze';
Bars.Col := 2242890;
Bars.Up := ['ronze', 'nze bar'];
end;
'iron' :
begin
Bars.Kind := 'Iron';
Bars.Col := 5000530;
Bars.Up := ['ron', 'on bar'];
end;
'steel' :
begin
Bars.Kind := 'Steel';
Bars.Col := 7368824;
Bars.Up := ['teel', 'eel bar'];
end;
'mithril', 'mith' :
begin
Bars.Kind := 'Mithril';
Bars.Col := 6111295;
Bars.Up := ['ithril', 'ril bar'];
end;
'adamant', 'adamantite' :
begin
Bars.Kind := 'Adamantite';
Bars.Col := 4346433;
Bars.Up := ['damant', 'mantite', 'tite bar'];
end;
'rune', 'runite' :
begin
Bars.Kind := 'Runite';
Bars.Col := 6511172;
Bars.Up := ['unite', 'nite bar'];
end;
end;
Bars.Anvil := 'nvil';
Case lowercase(Players[CurrentPlayer].Strings[1]) of
'dagger' :
begin
Items.Name := 'agger';
Items.Bars := 1;
Items.Scroll := False;
end;
'axe' :
begin
Items.Name := 'Axe';
Items.Bars := 1;
Items.Scroll := False;
end;
'mace' :
begin
Items.Name := 'Mace';
Items.Bars := 1;
Items.Scroll := False;
end;
'med helm' :
begin
Items.Name := 'edium helm';
Items.Bars := 1;
Items.Scroll := False;
end;
'bolts' :
begin
Items.Name := 'ossbow bolts';
Items.Bars := 1;
Items.Scroll := False;
end;
'sword' :
begin
Items.Name := 'Sword';
Items.Bars := 1;
Items.Scroll := False;
end;
'nails' :
begin
Items.Name := 'ails';
Items.Bars := 1;
Items.Scroll := False;
end;
'arrowtips' :
begin
Items.Name := 'rrow tips';
Items.Bars := 1;
Items.Scroll := False;
end;
'scimitar' :
begin
Items.Name := 'cimitar';
Items.Bars := 2;
Items.Scroll := False;
end;
'longsword' :
begin
Items.Name := 'ongsword';
Items.Bars := 2;
Items.Scroll := False;
end;
'full helm' :
begin
Items.Name := 'ull helm';
Items.Bars := 2;
Items.Scroll := False;
end;
'square' :
begin
Items.Name := 'quare shield';
Items.Bars := 2;
Items.Scroll := False;
end;
'warhammer' :
begin
Items.Name := 'arhammer';
Items.Bars := 3;
Items.Scroll := False;
end;
'battleaxe' :
begin
Items.Name := 'attleaxe';
Items.Bars := 3;
Items.Scroll := False;
end;
'chain' :
begin
Items.Name := 'hainbody';
Items.Bars := 3;
Items.Scroll := True;
end;
'kite' :
begin
Items.Name := 'iteshield';
Items.Bars := 3;
Items.Scroll := True;
end;
'twohand' :
begin
Items.Name := 'anded sword';
Items.Bars := 3;
Items.Scroll := True;
end;
'legs' :
begin
Items.Name := 'latelegs';
Items.Bars := 3;
Items.Scroll := True;
end;
'platebody' :
begin
Items.Name := 'latebody';
Items.Bars := 5;
Items.Scroll := True;
end;
'skirt' :
begin
Items.Name := 'lateskirt';
Items.Bars := 3;
Items.Scroll := True;
end;
'knife' :
begin
Items.Name := 'hrowing';
Items.Bars := 1;
Items.Scroll := False;
end;
'dart' :
begin
Items.Name := 'art tips';
Items.Bars := 1;
Items.Scroll := False;
end;
'claws' :
begin
Items.Name := 'laws';
Items.Bars := 2;
Items.Scroll := True;
end;
end;
end;

///////////////////////////////////////////////////////////

function HammerDTM : Integer; //hammer dtm
begin
Result := DTMFromString('78DA63F4636260606464400681E65C0C72401' +
'A24FA1F0818A3816A7E32A00146241248BB03D5F031E257E3C584' +
'C4C3A1C61FA88605BF1A00F487075E');
end;

///////////////////////////////////////////////////////////

function Barz: Integer;
var
BMP: TDTMPointDef;
BSP: Array [0..5] of TDTMPointDef;
BARDTM: TDTM;
begin
BMP.x := 977;
BMP.y := 303;
BMP.AreaSize := 2;
BMP.AreaShape := 0;
BMP.Color := Bars.Col;
BMP.Tolerance := 15;

BSP[0].x := 977;
BSP[0].y := 303;
BSP[0].AreaSize := 2;
BSP[0].AreaShape := 0;
BSP[0].Color := Bars.Col;
BSP[0].Tolerance := 15;

BSP[1].x := 987;
BSP[1].y := 300;
BSP[1].AreaSize := 0;
BSP[1].AreaShape := 0;
BSP[1].Color := 65536;
BSP[1].Tolerance := 5;

BSP[2].x := 992;
BSP[2].y := 305;
BSP[2].AreaSize := 0;
BSP[2].AreaShape := 0;
BSP[2].Color := 65536;
BSP[2].Tolerance := 5;

BSP[3].x := 986;
BSP[3].y := 312;
BSP[3].AreaSize := 0;
BSP[3].AreaShape := 0;
BSP[3].Color := 65536;
BSP[3].Tolerance := 5;

BSP[4].x := 974;
BSP[4].y := 316;
BSP[4].AreaSize := 0;
BSP[4].AreaShape := 0;
BSP[4].Color := 65536;
BSP[4].Tolerance := 5;

BSP[5].x := 965;
BSP[5].y := 311;
BSP[5].AreaSize := 0;
BSP[5].AreaShape := 0;
BSP[5].Color := 65536;
BSP[5].Tolerance := 5;

BARDTM.MainPoint := BMP;
BARDTM.SubPoints := BSP;
Result := AddDTM(BARDTM);
end;

///////////////////////////////////////////////////////////

procedure SetHammer(T : Boolean);
begin
Hammer := T;
end;

function BarUpText : Boolean;
begin
Result := IsUptextMultiCustom(Bars.Up);
end;

function ScreenWait(Screen : ScreenChoice; Seconds : Integer) : Boolean;
var T : LongInt; S : Integer;
begin
S := Seconds * 1000;
if not LoggedIn then Exit;
Result := Screen;
MarkTime(T);
repeat
Wait(100);
until Result or (TimeFromMark(T) >= S);
if (TimeFromMark(T) >= S) then
begin
WriteLn('No Screen... Probably Lagged Out!');
Exit;
end;
end;

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// Start of Weird Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

///////////////////////////////////////////////////////////

Function IsOption(Text : String): Boolean; //Cazax's function... should be in
Var //srl cuz its great!
TPA : TPointArray; //(I added if not Result part)
Box : TBox;
Begin
FindColorsTolerance(TPA, 4674653, 0, 0, 764, 502, 5);
Box := GetTPABounds(TPA);
Result := FindText(X, Y, Text, UpChars, Box.X1, Box.Y1, Box.X2, Box.Y2);
if not Result then
srl_Warn('IsOption', 'Option Not Found', warn_AllVersions);
End;

///////////////////////////////////////////////////////////

Function IsOptionMulti(Text : TStringArray): Boolean; {Changed it to help me!}
Var I : Integer;
Begin
For I:=0 To High(Text) do
If IsOption(Text[I]) Then
Begin
Result := True;
Exit;
End;
End;

///////////////////////////////////////////////////////////

function IfIsOptionChooseEx(cx, cy : Integer; randomx, randomy : Integer; MaxWait : Integer; ChooseThis : TStringArray; Click, Move : Boolean) : Boolean;
var T : Integer;
begin
MarkTime(T);
if Click then Mouse(cx, cy, randomx, randomy, False);
repeat
Wait(300);
until (IsOptionMulti(ChooseThis) or (TimeFromMark(T)>= MaxWait));
if (TimeFromMark(T)>= MaxWait) and Move then
begin
MMouse(cx - 50, cy, 15, 15);
Result := False;
end;
Result := ChooseOptionMulti(ChooseThis);

end;

///////////////////////////////////////////////////////////

function IfIsOptionChoose(MaxWait: Integer; ChooseThis : TStringArray; Move : Boolean) : Boolean;
begin
Result := IfIsOptionChooseEx(0, 0, 0, 0, MaxWait, ChooseThis, False, Move);
end;

///////////////////////////////////////////////////////////

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// End of Weird Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

///////////////////////////////////////////////////////////

function CountItemsDTMs(DTMs: TIntegerArray; Including: Boolean): integer; //thnx lordsaturn, even though you didn't want credits!
var
i, Hi, c: integer;
begin
if not Including then Result := InvCount;
Hi := High(DTMs);
if Hi < 0 then Exit;
for i := 0 to Hi do
begin
c := CountItems(DTMs[i], 'dtm', []);
if Including then
IncEx(Result, c)
else
DecEx(Result, c);
end;
if Debug then WriteLn(IntToStr(Result));
end;

///////////////////////////////////////////////////////////

function CountBarsInInv : Integer;
var barss : Integer;
begin
barss := Barz;
Result := CountItemsDTMs([Barss], True);
FreeDTM(Barz);
end;

///////////////////////////////////////////////////////////

function CountItemsSmithed : Integer;
var barss, hamm : Integer;
begin
barss := Barz;
hamm := DTMFromString('78DA63F4636260606464400681E65C0C72401' +
'A24FA1F0818A3816A7E32A00146241248BB03D5F031E257E3C584' +
'C4C3A1C61FA88605BF1A00F487075E');
Result := CountItemsDTMs([Hamm, barss], False);
FreeDTM(Barz);
FreeDTM(Hamm);
end;

///////////////////////////////////////////////////////////

function HammerOnly : Boolean;
var H, I : Integer;
begin
I := HammerDTM;
if FindDTM(I, x, y, MIX1, MIY1, MIX2, MIY2) then Result := True;
for H := 2 to 28 do
begin
if ExistsItem(H) then Result := False;
if not Result then Break;
end;
FreeDTM(I);
end;

///////////////////////////////////////////////////////////

function DepositAllButHammer : Boolean;
var H, I : Integer; TB : TBox;
begin
I := HammerDTM;
for H := 1 to 28 do
begin
TB := InvBox(H);
if ExistsItem(H) then
if not FindDTM(I, x, y, TB.X1, TB.Y1, TB.X2, TB.Y2) then
begin
MouseItem(H, False);
if not IfIsOptionChoose(4000, ['All'], False) then
ChooseOption('Deposit All');
Wait(RandomRange(800, 1000));
end;
end;
if HammerOnly then Result := True;
end;
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// Start of Random Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

///////////////////////////////////////////////////////////

procedure WalkAnvil; forward;
procedure WalkBank; forward;
function GetLocation : String; forward;

function HandleFight : Boolean;
var L : Integer; Loc, Color : String;
begin
Loc := Players[CurrentPlayer].Loc
Result := FindFight;
if Result then
begin
L := GetMMLevels('run', Color);
if (L >= 15) then SetRun(True);
Case Loc of
'Bank' :
begin
WalkAnvil;
end;
'Anvil' :
begin
WalkBank;
end;
end;
Flag;
if FindFight then {failsafe...}
begin
RunAway('n', False, 1, 4000);
GetLocation;
end;
end;
end;

///////////////////////////////////////////////////////////

function Randoms : Boolean; //too lazy to type findnormalrandoms...
var I : Integer;
begin
for I := 1 to 2 do
begin
case I of
1: Result := FindNormalRandoms;
2: Result := HandleFight;
end;
if Result then Break;
end;
end;

///////////////////////////////////////////////////////////

procedure FastAB;
begin
if not LoggedIn then Exit;
Case Random(13) of
1,9 : PickUpMouse;
2..5, 12 : SleepAndMoveMouse(500+random(1000));
6..8 : RandomRClick;
end;
end;

///////////////////////////////////////////////////////////

procedure WhileAB;
begin
if not LoggedIn then Exit;
case Random(40) of
10, 20, 30: Wait(500+random(7000));
1: begin
MakeCompass('E');
Wait(25+random(5));
MakeCompass('S');
Wait(25+random(5));
MakeCompass('W');
Wait(25+random(5));
MakeCompass('N');
Wait(random(200));
end;
2..5, 35: begin
HoverSkill('smithing' ,false);
Wait(random(2000));
GameTab(4);
end;
3, 15, 31..34: FastAB;
4, 7, 40: MouseBox(MSX1,MSY1,MSX2,MSY2,3);
6, 17, 23: MMouse(Random(500),Random(500), 15, 15);
end;
end;

///////////////////////////////////////////////////////////

{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}
// End of Random Functions \\
{-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-}

function GetSmithingLevel(Start : Boolean) : Boolean;
var
SmithLvl : Integer;
begin
Players[CurrentPlayer].Level[8] := GetSkillInfo('strength', False);
SmithLvl := GetSkillInfo('smithing', False);
if Start then
begin
Players[CurrentPlayer].Integers[3] := SmithLvl;
end;
Players[CurrentPlayer].Integers[4] := SmithLvl;
if SmithLvl > 0 then
begin
Result := True;
Writeln('Smithing lvl = ' + IntToStr(SmithLvl));
end
else
begin
Result := False;
Writeln('Error with getting Smithing lvl.');
Players[CurrentPlayer].Rand := 'Error getting Smithing lvl.';
LogOut;
Players[CurrentPlayer].Active := False;
end;
end;

function DTMS(Which : String) : Integer; //NOT DYNAMIC I KNOW, BUT I COULDN'T
var // GET THE OTHER WAY TO WORK FOR ME!
dtmMainPoint: TDTMPointDef; // PLUS I CAN EDIT THESE FASTER!
dtmSubPoints: Array of TDTMPointDef;
TempTDTM: TDTM;
begin
case lowercase(Which) of
'walkbank' :
begin //walk to bankers
SetArrayLength(dtmSubPoints, 6);
dtmMainPoint.x := 964;
dtmMainPoint.y := 219;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 15527148;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 964;
dtmSubPoints[0].y := 219;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 15527148;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 970;
dtmSubPoints[1].y := 218;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 928;
dtmSubPoints[2].y := 215;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 928;
dtmSubPoints[3].y := 225;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 30;

dtmSubPoints[4].x := 971;
dtmSubPoints[4].y := 226;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 964;
dtmSubPoints[5].y := 231;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 65536;
dtmSubPoints[5].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'blackness' :
begin
SetArrayLength(dtmSubPoints, 6);
dtmMainPoint.x := 964;
dtmMainPoint.y := 219;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 15527148;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 964;
dtmSubPoints[0].y := 219;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 15527148;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 972;
dtmSubPoints[1].y := 226;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 65536;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 972;
dtmSubPoints[2].y := 231;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 65536;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 964;
dtmSubPoints[3].y := 231;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 5;

dtmSubPoints[4].x := 968;
dtmSubPoints[4].y := 230;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 965;
dtmSubPoints[5].y := 229;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 65536;
dtmSubPoints[5].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'inbank' :
begin
SetArrayLength(dtmSubPoints, 5);
dtmMainPoint.x := 1162;
dtmMainPoint.y := 163;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 195836;
dtmMainPoint.Tolerance := 30;

dtmSubPoints[0].x := 1162;
dtmSubPoints[0].y := 163;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 195836;
dtmSubPoints[0].Tolerance := 30;

dtmSubPoints[1].x := 1118;
dtmSubPoints[1].y := 168;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1119;
dtmSubPoints[2].y := 212;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1163;
dtmSubPoints[3].y := 203;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 30;

dtmSubPoints[4].x := 1118;
dtmSubPoints[4].y := 184;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 195836;
dtmSubPoints[4].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'ladders' :
begin
SetArrayLength(dtmSubPoints, 3);
dtmMainPoint.x := 672;
dtmMainPoint.y := 286;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := a;
dtmMainPoint.Tolerance := 20;

dtmSubPoints[0].x := 672;
dtmSubPoints[0].y := 286;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := a;
dtmSubPoints[0].Tolerance := 20;

dtmSubPoints[1].x := 622;
dtmSubPoints[1].y := 263;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := a;
dtmSubPoints[1].Tolerance := 20;

dtmSubPoints[2].x := 678;
dtmSubPoints[2].y := 207;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := a;
dtmSubPoints[2].Tolerance := 20;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'middle' :
begin
SetArrayLength(dtmSubPoints, 4);
dtmMainPoint.x := 652;
dtmMainPoint.y := 177;
dtmMainPoint.AreaSize := 4;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := a;
dtmMainPoint.Tolerance := 20;

dtmSubPoints[0].x := 652;
dtmSubPoints[0].y := 177;
dtmSubPoints[0].AreaSize := 4;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := a;
dtmSubPoints[0].Tolerance := 20;

dtmSubPoints[1].x := 673;
dtmSubPoints[1].y := 299;
dtmSubPoints[1].AreaSize := 4;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := a;
dtmSubPoints[1].Tolerance := 20;

dtmSubPoints[2].x := 679;
dtmSubPoints[2].y := 224;
dtmSubPoints[2].AreaSize := 4;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := a;
dtmSubPoints[2].Tolerance := 20;

dtmSubPoints[3].x := 624;
dtmSubPoints[3].y := 281;
dtmSubPoints[3].AreaSize := 4;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := a;
dtmSubPoints[3].Tolerance := 20;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'anvilblack' :
begin
SetArrayLength(dtmSubPoints, 6);
dtmMainPoint.x := 638;
dtmMainPoint.y := 155;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 6520976;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 638;
dtmSubPoints[0].y := 155;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6520976;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 639;
dtmSubPoints[1].y := 120;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 65536;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 649;
dtmSubPoints[2].y := 120;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 65536;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 649;
dtmSubPoints[3].y := 125;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 5;

dtmSubPoints[4].x := 640;
dtmSubPoints[4].y := 125;
dtmSubPoints[4].AreaSize := 2;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 646;
dtmSubPoints[5].y := 113;
dtmSubPoints[5].AreaSize := 2;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 195836;
dtmSubPoints[5].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
'anvilfailsafe' :
begin
SetArrayLength(dtmSubPoints, 7);
dtmMainPoint.x := 636;
dtmMainPoint.y := 155;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 6520976;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 636;
dtmSubPoints[0].y := 155;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 6520976;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 639;
dtmSubPoints[1].y := 120;
dtmSubPoints[1].AreaSize := 2;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 65536;
dtmSubPoints[1].Tolerance := 5;

dtmSubPoints[2].x := 649;
dtmSubPoints[2].y := 120;
dtmSubPoints[2].AreaSize := 2;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 65536;
dtmSubPoints[2].Tolerance := 5;

dtmSubPoints[3].x := 649;
dtmSubPoints[3].y := 125;
dtmSubPoints[3].AreaSize := 2;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 65536;
dtmSubPoints[3].Tolerance := 5;

dtmSubPoints[4].x := 640;
dtmSubPoints[4].y := 125;
dtmSubPoints[4].AreaSize := 2;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 65536;
dtmSubPoints[4].Tolerance := 5;

dtmSubPoints[5].x := 646;
dtmSubPoints[5].y := 107;
dtmSubPoints[5].AreaSize := 2;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 65536;
dtmSubPoints[5].Tolerance := 5;

dtmSubPoints[6].x := 647;
dtmSubPoints[6].y := 115;
dtmSubPoints[6].AreaSize := 2;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 65536;
dtmSubPoints[6].Tolerance := 5;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
end;

function GetLocation : String;
var InBanks, Anvils{, Middles} : Integer;
begin
a := FindLadderColor;
InBanks := DTMS('inbank');
Anvils := DTMS('ladders');
{Middles := DTMS('middle');
if DTMRotated(Middles, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Middle';
Result := 'Middle';
end
else }
if DTMRotated(InBanks, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Bank';
Result := 'Bank';
end
else
if DTMRotated(Anvils, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Players[CurrentPlayer].Loc := 'Anvil';
Result := 'Anvil';
end
else
begin
WriteLn('Location Not Found!');
Result := '';
Players[CurrentPlayer].Loc := 'LocationCheckFailed';
Players[CurrentPlayer].Active := False;
Logout;
FreeDTM(InBanks);
FreeDTM(Anvils);
{FreeDTM(Middles);}
Exit;
end;
WriteLn('At ' +(Players[CurrentPlayer].Loc)+ '.');
end;

procedure WalkBank;
var Black, Bankers : Integer;
begin
if not LoggedIn then Exit;
Black := DTMS('blackness');
Bankers := DTMS('walkbank');
if DTMRotated(Black, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Bank') then
begin
WriteLn('Walked To Bank Using Blackness');
Players[CurrentPlayer].Loc := 'Bank';
end;
end
else
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Bank') then
begin
WriteLn('Walked To Bank Using Blackness');
Players[CurrentPlayer].Loc := 'Bank';
end;
end
else
if FindSymbol(x, y, 'bank') then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Bank') then
begin
WriteLn('Walked To Bank Using Blackness');
Players[CurrentPlayer].Loc := 'Bank';
end;
end
else
begin
WriteLn('Walk To Bank Failed... Setting Player False');
Players[CurrentPlayer].Loc := 'BankWalkFailed';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
FreeDTM(Bankers);
FreeDTM(Black);
end;

procedure WalkAnvil;
var Black, Failsafe : Integer;
begin
if not LoggedIn then Exit;
if (Players[CurrentPlayer].Loc = 'Anvil') then Exit;
Black := DTMS('anvilblack');
Failsafe := DTMS('anvilfailsafe');
if DTMRotated(Black, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using Blackness');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
if DTMRotated(Failsafe, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 2, 2, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using FailsafeDTM');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 3, 3, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using Anvil Symbol');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
if FindSymbol(x, y, 'guide') then
begin
Mouse(x, y, 3, 3, True);
Wait(500);
FFlag(0);
if (GetLocation = 'Anvil') then
begin
WriteLn('Walked To Anvil Using Guide Symbol');
Players[CurrentPlayer].Loc := 'Anvil';
end;
end
else
begin
WriteLn('Walk To Anvil Failed... Setting Player False');
Players[CurrentPlayer].Loc := 'AnvilWalkFailed';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
FreeDTM(Black);
FreeDTM(Failsafe);
end;

procedure GetHammer;
var H : Integer;
begin
H := HammerDTM;
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Bank') then WalkBank;
WriteLn('Getting hammer...');
MakeCompass('e');
OpenBank('vwb', False, False);
ScreenWait(BankScreen, 10);
SearchBank('hammer');
Wait(2000+random(500));
if FindDTM(H, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 3, 3, False)
Wait(1000+random(500));
IfIsOptionChoose(5000, ['ammer', 'ithdraw Ham'], True);
Wait(1000+random(500));
CloseBank;
SetHammer(True);
end
else
begin
WriteLn('Hammer Not Found In Bank.');
Players[CurrentPlayer].Loc := 'NoHammerInBank';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
FreeDTM(H);
end;

procedure HCheck(Quick : Boolean);
var H : Integer;
begin
H := HammerDTM;
if not LoggedIn then Exit;
GameTab(4);
if not FindDTM(H, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if not Quick then GetHammer;
end else SetHammer(True);
if Hammer then WriteLn('Hammer Found.')
else
begin
WriteLn('Hammer Not Found.');
Players[CurrentPlayer].Loc := 'NoHammer';
Players[CurrentPlayer].Active := False;
Logout;
end;
FreeDTM(H);
end;

function LevelUpCheck : Boolean;
begin
Result := (GetColor(104, 367) = 0) and (GetColor(470, 370) = 0) and (GetColor(98, 424) = 0);
if not Result then
Result := (GetColor(474, 427) = 0) and (GetColor(267, 426) = 0);
end;

function FindBar(InBank, Click, Inv : Boolean) : Boolean;
begin
if not LoggedIn then Exit;
if InBank then
begin
if FindDTM(Barz, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
MMouse(x, y, 0, 0);
Wait(1000+random(500));
if IsUptextMultiCustom(Bars.Up) then
Mouse(x, y, 0, 0, False);
Result := IfIsOptionChoose(5000, ['All'], False)
if not Result then Result := ChooseOption('All');
end else
begin
if Inv then
begin
WriteLn('Bar Not Found.');
Players[CurrentPlayer].Loc := 'NoBars';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;
if not InBank then
begin
GameTab(4);
if FindDTM(Barz, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if Click then
begin
WriteLn('Clicking Bar');
MMouse(x, y, 3, 3);
GetMousePos(x, y);
Result := BarUpText;
Mouse(x, y, 0, 0, True);
Wait(1000+random(500));
end
else
Result := True;
end else
begin
if Inv then
begin
WriteLn('Bar Not Found.');
Players[CurrentPlayer].Loc := 'NoBars';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;
if Result then
if Click then
WriteLn(Bars.Kind+' Bar Found.');
FreeDTM(Barz);
end;

function MyBank : Boolean;
var Bank, Time : LongInt; I : Integer;
begin
if not (Players[CurrentPlayer].Loc = 'Bank') then WalkBank;
MarkTime(Bank);
Result := BankScreen;
if not Result then
begin
repeat
if OpenBankFast('vwb') then
begin
MarkTime(Time);
repeat
Wait(50);
until (BankScreen) or (PinScreen) or (TimeFromMark(Time) >= 6000);
if PinScreen then InPin(Players[CurrentPlayer].Pin);
if Result then Break else
begin
Inc(I);
Continue;
end;
end;
until (BankScreen) or (I >= 10);
if (I >= 10) then
begin
WriteLn('Bank not opened.');
Players[CurrentPlayer].Loc := 'NoBank';
Players[CurrentPlayer].Active := False;
Logout;
end;
if BankScreen then FixBank;
end else Wait(500);
end;


procedure Withdraws;
var I : Integer; Close : LongInt;
begin
if not LoggedIn then Exit;
if (CountBarsInInv >= Items.Bars) then Exit;
if not HammerOnly then Exit;
if MyBank then
begin
I := 0;
repeat
FindBar(True, True, True)
Wait(1500+random(500));
Inc(I);
until (InvFull) or (I >= 8) or (CountBarsInInv >= Items.Bars);
if I >= 8 then
begin
SearchBank('bar');
Wait(2000+random(500));
I := 0;
repeat
FindBar(True, True, True)
Wait(1500+random(500));
Inc(I);
until (InvFull) or (I >= 4) or (CountBarsInInv >= Items.Bars);
end;
if I >= 4 then
begin
WriteLn('No Bars In Bank.');
Players[CurrentPlayer].Loc := 'NoBarsInBank';
Players[CurrentPlayer].Active := False;
Logout;
end;
MarkTime(Close);
repeat
CloseBank;
until (not Bankscreen) or (TimeFromMark(Close) >= 10000);
if GetSmithingLevel(False) then WriteLn('We are level ' + IntToStr(Players[CurrentPlayer].Integers[4]) + ' smithing.');
if not Bankscreen then WalkAnvil;
end;
end;

procedure Deposits;
var I : Integer;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Bank') then WalkBank;
if not HammerOnly then
begin
if MyBank then
begin
I := 0;
WriteLn('Depositing');
repeat
Deposit(2, 28, True);
Inc(I);
Wait(1000);
until (HammerOnly) or (I >= 10);
if HammerOnly then
begin
WriteLn('Items Deposited');
Inc(Loads);
Inc(AllLoads);
Inc(Players[CurrentPlayer].Integers[1]);
Inc(ReportVars[0]);
end;
if (I >= 10) then
begin
WriteLn('Depositing Error');
Players[CurrentPlayer].Loc := 'Depositing';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;
end;

function FindAnvil(Click : Boolean): Boolean;
Var
tpa : TPointArray;
atpa : T2DPointArray;
p : TPoint;
cts : Integer;
h, z : Integer;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then WalkAnvil;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.00, 0.06);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 4671308, MSX1, MSY1, MSX2, MSY2, 6);
ColorToleranceSpeed(cts);
SetColorspeed2Modifiers(0.2, 0.2);
if Length(tpa) > 20 then
begin
atpa := SplitTPAEx(tpa, 10, 10);
SortATPAFrom(atpa, p);
z := High(atpa);
for h := 0 to z do
if Length(atpa[h]) > 90 then
begin
MiddleTPAEx(atpa[h], x, y);
Wait(50 + random(100));
MMouse(x, y, 2, 2);
Wait(100 + random(50));
GetMousePos(x, y);
if Click then
begin
GetMousePos(x, y);
WriteLn('Anvil Found');
Mouse(x, y, 5, 5, False);
Result := IfIsOptionChoose(5000, [Bars.Anvil], False)
if not Result then Result := ChooseOption(Bars.Anvil);
FFlag(0);
end
else
begin
Result := True;
end;
if Result then Break;
end;
end;
end;

procedure Anvil;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then WalkAnvil;
if not FindAnvil(True) then
begin
WriteLn('Anvil Not Found... weird error');
Players[CurrentPlayer].Loc := 'NoAnvil';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;

{*******************************************************************************
Function SmithItems : Boolean;
By: n3ss3s Edited by Mormonman!
Description: Returns true if could smith the item Item.
*******************************************************************************}

function SmithItems : Boolean;
begin
If Items.Scroll Then
FixSmith(True);
If FindTextTPAEx(16777215, 10, MSX1, MSY1, MSX2, MSY2, x, y, Items.Name, statchars, Nothing) Then
begin
if (CountBarsInInv < Items.Bars) then
begin
srl_Warn('SmithItems', 'Not enough bars to smith', warn_Warning);
Exit;
end;
Mouse(x + 3, y + 3, 4, 4, False);
Result := IfIsOptionChoose(5000, ['ake All'], False)
if not Result then Result := ChooseOption('All');
end;
end;

function WaitForIt : Boolean; Forward;

procedure Load;
var LoadTime : LongInt; I : Integer;
begin
if not LoggedIn then Exit;
if not (CountBarsInInv >= Items.Bars) then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then WalkAnvil;
MarkTime(LoadTime);
I := 0;
repeat
FindBar(False, True, True);
Anvil;
ScreenWait(SmithingScreen, 5);
if SmithingScreen then Break;
begin
Inc(I);
WriteLn('Try #' +IntToStr(I));
end;
Wait(1000+random(500));
if SmithingScreen then Break;
until (SmithingScreen) or (I >= 15);
if SmithItems then
while not WaitForIt do Wait(500);
end;

function WaitForIt : Boolean;
begin
if not LoggedIn then Exit;
if not (Players[CurrentPlayer].Loc = 'Anvil') then Exit;
While (CountBarsInInv > 0) do
begin
Wait(1000);
if Randoms then
if not LoggedIn then
begin
Players[CurrentPlayer].Loc := 'RandomFail';
NextPlayer(False);
end;
if LevelUpCheck then
begin
Inc(Players[CurrentPlayer].Integers[3]);
Inc(LevelsGained);
ReportVars[1] := ReportVars[1] + 1;
Load;
end;
if not FindBar(False, False, False) then Break;
end;
if (CountBarsInInv = 0) or (not (FindBar(False, False, False))) then
Result := True;
end;

procedure SetupScript;
begin
WriteLn('Smart Loading...');
SmartSetupEx(Smartworld, Members, Signed, false);
wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
WriteLn('Smart Loaded!');
SetupSRL;
SetupSmithing;
MySRL := YourSRLID;
MySRLx := YourSRLPassword;
If MySRL = '' Then MySRL := '6199';
If MySRLx = '' Then MySRLx := 'trenton';
SRLID := MySRL;
SRLPassword := MySRLx;
ScriptID := '1172';
SRL_Procs[0] := @FastAB;//antiban for walking
DeclarePlayers;
//SetAutoingDefaults;
end;

procedure SetupPlayer;
var L : Integer; color : String;
begin
if not LoggedIn then LoginPlayer;
Loads := 0;
MakeCompass('n');
SetAngle(True);
L := GetMMLevels('run', color);
if (L >= 50) then SetRun(True) else SetRun(False);
HCheck(False);
SetVars;
GetLocation;
if not (Players[CurrentPlayer].Integers[1] >= 1) then GetSmithingLevel(True);
end;

procedure Report;
var I : Integer;
begin
SendSRLReport;
if not Debug then ClearDebug;
WriteLn(' ');
WriteLn('[------Stick Smither------]');
WriteLn('[---Made By : Mormonman---]');
WriteLn('[--Time : '+TimeRunning+'--]');
WriteLn('[--Loads : '+IntToStr(AllLoads)+'--]');
WriteLn('[---Player Stats---]');
for I := 0 to High(Players) do
begin
Writeln('[---' + IntToStr(I) + ': ' + Players[I].Nick + ': ' + Players[I].Rand +
'[Loads : ' + IntToStr(Players[I].Integers[1]) + '] ' +
'[Levels Gained : ' + (IntToStr(Players[I].Integers[4] - Players[I].Integers[3])) + '] ' +
'[Current Lvl : ' + IntToStr(Players[I].Integers[4]) + '] ' +
'[Active : ' + BoolToStr(Players[I].Active) + '] ---] ');
end;
WriteLn('[Thank you for using my script!]');
end;

procedure ScriptTerminate;
begin
if not Debug then ClearDebug;
Report;
end;

procedure LoopoftheMain;
begin
repeat//player loop
SetupPlayer;
repeat //smithing loop
Withdraws;
Load;
Deposits;
until (Loads >= Players[CurrentPlayer].Integers[0]) or (not (LoggedIn)); //end of smithing loop
if LoggedIn then NextPlayer(True)
else NextPlayer(False);
until (AllPlayersInactive);//end of player loop
end;


begin
SetupScript;
//SetupPlayer;
LoopoftheMain;
end.

——————————————————
<!– END TEMPLATE: formanswers –>

Iron Man

2009-02-24 00:39:57

Yes. I've seen you around the forums & IRC and from what I've noticed you have a nice attitude.

Just a few small things: It isn't a big deal at all, but fix your standards in WhileAB (the one being used with 2..5, 35). In FindAnvil you do GetMousePos(x, y); then move the mouse with 5, 5 randomness, that will move it just slightly (most of the time) making it seem a little bit more detectable, I suggest using 0, 0 randomness for it instead of the Mouse(x, y, 5, 5, False);.

Good luck.

NiCbaZ

2009-02-24 01:00:18

Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes < that was not copy and paste btw.

App of the month, im very impressed , very.

Records, DDTMs, TPAs, Logic, Your own personal touch .

:)

Tickyy

2009-02-24 01:41:40

Yes, Welcome to the SRL members world

see ya soon :D

NCDS

2009-02-24 02:03:13

OfCourse Yes :)

I have actually been waiting for you to apply!

Great Job with this!

Kave

2009-02-24 03:09:30

From: NiCbaZ
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes < that was not copy and paste btw.

App of the month, im very impressed , very.

Records, DDTMs, TPAs, Logic, Your own personal touch .

:)


Totally agree but add my own Yes, Your very active around the forum and have a nice attitude.

Naum

2009-02-24 03:13:32

Yes!.

You dont need the begins and ends on your 'loc' case.
Usually types have a 'T' infront of them e.g TItem.

You could also use a with do statement for your records.
But it's nice to see a jr member using types

:). Keep it up!

(lol looks like a poem :p)

Richard

2009-02-24 05:38:58

Its a very nice script, one of the best apps I've seen in a while.

Just a couple of things I noticed, your variables were all on one line, I think it looks better when they are on a different line for each type of variable (this is just personal taste):
var 
Hammer : Boolean;
x, y, a, Loads, AllLoads, LevelsGained : Integer;
Bars : Bar;
Items : Item;
MySRL, MySRLx : String;

And another thing I noticed, it won't do the job (!), you've commented out the main loop procedure in your main loop so it will compile and straight away terminate:
begin
SetupScript;
//SetupPlayer;
//LoopoftheMain;
end.

But other than that, great script, YES!

mormonman

2009-02-24 12:16:17

If you voted no, post reasons? I want some more criticism like Richard did.

Dervish

2009-02-24 13:03:09

Yes.

90/100

Richard

2009-02-24 13:12:10

I think there may be a glitch in the system, because I've seen apps before get no's without anyone saying anything about it, or people just need to get the guts to write it…

markuska815

2009-02-24 14:50:26

Yes… great script, shows advanced knowlege of SRL.

Naike

2009-02-24 15:11:47

Yas, Impressed.. Long time since that happend ;O

Rubix

2009-02-24 17:45:48

See ya soon in the SRL Members club.

(yes)

Hugolord

2009-02-24 17:49:03

I think this app comes close to Greg's, yes from me.

mixster

2009-02-24 18:39:40

Nice script overall.
Now, time for suggestions!
cases using strings for arguments are slower than those using numbers to the point it's probably faster depending on the size of your case to have a relating TStringArray that holds the strings and then you find the matching string inside that and use that index for your case, such as:

strArr := ['cheese', 'waffles', 'meow'];
index := -1;
for i := 0 to High(strArr) do
if (strArr[i] = checkText) then
begin
index := i;
break;
end;
case index of
0: Writeln('Cheese!');
1: Writeln('Waffles!');
2: Writeln('Ronroneo como una morsa!');
end;

This isn't anything crucial and may not be faster, but it looks sexier (and you can also give it a "default" branch to run this way by adding a line for "-1: " to handle stuff like invalid options).

Other than that, your case could be shortened by avoiding the repetitive assignment of Bars.Kind in each branch by just having it do Bars.Kind := Players[].Strings[], though this would mean you would need to have a set one for Mithril onwards instead of a short and long version - though you would probably want that anyway.
Like wise, your up text assignment looks like it may be able to be automated using something like Copy(Bars.Kind, 2, 5); for the first part.
A further similar point is that your item assignment could also be automated a bit more using a similar technique to the Copy() above - with the bars amount being assigned on a wider case of 'item1', 'item2', 'blah': item.bars := 1; and so on, which would greatly cut down on lines and make it less boring to scroll through :)

Your SetHammer procedure would be nice in an OOP environment, but unneeded in Scar as it must cut down on maybe a few chars per call and seems like a bit of a useless function.
The situation is similar with BarUpText - it doesn provide some shortening, but not enough in my opinion.

Your ScreenWait function shows a lack in logic - it appears it will only check to see if the Screen is there once and if not wait for a bit then return false. You may have supposed to have moved the Result assignment into the loop or something, or that may be what it is supposed to do, but it seems unlikely to me (also the exit is a waste since there's no more to be run afterwards, so should just be a "if () then Writeln();".

IsOptionMulti is generates quite a lot of redundancy - you would be better off just having IsOption then looping through the Result = FindText using the supplied string array and breaking if it finds it, which means you don't have to call extra FindColors and GetTPABounds for no reason.

IfIsOptionChooseEx is only called in IfIsOptionChoose, so unless you plan on extending it outwards, you may as well merge the two.

In CountBarsInInv, you should free barss rather than Barz, as that will just make a new DTM then free it and leave another one in the system being unreferenced completely and so slowly fill up the system (using more descriptive function names could fix this, such as getBarDTM rather than barz).

In CountItemsSmithed, there's the same problem with doing FreeDTM(Barz) rather than barss. Also, you have a hammer DTM in there, but already have a function that returns a hammer DTM for you to use and should instead use that function or remove it.

For HammerOnly - I would think doing a check on InvCount and if 2 or higher would work well - probably with a check to ensure you do have a hammer.

For DDTM's, event when not dynamic, you can shorten them a lot by using a for loop to assign the generic variables, such as:

for i := 0 to 6 do
begin
dtmSubPoints[i].AreaSize := 2;
dtmSubPoints[i].AreaShape := 0;
dtmSubPoints[i].Color := 65536;
dtmSubPoints[i].Tolerance := 5;
end;
and voila, lots of line cut! Of course, only do ones that are the same for all (usually all of the above except color will be the same). Also, for DDTM's, the MainPoint and the first array for the SubPoint don't need to be the same - the SubPoint can be different.

In GetLocation - you should probably use NextPlayer(false) instead of just logging out to ensure multiplayer is all working nicely.

WalkBank could be improved by condensing the if's as the bit after is pretty much the same since the writeln's all say the same. You could even chain them like "if not FindDTM(meh) then if not FindDTM(meow) then if not FindSymbol('bank') then exit" and you have a much shorter and less repeated code as you would only need the Mouse(x, y, 2, 2) etc. once instead of some 4/5 times. Also, if it doesn't find anything, then it won't free the two DTM's.

In FindBar you use Barz for a FindDTM, and so without assigning, you can't free it - all FreeDTM(Barz) does is create a new DTM then free that one with the other 1 (or possibly 2 if it doesn't find it the first time) remaining.

In your SetupScript/ScriptSetup, you have a default SRL stats account, which is no longer allowed per scripting guidelines set out for the community.

Most of your problems extend from lack of freeing of DTM's, which would be largely avoided by using global variables for them instead or ensuring your functions are named more descriptively so you make sure you free variables rather than function results.
(Will not vote).

JAD

2009-02-24 18:49:06

From: Dr D. Dervish
Yes.

90/100


Could you please tell him what's wrong with his script so he can improve? You gave him a grade on his program but skipped the grading.

You're obviously getting in… Good job!


@Richard, some people might have meant to say yes but missed when it came to clicking the button :p I've done that in polls before where I miss voted because I wasn't really paying attention.

Either that or some people have no reason to vote no other than they are just selfish and want the members section all to themselves.

mormonman

2009-02-24 19:34:41

ILY mixster! and thanks to everyone else for posting critques!

Tootoot222

2009-02-25 01:43:32

I vote YES! Great script, but as nauman said, you really could benefit from a with..do tutorial =p

NiCbaZ

2009-02-25 01:52:55

From: Tootoot222
I vote YES! Great script, but as nauman said, you really could benefit from a with..do tutorial =p


Why a tut il just tell me him now ( btw with do takes more code but looks nice).



With {typehere} do

with do, is a nice way of making code look nice, its used for Types … heres a script example….



type
TTut = record
Example: Integer;
End: Integer;
end;


begin
with TTut do
begin
Example := 0;
End:= 1;
end;
end.




As you can see when you call the with statment of the the record you can simply call the the Vars inside of the record without calling the name of it…

Laur€ns

2009-02-25 07:33:20

An HelloWorldScript would make more chance than this script even a leecher could make.

Ofcourse not. Big fat yes.

P1nky

2009-02-25 11:14:55

Good Job though , you could'ev prolly add some TPA's here and there :p
tho you got most covered.
YES!

Torrent of Flame

2009-02-25 12:29:08

NO MULTIPLAYER?

NO! OFC lol Best app in a long time

mormonman

2009-02-25 14:47:12

I hate white letters :p

Torrent of Flame

2009-02-25 17:06:23

<3

Nava2

2009-02-25 19:36:36

Hoo Rah.

Good luck.

Fix the standards, I like you, I hope you get in ;)

Please listen to mixster and fix up the script.

:)

Nose Smasher

2009-02-25 23:43:19

I see you finally applied ;)

Good script, good person, good luck! (You're basically in…)

Jus don't ever stop! Always look for new things to learn ;)

Hobbit

2009-02-28 00:53:48

32 yes
2 no

2 days till poll closes anyways

Welcome :)

Make sure you read all the important stickies ;)