Log in

View Full Version : [SRL] AK Smelter



Pages : 1 2 3 4 5 6 7 8 9 [10]

erniedabernie
06-13-2012, 07:54 PM
| Banked | Bars | Crafted | XP | XP/Hour ]
| 54 | 0 | 1473 | 44190 | 28399 ]

Worked that one time, getting this after 2/3 banks all the time:

SwitchToPlayer(PlayerNo: 0, Active: False);

Player is not Active...

All players not active!

NextPlayer(True)

Thanks tho =)

ericrootbeer
06-14-2012, 03:10 AM
how do i get the forms to not come up :S I'm sort of confused on how to do this

kevin33
06-14-2012, 04:02 AM
Type your info in the script itself, this will disable the form.

ericrootbeer
06-14-2012, 04:03 AM
Type your info in the script itself, this will disable the form.

i typed my info into the script itself, but the form still pops up

kevin33
06-14-2012, 04:04 AM
Hmm ill take a look and edit this post with what to do. Says right in the script:
{ ATTENTION!!!
To use Forms just push play do NOT put anything in DeclarePlayers.
If you want to use DeclarePlayers fill it in (Forms should NOT come up then)}

Just use the forms its no big deal. SmartManager it is a problem though I guess. Is that why you dont want to use the forms?

ericrootbeer
06-14-2012, 04:28 AM
Hmm ill take a look and edit this post with what to do. Says right in the script:
{ ATTENTION!!!
To use Forms just push play do NOT put anything in DeclarePlayers.
If you want to use DeclarePlayers fill it in (Forms should NOT come up then)}

Just use the forms its no big deal. SmartManager it is a problem though I guess. Is that why you dont want to use the forms?

yup :S it doesn't work past the 6 hours otherwise

fastkill98
06-14-2012, 05:04 AM
This is absolutely great. Thanks :) I'll post my proggy once I'm finished :)

Product
06-14-2012, 06:29 AM
[Error] (1788:3): Unknown identifier 'ScreenShots' at line 1787
Compiling failed.

anyone help me with this?

Product
06-14-2012, 06:31 AM
just delete the line and it will work fine

afetr reading through these found out how to do, nvm my comment.

ty its running now =D

fastkill98
06-14-2012, 07:19 AM
[================================================== ===================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ===================]
[ **** | True | 02:29:40 | 115 | 1582 | 0 | 9831 | 3941 ]
[================================================== ===================]
Oh my it works. Does it work indeed. Thank you for making this.

boxing
06-14-2012, 01:21 PM
Compiled successfully in 406 ms.
SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 1, Members: True, Signed: True, Super Detail: False.
Error: Out Of Range at line 208
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Refuses to run, any help?

Twinlab
06-15-2012, 12:25 AM
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ | True | 04:28:59 | 220 | 1962 | 0 | 34444 | 7683 ]
[================================================== ====================]

Making steel bars in Al kharid, runs very smoothly. Thank you!

Lyonhart
06-16-2012, 01:01 AM
This script is brilliant--I'm going on about 6 hours, will post proggy soon!

Thanks a lot!

fastkill98
06-16-2012, 04:53 AM
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ **** | True | 03:32:17 | 178 | 1593 | 0 | 27966 | 7904 ]
[================================================== ====================]

Steel Bars, Works perfect.

BigRedJapan
06-16-2012, 05:40 AM
Someone Post a code that works! Mine wont even start up!

This is for those that are using for silver crafting! very cheap method of fast crafting levels!


{================================================= =============================]
[ [SRL] Al-Kharid Smelter by Narcle ]
[ SRL 5 and Simba ]
[ ]
[ NAME : Narcle's AK Smelter ]
[ WRITER : Narcle ]
[ CATEGORY : Smithing & Crafting ]
[ DESCRIPTION : Smelts ores into bars & make C-balls ]
[ Can craft Silver/Gold bars ]
[ AUTOCOLOR : Yes ]
[ ]
[================================================== ============================]
[ Description. ]
[================================================== ============================]
[ I made this script mainly to make cannonballs. I then expanded on the ]
[ concept and made it into a full fledged smelter. It's a very simple setup ]
[ as I try to keep most of my scripts; the simpler the setup the less likely ]
[ something could go wrong. I hope you use this as well as I have. ]
[ -Narcle ]
[================================================== ============================]
[ Instructions. ]
[================================================== ============================]
[ ]
[ Instructions have changed a bit. Please go to: ]
[ http://villavu.com/forum/showthread.php?t=34507 ]
[ For complete instructions. (first post) ]
[ ]
[================================================== ============================}
{$i srl/srl/misc/Smart.simba}
{$i srl/srl.simba}
{$i SRL/SRL/Misc/Reports.simba}
{$i srl/srl/misc/paintsmart.simba}



{ ATTENTION!!!
To use Forms just push play do NOT put anything in DeclarePlayers.
If you want to use DeclarePlayers fill it in (Forms should NOT come up then)}



procedure DeclarePlayers;
begin
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := true; //Use player in script?
Pin := ''; //Pin for bank
Strings[0] := 'steel'; //What to smith/craft? [Create string]
Strings[1] := 'al kharid';//Where are you smithing? [Al Kharid, Edgeville]
//cballs, steeltoball, steel, mith, addy, runite, iron, bronze, silver, gold
Arrays[0] := [1, 2, true, false, '23:00', true, false, false];//Settings array
//Settings array := [1st Bankslot, 2nd Bankslot, Take-Breaks, Take-Sleeps, Sleep-Time 'hh:mm', Rest for run, Use Coal bag];
end;

{
With Players[1] do
begin
Name := '';
Pass := '';
Active := true;
Pin := '';
Strings[0] := ''; //[Create string]
Strings[1] := 'al kharid';
Arrays[0] := [1, 2, true, false, '23:00', true, false, false];
end;
}
end;

//Advance Constants
Const
DebugMode = False;
//Change these if needed
AKBankBooth_Color = 9747935;//Color of the bank booth at AK
GreenHedge_Color = 2056767;


Type
TTPAItem = Record
OutLine, Width, Height, Color: Integer;
end;
Type
TPlayas = Record
WithDrawMain, WithDrawSeco, BaseCount, SecoCount, BagCount, BaseDivi: integer;//Setup
BaseAmount, SecoAmount, FailToSmelt: integer;
XPper: Extended;//Setup
CannonBall, SmeltBars, CraftGold, CraftSilver: boolean;//Setup
BaseItem, SecoItem, CraftedItem: TTPAItem;
Coords: TPoint;
SmeltText, SleepTime, statsStr: string;
TakeBreaks, TakeSleeps, RestForRun, HasCoalBag, DisableAntiBan: Boolean;
BankSlot1, BankSlot2: integer;
EdgeVille, AlKharid, Neitiznot: Boolean;
ClickFurnace: Function(Option: string): boolean;
MyOpenBank: Function: boolean;
end;

var
LogTime, BreakTime: integer;//Timers
TotalBars, TotalXP, TotalCrafted: integer;//Counters
PaceCheck: integer;//Ise this to see how fast they are going.
MyVars: array[0..21] of integer;
Playas: array[0..99] of TPlayas;

const
//don't change these!
stats_Bars = 10;
stats_Crafted = 11;
stats_XP = 12;
stats_XPpH = 13;
version = '1.6.3';
ScriptName = 'Narcle''s AK Smelter';

procedure Debug(S: string);
begin
if DebugMode then
Writeln(S)
else
Debugln(S);
Status(S);
end;

const
FilePath = AppPath + 'AKchars.ini';

formCheckActive = 0;
formCheckBreak = 2;
formCheckSleep = 3;
formCheckRestRun = 1;

var
frmDesign: TForm;
PButtons: Array [0..3] of TButton;
SButtons: Array [0..3] of TButton;
frmLabels: Array of TLABEL;
frmEdits: Array [0..9] of TEDIT;
CreateCombo: TCOMBOBOX;
LocationCombo: TCOMBOBox;
CheckBoxs: Array [0..5] of TCHECKBOX;
CurPlayer: integer;
AKpf_SavePlayers, AKpf_Terminate: boolean;

Procedure SavePlayers(tofile: boolean);
var
i: integer;
begin
With Players[CurPlayer] do
begin
Name := frmEdits[0].Caption;
Pass := frmEdits[1].Caption;
Pin := frmEdits[2].Caption;
Active := CheckBoxs[0].CHECKED;
Strings[0] := CreateCombo.Caption;
Strings[1] := LocationCombo.Caption;
Arrays[0] := [StrToInt(frmEdits[3].Caption), StrToInt(frmEdits[4].Caption), CheckBoxs[2].CHECKED, CheckBoxs[3].CHECKED, frmEdits[5].Caption, CheckBoxs[1].CHECKED, CheckBoxs[4].CHECKED, CheckBoxs[5].CHECKED];
end;

if tofile then
begin
WriteINI('General', 'NumOfPlayers', IntToStr(HowManyPlayers), FilePath);
WriteINI('General', 'statsUser', frmEdits[6].Caption, FilePath);
WriteINI('General', 'statsPass', frmEdits[7].Caption, FilePath);
end;

if tofile then
for i := 0 to HowManyPlayers - 1 do
with Players[i] do
begin
WriteINI('Player['+IntToStr(i)+']', 'Name', Name, FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Pass', Pass, FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Pin', Pin, FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Active', BoolToStr(Active), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Strings[0]', Strings[0], FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Strings[1]', Strings[1], FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][0]', IntToStr(Arrays[0][0]), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][1]', IntToStr(Arrays[0][1]), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][2]', BoolToStr(Arrays[0][2]), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][3]', BoolToStr(Arrays[0][3]), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][4]', Arrays[0][4], FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][5]', BoolToStr(Arrays[0][5]), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][6]', BoolToStr(Arrays[0][6]), FilePath);
WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][7]', BoolToStr(Arrays[0][7]), FilePath);
end;
end;


Procedure ShowPlayer(index: integer);
begin
With Players[index] do
begin
frmEdits[0].Caption := Name;
frmEdits[1].Caption := Pass;
frmEdits[2].Caption := Pin;
CheckBoxs[0].CHECKED := Active;
CreateCombo.Caption := Strings[0];
if Strings[1] = '' then
LocationCombo.Caption := 'Al Kharid'
else
LocationCombo.Caption := Strings[1];
frmEdits[3].Caption := IntToStr(Arrays[0][0]);//1st bank slot
frmEdits[4].Caption := IntToStr(Arrays[0][1]);//2nd bank slot
CheckBoxs[2].CHECKED := Arrays[0][2];//Take breaks
CheckBoxs[3].CHECKED := Arrays[0][3];//Sleep boolean
frmEdits[5].Caption := Arrays[0][4];//Sleep time
CheckBoxs[1].CHECKED := Arrays[0][5];//Rest for Run
CheckBoxs[4].CHECKED := Arrays[0][6];//CoalBag

end;
CurPlayer := index;
frmEdits[6].Caption := stats_Username;
frmEdits[7].Caption := stats_UserPass;
frmEdits[8].Caption := IntToStr(CurPlayer);
frmEdits[9].Caption := IntToStr(HowManyPlayers);
end;

Procedure LoadPlayers;
var
i: integer;
begin
HowManyPlayers := StrToIntDef(ReadINI('General', 'NumOfPlayers', FilePath), 1);
stats_Username := ReadINI('General', 'statsUser', FilePath);
stats_UserPass := ReadINI('General', 'statsPass', FilePath);
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
CurPlayer := CurrentPlayer;
for i := 0 to HowManyPlayers - 1 do
with Players[i] do
begin
Name := ReadINI('Player['+IntToStr(i)+']', 'Name', FilePath);
if Name = '' then
begin
Active := false;
Arrays[0] := [1,2,true,false,'hh:mm',false,false];
Strings[0] := 'Select what to make here.';
end
else
begin
Pass := ReadINI('Player['+IntToStr(i)+']', 'Pass', FilePath);
Pin := ReadINI('Player['+IntToStr(i)+']', 'Pin', FilePath);
Active := StrToBool(ReadINI('Player['+IntToStr(i)+']', 'Active', FilePath));
Strings[0] := ReadINI('Player['+IntToStr(i)+']', 'Strings[0]', FilePath);
Strings[1] := ReadINI('Player['+IntToStr(i)+']', 'Strings[1]', FilePath);
try
Arrays[0] := [StrToIntDef(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(0)+']', FilePath), 1),
StrToIntDef(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(1)+']', FilePath), 2),
StrToBool(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(2)+']', FilePath)),
StrToBool(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(3)+']', FilePath)),
ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(4)+']', FilePath),
StrToBool(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(5)+']', FilePath)),
StrToBool(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(6)+']', FilePath)),
StrToBool(ReadINI('Player['+IntToStr(i)+']', 'Arrays[0]['+IntToStr(7)+']', FilePath))];
except
Arrays[0] := [1,2,true,false,'hh:mm',false,false,false];
end;
end;
end;
end;

procedure OnLeftClick(Sender: TObject);
var
i: integer;
begin
Case Sender of
SButtons[0]: begin//Start
frmDesign.ModalResult := mrOk;
AKpf_SavePlayers := False;
AKpf_Terminate := False;
Writeln('Start.');
end;
SButtons[1]: begin//Save and start
frmDesign.ModalResult := mrOk;
AKpf_SavePlayers := True;
AKpf_Terminate := False;
Writeln('Save and Start.');
end;
SButtons[2]: begin//Save and Exit
frmDesign.MODALRESULT:= mrOk;
AKpf_SavePlayers := True;
AKpf_Terminate := True;
Writeln('Save and Exit.');
end;
SButtons[3]: begin//Exit
frmDesign.MODALRESULT:= mrOk;
AKpf_SavePlayers := False;
AKpf_Terminate := True;
Writeln('Exit.');
end;
PButtons[0]: begin//Previous player
SavePlayers(false);
if CurPlayer = 0 then
ShowPlayer(HowManyPlayers - 1)
else
ShowPlayer(CurPlayer - 1);
end;
PButtons[1]: begin//New player
Inc(HowManyPlayers);
NumberOfPlayers(HowManyPlayers);
SavePlayers(false);
CurPlayer := HowManyPlayers-1;
for i := 0 to 2 do
begin
frmEdits[i].Caption := '';
CheckBoxs[i].CHECKED := true;
end;
CreateCombo.Caption := 'Select what to make here.';
frmEdits[3].Caption := '1';
frmEdits[4].Caption := '2';
CheckBoxs[3].CHECKED := false;
CheckBoxs[4].CHECKED := false;
CheckBoxs[5].CHECKED := false;
frmEdits[5].Caption := 'hh:mm';
frmEdits[6].Caption := stats_Username;
frmEdits[7].Caption := stats_UserPass;
frmEdits[8].Caption := IntToStr(CurPlayer);
frmEdits[9].Caption := IntToStr(HowManyPlayers);
Writeln('Player '+IntToStr(CurPlayer)+' added.');
end;
PButtons[2]: begin//Next player
SavePlayers(false);
if CurPlayer = HowManyPlayers - 1 then
ShowPlayer(0)
else
ShowPlayer(CurPlayer + 1);
end;
PButtons[3]: begin//Delete player
if (HowManyPlayers > 1) and (CurPlayer = 0) then
Writeln('Can''t delete player 0.')
else
if (HowManyPlayers = 1) then
begin
if not (MessageDlg('Delete?', 'Do you want to reset Player '+ToStr(CurPlayer)+'?', mtWarning, [mbYes,mbNo]) = 6) then
Exit;
Writeln('Player '+ToStr(CurPlayer)+' reset.');
for i := 0 to 2 do
begin
frmEdits[i].Caption := '';
CheckBoxs[i].CHECKED := true;
end;
CreateCombo.Caption := '';
frmEdits[3].Caption := '1';
frmEdits[4].Caption := '2';
CheckBoxs[3].CHECKED := false;
frmEdits[5].Caption := 'hh:mm';
CheckBoxs[5].CHECKED := false;
end
else
if MessageDlg('Delete?', 'Do you want to delete Player '+ToStr(CurPlayer)+'?', mtWarning, [mbYes,mbNo]) = 6 then
begin
Writeln('Player '+ToStr(CurPlayer)+' deleted.');
Swap(Players[CurPlayer], Players[HowManyPlayers - 1]);
IncEx(HowManyPlayers, -1);
ShowPlayer(Max(CurPlayer - 1, 0));
SavePlayers(true);
end;
end;
end;
end;

procedure InitForm;
var
i: integer;
PCaps, CreateComboText, LocationText, Labels: TStringArray;
Ws, Ls, Ts: TIntegerArray;
begin
frmDesign := Tform.Create(nil);
With frmDesign do
begin
setBounds(100, 100, 390, 330);
Caption := 'Narcle''s AK Smelter v'+version;
Color := ClWhite;
Font.Color := ClBlack;
end;

PCaps := ['Previous Player', 'New Player', 'Next Player', 'Delete Player'];
for i := 0 to 3 do
begin
PButtons[i] := TBUTTON.Create(frmDesign);
with PButtons[i] do
begin
Parent := frmDesign;
Height := 22;
if i = 3 then
Width := 80//Delete Player
else
Width := 120;
Left := 10+i*125;
Top := 8;
CAPTION := PCaps[i];
ONCLICK := @OnLeftClick;
if i = 3 then
begin
Left := 135;
Top := 34;
end;
end;
end;

PCaps := ['Start', 'Save and Start', 'Save and Exit', 'Exit'];
for i := 0 to 3 do
begin
SButtons[i] := TBUTTON.Create(frmDesign);
with SButtons[i] do
begin
Parent := frmDesign;
Height := 22;
Width := 90;
Left := 6+i*96;
Top := 300;
FONT.Size := 8;
CAPTION := PCaps[i];
OnClick := @OnLeftClick;
end;
end;

CreateComboText := ['Bronze bars', 'Iron bars', 'Steel bars', 'Silver bars', 'Gold bars',
'Mithril bars', 'Addamantite bars', 'Runite bars', 'Cannonballs from Ores', 'Cannonballs from Bars',
'Silver Holy Symbol', 'Silver Unholy Symbol', 'Silver Sickle', 'Silver Tiara',
'Gold ring', 'Gold necklace', 'Gold amulet', 'Gold bracelet', 'Sapphire ring', 'Sapphire necklace', 'Sapphire amulet',
'Sapphire bracelet', 'Emerald ring', 'Emerald necklace', 'Emerald amulet', 'Emerald bracelet',
'Ruby ring', 'Ruby necklace', 'Ruby amulet', 'Ruby bracelet', 'Diamond ring', 'Diamond necklace',
'Diamond amulet', 'Diamond bracelet', 'Dragonstone ring', 'Dragonstone necklace',
'Dragonstone amulet', 'Dragonstone bracelet'];
CreateCombo := TComboBox.Create(frmDesign);
with CreateCombo do
begin
Parent := frmDesign;
Top := 80;
Left := 200;
Width := 180;
Height := 20;
FONT.Size := 10;
Caption := 'Select what to make here.';
for i := 0 to High(CreateComboText) do
ITEMS.Add(CreateComboText[i]);
end;

LocationText := ['Al Kharid', 'Edgeville'];
LocationCombo := TComboBox.Create(frmDesign);
with LocationCombo do
begin
Parent := frmDesign;
Top := 126;
Left := 200;
Width := 180;
Height := 20;
for i := 0 to High(LocationText) do
Items.Add(LocationText[i]);
end;

Labels := ['Username:', 'Password:', 'Bank Pin:', '1st Bank slot:', '2nd Bank slot:',
'What are you Making:', 'Where are you smelting:',
'Active', 'Rest for Run', 'Take Breaks', 'Sleep : Time ---->', 'Use Coal bag', 'Disable Antiban',
'SRL Stats User:', 'SRL Stats Password:', 'Player:', 'Total Players:'];
SetArrayLength(frmLabels, Length(Labels));
Ts := [62, 108, 156, 186, 216, 62, 108, 156, 178, 200, 222, 244, 266, 250, 280, 38, 38];
Ls := [10, 10, 50, 29, 25, 200, 200, 228, 228, 228, 228, 228, 228, 34, 10, 20, 260];
for i := 0 to High(Labels) do
begin
frmLabels[i] := TLABEL.Create(frmDesign);
with frmLabels[i] do
begin
Parent := frmDesign;
Height := 20;
Width := 50;
Top := Ts[i];
Left := Ls[i];
Font.Size := 8;
Caption := Labels[i];
end;
end;

Ws := [180, 180, 60, 60, 60, 60, 76, 76, 28, 28];
Ts := [ 80, 126, 154, 184, 214, 218, 244, 274, 34, 34];
Ls := [ 10, 10, 100, 100, 100, 320, 112, 112, 60, 330];
for i := 0 to 9 do
begin
frmEdits[i] := TEDIT.Create(frmDesign);
with frmEdits[i] do
begin
Parent := frmDesign;
Height := 21;
Width := Ws[i];
top := Ts[i];
Left := Ls[i];
Font.Size := 8;
if i = 3 then
Caption := '1';
if i = 4 then
Caption := '2';
if i = 5 then
Caption := 'hh:mm';
end;
end;

for i := 0 to 5 do
begin
CheckBoxs[i] := TCHECKBOX.Create(frmDesign);
with CheckBoxs[i] do
begin
Parent := frmDesign;
Top := 154+i*22;
Left := 210;
if InIntArray([0, 1, 2], i) then
Checked := true;
end;
end;

if FileExists(FilePath) then
begin
LoadPlayers;
ShowPlayer(0);
end
else
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
CurPlayer := CurrentPlayer;
frmEdits[8].Caption := IntToStr(CurPlayer);
frmEdits[9].Caption := IntToStr(HowManyPlayers);
end;

frmDesign.ShowModal;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;


Function Loc(Location: string): Boolean;
begin
Result := Players[CurrentPlayer].Loc = Lowercase(Location);
end;

Procedure SetLoc(Location: string);
begin
Players[CurrentPlayer].Loc := Lowercase(Location);
end;

function TPAItem(cOutLine, cWidth, cHeight, cColor: Integer): TTPAItem;
begin
with Result do
begin
OutLine := cOutLine;
Width := cWidth;
Height := cHeight;
Color := cColor;
end;
end;

function FindTPAItem(Item: TTPAItem; B: TBox): Boolean;
var
TPA: TPointArray;
Bt: TBox;
x,y: integer;
T:TPoint;
begin
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
Bt := GetTPABounds(TPA);
T := MiddleTPA(TPA);
if (Length(TPA) = Item.OutLine) and (iAbs(Bt.x2-Bt.x1) = Item.Width) and (iAbs(Bt.y2-Bt.y1) = Item.Height) then
if Item.Color > -1 then
Result := FindColorTolerance(x, y, Item.Color, T.x, T.y, T.x, T.y, 7)
else
Result := True;
end;

Function UpdateItem(var Item: TTPAItem; InvN: integer; ForcedUpdate: Boolean): Boolean;
var
TPA: TPointArray;
T: TPoint;
B: TBox;
begin
if InvN < 1 then
Exit;
if not ForcedUpdate then
if (Item.OutLine > 0) then
Exit;
if ForcedUpdate then
WriteLn('Item wasn''t detected attempting a TPA update.');
Wait(300+random(200));
B := InvBox(InvN);
FindColorsTolerance(TPA, srl_outline_black, B.x1, B.y1, B.x2, B.y2, 0);
if Length(TPA) < 1 then
Exit;
B := GetTPABounds(TPA);
T := MiddleTPA(TPA);
Item := TPAItem(Length(TPA), iAbs(B.x2-B.x1), iAbs(B.y2-B.y1), GetColor(T.x, T.y));
Result := true;
Writeln('Item := TPAItem('+inttostr(Item.Outline) +', '+inttostr(Item.Width)+', '+inttostr(Item.Height)+', '+inttostr(Item.Color)+');');
Exit;
end;

function iCountArr(Item: TTPAItem): TIntegerArray;
var
i, n: integer;
begin
SetArrayLength(Result, 28);
for i := 1 to 28 do
if FindTPAItem(Item, InvBox(i)) then
begin
Result[n] := i;
Inc(n);
end;
SetArrayLength(Result, n);
end;

function iCount(Item: TTPAItem): integer;
begin
Result := Length(iCountArr(Item));
end;

Function GoldCraftCoords(x, y: integer): TPoint;//x = 0 to 3, y = 0 to 7
begin
Result.y := 101+ 61*y;
if (y = 0) then
Result.x := 110+47*x;//Rings
if InRange(y, 1, 3) and InRange(x, 0, 6) then
Result.x := 125 + 51*x;//others
end;

Function GoldMenu: Boolean;
begin
Result := InRange(CountColor(2071039, MSX1, MSY1, MSX2, MSY1+60), 610, 630);
end;

Function SilverMenu: Boolean;
begin
Result := InRange(CountColor(2070783, MSX1, MSY1, MSX2, MSY1+60), 285, 310);
end;

Procedure ResetTimer(Time: string);
begin
Case LowerCase(Time) of
'logout': LogTime := GetSystemTime+RandomRange(19*60000, 31*60000);
'break': BreakTime := GetSystemTime+RandomRange(50*60000, 180*60000);
end;
end;

procedure Report;
var
i: integer;
begin
if (GetTimeRunning < 60000) then
Exit;

With Playas[CurrentPlayer] do
begin

if CannonBall then
begin
MyVars[0] := Round(MyVars[2]*25.5/4);
IncEx(Players[CurrentPlayer].Integers[11], MyVars[2]);//Players C-balls
IncEx(TotalCrafted, MyVars[2]);//Total
stats_IncVariable('Cannonballs (Made)', MyVars[2]);
end;

if SmeltBars then
begin
MyVars[0] := Round(MyVars[1]*XPper) + MyVars[0];//XP
IncEx(Players[CurrentPlayer].Integers[10], MyVars[1]);//Bars
IncEx(TotalBars, MyVars[1]);
stats_IncVariable(statsStr, MyVars[1]);
end;

if CraftGold or CraftSilver then
begin
MyVars[0] := Round(MyVars[1]*XPper) + MyVars[0];
IncEx(Players[CurrentPlayer].Integers[11], MyVars[1]);//Player Crafted
IncEx(TotalCrafted, MyVars[1]);//Total Crafted
stats_IncVariable(statsStr, MyVars[1]);
end;
end;
With Players[CurrentPlayer] do
begin
Integers[12] := integers[12] + MyVars[0];//XP
IncEx(TotalXP, MyVars[0]);
stats_IncVariable('Total EXP Gained', MyVars[0]);

if ((PlayerWorked(CurrentPlayer)/60000.0) > 0) then
Integers[13] := round( (Integers[12]*60.0)/(PlayerWorked(CurrentPlayer)/60000.0))//XP Per hour
else
Integers[13] := -1;//error number
end;
writeln('');
//ClearReport;
if (HowManyPlayers > 1) then
SRLProgressReport(ResultDebugBox, ScriptName, 'Narcle', version,
['Run Time', 'Total Bars', 'Crafted', 'Total XP'],
[MsToTime(GetTimeRunning, Time_Abbrev), TotalBars, TotalCrafted, TotalXP]);

SRLPlayerReport( ResultDebugBox, 0, False,
[True, True, False, False, False, False],
['Bars', 'Crafted', 'XP', 'XP/Hour'],
[], [stats_Bars, stats_Crafted, stats_XP, stats_XPpH], [], []);

For i := 0 to High(MyVars) do
MyVars[i] := 0;
stats_Commit;
end;

Procedure SetupPlayer;
begin
Debug('Player setup...');
Disguise('AKS: '+Players[CurrentPlayer].Nick);
SetAngle(SRL_ANGLE_HIGH);
ResetTimer('Logout');
RunEnergy(20);
GameTab(tab_Inv);
end;

procedure LogoutSeq(reason:string);
begin
CloseWindow;
if (reason = '') then
nextplayer(true)
else
begin
writeln(reason+', '+Players[CurrentPlayer].Name+' is now inactive.');
SaveScreenshot(AppPath + reason + TheDate(Date_Day) + TheTime+'.bmp');
nextplayer(false);
end;
end;

function TakeABreak: boolean;
var
H, M, S, BreakFor, T: integer;
begin
if ( GetSystemTime >= BreakTime ) then
begin
CloseWindow;
Logout;
result := true;
BreakFor := RandomRange(5 * 60000, 25 * 60000);
ConvertTime(BreakFor, H, M, S);
Writeln('Break for: '+inttostr(M)+ 'm:' +inttostr(S)+ 's');
Logout;
MarkTime(T);
Repeat
wait(1000);
until (BreakFor < TimeFromMark(T))
ResetTimer('Logout');
ResetTimer('Break');
NextPlayer(true);
end;
end;

function TakeASleep(SleepTime: string): boolean;
var
H, M, S, ms: Word;
SleepH, SleepM, SleepFor, Hr, Mr, Sr, T: integer;
begin
SleepH := StrToInt(Copy(SleepTime, 1, 2));
SleepM := StrToInt(Copy(SleepTime, 4, 5));
DecodeTime(Now, H, M, S, ms);
if (H = SleepH) and (M > SleepM) then
begin
Logout;
Result := true;
SleepFor := RandomRange(540 * 60000, 780 * 60000);
ConvertTime(SleepFor, Hr, Mr, Sr);
Writeln('Sleep for: '+inttostr(Hr)+ 'h:'+inttostr(Mr)+ 'm:' +inttostr(Sr)+ 's');
Logout;
MarkTime(T);
Repeat
wait(1000);
until (SleepFor < TimeFromMark(T))
ResetTimer('Logout');
ResetTimer('Break');
NextPlayer(true);
end;
end;


function BuildingOutline: integer;
var
arC, A: TIntegerArray;
i, t, Len, Hi, c: Integer;
H, S, L: Extended;
begin
Result := -1;
t := GetSystemTime;
arC := GetColors(TPAFromBox(IntToBox(MMX1, MMY1, MMX2, MMY2)));
ClearSameIntegers(arC);
SetArrayLength(A, Length(arC));
for i := 0 to High(arC) do
begin
ColorToHSL(arC[i], H, S, L);
if (L >= 90.5) and (L <= 99.0) then
begin
A[Len] := arC[i];
Inc(Len);
end;
end;
For i := 0 to Len do
begin
c := CountColor(A[i], MMX1, MMY1, MMX2, MMY2)
if c > Hi then
begin
Hi := c;
Result := A[i];
end;
end;
Debug('BuildingOutline = ' + IntToStr(Result)+ ' '+IntToStr(GetSystemTime-t)+'ms');
end;


Function AKFindPosition: boolean;
var
TPAG: TPointArray;
B: TBox;
ATPAG: T2DPointArray;
Size: integer;
begin
Result := False;
if BankScreen then
begin
SetLoc('at bank');
Result := true;
Exit;
end;

FindColorsSpiralTolerance(MMCX, MMCY, TPAG, GreenHedge_Color, MMx1, MMy1, MMx2, MMy2, 40);

If (Length(TPAG) < 1) then
Exit;

ATPAG := SplitTPAEx(TPAG, 3, 3);
SortATPASize(ATPAG, True);

if DebugMode then
SMART_DrawDotsEx(True, ATPAG[0], clBlue);

B := GetTPABounds(ATPAG[0]);
Size := Length(ATPAG[0]);
Debug('Size: '+ ToStr(Size) +' Height: '+ToStr(B.y2-B.y1));

if InRange(Size, 130, 500) and InRange(B.y2-B.y1, 20, 69) then
begin
SetLoc('smelted');
Result := True;
Debug('Near Furnace');
end;

if InRange(Size, 200, 800) and InRange(B.y2-B.y1, 70, 120) then
begin
SetLoc('to bank');
Result := True;
Debug('Near Bank');
end;
end;

function ToAKCactus(ToFurnace:boolean): boolean;//This uses the green bush wall
var
z: integer;
B: TBox;
TPA: TpointArray;
ATPA: T2DPointArray;
T, O: TPoint;
begin
if not LoggedIn then
Exit;
Debug('To Cactus...');
if ToFurnace then
begin
O := Point(2, Random(5));
B := IntToBox(MMX1, MMY1, MMX2, MMY2);
end
else
begin
Case Random(2) of
0: O := Point(-6, 15);
1: O := Point(-8, 20);
end;
B := IntToBox(625, MMCY, MMX2, MMY2);
end;
z := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, GreenHedge_Color, B.x1, B.y1, B.x2, B.y2, 40);
ColorToleranceSpeed(z);
if Length(TPA) < 1 then
Exit;
//ATPA := TPAtoATPAEx(TPA, 20, 38);
ATPA := SplitTPA(TPA, 3);
SortATPASize(ATPA, true);
B := GetTPABounds(ATPA[0]);
T := Point(B.x1+O.x, B.y1+O.y);
if DebugMode then
begin
SMART_DrawDotsEx(true, ATPA[0], clBlue);
TPA := TPAFromBox(IntToBox(T.x, T.y, T.x+6, T.y+8 ));
SMART_DrawDotsEx(False, TPA, clRed);
end;

if PointInBox(T, MMBox) then
begin
Mouse(T.x, T.y, 6, 8, true);
FFlag(20);
Result := true;
PaceCheck := GetSystemTime;
end else
Debug('To AK Cactus failed.');
end;



function ToAKFurnace: Boolean;
var
TPA: TPointArray;
B, Ba: TBox;
ATPA: T2DPointArray;
T: TPoint;
YMod: integer;
begin
if not LoggedIn then
Exit;
Debug('To Furnace...');
Result := False;
B := MMBox;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, GreenHedge_Color, B.x1, B.y1, B.x2, B.y2, 40);//green hedge
if (High(TPA) < 1) then
Exit;
ATPA := SplitTPAEx(TPA, 3, 3);
SortATPAFromSize(ATPA, 1000, True);
//SMART_DrawDotsEx(True, ATPA[0], clGreen);
Ba := GetTPABounds(ATPA[0]);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, BuildingOutline, B.x1, B.y1, Ba.x2+6, Ba.y1+12, 0);
if (High(TPA) < 1) then
Exit;
ATPA := SplitTPA(TPA, 15);
SortATPAFromSize(ATPA, 200, True);
B := GetTPABounds(ATPA[0]);
//SMART_DrawDotsEx(True, ATPA[0], clBlue);

Debug('PaceCheck: '+ToStr(GetSystemTime-PaceCheck)+'ms');
Case (GetSystemTime-PaceCheck) of
0..70: Ymod := 4;
71..89: Ymod := 3;
90..129: YMod := 2;
else
YMod := 0;
end;
if (B.y2-B.y1 < 37) then//if the Box is too short, somethigns off
T := Point(Ba.x1-17, Ba.y1-25+YMod)
else
T := Point(B.x2-17, B.y2-30+YMod);

if DebugMode then
begin
SMART_DrawDotsEx(True, ATPA[0], clBlue);
TPA := TPAFromBox(IntToBox(T.x, T.y, T.x+5, T.y+5 ));
SMART_DrawDotsEx(false, TPA, clRed);
end;

If PointInBox(T, MMBox) then
begin
Mouse(T.x, T.y, 5, 5, true);
FFlag(20);
Wait(400+random(100));
FFlag(0);
Result := True;
PaceCheck := GetSystemTime;
Wait(700+random(300));
end else
Debug('To AK Furnace failed.');
end;

function ToAKBank: Boolean;//Uses bankers at bank
var
z, L: integer;
T: TPoint;
B: TBox;
TPA, TPA2: TpointArray;
ATPA, ATPA2: T2Dpointarray;
begin
if not LoggedIn then
Exit;
Debug('To Bank...');
z := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, GreenHedge_Color, MMX1, MMY1, MMX2, MMY2, 40);
ColorToleranceSpeed(z);
if (Length(TPA) < 1) then
Exit;
ATPA := SplitTPAEx(TPA, 2, 2);
SortATPASize(ATPA, true);

B := GetTPABounds(ATPA[0]);
if DebugMode then
SMART_DrawDotsEx(True, ATPA[0], clBlue);
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA2, BuildingOutline, MMX1, B.Y1+9, B.X1, MMY2, 0);
ColorToleranceSpeed(z);
if (Length(TPA2) < 1) then
Exit;

ATPA2 := SplitTPAEx(TPA2, 15, 10);
SortATPASize(ATPA2, True);
L := Length(ATPA2);
if (L = 0) then
Exit;
SetArrayLength(ATPA2, Min(L, 2));

SortATPAFromFirstPoint(ATPA2, Point(B.x1-16, MMY2));

B := GetTPABounds(ATPA2[0]);
Debug('H: '+ToSTR(B.y2-B.y1)+', W: '+ToStr(B.x2-B.x1));
T := Point(B.x2-13, B.y1+(B.y2-B.y1)/2-MAx((35-(B.x2-B.x1))/2, 2));
if DebugMode then
begin
TPA := TPAFromBox(IntToBox(T.x, T.y, T.x+4, T.y+8 ));
SMART_DrawDotsEx(False, ATPA2[0], clGreen);
SMART_DrawDotsEx(False, TPA, clRed);
end;

if PointInBox(T, MMBox) then
begin
Mouse(T.x, T.y, 4, 8, true);
FFlag(20);
Result := true;
if RunEnergy(10) then
Wait(1200+random(600))
else
Wait(2400+random(1200));
end else
Debug('To AK Bank failed.');
end;

function AKClickFurnace(Option: string): boolean;
var
z: integer;
TPoint: TPoint;
TPA, TPA2: TpointArray;
ATPA: T2Dpointarray;
begin
z := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(TPA, 3815997, MSX1, MSY1, MSX2, MSY2, 50);
FindColorsTolerance(TPA2, 1911763, MSX1, MSY1, MSX2, MSY2, 18);
ColorToleranceSpeed(z);
TPA := CombineTPA(TPA, TPA2);
if Length(TPA) < 1 then exit;
ATPA := SplitTPAEx(TPA, 15, 10);
SortATPASize(ATPA, true);
TPA := ATPA[0];
TPoint := MiddleTPA(TPA);
if Length(TPA) > 0 then
begin
MMouse(TPoint.x+10, TPoint.y+10, 1, 1);
if WaitUpText('urnac', 100+random(50)) then
begin
case random(2) of
0: begin
ClickMouse2(mouse_Right);
Result := WaitOption(Option, 200+random(100));
end;
1: begin
ClickMouse2(mouse_Left);
Result := DidClick(True, 100);
end;
end;
If Result then
begin
wait(300+random(200));
Exit;
end;
end;
end;
end;

Function ToEdgeFurnace: Boolean;
var
TPA: TPointArray;
B, Bs: TBox;
ATPA: T2DPointArray;
T: TPoint;
i: integer;
begin
if not LoggedIn then
Exit;
Debug('To Furnace...');
Result := false;
FindColorsSpiralTolerance(MMX2, MMCY, TPA, BuildingOutline, MMx1, MMy1, MMx2, MMy2, 0);
if High(TPA) < 0 then
Exit;
ATPA := SplitTPA(TPA, 16);

For i := 0 to High(ATPA) do
begin
Bs := GetTPABounds(ATPA[i]);
if InRange(Bs.y2-Bs.y1, 23, 28) then
begin
B := Bs;
TPA := ATPA[i];
Break;
end;
end;

if DebugMode then
SMART_DrawDotsEx(true, TPA, clBlue);

T := Point(B.x1+(B.x2-B.x1)/2+3, B.y1+(B.y2-B.y1)/2-5);
if DebugMode then
begin
TPA := TPAFromBox(IntToBox(T.x, T.y, T.x+3, T.y+5 ));
SMART_DrawDotsEx(False, TPA, clRed);
end;
if PointInBox(T, MMBox) then
begin
Mouse(T.x, T.y, 3, 5, true);
FFlag(0);
Result := true;
wait(800+random(400));
end else
Debug('To Edge Furnace failed.');
end;

Function ToEdgeBank: Boolean;
var
TPA: TPointArray;
B,Bs: TBox;
ATPA: T2DPointArray;
T: TPoint;
i: integer;
begin
if not LoggedIn then
Exit;
Debug('To Bank...');
Result := false;
FindColorsSpiralTolerance(MMX1, MMY2, TPA, BuildingOutline, MMx1, MMy1, MMx2, MMy2, 0);
if High(TPA) < 0 then
Exit;
ATPA := SplitTPA(TPA, 17);

For i := 0 to High(ATPA) do
begin
Bs := GetTPABounds(ATPA[i]);
Debug('W: '+ToStr(Bs.y2-Bs.y1)+' H: '+ToStr(Bs.x2-Bs.x1));
if InRange(Bs.y2-Bs.y1, 42, 55) and InRange(Bs.x2-Bs.x1, 23, 36) then
begin
B := Bs;
TPA := ATPA[i];
Break;
end;
end;

if DebugMode then
SMART_DrawDotsEx(true, TPA, clBlue);

T := Point(B.x2-9, B.y1+16);
if DebugMode then
begin
TPA := TPAFromBox(IntToBox(T.x, T.y, T.x+5, T.y+5 ));
SMART_DrawDotsEx(False, TPA, clRed);
end;
if PointInBox(T, MMBox) then
begin
Mouse(T.x, T.y, 2, 3, true);
FFlag(0);
Wait(1200+random(200));
Result := True;
end else
Debug('To Edge Bank failed.');
end;

Function EdgeClickFurnace(Option: string): Boolean;
var
TPA, tpa1, tpa2: TPointArray;
ATPA: T2DPointArray;
B:TBox;
T: TPoint;
begin

FindColorsTolerance(tpa1, 1516193, MSX1, MSY1, MSX2, MSY2, 50);
//SMART_DrawDotsEx(true, tpa1, 255);
if (Length(tpa1) < 1) and (Length(tpa2) < 1) then
Exit;
ATPA := TPAtoATPAEx(tpa1, 30, 40);
SortATPAFromSize(ATPA, 450, true);
//for i := 0 to High(ATPA) do Debug('ATPA['+ToStr(i)+'] Length = '+ToStr(Length(ATPA[i])));
tpa1 := ATPA[0];
B := GetTPABounds(tpa1);
FindColorsTolerance(tpa2, 6121324, B.x1-50, B.y1-20, B.x2, B.y2+30, 50);

if DebugMode then
begin
SMART_DrawDotsEx(true, tpa1, 255);
SMART_DrawDotsEx(False, tpa2, 5026082);
end;
Debug('tpa1 Length = '+ToStr(Length(tpa1))+' || tpa2 Length = '+ToStr(Length(tpa2)));

if (Length(tpa1) < 1) and (Length(tpa2) < 1) then
Exit;

TPA := CombineTPA(tpa1, tpa2);
T := MiddleTPA(TPA);

if PointInBox(T, IntToBox(B.x1-50, B.y1-20, B.x2, B.y2+30)) then
begin
MMouse(T.x-10, T.y-10, 20, 20);
if WaitUpTextMulti(['urnac', 'nace'], 400) then
begin
case random(2) of
0: begin
ClickMouse2(mouse_Right);
Result := WaitOption(Option, 200+random(100));
end;
1: begin
ClickMouse2(mouse_Left);
Result := DidClick(True, 100);
end;
end;
If Result then
begin
wait(300+random(200));
Exit;
end;
end;
end;

end;

Function EdgeOpenBank: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
i, cts: integer;
T: TPoint;
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.33, 0.22);
FindColorsTolerance(TPA, 3688009, MSX1, MSY1, MSX2, MSY2, 3)
ColorToleranceSpeed(cts);
SetColorSpeed2Modifiers(0.2, 0.2);
if Length(TPA) < 1 then
Exit;

ATPA := SplitTPAEx(TPA, 1, 4);
SortATPASize(ATPA, True);
SetArrayLength(ATPA, Min(3, Length(ATPA)));
SortATPAFromFirstPoint(ATPA, Point(MSCX+30, MSCY));

for i := 0 to High(ATPA) do
begin
T := MiddleTPA(ATPA[i]);
MMouse(T.x-5, T.y-5, 10, 10);
wait(100+Random(100));
if WaitUpText('ooth', 450) then
if random(3) = 0 then
begin
ClickMouse2(mouse_Right);
Result := WaitOptionMulti(['Bank B', 'nk B', 'k Bank'], 250+random(100));
end else
begin
ClickMouse2(mouse_Left);
Result := DidClick(True, 200);
end;
if Result then
Exit;
end;
end;

Function AKOpenBank: Boolean;
var
i, H, L: integer;
T: TPoint;
TPA: TPointArray;
ATPA: T2Dpointarray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, AKBankBooth_Color, MSX1, MSY1, MSX2, MSY2, 30);
if Length(TPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(TPA, 44, 200);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
L := High(ATPA);
If L > 1 then
H := 1 Else H := L;
For i := 0 to H do
begin
T := MiddleTPA(ATPA[i]);
MMouse(T.x, T.y, 1, 1);
if WaitUpText('ooth', 450) then
if random(3) = 0 then
begin
ClickMouse2(mouse_Right);
Result := WaitOptionMulti(['Bank B', 'nk B', 'k Bank'], 250+random(100));
end else
begin
ClickMouse2(mouse_Left);
Result := DidClick(True, 200);
end;
if Result then
Exit;
end;
end;

Function Smelt: boolean;
var
i, s, C, Timer: integer;
iCa: TIntegerArray;
T: TPoint;
Item: TTPAItem;
begin
With Playas[CurrentPlayer] do
begin
Debug('Going to smelt...');

repeat
if SmeltBars then
if (iCount(BaseItem) > 0) then
if ClickFurnace('elt') then
begin
Timer := GetSystemTime + 8000+random(2000);
repeat
Wait(50+random(50));//Waiting for smith options to pop up
if (GetSystemTime > Timer) or not LoggedIn then
Exit;
until FindTextTpaEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, T.x, T.y, SmeltText, statchars, Nothing);
Wait(RandomRange(150, 350));//Don't want a instant click, the text can pop up fast
MouseBox(T.x-20, T.y-30, T.x+20, T.y+8, 1);
Debug('Smelting Ore...');

Timer := GetSystemTime+4000*WithDrawMain;
repeat
If not LoggedIn then
Exit;
if FindNormalRandoms then
Break;
if ClickContinue(true, true) then
Break;
Wait(300+random(200));
until( iCount(BaseItem) < 1) or (GetSystemTime > Timer);
UpdateItem(CraftedItem, 2, False);
if iCount(CraftedItem) < 1 then
UpdateItem(CraftedItem, WithDrawMain+2, True);
end;

if SmeltBars then
Item := CraftedItem
else
Item := BaseItem;

//CannonBall Begin
if CannonBall or CraftGold or CraftSilver then
if ( iCount(Item) > 0 ) then
begin
if CannonBall then
Debug('Making Cannonballs...')
else
Debug('Making '+Players[CurrentPlayer].Strings[0]+'...');
for i := 0 to 3 do
begin
iCa := iCountArr(Item);
s := iCa[random(High(iCa))];
if ExistsItem(s) then
begin
MouseItem(s, mouse_Left);
Break;
end;
end;

if ClickFurnace('bar') then
begin
Timer := GetSystemTime + 8000+random(2000);
repeat
Wait(100+random(100));//Waiting for options to pop up
if (GetSystemTime > Timer) or not LoggedIn then
Exit;
if CannonBall then
if FindTextTpaEx(2070783, 0, MCX1, MCY1, MCX2, MCY2, T.x, T.y, 'nonb',statchars, Nothing) then
begin
Wait(RandomRange(150, 350));
MouseBox(T.x-20, T.y-30, T.x+20, T.y+8, 1);
Break;
end;
until GoldMenu or SilverMenu;

if CraftGold then
begin
T := GoldCraftCoords(Coords.x, Coords.y);
Mouse(T.x, T.y, 8, 8, false);
end;

If CraftSilver then
FindTextTPA(52224, 0, MSX1, MSY1, MSX2, MSY2, SmeltText, StatChars, ClickRight);

if CraftSilver or CraftGold then
if WaitOptionMulti(['ke Al', 'e All', 'ke A', 'All'], 2000) then
begin
Timer := GetSystemTime+4000*WithDrawMain;
repeat
If not LoggedIn then
Exit;
if FindNormalRandoms then
Break;
if ClickContinue(true, true) then
Break;
Wait(300+random(200));
until( iCount(Item) < 1 ) or (GetSystemTime > Timer);
UpdateItem(CraftedItem, 2, false);
if iCount(CraftedItem) < 1 then
UpdateItem(CraftedItem, 2, True);
end;

if CannonBall then
begin
Timer := GetSystemTime+6666*WithDrawMain;
repeat
If not LoggedIn then
Exit;
if FindNormalRandoms then
Break;
if ClickContinue(true, true) then
Break;
Wait(300+random(200));
until( iCount(Item) < 1 ) or (GetSystemTime > Timer);
end;
end;
end;
//CannonBall end;

Inc(C);
if CannonBall then
if ( iCount(BaseItem) > 0 ) then
Continue;

until( iCount(BaseItem) < 1) or ( C > 5 );
Debug('Smelting Done.');
Result := true;
end;//With do end;
end;

Function Bank: boolean;
var
T: TPoint;
B: TBox;
TPA: TPointArray;
W, F, Timer, CBalls, WithDrawIs, A:integer;
Recorded: Boolean;
begin
Debug('Opening Bank...');

Timer := GetSystemTime + 40000;
if Playas[CurrentPlayer].AlKharid or Playas[CurrentPlayer].EdgeVille then
repeat
Wait(800+random(502));
if (PinScreen) or (BankScreen) Then
Break;
if Playas[CurrentPlayer].MyOpenBank() then
Break;
if OpenBankNPC then
Break;
until (GetSystemTime > Timer) or (not LoggedIn);

repeat
Wait(50+random(20));
if InRange(CountColor(2070783, 90, 147, 230, 211), 400, 430) then
if (Players[CurrentPlayer].Pin <> '') then
MouseBox(90, 147, 230, 211, 1)
else
begin
LogoutSeq('Bank Pin settings unknown');
Exit;
end;
until PinScreen or BankScreen or (not LoggedIn) or (GetSystemTime > Timer);

if (GetSystemTime > Timer) or (not LoggedIn) then
begin
SetLoc('Lost');
Exit;
end;

if PinScreen then
begin
Debug('Entering Pin...');
F := 0;
repeat
InPin(Players[CurrentPlayer].Pin);
Inc(F);
until (BankScreen) or ( F > 5 )
if (F > 5) then
begin
LogoutSeq('Failed to enter bank pin');
Exit;
end;
end;

if BankScreen then
with Playas[CurrentPlayer] do
begin

if (iCount(CraftedItem) < 26 ) and InvFull then
Inc(FailToSmelt)
else
FailToSmelt := 0;

if (FailToSmelt > 2) then
begin
LogoutSeq('Failed to smelt 2+ times');
Exit;
end;

repeat
Wait(100+random(100));
Until (CountColor(65535, MBX1, MBY1, MBX2, MBY2) > 20) or not LoggedIn;

if Not Recorded then
begin
if CannonBall then
begin
FindColors(TPA, 65535, MIX1, MIY1, MIX2, MIY2);
B := GetTPABounds(TPA);
CBalls := GetAmountBox(B);
Debug('Cannonballs: '+inttostr(CBalls));
MyVars[2] := MyVars[2] + CBalls;
if SmeltBars then
MyVars[1] := MyVars[1] + Round(CBalls / 4);
end;
if CraftGold or CraftSilver then
MyVars[1] := MyVars[1] + iCount(CraftedItem);

if SmeltBars and not CannonBall then
MyVars[1] := MyVars[1] + iCount(CraftedItem);
Debug('Record Count: '+ToStr(MyVars[1]));
Recorded := true;
end;

repeat
if not LoggedIn then
Exit;
if (InvCount > 0) then
begin
Debug('Banking...');
if HasCoalBag then
Deposit(2, 28, true)
else
DepositAll;
end;

BaseAmount := BaseAmount - WithDrawMain;
if (WithDrawSeco > -1) then
SecoAmount := SecoAmount - WithDrawSeco;
FixBank;
BankTab(1);
Debug('Withdrawing...');

Timer := GetSystemTime + 2000;
Repeat
A := GetAmountBox(BankIndexToMSBox(BankSlot1));
Wait(50+random(50));
until (A > 0) or (GetSystemTime > Timer);
if (A < (WithDrawMain+1)) and ((BaseAmount - WithDrawMain) < (WithDrawMain+1)) then
begin
CloseBank;
LogoutSeq('Ran out of primary');
Exit;
end;
If (A > (WithDrawMain+1)) then
BaseAmount := A;

if (WithDrawSeco > -1) then
begin
Timer := GetSystemTime + 2000;
Repeat
A := GetAmountBox(BankIndexToMSBox(BankSlot2));
Wait(50+random(50));
until (A > 0) or (GetSystemTime > Timer);
if (A < (WithDrawSeco+1)) and ((SecoAmount - WithDrawSeco) < (WithDrawSeco+1)) then
begin
CloseBank;
LogoutSeq('Ran out of secondary');
Exit;
end;
If (A > (WithDrawSeco+1)) then
SecoAmount := A;
end;

if HasCoalBag then//Coal Bag mod
if (WithDrawSeco > 0) then
begin
T := BankIndexToBankPoint(BankSlot2);
Withdraw(T.x, T.y, 0);
Timer := GetSystemTime + 60000;
Repeat
Wait(50);
if (GetSystemTime > Timer) then
Exit;
until (InvFull);
InvMouse(1, mouse_Right);//Coal ore
WaitOptionMulti(['Fill', 'ill', 'll C'], 1000);
Timer := GetSystemTime + 10000;
repeat
wait(50+random(100));
if InChat('already full') then
Deposit(2, 28, true);
if (GetSystemTime > Timer) then
Exit;
until (InvCount = 1);
end;


if (WithDrawMain > 26) then
WithDrawIs := 0
else
WithDrawIs := WithDrawMain;

T := BankIndexToBankPoint(BankSlot1);
Withdraw(T.x, T.y, WithDrawIs);
Timer := GetSystemTime + 60000;
Repeat
Wait(50);
until (GetSystemTime > Timer) or (InvCount >= WithDrawMain);
if (GetSystemTime > Timer) then
Exit;

UpdateItem(BaseItem, 2, False);
if iCount(BaseItem) <> WithDrawMain then
UpdateItem(BaseItem, 2, True);

if (WithDrawSeco > -1) then
if (InvCount >= WithDrawMain) then
begin
if HasCoalBag then
WithDrawIs := 0
else
begin
if WithDrawSeco > 14 then
WithDrawIs := 0
else
WithDrawIs := WithDrawSeco;
end;
T := BankIndexToBankPoint(BankSlot2);
Withdraw(T.x, T.y, WithDrawIs);
Timer := GetSystemTime + 60000;
Repeat
Wait(50);
until (GetSystemTime > Timer) or (InvCount >= 27);
UpdateItem(SecoItem, WithDrawMain+2, False);
if iCount(SecoItem) < 1 then
UpdateItem(SecoItem, WithDrawMain+2, True);
end;
if (GetSystemTime > Timer) then
Exit;
Inc(W);
until(InvCount >= 27) or (W > 10);

if (W > 10) then
begin
LogoutSeq('Banking failed');
Exit;
end;
end;

with Playas[CurrentPlayer] do
begin

if not (iCount(BaseItem) = WithDrawMain) then
begin
LogoutSeq('Counted BaseItem wrong');
Exit;
end;

if HasCoalBag then
A := 1
else
A := WithDrawSeco;

if (WithDrawSeco > -1) then
if not (iCount(SecoItem) >= A) then
begin
LogoutSeq('Counted SecoItem wrong');
Exit;
end;

end;

Debug('Done Banking...');
Case random(3) of
1: CloseBank;
end;
Inc(Players[CurrentPlayer].Banked);
result := true;

//if (ReportTime < GetSystemTime) then
Report;
end;

procedure DoChecks;
var
r: integer;
begin
FindNormalRandoms;

r := round(rs_GetCompassAngleDegrees*100.0);
Debugln('Compass: '+tostr(r/100.0)+' Degrees r := ' + ToStr(r));
if InRange(r, 300, 35699) then
begin
Debug('ClickNorth');
ClickNorth(SRL_ANGLE_HIGH);
end;

if (HowManyPlayers > 1) then
if ( GetSystemTime >= LogTime ) then
LogoutSeq('');

if Playas[CurrentPlayer].TakeSleeps then
TakeASleep(Playas[CurrentPlayer].SleepTime);

if Playas[CurrentPlayer].TakeBreaks then
TakeABreak;

if Playas[CurrentPlayer].RestForRun then
if Loc('banked') then
if not RunEnergy(28+random(13)) then
begin
Debug('Resting...');
RestUntil(50+random(45));
Debug('Done resting.');
end;
RunEnergy(20);

if not LoggedIn then
LogoutSeq('');

if not Playas[CurrentPlayer].DisableAntiBan then
r := Random(60);
if (r < 5) then
Debug('Antiban...');
case r of
10: wait(1000+random(10000));
1,2: if (Playas[CurrentPlayer].SmeltBars) or (Playas[CurrentPlayer].CannonBall) then
HoverSkill('smithing' ,false)
else
HoverSkill('crafting' ,false);
3: PickUpMouse;
4: if (HowManyPlayers = 1) then
if random(20) = 1 then
Wait(RandomRange(29000, 59000));//29-59secs
end;
if (r < 5) then
Debug('End Antiban.');
FindNormalRandoms;
end;

function ArrInStrEx(StrArr: TStringArray; Str: string): integer;//Needed for figuring out crafting
var
i: integer;
begin
Result := -1;
for i := 0 to High(StrArr) do
if Pos(StrArr[i], Str) > 0 then
begin
Result := i
Exit;
end;
end;

procedure EndOfScript;
begin
writeln('');
writeln('Thanks for using my AK Smelter!');
writeln('Please post proggies on forums!');
writeln(' -Narcle');
end;

procedure ScriptStartup;
var
i: integer;
CreateStr: string;
Gem, Kind: TIntegerArray;
begin
Debug('SMART & SRL Loading...');
Smart_Server := 1;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;

SRL_Procs[srl_OnLogIn] := @SetupPlayer;
SRL_Procs[srl_OnLogOut] := @Report;
AddOnTerminate('EndOfScript');

NumberOfPlayers(100);
DeclarePlayers;
if (Players[0].Name = '') then
begin
SafeInitForm;
if AKpf_SavePlayers then
SavePlayers(True);
if AKpf_Terminate then
TerminateScript;
end else
begin
HowManyPlayers := 0;
CurrentPlayer := 0;
DeclarePlayers;
for i := 0 to High(Players) do
if (Players[i].Name <> '') then
Inc(HowManyPlayers)
else
Break;
NumberOfPlayers(HowManyPlayers);
end;

Debug('Player count = '+ToStr(HowManyPlayers));

SetupSRLStats(18, stats_Username, stats_Userpass);
if (stats_Username = '') then
begin
stats_Username := 'Anonymous';
stats_Userpass := 'anon1337';
end;

Gem := [15, 40, 55, 70, 85, 100];//Base gem xp
Kind := [0, 5, 15, 10];//Kind modifiers, Dragonstone Amulet is +50

For i := 0 to HowManyPlayers - 1 do
With Playas[i] do// Playas[CurrentPlayer]
begin
CreateStr := LowerCase(Players[i].Strings[0]);
//All booleans should be false
If Length(Players[i].Name) < 1 then
begin
Writeln('Player '+ToStr(i)+' has no name, making inactive for now.');
Players[i].Active := false;
Continue;
end;
if Players[i].Nick = '' then
Players[i].Nick := Capitalize(Copy(Players[i].Name, 1, 4));

try
BankSlot1 := Players[i].Arrays[0][0];
BankSlot2 := Players[i].Arrays[0][1];
TakeBreaks := Players[i].Arrays[0][2];
TakeSleeps := Players[i].Arrays[0][3];
SleepTime := Players[i].Arrays[0][4];
RestForRun := Players[i].Arrays[0][5];
HasCoalBag := Players[i].Arrays[0][6];
DisableAntiBan := Players[i].Arrays[0][7];
except
Writeln('Player '+ToStr(i)+': Settings array set wrong, setting to defaults.');
BankSlot1 := 1;
BankSlot2 := 2;
TakeBreaks := true;
TakeSleeps := false;
SleepTime := '23:00';
RestForRun := true;
HasCoalBag := false;
DisableAntiBan := false;
end;

Case Lowercase(Players[i].Strings[1]) of
'al kharid': AlKharid := True;
'edgeville', 'edgeville (beta)': EdgeVille := True;
'neitiznot': Neitiznot := True;
else
begin
Writeln('Smelting location not choosen, setting to default (Al Kharid).');
Players[i].Strings[1] := 'al kharid';
AlKharid := true;
end;
end;

if AlKharid then
begin
ClickFurnace := @AKClickFurnace;
MyOpenBank := @AKOpenBank;
Players[i].Loc := 'lost';
end;

if EdgeVille then
begin
ClickFurnace := @EdgeClickFurnace;
MyOpenBank := @EdgeOpenBank;
Players[i].Loc := 'at bank';
end;

WithDrawSeco := -1;

if ArrInStr(['ring', 'necklace', 'bracelet', 'amulet'], CreateStr) then
begin
CraftGold := True;
statsStr := 'Gold Bars Crafted';
Coords.x := ArrInStrEx(['gold','sapphire','emerald','ruby','diamond','drag onstone'], CreateStr);
Coords.y := ArrInStrEx(['ring','necklace','amulet','bracelet'], CreateStr);
if (Coords.x < 0) or (Coords.y < 0) then
begin
Writeln('');
Writeln('Player '+ToStr(i)+' create string not setup correctly, please fix.');
TerminateScript;
end;
if (Pos('dragonstone', CreateStr)>0) and (Pos('amulet', CreateStr)>0) then
XPper := 150.0//Dragonstone Amulet xp
else
XPper := Gem[Coords.x]+Kind[Coords.y];
if (Coords.x = 0) then
WithDrawMain := 28
else
begin
WithDrawMain := 14;
WithDrawSeco := 14;
end;
end;

if (Pos('silver', CreateStr) > 0) and not(Pos('bars', CreateStr) > 0) then
begin
CraftSilver := True;
XPper := 50.0;
WithDrawMain := 28;
statsStr := 'Silver Bars Crafted';
Case CreateStr of
'silver holy symbol':
SmeltText := 'aradom';
'silver unholy symbol':
SmeltText := 'nholy';
'silver sickle':
SmeltText := 'ickle';
'silver tiara':
begin
SmeltText := 'iara';
XPper := 52.5;
end;
else
begin
Writeln('');
Writeln('Player '+ToStr(i)+' create string not setup correctly, please fix.');
TerminateScript;
end;
end;
end;

BagCount := 28;

if (not CraftSilver) and (not CraftGold) then
Case CreateStr of
'cball','cballs', 'cannonballs', 'cannonballs from ores':
begin
BaseDivi := 3;
XPper := 17.5;//steel
SmeltText := 'teel';
SmeltBars := True;
CannonBall := True;
statsStr := 'Steel Bars Melted';
end;

'steeltoball', 'bartoballs', 'steeltocballs', 'steeltoballs', 'cannonballs from bars':
begin
BaseDivi := 1;
XPper := 17.5;//steel
CannonBall := True;
HasCoalBag := false;
end;

'iron', 'iron bars':
begin
BaseDivi := 1;
SmeltText := 'ron';//set
XPper := 12.5;
SmeltBars := True;
statsStr := 'Iron Bars Melted';
HasCoalBag := false;
end;

'steel', 'steel bars':
begin
BaseDivi := 3;
SmeltText := 'teel';//set
XPper := 17.5;
SmeltBars := True;
statsStr := 'Steel Bars Melted';
end;

'mith','mithril', 'mithril bars':
begin
BaseDivi := 5;
SmeltText := 'ithril';
XPper := 30.0;
SmeltBars := True;
statsStr := 'Mithril Bars Melted';
end;

'addy','addamite','addamantite','addamantite bars':
begin
BaseDivi := 7;
SmeltText := 'damant';//set
XPper := 37.5;
SmeltBars := True;
statsStr := 'Adamant Bars Melted';
end;

'rune','runite', 'runite bars':
begin
BaseDivi := 9;
SmeltText := 'une';//set
XPper := 50.0;
SmeltBars := True;
statsStr := 'Runite Bars Melted';
end;

'copper', 'tin', 'bronze', 'bronze bars':
begin
BaseDivi := 2;
SmeltText := 'ronze';//set
XPper := 6.2;
SmeltBars := True;
statsStr := 'Bronze Bars Melted';
HasCoalBag := false;
end;

'gold', 'gold bars':
begin
BaseDivi := 1;
SmeltText := 'old'
XPper := 22.5;
SmeltBars := True;
statsStr := 'Gold Bars Melted';
HasCoalBag := false;
end;

'silver', 'silver bars':
begin
BaseDivi := 1;
SmeltText := 'ilver';
XPper := 13.7;
SmeltBars := True;
statsStr := 'Silver Bars Melted';
HasCoalBag := false;
end;
else
begin
Writeln('');
Writeln('Player '+ToStr(i)+' create string not setup correctly, please fix.');
TerminateScript;
end;
end;
if WithDrawMain < 1 then
begin
if HasCoalBag then
BagCount := BagCount + 26;//Coal bag takes one spot so -1 for invy space
WithDrawMain := BagCount / BaseDivi;
if BaseDivi <> 1 then
WithDrawSeco := (BaseDivi-1)*WithDrawMain
else
WithDrawSeco := -1;
end;
Debug('WithDrawMain: '+ToStr(WithDrawMain));
Debug('WithDrawSeco: '+ToStr(WithDrawSeco));
end;

for i := 0 to HowManyPlayers-1 do
if Players[i].Active then
begin
CurrentPlayer := i;
Break;
end;

Writeln('CurrentPlayer = '+Players[CurrentPlayer].Name);

WRiteln('AK Smelter v'+version);
Writeln(' By Narcle');
Debug('Runescape Loading...');
While not RSReady do
Wait(100);
Debug('Logging in...');
ResetTimer('Break');
LoginPlayer;
end;

begin
ScriptStartup;
repeat
if Playas[CurrentPlayer].AlKharid then
Case Players[CurrentPlayer].Loc of
'lost':
if not AKFindPosition then
LogoutSeq('Couldn''t find position');
'at bank':
if Bank then
SetLoc('banked');
'banked':
if ToAKCactus(true) then
SetLoc('to furnace');
'to furnace':
if ToAKFurnace then
SetLoc('at furnace');
'at furnace':
if Smelt then
SetLoc('smelted');
'smelted':
if ToAKCactus(False) then
SetLoc('to bank');
'to bank':
if ToAKBank then
SetLoc('at bank');
end;

if Playas[CurrentPlayer].Edgeville then
Case Players[CurrentPlayer].Loc of
'at bank':
if Bank then
SetLoc('to furnace');
'to furnace':
if ToEdgeFurnace then
SetLoc('at furnace');
'at furnace':
if Smelt then
SetLoc('to bank');
'to bank':
if ToEdgeBank then
SetLoc('at bank');
'lost': LogoutSeq('Couldn''t find position');
end;

DoChecks;
until (AllPlayersInactive);
end.

Lyonhart
06-16-2012, 05:53 AM
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ **** | True | 06:25:10 | 97 | 0 | 9068 | 57806 | 9005 ]
[================================================== ====================]

9k Cannonballs, brilliant!

Many Kudos!

nokiaacer
06-17-2012, 04:58 AM
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active...
All players not active!
NextPlayer(True)

anyone knows how to fix this, it keeps logging out after opening bank after doing about 2 loads it says failed to smith 2 times as well but it has already smith all the bars



ps: how to make it dont take breaks anyone?

megashadow42691
06-17-2012, 08:38 AM
this bot is not working for me, in line 1787 ScreenShots := true; is missed up.
after i delete that line it pops open another tab called smart where line 95 98 101 are also missed up plz help me

ShitboyShitpants
06-17-2012, 08:39 AM
this bot is not working for me, in line 1787 ScreenShots := true; is missed up.
after i delete that line it pops open another tab called smart where line 95 98 101 are also missed up plz help me
same here.

Metagen
06-18-2012, 02:12 AM
Your script is working great Narcle (After commenting the compile error :p)

[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ SECRET | True | 02:15:29 | 117 | 0 | 1596 | 87780 | 38873 ]
[================================================== ====================]

Emerald Rings.
I stopped it myself because I wanted to restart smart before bed :)

creedgaming
06-18-2012, 10:15 AM
So the script loads properly but it only works 2-3 minutes and it comes up "Base" or "Failed to smelt 2 times" and then terminates.... Sometimes it doesn't bank the resources properly...

Evoleon
06-18-2012, 04:04 PM
Does anyone know how to stop the form from popping up. I have all my info put in (look below) but it still keeps on popping up. Any help would be appreciated. Also im not sure what the use player in script is used for but i have set that to both true and false and it still didnt work.

Name := 'username'; //Character Name
Pass := 'password'; //Character Pass
Active := true; //Use player in script?
Pin := ''; //Pin for bank
Strings[0] := 'steel'; //What to smith/craft? [Create string]
Strings[1] := 'Edgeville';//Where are you smithing? [Al Kharid, Edgeville]
//cballs, steeltoball, steel, mith, addy, runite, iron, bronze, silver, gold
Arrays[0] := [1, 2, true, false, '23:00', false, false, false];//Settings array
//Settings array := [1st Bankslot, 2nd Bankslot, Take-Breaks, Take-Sleeps, Sleep-Time 'hh:mm', Rest for run, Use Coal bag];
end;

blinkblink
06-18-2012, 06:15 PM
To fix the form issue

look for line #1794
You will see this, which is inside "ScriptStartUp":
if (Players[0].Name = '') then
begin
SafeInitForm;
if AKpf_SavePlayers then
SavePlayers(True);
if AKpf_Terminate then
TerminateScript;
end else

Simply change all that which executes the form adding "//" before each of them:
// if (Players[0].Name = '') then
// begin
// SafeInitForm;
// if AKpf_SavePlayers then
// SavePlayers(True);
// if AKpf_Terminate then
// TerminateScript;
// end else

That is it :P

nokiaacer
06-18-2012, 10:16 PM
ok can someone please tell me how to remove the antiban from script itself as i am not using the form?????????????????

Evoleon
06-19-2012, 04:10 AM
To fix the form issue

look for line #1794
You will see this, which is inside "ScriptStartUp":
if (Players[0].Name = '') then
begin
SafeInitForm;
if AKpf_SavePlayers then
SavePlayers(True);
if AKpf_Terminate then
TerminateScript;
end else

Simply change all that which executes the form adding "//" before each of them:
// if (Players[0].Name = '') then
// begin
// SafeInitForm;
// if AKpf_SavePlayers then
// SavePlayers(True);
// if AKpf_Terminate then
// TerminateScript;
// end else

That is it :P

Thank you so much!! It actually is working without a form!! I really appreciate it!! Anyone who is having trouble with the form still appearing follow these exact directions! +1

blinkblink
06-20-2012, 03:17 AM
Sapphire Bracelets at Edgeville

[================================================== =====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =====================]
[ XXXX | True | 05:37:59 | 337 | 0 | 4704 | 235200 | 41752 ]
[================================================== =====================]

[================================================== =====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =====================]
[ XXXX | True | 03:00:05 | 206 | 0 | 2870 | 143500 | 47810 ]
[================================================== =====================]

Wow, I just realized the XP being calculated is wrong... Sapphire Bracelets is 60xp each, so for the 3 hours run do the math 60xp x 2870 = 172,200xp gained xp LOL - I knew there was something odd with the xp being gained. Currently the script says the xp is 50xp which is supposed to be 60xp for each.

Latest run with the correct xp
[================================================== =====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =====================]
[ XXXX | True | 05:59:50 | 419 | 0 | 5852 | 351120 | 58545 ]
[================================================== =====================]

Blackdeath
06-20-2012, 07:18 PM
This script never fails to make me all the bars I need. Thank you!!!

[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ XXXX | True | 06:00:45 | 330 | 1640 | 0 | 49200 | 8183 ]
[================================================== ====================]

Sexininjah
06-20-2012, 10:44 PM
Wont click on furnace to smelt
Loading extension C:\Simba\Extensions\associate.sex
Extension Enabled
Loading extension C:\Simba\Extensions\extension.sex
Extension Enabled
Extensions Updater Enabled!
Loading extension C:\Simba\Extensions\msi.sex
Extension Enabled
Loading extension C:\Simba\Extensions\ObjectDTM.sex
Extension Enabled
Simba news:

Simba 0.98.2 has been released. See http://wizzup.org/simba/releases.html
or comment on the forum: http://villavu.com/forum/showthread.php?t=71065

Simba 984 is the latest Simba.

SRL 5 has been released. It is in the SRL updaters.

Simba 0.99 release candidate 4 has been released. You can find it at the
forums. It may very well be the last release candidate.

If you're interested, give it a go and leave feedback on the thread.


Thank you for using Simba,
Hakuna Matata.

Object DTM Extension: Failed to grab remote extension.
ODTM Updater Enabled!
Loading extension C:\Simba\Extensions\srl.sex
Extension Enabled
SRL Updater Enabled!
Plugins Updater Enabled!
SPS Updater Enabled!
MSI Updater Enabled!
[Error] C:\Users\NINJAH~1\AppData\Local\Temp\Narcles AK Smelter [v1.6.3][SRL5]-1.simba(1788:3): Unknown identifier 'ScreenShots' at line 1787
Compiling failed.
Compiled successfully in 577 ms.
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 1, Members: True, Signed: True, Super Detail: False.
Save and Start.
CurrentPlayer = kanethedemon
AK Smelter v1.6.3
By Narcle
Welcome to Runescape.
Kanethedemon
Screenshot of: IP Log 2 Minutes and 10 Seconds
Current player: Kanethedemon
Item := TPAItem(178, 31, 29, 1317936);
Item := TPAItem(178, 31, 29, 1646881);

[================================================== =================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =================]
[ Kane | True | 00:00:34 | 1 | 0 | 0 | 0 | 0 ]
[================================================== =================]

[================================================== =================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =================]
[ Kane | True | 00:02:24 | 2 | 0 | 0 | 0 | 0 ]
[================================================== =================]
Failed to smelt 2+ times, kanethedemon is now inactive.
NextPlayer(False)

[================================================== =================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =================]
[ Kane | True | 00:03:49 | 2 | 0 | 0 | 0 | 0 ]
[================================================== =================]
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active...
All players not active!

creedgaming
06-21-2012, 07:13 AM
Wont click on furnace to smelt
Loading extension C:\Simba\Extensions\associate.sex
Extension Enabled
Loading extension C:\Simba\Extensions\extension.sex
Extension Enabled
Extensions Updater Enabled!
Loading extension C:\Simba\Extensions\msi.sex
Extension Enabled
Loading extension C:\Simba\Extensions\ObjectDTM.sex
Extension Enabled
Simba news:

Simba 0.98.2 has been released. See http://wizzup.org/simba/releases.html
or comment on the forum: http://villavu.com/forum/showthread.php?t=71065

Simba 984 is the latest Simba.

SRL 5 has been released. It is in the SRL updaters.

Simba 0.99 release candidate 4 has been released. You can find it at the
forums. It may very well be the last release candidate.

If you're interested, give it a go and leave feedback on the thread.


Thank you for using Simba,
Hakuna Matata.

Object DTM Extension: Failed to grab remote extension.
ODTM Updater Enabled!
Loading extension C:\Simba\Extensions\srl.sex
Extension Enabled
SRL Updater Enabled!
Plugins Updater Enabled!
SPS Updater Enabled!
MSI Updater Enabled!
[Error] C:\Users\NINJAH~1\AppData\Local\Temp\Narcles AK Smelter [v1.6.3][SRL5]-1.simba(1788:3): Unknown identifier 'ScreenShots' at line 1787
Compiling failed.
Compiled successfully in 577 ms.
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 1, Members: True, Signed: True, Super Detail: False.
Save and Start.
CurrentPlayer = kanethedemon
AK Smelter v1.6.3
By Narcle
Welcome to Runescape.
Kanethedemon
Screenshot of: IP Log 2 Minutes and 10 Seconds
Current player: Kanethedemon
Item := TPAItem(178, 31, 29, 1317936);
Item := TPAItem(178, 31, 29, 1646881);

[================================================== =================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =================]
[ Kane | True | 00:00:34 | 1 | 0 | 0 | 0 | 0 ]
[================================================== =================]

[================================================== =================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =================]
[ Kane | True | 00:02:24 | 2 | 0 | 0 | 0 | 0 ]
[================================================== =================]
Failed to smelt 2+ times, kanethedemon is now inactive.
NextPlayer(False)

[================================================== =================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =================]
[ Kane | True | 00:03:49 | 2 | 0 | 0 | 0 | 0 ]
[================================================== =================]
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active...
All players not active!

Having same issues with script

Sexininjah
06-22-2012, 12:23 AM
Having same issues with script

Idk how to fix it. Reinstalled simba and everything but still not working. I even deleted all the components and reinstalled them.

blinkblink
06-22-2012, 01:52 AM
You guys above just add "//" on the screenshots line #1787(should be around there)
Original:
ScreenShots := true;
Make it like this:
// ScreenShots := true;
Save it afterwards.

That should fix it

Sexininjah
06-22-2012, 10:37 AM
You guys above just add "//" on the screenshots line #1787(should be around there)
Original:
ScreenShots := true;
Make it like this:
// ScreenShots := true;
Save it afterwards.

That should fix it


I did have that. It runs fine until it gets to furnace and does not click to smelt. I have tried everything else I can.

blinkblink
06-22-2012, 04:40 PM
I did have that. It runs fine until it gets to furnace and does not click to smelt. I have tried everything else I can.

Yeah sorry I just realized now what I mentioned was not needed, my bad

What are you doing(smelting or crafting), what are you trying to make and at what location? I want to try it to see if its working or not

I know for sure crafting sapphire bracelet works perfectly on both edveville & al kharid

simbanoob
06-23-2012, 06:04 AM
i've been looking for hours.. please help if u can.... heres what it says...
Compiled successfully in 640 ms.
SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 1, Members: True, Signed: True, Super Detail: False.
Error: Exception: Access violation at line 105
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
No Plugins update available.
No SRL update available.


[Error] (1:1): Unexpected end of file at line 0
Compiling failed. after a smart tab popped up now to.... i have no clue why it won't work :p

clc
06-23-2012, 01:30 PM
[Error] (1788:3): Unknown identifier 'ScreenShots' at line 1787
Compiling failed.
if it has already been addressed plz link me
nvm

clc
06-23-2012, 01:31 PM
I did have that. It runs fine until it gets to furnace and does not click to smelt. I have tried everything else I can.
tyvm

Run S Kape
06-23-2012, 01:36 PM
Thanx for the awesome script. It runs for hours and hours without any error, i almost run on 3 accounts

mandy4ever4
06-24-2012, 05:21 AM
i've been looking for hours.. please help if u can.... heres what it says...
Compiled successfully in 640 ms.
SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 1, Members: True, Signed: True, Super Detail: False.
Error: Exception: Access violation at line 105
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
No Plugins update available.
No SRL update available.


[Error] (1:1): Unexpected end of file at line 0
Compiling failed. after a smart tab popped up now to.... i have no clue why it won't work :p Got same thing :(

raggdoll811
06-24-2012, 05:23 AM
Thought I'd drop in and say thanks. Here's a nice little proggy:

Gold Bars
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ ****| True | 00:57:50 | 33 | 923 | 0 | 20768 | 21544 ]
[================================================== ====================]


Emerald Rings
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ ****| True | 01:13:47 | 72 | 0 | 994 | 54670 | 44453 ]
[================================================== ====================]

Decided to test with 1k materials to meet a needed target level. Works great, 10/10. Thank you sir and will definitely continue using.

slobo4
06-24-2012, 09:32 AM
i am trying a lot of scripts on simba,
but i have to say that this is one of the best !
Thanks :D

Death12652
06-25-2012, 02:38 AM
So uh did you forget that for Cballs smelter you need the mold?

Nevermind I fail I forgot anout the whole toolbelt thing they have now, been a long time since I have auto'd just now picking it back up.

Run S Kape
06-27-2012, 04:59 PM
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ ---- | True | 07:34:53 | 359 | 3210 | 0 | 56353 | 7433 ]
[================================================== ====================]




................................................ht tp://villavu.com/forum/picture.php?albumid=95&pictureid=246

holy angel
06-29-2012, 01:57 PM
I cant get it to do gold bars at edge anyone know why? It just keeps checking my skills and facing camera north

Cokedrip
07-03-2012, 10:54 PM
Everytime I try to "Save and Start"

Error: Out Of Range at line 183
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]




-----> Line 183: WriteINI('Player['+IntToStr(i)+']', 'Arrays[0][7]', BoolToStr(Arrays[0][7]), FilePath);





I've never been able to successfully run this script, I've been trying to troubleshoot it for awhile now..

Help?

kevin33
07-04-2012, 12:36 AM
Ok so me and my persistant mind have found a fix for all those people getting the error FAILED TO SMELT 2+ TIMES...

Go to line 1505 of the script:

if (FailToSmelt > 2) then

Change the 2 to a larger number like say 100. This will allow it to run longer which is wonderful. If you have the experience you could also change the part completely but NARCLE doesnt like people messing with his scripts so I cannot post what to do nor do I know if he is okay with me posting this. ANyways hope this helps and if you have any questions feel free to ask me.
Narcle if you dont want this up I will sadly remove it just let me know :)

Dani Bolton
07-04-2012, 10:00 AM
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ *** | True | 07:33:36 | 127 | 0 | 14112 | 89964 | 11900 ]
[================================================== ====================]


Lovely thanks.

kevin33
07-04-2012, 02:17 PM
Gold crafting :)
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ | True | 06:00:02 | 241 | 0 | 1920 | 38400 | 6399 ]
[================================================== ====================]

Mindset
07-05-2012, 06:24 PM
Awesome script dude - I got 99 crafting with this thanks :) Just trying to finish 97-99 smithing - What string do I need to use for Gold Ore/Gold Bars please dude?

Thanks,
Chris

Brow
07-07-2012, 02:49 PM
I just can't get this script to stay logged in for more than 3 trips of doing 'Gold ring'(s) previous to me trying gold rings it worked perfect making mith bars, I can't see where or if I've gone wrong. All I've changed is 'mith' to 'Gold ring' ..."/

-Brow

kevin33
07-07-2012, 05:44 PM
What does your debug say when you run it? (make sue you turn it on and then run the script)

Leonardo Da Vinci
07-07-2012, 08:37 PM
Any idea how to fix this?
I can't WAIT to try this, thank you!

[Error] (1788:3): Unknown identifier 'ScreenShots' at line 1787
Compiling failed.

Edit: I stopped being a retard and looked through the thread.

-----

Absolutely brilliant and flawless script. Nothing I could possibly suggest or add to.
This is a "Must-download" on my list.

kagly14
07-09-2012, 12:46 PM
when i start the script it says "Player 0 create string not setup correctly, please fix."goes away and nothing happens so please help

JereHakala
07-09-2012, 08:13 PM
I'm at top 190 smith thanks to this script :) Amazing that it works almost 4 months after without update, Jagex is doing great job.

Wait..

RuneDragon
07-10-2012, 12:51 AM
I'm at top 190 smith thanks to this script :) Amazing that it works almost 4 months after without update, Jagex is doing great job.

Wait..

What you smited ? I want to reach 90 :P

Sexininjah
07-10-2012, 04:33 PM
Level 92 smith thanks to this script! Cannonballs and rune bars all the way!

nexusenvy
07-11-2012, 02:01 AM
Did they just change the smelt bar screen? I don't remember if it was blue yesterday.

Edit: oops it was mybad script is fine :)

Kampf Gewehr
07-12-2012, 03:34 PM
Narcle- This is the BEST smelting bot that I have found. I run this across a few different accounts and it's very dependable, simple, and clean, and easy to use. Good work!

kagly14
07-13-2012, 03:32 PM
thank you guys for no help!!!!!!!!!!!!!!:duh::duh::wacko:

yuanli82
07-14-2012, 01:32 AM
This script does not run, and not to update?
Now there are people running this script it?
I ask next?

Olly
07-15-2012, 06:46 PM
This script does not run, and not to update?
Now there are people running this script it?
I ask next?

That make no sense....

kevin33
07-15-2012, 07:19 PM
That make no sense....

He means it doesnt run (because the toolbar update) and he does not have the temp fix in order to "update" it to be used for him at this time.
There are people using it Im sure that have taken the time to do the temp fix but I advise you wait because the official fix is just around the corner.

Jowston
07-17-2012, 06:12 PM
Did the test fix, but still can't get this script up. Can't wait for it to come back, only script I've found that supports coal bag!

mortino
07-18-2012, 02:03 AM
i can only get this script working on amulets, also have on tried gold crafting, trying to get bracelets to work but unfortunately i only know DTM's and nothing about TPA's. :(

YoHoJo
07-27-2012, 08:07 AM
Got latest everything, it logs in, but mouse moves around a bit and then Loc is set to lost and it logs out.
Starting at bank w/ empty inventory.

Bam Bam
07-27-2012, 05:34 PM
Got latest everything, it logs in, but mouse moves around a bit and then Loc is set to lost and it logs out.
Starting at bank w/ empty inventory.

Same for me. I also haven't read enough of it yet to pinpoint the problem.

-Bam Bam

Bam Bam
07-27-2012, 05:54 PM
Got latest everything, it logs in, but mouse moves around a bit and then Loc is set to lost and it logs out.
Starting at bank w/ empty inventory.

YoHoJo, start with the bank screen open and the items in the correct slots, it's working for me right now.

Narcle
07-27-2012, 11:00 PM
Still works? Thought new SRL changes made it outdated atm (not including screenshot thing)

Bam Bam
07-28-2012, 01:58 AM
Still works? Thought new SRL changes made it outdated atm (not including screenshot thing)

I had to fix the smart declaration and remove the screenshot thing as well as the smart debug stuff. Once I got all that done it would log in and then log out immediately so after reading through your code I discovered it would work with bank screen open at start :P so yes, most of it still works great

-Bam Bam

Edit: as I was typing this out I got a "Couldn't find position, <player name> is now inactive" which I haven't bothered to debug yet seeing as I've been babysitting it for the most part.

Edit for the Edit: It'd have helped if I'd been running on highest brightness I think lol..

nexusenvy
07-28-2012, 02:41 AM
deleted: wrong post :p

Sexininjah
07-28-2012, 12:13 PM
Still works? Thought new SRL changes made it outdated atm (not including screenshot thing)

any time frame for an updated script Narcle? Not rushing just wondering. Epicbot and Powerbot dont have a good smelter bot with coal bag like yours :P Trying for my 99 and of course your script will get the credit no one elses.

Narcle
07-28-2012, 01:08 PM
any time frame for an updated script Narcle? Not rushing just wondering. Epicbot and Powerbot dont have a good smelter bot with coal bag like yours :P Trying for my 99 and of course your script will get the credit no one elses.

Not atm, I'm literally working 7 days a week atm. No time off until next Saturday.

nokiaacer
07-28-2012, 03:40 PM
yeah hope you can do a little update when you get the time narcle gets cannot find position quite a bit an stalls sometimes until logout at withdraw

Sexininjah
07-28-2012, 04:02 PM
Not atm, I'm literally working 7 days a week atm. No time off until next Saturday.

Oh well guess Imma have to wait then :) thanks narcle anyways

Kampf Gewehr
07-30-2012, 11:54 AM
I updated everything again and am still getting this error? Can anyone please help me?


[Error] C:\Simba\Includes\srl/srl/misc/Smart.simba(53:19): Invalid number of parameters at line 52
Compiling failed.

James Cash
07-30-2012, 01:27 PM
so many faults, first without changing anything but filling it in normally..

[Error] C:\Simba\Includes\SRL/SRL/core/globals.simba(581:5): Unknown identifier 'ImageSetClientArea' at line 580
Compiling failed.

after clearing this up the problems go on and on, what shall i do?
line 580 is blank..
Updated everything -------------
[Error] C:\Simba\Includes\srl/srl.simba(86:19): Unknown identifier 'SetupSmart' at line 85
Compiling failed.
[Error] (32193:1): Unexpected end of file at line 32192
Compiling failed.

Deleted line 85 it was ANOTHER blank line and got the 2nd thing after?>>

YoHoJo
07-30-2012, 11:15 PM
YoHoJo, start with the bank screen open and the items in the correct slots, it's working for me right now.

That is so weird it works!
Just open your bank screen, then start the script, and it works just fine.
But if you start it just standing in the bank, it logs you out and sets Loc to 'Lost'.
Thanks!

Bam Bam
07-31-2012, 12:40 PM
so many faults, first without changing anything but filling it in normally..

[Error] C:\Simba\Includes\SRL/SRL/core/globals.simba(581:5): Unknown identifier 'ImageSetClientArea' at line 580
Compiling failed.

after clearing this up the problems go on and on, what shall i do?
line 580 is blank..
Updated everything -------------
[Error] C:\Simba\Includes\srl/srl.simba(86:19): Unknown identifier 'SetupSmart' at line 85
Compiling failed.
[Error] (32193:1): Unexpected end of file at line 32192
Compiling failed.

Deleted line 85 it was ANOTHER blank line and got the 2nd thing after?>>

You have to basically know how to script to fix this thing. There are a lot of changes that need making due to SRL changes. Fix the smart declaration and remove references to paintsmart if you need to.


That is so weird it works!
Just open your bank screen, then start the script, and it works just fine.
But if you start it just standing in the bank, it logs you out and sets Loc to 'Lost'.
Thanks!

I think something else isn't working but that works because the first couple lines in the function exits if the bank screen is detected after setting location to 'bank'

Narcle
08-01-2012, 01:28 AM
I think something else isn't working but that works because the first couple lines in the function exits if the bank screen is detected after setting location to 'bank'

I'm guessing it's my bank detection loop that makes it fail. So basically its flawed somewhere when its declaring the location but having the bankscreen open overrides it. /shrug

furion_pwnage
08-01-2012, 11:18 PM
Edit: I see that this is outdated. I really do appreciate this script narcle, helped out a lot.

otaman
08-02-2012, 01:47 AM
Ok I've read through about 10 pages from the end back, and another ten hopping through the 94 currently in this thread and I can't find an answer here or anywhere.
I know with a bit of modding this script should work, and I assumed I'd be able to do it. Maybe I'm doing it wrong, or maybe I don't know the actual problem. I've tried all sorts of things. I know people don't always simply tell other what to do so they learn themselves, but I'm totally lost after trying many different edits for the last hour or so. If I could even get a hint or a link to a thread that might explain something that'd be great.

Bam Bam
08-02-2012, 03:50 PM
Narcle, this is overall a great script but you're a little short on failsafes in my opinion. For example if you set coal bag true and then don't have it for some reason, it was clicking the furnace for like an hour on me just now.. If / when you get around to releasing the update you should think about adding a coal bag detection if use coal bag is set to true or something to that effect that will stop it from trying to smelt endlessly when there aren't any coal ores left

Narcle
08-03-2012, 01:11 AM
Narcle, this is overall a great script but you're a little short on failsafes in my opinion. For example if you set coal bag true and then don't have it for some reason, it was clicking the furnace for like an hour on me just now.. If / when you get around to releasing the update you should think about adding a coal bag detection if use coal bag is set to true or something to that effect that will stop it from trying to smelt endlessly when there aren't any coal ores left

Coal bag was quickly added, I had to borrow an account just to do it so I wasn't able to add more failsafes and test it sadly.

[F]aceless
08-05-2012, 02:54 PM
Nice script! Nice GUI! Although I had to make some changes because it was outdated

Emotional
08-06-2012, 04:26 PM
[Error] C:\Simba\Includes\srl/srl/misc/Smart.simba(53:19): Invalid number of parameters at line 52
Compiling failed.

o.o DaFuqq XD

Codeman888
08-11-2012, 03:23 PM
i am getting this error when i try to run this script

[Error] C:\Simba\Includes\srl/srl/misc/Smart.simba(53:19): Invalid number of parameters at line 52
Compiling failed.

can anyone help please

Ian
08-13-2012, 03:38 AM
I think that you two will find this to be useful: http://villavu.com/forum/search.php

JereHakala
08-23-2012, 08:09 PM
so many faults, first without changing anything but filling it in normally..

[Error] C:\Simba\Includes\SRL/SRL/core/globals.simba(581:5): Unknown identifier 'ImageSetClientArea' at line 580
Compiling failed.

after clearing this up the problems go on and on, what shall i do?
line 580 is blank..
Updated everything -------------
[Error] C:\Simba\Includes\srl/srl.simba(86:19): Unknown identifier 'SetupSmart' at line 85
Compiling failed.
[Error] (32193:1): Unexpected end of file at line 32192
Compiling failed.

Deleted line 85 it was ANOTHER blank line and got the 2nd thing after?>>
The last update was 4 months ago, and the script was broken about a month ago due to one update, it clearly states on the first post that it is outdated.

Silly.

HolyWord
08-28-2012, 03:24 AM
After i updated it work with simba.991 and commented out a line it works fine :) Proggy later!

[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ Dave | False | 05:47:47 | 194 | 1729 | 6916 | 74538 | 12859 ]

Six hour fix isn't working. But script runs flawlessly.

newb cheater
08-29-2012, 10:18 AM
Would you mind to post your fixes?

The Killer
08-29-2012, 12:05 PM
Would you mind to post your fixes?

you should know how to fix it yourself by now.

Footy
08-30-2012, 04:15 PM
After I updated it, it worked perfectly! I'll post a six hour proggy when I get there.
E: Left the script run alone for an hour, and when I came back, it was in the al-kharid palace fountain area spam-clicking the compass. Other then that, it works great!

Kampf Gewehr
08-31-2012, 03:52 PM
Can someone help me out with how to fix this script so I can run it?

Footy
08-31-2012, 03:55 PM
Change {$i SRL/misc/smart.simba} to {$Define smart}
Change {$i SRL/misc/paintsmart.simba} to {$i SRL/misc/smartgraphics.simba}
Comment out all the smart server settings that give you errors.

Kampf Gewehr
09-01-2012, 04:45 AM
Wow thank you so much... this worked! I really appreciate your help bro.

Kampf Gewehr
09-01-2012, 11:06 AM
Footy,

with your fix I was able to make almost 2500 steel bars. I eventually stopped it myself cause runescape was about to update.

[================================================== =====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== =====================]
[ xxxx | True | 180:08:39 | 269 | 2412 | 0 | 42344 | 235 ]
[================================================== =====================]

nice robust script narcle!

Footy
09-01-2012, 01:26 PM
Erm... You ran this for 180 hours??? o.0

Austin
09-02-2012, 12:44 AM
Good script, hope it gets fixed after the Al-kharid graphical update in a week or too :(

James Cash
09-02-2012, 07:22 PM
[Error] C:\Simba\Includes\srl/srl/misc/Smart.simba(46:19): Invalid number of parameters at line 45
Compiling failed.
hmm

Footy
09-02-2012, 07:28 PM
See my fix about 5 posts up.

James Cash
09-02-2012, 09:01 PM
ok, done what you said..
Exception in Script: Unable to find file 'SRL/misc/smartgraphics.simba' used from 'C:\Users\all\Downloads\Narcles AK Smelter [v1.6.3][SRL5] (10).simba'

Footy
09-02-2012, 11:48 PM
Navigate to SRL/SRL/misc and see if smartgraphics.simba is there. If not, you need to reinstall simba, or its not fully updated.

Kampf Gewehr
09-05-2012, 11:00 PM
Erm... You ran this for 180 hours??? o.0

maybe the timer is counted in minutes? like 180 mins?

HolyWord
09-05-2012, 11:36 PM
maybe the timer is counted in minutes? like 180 mins?

No it probably just glitched.

kottonmouth
09-05-2012, 11:52 PM
180h would be great :)

Darkstar72
09-11-2012, 10:23 AM
Hey guys, so I had a similar problem to that mentioned on the previous page, followed the steps you guys said and it will actually start now so thx for that - anyone else pasting in the alternative "$Define Smart" etc should just check to make sure that their comp has saved the files using that exact pathway, cuz i think James Cash had this problem and thats why he couldnt find the smartgraphics.simba file.

As i said the script will start up now, however it wont actually DO anything - I've got it set on cannonballs and it takes out the steel bars fine, runs to furnace, but then it stands there using the steel bar with everything in the room except the furnace ... any help here would be greatly appreciated? :) my computing skills are a bit more then just lacking, but i tried searching through the script anyway and couldnt see anything that stuck out. Possibly the Al Kharid graphical update (that Austin mentioned earlier) has made the furnace unclickable? honestly i think i'm a little out of my epth here ...

EDIT: Nvm i uninstalled and redownloaded, must have been a corrupted file somehwere ... anywayz great script, thx

newb cheater
09-16-2012, 03:16 PM
[================================================== ====================]
[ Nick | Active | Worked | Banked | Bars | Crafted | XP | XP/Hour ]
[================================================== ====================]
[ **** | True | 01:24:37 | 58 | 0 | 1568 | 39200 | 27792 ]
[================================================== ====================]

Working well after all fixes

Kampf Gewehr
09-24-2012, 12:02 AM
Starting having issues with this script- I start with the bank window open, it withdraws the materials, but then decides it just wants to sit around and never goes to smelt. Not sure what is wrong, I have been using this with the fixes for two or three weeks now, always using the same method... any suggestions?

EDIT:Item :=
TPAItem(178, 31, 29, 1383729);
Item wasn't detected attempting a TPA update.
Item := TPAItem(178, 31, 29, 1383729);
Item := TPAItem(71, 31, 23, 3295064);
Counted BaseItem wrong

Naturiown
09-25-2012, 10:51 PM
okay i think i missed some installation stuff.... because i found this error.
[Error] C:\Simba\Includes\srl\srl\misc\Smart.simba(56:19): Invalid number of parameters at line 55
wanna tell me what i'm missing? o.O :D
thx

kevin33
09-26-2012, 07:40 PM
Got in two six hour runs yesterday :)
Just wondering Narcle, do you plan on updating it to work with the new Al Kharid update?? Really liked using this script on my f2p pure for crafting so it would be great if it was updated because it was the best for making jewelery and only one that really worked well for colour.