SRL Archive - Archive

Dgby714 - SRL Member Application


Dgby714

2010-03-04 03:09:40

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
Jethr0x (I think, it was awhile ago)


What is your general programming knowledge?
HyperText Markup Language
PHP: Hypertext Preprocessor

Bits of:
C
C++
C#
Java
JavaScript
Perl
Python
BASIC
Tcl
Visual Basic
Object Pascal
Lua(Very Little)
Ruby(Almost None)


Are you a member of any other communities?
Nope


Tell us about yourself…
From: Dgby714
My name is John in 16 years old and turn 17 in July.
I'm a 9th grade dropout planing on getting my GED.
I don't have a job right now.
I sleep weird hours for where I live (Sleeping 6am-5pm) yes am and pm are correct =)
I like World of Warcraft and Runescape.
I don't create script to get my characters in runescape better skills, I create them because I like scripting.
I like the felling you get after finishing a script that people will use (…this dosnt apply to my alcher lol)
When I post on a thread I edit it if I notice I spelt something wrong lol


Please show us one (or multiple) of your scripts.
Dg's PowerChopper:
program DgsPowerCutter;
{$define SMART} //Comment to turn off Smart =)
{$IFDEF SIMBA}
{$include SRL/SRL.scar}
{$include SRL/SRL/misc/Reports.scar}
{$include SRL/SRL/misc/trade.scar}
{$include SRL/SRL/misc/FindXP.scar}
{$include SRL/SRL/misc/Debug.scar}
{$ELSE}
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/Reports.scar}
{.include SRL/SRL/misc/trade.scar}
{.include SRL/SRL/misc/FindXP.scar}
{.include SRL/SRL/misc/Debug.scar}
{$ENDIF}

const
SRLStatsID = ''; //Stats ID
SRLStatsPass = ''; //Stats Pass
SServer = 123; // Smart Server (integer) 0 = Random
SMembers = False; // Member? (boolean)
SSigned = False; // Signed? (boolean)
CheckForUpdate = true; //Will alert you if theres a newer version out
UseAccountINI = true; //Use accounts.ini or DeclarePlayers
Debug = false; //does nothing atm lol

{*******************************************************************************
procedure DeclarePlayers;
By: ???
Description: Generic DeclarePlayers
*******************************************************************************}
procedure DeclarePlayers; // You only have to fill this
begin // out if your not using Accounts.ini
CurrentPlayer := 0;
NumberOfPlayers(1);
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Strings[1] := ''; // Tree Type? [normal..magic or ivy]
Strings[4] := 'vtp'; // Area (Only if Cutting Ivy)
Strings[2] := 'Woodcutting'; // Lampskill
Strings[3] := 'N'; //Run Direction incase of Fight, can be 'N', 'E', 'S', 'W' or an angle in degrees (145, 93, 180, etc).
Integers[1] := 1; // Loads of Logs or Ivy CutDown?
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
Active := True;
end;
end;

{###############################################################################
### SCRIPT BELOW THIS POINT ###
###############################################################################}

const
Script = 'Dg''s PowerCutter';
Version = '0.5';
UURL = 'http://dgspc.freehostia.com/DgsPC.simb.ver';
FourmURL = 'http://villavu.com/forum/showthread.php?p=687781';

{*******************************************************************************
type DGObject
By: Dgby714
Description: A type for Objects
*******************************************************************************}
type
DGObject = record
Uptext: TStringArray;
Color: integer;
Hue: extended;
Sat: extended;
Tol: integer;
Dir: string; //Direction to Point to see Ivy!
end;

{*******************************************************************************
Var and Const
By: Dgby714 and more =)
Description: Varibles and Constistants LOL cant Spell
*******************************************************************************}
var
NumOfPlay, Stats_UserID, Stats_Password, Stats_ScriptID: string;
{$IFNDEF SIMBA}SVersion: string;{$ENDIF}
Stats_LastTime: Integer;
Stats_GlobalVars: array[1..24] of Integer;
Stats_CustomVars: array [1..20] of Integer;

const
Stats_Link = 'http://scriptmanager.freehostia.com/submit.php';

{$IFDEF SIMBA}
{*******************************************************************************
function Implode(Glue : string; Pieces : TStringArray) : string;
Description: srl_Implode
*******************************************************************************}
function Implode(Glue : string; Pieces : TStringArray) : string;
begin
Result := srl_Implode(Pieces, Glue);
end;

{*******************************************************************************
function Explode(str, del: string): TStringArray;
Description: srl_Explode
*******************************************************************************}
function Explode(str, del: string): TStringArray;
begin
Result := srl_Explode(str, del);
end;
{$ENDIF}

{*******************************************************************************
procedure Screenie;
By: Dgby714
Description: Gets a ScreenShot of the Target
*******************************************************************************}
procedure Screenie;
begin
TakeScreenshot('');
end;

{*******************************************************************************
procedure WriteLnEx( str: string );
By: Dgby714
Description: Adds [TheTime] to the beggining of WriteLn
*******************************************************************************}
procedure WriteLnEx( str: string );
begin
WriteLn('[' + TheTime + '] ' + str);
end;

{*******************************************************************************
procedure Report( str: string );
By: Dgby714
Description: Does Disguise, Status, and WriteLnEx all in one
*******************************************************************************}
procedure Report( str: string );
begin
{$IFNDEF SIMBA}
Disguise(str);
Status(str);
{$ENDIF}
WriteLnEx(str);
end;

{*******************************************************************************
procedure Stats_CheckOutput(s: string);
By: ???
Description: ???
*******************************************************************************}
procedure Stats_CheckOutput(s: string);
var
i: Integer;
sa: TStringArray;
begin
sa := Explode(#10, s);
for i := 0 to High(sa) do
if (Trim(sa[i]) <> '') then
if StartsWith('ERROR(1)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_UserID := '';
Stats_Password := '';
end
else if StartsWith('ERROR(2)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_ScriptID := '';
end
else
WriteLn('STATS: "' + sa[i] + '"');
end;

{*******************************************************************************
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
By: ???
Description: ???
*******************************************************************************}
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
var
Client: Integer;
s: string;
sa: TStringArray;
begin
Result := False;
if (Stats_ScriptID = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getinfo');
AddPostVariable (Client, 'sID', Stats_ScriptID);
s := PostHTTPPageEx(Client, Stats_Link);
sa := Explode(#10'GLUE'#10, s);
if (Length(sa) = 5) then
begin
Result := True;
Version := sa[0];
News := sa[1];
Link := sa[2];
OutDated := sa[3] = '1';
LastUpdate_HoursAgo := StrToIntDef(sa[4], -1);
end
else
Stats_CheckOutput(s);
FreeHTTPClient(Client );
end;

{*******************************************************************************
procedure Stats_SendReport;
By: ???
Description: ???
*******************************************************************************}
procedure Stats_SendReport;
var
i, Client, Time: Integer;
s: string;
begin
if (Stats_UserID = '') and (Stats_Password = '') and (Stats_ScriptID = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'submit');
Time := (GetTimeRunning - Stats_LastTime) div 1000 div 60;
if (Time < 5) then
Time := 0
else
Stats_LastTime := GetTimeRunning;
AddPostVariable(Client, 'sTime', IntToStr(Time));
if (Stats_UserID <> '') and (Stats_Password <> '') then
begin
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
end
else
begin
AddPostVariable(Client, 'uID', '-1');
AddPostVariable(Client, 'uPass', '');
end;
if (Stats_ScriptID <> '') then
begin
AddPostVariable (Client, 'sID', Stats_ScriptID);

for i := Low(Stats_CustomVars) to High(Stats_CustomVars) do
begin
AddPostVariable(Client, 'rndCustom' + IntToStr(i), IntToStr(Stats_CustomVars[i]));
Stats_CustomVars[i] := 0;
end;
end
else
begin
AddPostVariable (Client, 'sID', '-1');
end;
for i := Low(Stats_GlobalVars) to High(Stats_GlobalVars) do
begin
case i of
1: s := IntToStr(SRL_Logs - Stats_GlobalVars[i]);
2: s := IntToStr(Banks - Stats_GlobalVars[i]);
3: s := IntToStr(RandSolved[rand_Death] - Stats_GlobalVars[i]);
else if ((i - 3) < Length(RandSolved) - 1 {for Death}) then
s := IntToStr(RandSolved[i - 3] - Stats_GlobalVars[i]);
end;
AddPostVariable(Client, 'rndGlobal' + IntToStr(i), s);
Stats_GlobalVars[i] := Stats_GlobalVars[i] + StrToInt(s);
end;
s := PostHTTPPageEx(Client, Stats_Link);
Stats_CheckOutput(s);
FreeHTTPClient(Client);
if (SRL_Procs[srl_OnSendStats] <> nil) then
SRL_Procs[srl_OnSendStats]();
end;

{*******************************************************************************
procedure Stats_SendAccountInfo;
By: ???
Description: ???
*******************************************************************************}
procedure Stats_SendAccountInfo;
var
i, Client: Integer;
Accounts: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'setaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
if (Stats_ScriptID <> '') then
AddPostVariable (Client, 'sID', Stats_ScriptID)
else
AddPostVariable (Client, 'sID', '-1');
SetLength(Accounts, HowManyPlayers);
for i := 0 to HowManyPlayers - 1 do
Accounts[i] := implode('.|â&#8218;¬statâ&#8218;¬|.', [Players[i].Name, Players[i].Loc, IntToStr(Integer(Players[i].Active))]);
AddPostVariable(Client, 'accInfo', Implode(#10'ACC'#10, Accounts));
Stats_CheckOutput(PostHTTPPageEx(Client, Stats_Link));
FreeHTTPClient(Client);
end;

{*******************************************************************************
procedure Stats_ManageAccounts;
By: ???
Description: ???
*******************************************************************************}
procedure Stats_ManageAccounts;
var
i, ii, Client: Integer;
s: string;
Accounts, Stats: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
AddPostVariable (Client, 'sID', '-1');
s := PostHTTPPageEx(Client, Stats_Link);
Accounts := Explode(#10'ACC'#10, s);
for i := 0 to High(Accounts) do
begin
Stats := Explode('.|â&#8218;¬statâ&#8218;¬|.', Accounts[i]);
if (Length(Stats) = 3) then
begin
for ii := 0 to HowManyPlayers - 1 do
if (LowerCase(Players[ii].Name) = LowerCase(Stats[0])) then
begin
Players[ii].Loc := Stats[1];
Players[ii].Active := Stats[2] = '1';
Break;
end;
end
else
begin
Stats_CheckOutput(s);
Break;
end;
end;
FreeHTTPClient(Client);
stats_SendAccountInfo;
end;

{*******************************************************************************
function Space( num: integer ): string;
By: Dgby714
Description: Returns num spaces
*******************************************************************************}
function Space( num: integer ): string;
var
Text: string;
I: Integer;
begin
for I := 0 to Num do
Text := Text + ' ';
Result := Text;
end;

{*******************************************************************************
procedure Banner(str: string);
By: Dgby714
Description: My Banner =) (ToDo: Fix when ReplaceDebugLine comes out!)
*******************************************************************************}
procedure Banner(str: string);
var
ScriptName: string;
ConvertLength: integer;
begin
ScriptName := str + ' ' + Trim(Version);
ConvertLength := Floor((66 - Length(ScriptName)) / 2);
ScriptName := Space(ConvertLength) + ScriptName + Space(ConvertLength);
{$IFDEF SIMBA}
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| ________ ___. _________ ____ _____ |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| ________ ___. _________ ____ _____ |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| | | \ / ___\| __ < | | / / | |/ | |_ |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| ________ ___. _________ ____ _____ |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| | | \ / ___\| __ < | | / / | |/ | |_ |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| /_______ /\___ /|___ / ____| /____/ |___\____ | |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
{$ELSE}
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ReplaceDebugLine(2, '| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
Wait(Random(500));
ReplaceDebugLine(4, '| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
Wait(Random(500));
ReplaceDebugLine(6, '| \//_____/ \/\/ |__| |');
Wait(Random(500));
ReplaceDebugLine(1, '| ________ ___. _________ ____ _____ |');
Wait(Random(500));
ReplaceDebugLine(3, '| | | \ / ___\| __ < | | / / | |/ | |_ |');
Wait(Random(500));
ReplaceDebugLine(5, '| /_______ /\___ /|___ / ____| /____/ |___\____ | |');
{$ENDIF}
end;

{*******************************************************************************
procedure AntiRandoms;
By: ???
Description: Generic AntiRandoms
*******************************************************************************}
procedure AntiRandoms;
begin
LampSkill := Players[CurrentPlayer].Strings[2];
FindNormalRandoms;
if FindFight then
begin
srl_Warn('AntiRandoms', Players[CurrentPlayer].Name + ' was Attacked!', warn_AllVersions);
RunAway(Players[CurrentPlayer].Strings[3], True, 1, 1000+Random(500));
end;
if SomeoneTrades then
srl_Warn('AntiRandoms', GetTradersName + ' Traded ' + Players[CurrentPlayer].Name + '!', warn_AllVersions);
end;

{*******************************************************************************
procedure AntiBan;
By: ???
Description: Generic AntiBan
*******************************************************************************}
procedure AntiBan;
begin
case Random(60) of
0: RandomRClick;
1: HoverSkill('Woodcutting', False);
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
5: ExamineInv;
end;
end;

{*******************************************************************************
function GetBitmap(name: string): integer;
By: Dgby714
Description: Results the Log Bitmap
*******************************************************************************}
function GetBitmap(name: string): integer;
begin
case name of
'normal': Result := BitmapFromString(10, 10, 'beNpz02zNtk700o730Ip104x21' +
'YAgIBsoAkRA2XBbabgCuDhQBIggsineOhAuMoLoRVMAtyXSWR0iBTENLhjioB' +
'pkp+JrpRRpLwMXDHdUczSUdTGWczOV9zRX8LZUBAoC1aChABtloF6gCb7mEp7' +
'GYkAGUCMQARUDEdxfQJODrCSBapC9A2EDEcTNQBRiIwVxMEIWAJfFT3M=');
'oak': Result := BitmapFromString(10, 10, 'beNpLtppXHwlEZcGq7Wk2rSnWQARk' +
'wBFEFqKgM90WoqY52aoxybI23gIuBResT7CsijErizQpCjOuCFUFIohgTax5RZRp' +
'tKtGvIdWopd2mq8ukAtUmRNogIYKQoxAeqNMs7wVU9zkgUZBVAIR0BCgpUAEFAGa' +
'XBSgnOOjCDQcaAXQdrgDgBrhzi4JUkF2MxABNWKVhSjI8FRA9jIkEKAKANFOblo=');
'willow': Result := BitmapFromString(10, 10, 'beNqzEY0Mtgai8EArNzsxIHKxE' +
'QUiRysRILI3F4ZIoQnamApbGguZGwgCZZEF9TT5DLX5gchETwCIgIJANWgIqB' +
'GIgIp9PU08XQyBDAgCKoYjoIFAk4N8zYFqIOajIYibgSjE3wLZbQRlgWy4LNx' +
'fyAifLADjnD8n');
'maple': Result := BitmapFromString(10, 10, 'beNqz4a0IVQWismDVeHu+WFteCI' +
'q24Y204g235IFIQUTggkFmPAEm3N6G3EBZuGCIOY+9JqejNqeLDpebHpenARdQ' +
'EKgGDfkacwP1Ak3I8lZMcZMHMoAIqBeIgOohCGgg0OSiAOUcH0UgG4jgtkMQxM' +
'1AVBKkAncwXAEeWSAJl0X2MkQBLlmoAgB7C0VP');
'yew': Result := BitmapFromString(10, 10, 'beNoz5y6KMYYjexVOXwtuIPI2hyJk' +
'KbigpymXmzGXiyGXoz6noxoIAUXggoYq7CZq7OYaHEBZIBcoaKPDgYbs9TghspaK' +
'HCZy7BA2BAHVAxFEBGiyjTIHUA3EfDgCygIFcbkN4iqsskCUEqBjrsCB5mW4LMQN' +
'2AMEAB/iOxE=');
'magic': Result := BitmapFromString(10, 10, 'beNqrjdSf3q3T09heF9VaGwlEQA' +
'YQZSVaA1FarOXpKxcTI7RTonQgInDxxCjz2DATNCm4eGSQERDBpSDiGfFWEATk' +
'QhBQMC/VDog2re8sSLdHRkBBiJqSLEc4OnqwGkg2VoZfuXvrxMVzmq1VQMOBbj' +
'5xpLa5OgKIgFJAdPPxA8M5E3QntQG1QzwFkYUoAMoaLZhsOG9iSowF3NdwBSDZ' +
'hVMMZvXFR5jBZaEIABlMfTA=');
else
Result := BitmapFromString(10, 10, 'beNpz02zNtk700o730Ip104x21YAgIBsoA' +
'kRA2XBbabgCuDhQBIggsineOhAuMoLoRVMAtyXSWR0iBTENLhjioBpkp+JrpRRpLwMXDH' +
'dUczSUdTGWczOV9zRX8LZUBAoC1aChABtloF6gCb7mEp7GYkAGUCMQARUDEdxfQJODrCS' +
'BapC9A2EDEcTNQBRiIwVxMEIWAJfFT3M=');
end;
end;

{*******************************************************************************
procedure DeclarePlayersINI;
By: Dgby714
Description: Grabs player info from a ini file
*******************************************************************************}
procedure DeclarePlayersINI;
var
I: integer;
UserList, AccountsFile: string;
Usernames: array of string;
begin
AccountsFile := ScriptPath + '\accounts.ini';
if FileExists(AccountsFile) then
begin
CurrentPlayer := 0;
NumOfPlay := ReadInI('Accounts', 'Ammount', AccountsFile);
SetArrayLength(Usernames, StrToInt(NumOfPlay));
NumberOfPlayers(StrToInt(NumOfPlay));
UserList := ReadInI('Accounts', 'Usernames', AccountsFile);
if (StrToInt(NumOfPlay) > 1) then
begin
{$IFNDEF SIMBA}
Usernames := Explode(':', Userlist);
{$ELSE}
Usernames := srl_explode(':', Userlist);
{$ENDIF}
end else
Usernames[0] := Userlist;
for I := 0 to High(Usernames) do
begin
with Players[I] do
begin
Name := Usernames[I];
Pass := ReadInI(Usernames[I], 'Password', AccountsFile);
Nick := ReadInI(Usernames[I], 'Nick', AccountsFile);
Strings[1] := ReadInI(Usernames[I], 'Tree', AccountsFile);
Strings[2] := ReadInI(Usernames[I], 'LampSkill', AccountsFile);
Strings[3] := ReadInI(Usernames[I], 'RunDir', AccountsFile);
Integers[1] := StrToInt(ReadInI(Usernames[I], 'Loads', AccountsFile));
Active := StrToBool(ReadInI(Usernames[I], 'Active', AccountsFile));;
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
end;
end;
end else
begin
srl_Warn('DeclarePlayersINI', 'Accounts.ini Missing, Switching to DeclarePlayers;', warn_AllVersions);
DeclarePlayers;
end;
end;

{*******************************************************************************
procedure CFU;
By: Dgby714
Description: Checks if you have the latest Script!
*******************************************************************************}
procedure CFU;
var
CVersion, LVersion: extended;
begin
CVersion := StrToFloat(Version);
LVersion := StrToFloat(GetPage(UURL));
if (LVersion > CVersion) then
Report('Update Available visit ' + FourmURL + '!')
else
Report('You are using the latest version of DGsPC!');
end;

{*******************************************************************************
function Axe_Check: boolean;
By: Dgby714
Description: Checks for a Axe
*******************************************************************************}
function Axe_Check: boolean;
var
Hatchet, DHatchet, x, y, I: integer;
begin
if not LoggedIn then exit;
Hatchet := DTMFromString('78DA631467606058C580022C5DBD19FE03694' +
'620FE0F048C0240C60A0634C0042619A13C462E20B19B801A1E20' +
'B19F801A2920B181801A5920B19A801A31C26E0600F1EB0B38');
DHatchet := DTMFromString('78DA639460606038C78002FC05B8194480342' +
'310FF070246794C350C0C4C609211CA630499739C801A3E207196' +
'801A5620F180801A49207115BF1A00CC5B09F1');
I := 0;
repeat
if Result then Break;
case GetCurrentTab of
tab_Equip:begin
if FindDTM(Hatchet, x, y, 566, 285, 606, 327) then
Result := true;
if FindDTM(DHatchet, x, y, 566, 285, 606, 327) then
Result := true;
if (I = 0) then
if not GameTab(tab_Inv) then exit;
Inc(I);
end;

tab_Inv:begin
if FindDTM(Hatchet, x, y, MIX1, MIY1, MIX2, MIY2) then
Result := true;
if FindDTM(DHatchet, x, y, MIX1, MIY1, MIX2, MIY2) then
Result := true;
if (I = 0) then
if not GameTab(tab_Equip) then exit;
Inc(I);
end;
else
if not GameTab(tab_Equip) then exit;
end;
until(I = 2);
FreeDTM(Hatchet);
FreeDTM(DHatchet);
end;

{*******************************************************************************
function GetIvyInfo(str: string): DGObject;
By: Dgby714
Description: Results info about Ivy as a DGObject
*******************************************************************************}
function GetIvyInfo(str: string): DGObject;
var
Ivy: DGObject;
begin
with Ivy do
begin
Uptext := ['vy', 'hop', 'hop ivy', 'Chop Ivy', 'Chop vy', 'hop vy'];
Color := 2442035;
Hue := 0.11;
Sat := 0.20;
Tol := 3;
Dir := 'E';
end;
Result := Ivy;
end;

{*******************************************************************************
function GetTreeInfo(str: string): DGObject;
By: Dgby714
Description: Results info about a tree as a DGObject
*******************************************************************************}
function GetTreeInfo(str: string): DGObject;
var
Tree: DGObject;
begin
case str of
'normal':begin
with Tree do
begin
Uptext := ['ree', 'hop', 'down tree', 'own ree', 'own tree'];
Color := 1329468;
Hue := 0.14;
Sat := 2.44;
Tol := 5;
end;
end;
'oak':begin
with Tree do
begin
Uptext := ['ak', 'Oak', 'own Oak', 'own oak'];
Color := 2649439;
Hue := 0.02;
Sat := 0.88;
Tol := 17;
end;
end;
'willow':begin
with Tree do
begin
Uptext := ['wil', 'low', 'own willow'];
Color := 3562314;
Hue := 0.10;
Sat := 0.55;
Tol := 15;
end;
end;
'maple':begin
with Tree do
begin
Uptext := ['aple', 'maple', 'own maple'];
Color := 2243938;
Hue := 0.26;
Sat := 0.52;
Tol := 8;
end;
end;
'yew':begin
with Tree do
begin
Uptext := ['yew', 'ew', 'own yew'];
Color := 3506545;
Hue := 0.04;
Sat := 1.08;
Tol := 12;
end;
end;
'magic':begin
with Tree do
begin
Uptext := ['agic', 'magic', 'own magic'];
Color := 9755617;
Hue := 0.03;
Sat := 1.81;
Tol := 20;
end;
end else
begin
with Tree do
begin
Uptext := [''];
Color := 0;
Hue := 0;
Sat := 0;
Tol := 0;
end;
end;
end;
Result := Tree;
end;

{*******************************************************************************
procedure Drop_Logs;
By: Dgby714
Description: Drops all Logs in Invo.
*******************************************************************************}
procedure Drop_Logs;
var
bmpLog, ICount: integer;
TreeXP: extended;
begin
if not LoggedIn then
srl_Warn('Drop_Logs', 'Character not Logged In!!', warn_Terminate);
AntiRandoms;
if not GameTab(tab_Inv) then exit;
Report('Starting Log Dropping Process!');
bmpLog := GetBitmap(Lowercase(Players[CurrentPlayer].Strings[1]));
ICount := CountItems('bitmap', bmpLog, [15]);
if ICount > 0 then
begin
Report('Dropping ' + IntToStr(ICount) + ' Logs!');
DropItemsByIdentifier('bitmap', bmpLog, [15]);
end else
Report('No Logs Found!');
FreeBitmap(bmpLog);
Report('All Logs dropped, Back to Trees!');
TreeXP := FindXP('woodcutting', Lowercase(Players[CurrentPlayer].Strings[1]));
Stats_CustomVars[0] := StrToIntDef(FloatToStr(StrToFloatDef(IntToStr(ICount), 1) * TreeXP), 1);
Stats_CustomVars[1] := ICount;
IncEx(Players[CurrentPlayer].Integers[52], Stats_CustomVars[0]);
end;

{*******************************************************************************
procedure Chop_Trees;
By: Dgby714
Description: Finds and Chops Trees
*******************************************************************************}
procedure Chop_Trees;
var
i, StartTime: longint;
x, y, tempCount, ucount, ccount: integer;
Tree: DGObject;
begin
x := MSCX;
y := MSCY;
StartTime := GetSystemTime;
Tree := GetTreeInfo(Lowercase(Players[CurrentPlayer].Strings[1]));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Tree.Hue, Tree.Sat)
repeat
if FindColorSpiralTolerance(x, y, Tree.Color, MSX1, MSY1, MSX2, MSY2, Tree.Tol) then
begin
MMouse(x, y, 4, 4);
Wait(200 + Random(100));
if IsUpTextMultiCustom(Tree.Uptext) then
begin
Mouse(x, y, 0, 0, True);
x := MSCX;
y := MSCY;
tempCount := InvCount;
Wait(500+Random(500));
i := GetSystemTime;
while FindColorSpiralTolerance(x, y, Tree.Color, MSCX-100, MSCY-100, MSCX+100, MSCY+100, Tree.Tol) do
begin
AntiBan;
AntiRandoms;
Wait(250+random(100));
if (GetSystemTime-i > RandomRange(25000, 50000)) then Break;
if InvFull then Break;
if InvCount <> TempCount then
begin
i := GetSystemTime;
StartTime := GetSystemTime;
tempCount := InvCount;
end;
end;
end else
begin
srl_Warn('Chop_Trees', 'Couldn''t find the uptext of the tree.', warn_AllVersions);
Inc(ucount)
Wait(500);
end;
end else
begin
srl_Warn('Chop_Trees', 'Couldn''t find the color of the tree.', warn_AllVersions);
Inc(ccount)
Wait(500);
end;
until((InvFull) or ((GetSystemTime - StartTime) > RandomRange(25000, 50000)) or ((ucount + ccount) > 75));
end;

{*******************************************************************************
procedure Cut_Ivy;
By: Dgby714
Description: Finds and Cuts Ivy
*******************************************************************************}
procedure Cut_Ivy;
var
StartTime: longint;
x, y, ucount, ccount: integer;
Tree: DGObject;
begin
x := MSCX;
y := MSCY;
StartTime := GetSystemTime;
Tree := GetIvyInfo(Lowercase(Players[CurrentPlayer].Strings[4]));
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Tree.Hue, Tree.Sat);
MakeCompass(Tree.Dir);
repeat
if FindColorSpiralTolerance(x, y, Tree.Color, MSX1, MSY1, MSX2, MSY2, Tree.Tol) then
begin
MMouse(x, y, 4, 4);
Wait(200 + Random(100));
if IsUpTextMultiCustom(Tree.Uptext) then
begin
Mouse(x, y, 0, 0, True);
MMouse(MSCX, MSCY, 5, 5);
while IsUpTextMultiCustom(Tree.Uptext) do
Wait(100+Random(250));
Break;
end else
begin
srl_Warn('Cut_Ivy', 'Couldn''t find the uptext of the Ivy.', warn_AllVersions);
Inc(ucount)
Wait(500);
end;
end else
begin
srl_Warn('Cut_Ivy', 'Couldn''t find the color of the Ivy.', warn_AllVersions);
Inc(ccount)
Wait(500);
end;
until(((GetSystemTime - StartTime) > RandomRange(25000, 50000)) or ((ucount + ccount) > 75));
end;

{*******************************************************************************
procedure ProgressReport(Clear: boolean);
By: Dgby714
Description: My Proggie Procedure
*******************************************************************************}
procedure ProgressReport(Clear: boolean);
begin
if Clear then
ClearDebug;
SRLPlayerReport(ResultDebugBox, Skill_WoodCutting, False,
[True, False, True, False, False, False],
['Alches Done', 'Alches Left', 'Item Alched'],
[], [51, 52], [1], []);
end;

{*******************************************************************************
procedure MainLoop;
By: Dgby714
Description: My MainLoop
*******************************************************************************}
procedure MainLoop;
var
StartTime, EndTime, TotalTime: integer;
begin
if not LoggedIn then
srl_Warn('MainLoop', 'Character not Logged In!!', warn_Terminate);
Wait(1000+Random(1000));
if not Axe_Check then
srl_Warn('MainLoop', 'Axe Missing!!!', warn_Terminate);
repeat
StartTime := GetTickCount;
if (Lowercase(Players[CurrentPlayer].Strings[1]) <> 'ivy') then
begin
Chop_Trees;
Drop_Logs;
end else
Cut_Ivy;
EndTime := GetTickCount;
TotalTime := EndTime - StartTime;
Inc(Players[CurrentPlayer].Integers[50]);
IncEx(Players[CurrentPlayer].Integers[51], TotalTime);
ProgressReport(True);
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;
until(Players[CurrentPlayer].Integers[50] >= Players[CurrentPlayer].Integers[1]);
end;

{*******************************************************************************
procedure ScriptTerminate;
By: Dgby714
Description: My ScriptTerminate
*******************************************************************************}
procedure ScriptTerminate;
begin
ProgressReport(False);
{$IFNDEF SIMBA}
SVersion := IntToStr(GetSCARVersion);
insert('.', SVersion, 2)
Disguise('SCAR ' + SVersion + ' by Freddy1990');
{$ENDIF}
end;

begin
Banner(Script);
if CheckForUpdate then
CFU;
{$IFNDEF SIMBA}
if not (GetSCARVersion = 323) then
begin
srl_Warn('Main', 'Your using a older version of SCAR then recommended!', warn_AllVersions);
Wait(1000);
end;
{$ENDIF}
if (SServer = 0) then
Smart_Server := RandomWorld(Smart_Members, False)
else
Smart_Server := SServer;
Smart_Signed := SSigned;
Smart_SuperDetail := False;
SetupSRL;
Stats_ScriptID := '35';
Stats_UserID := SRLStatsID;
Stats_Password := SRLStatsPass;
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;
if UseAccountINI then
begin
if FileExists(ScriptPath + '\accounts.ini') then
DeclarePlayersINI
else
DeclarePlayers;
end else
DeclarePlayers;
repeat
if not LoggedIn then
LoginPlayer;
if (SRL_Logs < 1) then
SRL_Logs := 1;
Players[CurrentPlayer].Integers[50] := 0;//Temp (Loads Done)
Players[CurrentPlayer].Integers[51] := 0;//Temp (Time)
Players[CurrentPlayer].Integers[52] := 0;//Temp (Exp Gained)
Retaliate(False);
SetAngle(True);
SetRun(True);
GetAllLevels;
MainLoop;
if LoggedIn then
Logout;
NextPlayer(False);
until(AllPlayersInactive);
ProgressReport(True);
end.

Dg's Alcher:
program DGsAlcher;
//{$define SMART} //Comment to turn off Smart =)
{$IFDEF SIMBA}
{$include SRL/SRL.scar}
{$include SRL/SRL/misc/Reports.scar}
{$include SRL/SRL/misc/trade.scar}
{$include SRL/SRL/misc/QuickChat.scar}
{$ELSE}
{.include SRL/SRL.scar}
{.include SRL/SRL/misc/Reports.scar}
{.include SRL/SRL/misc/trade.scar}
{.include SRL/SRL/misc/QuickChat.scar}
{$ENDIF}

const
SRLStatsID = ''; //Stats ID
SRLStatsPass = ''; //Stats Pass
SServer = 123; // Smart Server (integer) 0 = Random
SMembers = False; // Member? (boolean)
SSigned = False; // Signed? (boolean)

{*******************************************************************************
procedure DeclarePlayers;
By: ???
Description: Generic DeclarePlayers
*******************************************************************************}
procedure DeclarePlayers;
begin
CurrentPlayer := 0;
NumberOfPlayers(1);
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Strings[1] := 'Magic'; // Lampskill
Strings[2] := 'N'; //Run Direction incase of Fight, can be 'N', 'E', 'S', 'W' or an angle in degrees (145, 93, 180, etc).
Strings[3] := Bank_GE; //Bank your neer (only if banking coins)
Integers[1] := 1; // Loads to Do?
Integers[2] := 0; //Break After? (mins) 0 = dont break
Integers[3] := 0; //Break For? (mins) + Random(60000);
Integers[4] := 0; //Only set if (Booleans[2] = true) When you get this many coins it will bank them all =)
Booleans[1] := False; //Force LowAlch
Booleans[2] := False; //Bank when coins >= Integers[4]
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
Active := True;
end;
{with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Strings[1] := 'Magic'; // Lampskill
Strings[2] := 'N'; //Run Direction incase of Fight, can be 'N', 'E', 'S', 'W' or an angle in degrees (145, 93, 180, etc).
Integers[1] := 1; // Loads to Do?
Integers[2] := 0; //Break After? (mins) 0 = dont break
Integers[3] := 0; //Break For? (mins) + Random(60000);
Integers[4] := 0; //Only set if (Booleans[2] = true) When you get this many coins it will bank them all =)
Booleans[1] := False; //Force LowAlch
Booleans[2] := False; //Bank when coins >= Integers[4]
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
Active := True;
end;}
end;

{###############################################################################
### SCRIPT BELOW THIS POINT ###
###############################################################################}
const
Version = '0.2';
UURL = 'http://dgspc.freehostia.com/DgsAlcher.simb.ver';
FourmURL = 'http://villavu.com/forum/showthread.php?p=689750';

{*******************************************************************************
Var and Const
By: Dgby714 and more =)
Description: Varibles and Constistants LOL cant Spell
*******************************************************************************}
var
Stats_UserID, Stats_Password, Stats_ScriptID: string;
{$IFNDEF SIMBA}SVersion: string;{$ENDIF}
Stats_LastTime: Integer;
Stats_GlobalVars: array[1..24] of Integer;
Stats_CustomVars: array [1..20] of Integer;

const
Stats_Link = 'http://scriptmanager.freehostia.com/submit.php';

{$IFDEF SIMBA}
{*******************************************************************************
function Implode(Glue : string; Pieces : TStringArray) : string;
Description: srl_Implode
*******************************************************************************}
function Implode(Glue : string; Pieces : TStringArray) : string;
begin
Result := srl_Implode(Pieces, Glue);
end;

{*******************************************************************************
function Explode(str, del: string): TStringArray;
Description: srl_Explode
*******************************************************************************}
function Explode(str, del: string): TStringArray;
begin
Result := srl_Explode(str, del);
end;
{$ENDIF}

{*******************************************************************************
procedure WriteLnEx( str: string );
By: Dgby714
Description: Adds [TheTime] to the beggining of WriteLn
*******************************************************************************}
procedure WriteLnEx( str: string );
begin
WriteLn('[' + TheTime + '] ' + str);
end;

{*******************************************************************************
procedure Report( str: string );
By: Dgby714
Description: Does Disguise, Status, and WriteLnEx all in one
*******************************************************************************}
procedure Report( str: string );
begin
{$IFNDEF SIMBA}
Disguise(str);
Status(str);
{$ENDIF}
WriteLnEx(str);
end;

{*******************************************************************************
procedure Stats_CheckOutput(s: string);
By: ???
Description: ???
*******************************************************************************}
procedure Stats_CheckOutput(s: string);
var
i: Integer;
sa: TStringArray;
begin
sa := Explode(#10, s);
for i := 0 to High(sa) do
if (Trim(sa[i]) <> '') then
if StartsWith('ERROR(1)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_UserID := '';
Stats_Password := '';
end
else if StartsWith('ERROR(2)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_ScriptID := '';
end
else
WriteLn('STATS: "' + sa[i] + '"');
end;

{*******************************************************************************
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
By: ???
Description: ???
*******************************************************************************}
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
var
Client: Integer;
s: string;
sa: TStringArray;
begin
Result := False;
if (Stats_ScriptID = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getinfo');
AddPostVariable (Client, 'sID', Stats_ScriptID);
s := PostHTTPPageEx(Client, Stats_Link);
sa := Explode(#10'GLUE'#10, s);
if (Length(sa) = 5) then
begin
Result := True;
Version := sa[0];
News := sa[1];
Link := sa[2];
OutDated := sa[3] = '1';
LastUpdate_HoursAgo := StrToIntDef(sa[4], -1);
end
else
Stats_CheckOutput(s);
FreeHTTPClient(Client );
end;

{*******************************************************************************
procedure Stats_SendReport;
By: ???
Description: ???
*******************************************************************************}
procedure Stats_SendReport;
var
i, Client, Time: Integer;
s: string;
begin
if (Stats_UserID = '') and (Stats_Password = '') and (Stats_ScriptID = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'submit');
Time := (GetTimeRunning - Stats_LastTime) div 1000 div 60;
if (Time < 5) then
Time := 0
else
Stats_LastTime := GetTimeRunning;
AddPostVariable(Client, 'sTime', IntToStr(Time));
if (Stats_UserID <> '') and (Stats_Password <> '') then
begin
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
end
else
begin
AddPostVariable(Client, 'uID', '-1');
AddPostVariable(Client, 'uPass', '');
end;
if (Stats_ScriptID <> '') then
begin
AddPostVariable (Client, 'sID', Stats_ScriptID);

for i := Low(Stats_CustomVars) to High(Stats_CustomVars) do
begin
AddPostVariable(Client, 'rndCustom' + IntToStr(i), IntToStr(Stats_CustomVars[i]));
Stats_CustomVars[i] := 0;
end;
end
else
begin
AddPostVariable (Client, 'sID', '-1');
end;
for i := Low(Stats_GlobalVars) to High(Stats_GlobalVars) do
begin
case i of
1: s := IntToStr(SRL_Logs - Stats_GlobalVars[i]);
2: s := IntToStr(Banks - Stats_GlobalVars[i]);
3: s := IntToStr(RandSolved[rand_Death] - Stats_GlobalVars[i]);
else if ((i - 3) < Length(RandSolved) - 1 {for Death}) then
s := IntToStr(RandSolved[i - 3] - Stats_GlobalVars[i]);
end;
AddPostVariable(Client, 'rndGlobal' + IntToStr(i), s);
Stats_GlobalVars[i] := Stats_GlobalVars[i] + StrToInt(s);
end;
s := PostHTTPPageEx(Client, Stats_Link);
Stats_CheckOutput(s);
FreeHTTPClient(Client);
if (SRL_Procs[srl_OnSendStats] <> nil) then
SRL_Procs[srl_OnSendStats]();
end;

{*******************************************************************************
procedure Stats_SendAccountInfo;
By: ???
Description: ???
*******************************************************************************}
procedure Stats_SendAccountInfo;
var
i, Client: Integer;
Accounts: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'setaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
if (Stats_ScriptID <> '') then
AddPostVariable (Client, 'sID', Stats_ScriptID)
else
AddPostVariable (Client, 'sID', '-1');
SetLength(Accounts, HowManyPlayers);
for i := 0 to HowManyPlayers - 1 do
Accounts[i] := implode('.|â&#8218;¬statâ&#8218;¬|.', [Players[i].Name, Players[i].Loc, IntToStr(Integer(Players[i].Active))]);
AddPostVariable(Client, 'accInfo', Implode(#10'ACC'#10, Accounts));
Stats_CheckOutput(PostHTTPPageEx(Client, Stats_Link));
FreeHTTPClient(Client);
end;

{*******************************************************************************
procedure Stats_ManageAccounts;
By: ???
Description: ???
*******************************************************************************}
procedure Stats_ManageAccounts;
var
i, ii, Client: Integer;
s: string;
Accounts, Stats: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
AddPostVariable (Client, 'sID', '-1');
s := PostHTTPPageEx(Client, Stats_Link);
Accounts := Explode(#10'ACC'#10, s);
for i := 0 to High(Accounts) do
begin
Stats := Explode('.|â&#8218;¬statâ&#8218;¬|.', Accounts[i]);
if (Length(Stats) = 3) then
begin
for ii := 0 to HowManyPlayers - 1 do
if (LowerCase(Players[ii].Name) = LowerCase(Stats[0])) then
begin
Players[ii].Loc := Stats[1];
Players[ii].Active := Stats[2] = '1';
Break;
end;
end
else
begin
Stats_CheckOutput(s);
Break;
end;
end;
FreeHTTPClient(Client);
stats_SendAccountInfo;
end;

{*******************************************************************************
procedure CFU;
By: Dgby714
Description: Checks if you have the latest Script!
*******************************************************************************}
procedure CFU;
var
CVersion, LVersion: extended;
begin
CVersion := StrToFloat(Version);
LVersion := StrToFloat(GetPage(UURL));
if (LVersion > CVersion) then
Report('Update Available visit ' + FourmURL + '!')
else
Report('You are using the latest version of DGsAlcher!');
end;

{*******************************************************************************
procedure AntiRandoms;
By: ???
Description: Generic AntiRandoms
*******************************************************************************}
procedure AntiRandoms;
begin
if not LoggedIn then
srl_Warn('MainLoop', 'Character not Logged In!!', warn_AllVersions);
LampSkill := Players[CurrentPlayer].Strings[2];
FindNormalRandoms;
if FindFight then
begin
srl_Warn('AntiRandoms', Players[CurrentPlayer].Name + ' was Attacked!', warn_AllVersions);
RunAway(Players[CurrentPlayer].Strings[3], True, 1, 1000+Random(500));
end;
if (InChat('What is your level in: Magic?')) then
begin
QCSayLevel('Magic');
end;
end;

{*******************************************************************************
procedure AntiBan;
By: ???
Description: Generic AntiBan
*******************************************************************************}
procedure AntiBan;
begin
case Random(60) of
0: RandomRClick;
1: HoverSkill('Magic', False);
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
5: ExamineInv;
end;
end;

{*******************************************************************************
function Space( num: integer ): string;
By: Dgby714
Description: Returns num spaces
*******************************************************************************}
function Space( num: integer ): string;
var
Text: string;
I: Integer;
begin
for I := 0 to Num do
Text := Text + ' ';
Result := Text;
end;

{*******************************************************************************
procedure Banner;
By: Dgby714
Description: My Banner =) (ToDo: Fix when ReplaceDebugLine comes out!)
*******************************************************************************}
procedure Banner;
var
ScriptName: string;
ConvertLength: integer;
begin
ScriptName := 'Dgby714''s Alcher ' + Trim(Version);
ConvertLength := Floor((66 - Length(ScriptName)) / 2);
ScriptName := Space(ConvertLength) + ScriptName + Space(ConvertLength);
{$IFDEF SIMBA}
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| ________ ___. _________ ____ _____ |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| ________ ___. _________ ____ _____ |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| | | \ / ___\| __ < | | / / | |/ | |_ |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| ________ ___. _________ ____ _____ |');
WriteLn('| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
WriteLn('| | | \ / ___\| __ < | | / / | |/ | |_ |');
WriteLn('| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
WriteLn('| /_______ /\___ /|___ / ____| /____/ |___\____ | |');
WriteLn('| \//_____/ \/\/ |__| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
{$ELSE}
ClearDebug;
WriteLn('|--------------------------------------------------------------------|');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('| |');
WriteLn('|--------------------------------------------------------------------|');
WriteLn('|' + ScriptName + '|');
WriteLn('|--------------------------------------------------------------------|');
Wait(Random(500));
ReplaceDebugLine(2, '| \______ \ ____\_ |__ ___.__.\______ \/_ | / | | |');
Wait(Random(500));
ReplaceDebugLine(4, '| | ` \/ /_/ > \_\ \___ | / / | / ^ / |');
Wait(Random(500));
ReplaceDebugLine(6, '| \//_____/ \/\/ |__| |');
Wait(Random(500));
ReplaceDebugLine(1, '| ________ ___. _________ ____ _____ |');
Wait(Random(500));
ReplaceDebugLine(3, '| | | \ / ___\| __ < | | / / | |/ | |_ |');
Wait(Random(500));
ReplaceDebugLine(5, '| /_______ /\___ /|___ / ____| /____/ |___\____ | |');
{$ENDIF}
end;

{*******************************************************************************
procedure ProgressReport(Clear: boolean);
By: Dgby714
Description: Simple...
*******************************************************************************}
procedure ProgressReport(Clear: boolean);
begin
if Clear then
ClearDebug;
SRLPlayerReport(ResultDebugBox, Skill_Mage, False,
[True, False, True, False, False, False],
['Alchs Done', 'Alchs Left', 'Item Alched', 'Alch Used'],
[], [50, 51], [50, 51], []);
end;

{*******************************************************************************
function FindAndClickAlch(str: string): boolean;
By: Dgby714
Description: Clicks High/Low Alch =)
*******************************************************************************}
function FindAndClickAlch(str: string): boolean;
var
Alch, GrayAlch, x, y, Tries: integer;
Clicked: boolean;
begin
Clicked := false;
Tries := 0;
if not (GetCurrentTab = tab_Magic) then
if not GameTab(tab_Magic) then
Exit;
case str of
'High':begin
Alch := BitmapFromString(20, 3, 'beNrTZX11J+TjPp6LuySa4' +
'tg0mZnuffkNF+ktZkUTWTmRHygIURlx+CtQ8NACASDK9mEB' +
'ikCU4RIB6gLqhYgD9cJNg6vEI4Kslx8A+OhLcQ==');
GrayAlch := BitmapFromString(20, 3, 'beNpjYYgM8vJ0sgIiL' +
'RVpJgaGlIQoqIgzhoiTlZWJtpG2MkTcydrIz90eSAKRkrQwUA' +
'SiDE0ErkZNQRyoESIO5LrbmwFNg4sAVbrbm2OIQNWoK0jAxbk' +
'BhZ0gkg==');
end;
'Low':begin
Alch := BitmapFromString(13, 3, 'beNo7/PXVnZCLuySAaOVEf' +
'kYGBnYhNn4/diCS2cQER3pVkkAFhxYIANU0xbFBlIFU6rIiI4' +
'4iVrgaCIIaiKosAgDgdhu8');
GrayAlch := BitmapFromString(13, 3, 'beNqzNgr0cvJ0sgIiK' +
'xNtJgYGIBLiYZYS5tZSkTY30ACSQKSuIAFU4GRtBFQDZEOUAR' +
'E3CwoC6oKogWiBq0RT5gQAaYUL6Q==');
end;
end;
repeat
if FindBitmapToleranceIn(Alch, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
begin
Clicked := True;
Mouse(x, y, 5, 5, True);
end else
begin
if FindBitmapToleranceIn(GrayAlch, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
begin
srl_Warn('FindAndClickAlch', 'Out of Runes!!!', warn_AllVersions);
Break;
end else
Inc(Tries);
end;
until((Clicked = True) or (Tries >= 5));
FreeBitmap(Alch);
FreeBitmap(GrayAlch);
Result := Clicked;
end;

{*******************************************************************************
procedure FindAndClickNotedItem;
By: Dgby714
Description: Clicks a Noted Item =)
*******************************************************************************}
procedure FindAndClickNotedItem;
var
NoteDTM, x, y, Tries: integer;
Clicked: boolean;
begin
if not (GetCurrentTab = tab_Inv) then
if not GameTab(tab_Inv) then
Exit;
NoteDTM := DTMFromString('78DA63DCC8CCC050C9C4800C26B52631FC07D' +
'28C40FC1F08185703D5B4A3AA61606062E082AA0101C61D4035DD' +
'04D41C05AA6924A0E618504D2D01358709DB050066470E51');
Tries := 0;
repeat
if FindDTM(NoteDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Clicked := True;
Mouse(x, y, 5, 5, True);
end else
Inc(Tries);
until((Clicked = True) or (Tries >= 5));
FreeDTM(NoteDTM);
end;

{*******************************************************************************
function BankMyCoins: boolean;
By: Dgby714
Description: Find/Opens a Bank and Deposits all Coins
*******************************************************************************}
function BankMyCoins: boolean;
var
CoinSlot, cx, cy: integer;
Coins: TInvenItem;
begin
FindCoins(cx, cy, 'inv');
CoinSlot := CoordsToItem(cx, cy);
Coins := GetInven(CoinSlot);
if (Coins.Count >= Players[CurrentPlayer].Integers[4]) then
begin
if OpenBank(Players[CurrentPlayer].Strings[3], False, False) then
begin
Wait(100+Random(250));
Deposit(CoinSlot, CoinSlot, True);
Report(IntToStr(Coins.Count) + ' coins banked!');
Wait(100+Random(250));
if CloseBank then
Result := true
else
srl_Warn('MainLoop', 'Can''t close the Bank.', warn_AllVersions);
end else
srl_Warn('MainLoop', 'Can''t open the Bank.', warn_AllVersions);
end;
end;

{*******************************************************************************
procedure MainLoop;
By: Dgby714
Description: My MainLoop
*******************************************************************************}
procedure MainLoop;
var
StartTime, BreakTime: integer;
begin
if not LoggedIn then
srl_Warn('MainLoop', 'Character not Logged In!!', warn_Terminate);
if ((Players[CurrentPlayer].Level[Skill_Mage] <= 54) or
(Players[CurrentPlayer].Booleans[1])) then
Players[CurrentPlayer].Strings[51] := 'Low'
else
Players[CurrentPlayer].Strings[51] := 'High';
StartTime := GetTickCount;
Stats_CustomVars[1] := 0;
repeat
if FindAndClickAlch(Players[CurrentPlayer].Strings[51]) then
begin
Wait(600+Random(100));
FindAndClickNotedItem;
Wait((500+Random(100))*RandomRange(2, 4));
AntiRandoms;
AntiBan;
Inc(Players[CurrentPlayer].Integers[50]);
Players[CurrentPlayer].Integers[51] := Players[CurrentPlayer].Integers[1] - Players[CurrentPlayer].Integers[50];
Inc(Stats_CustomVars[1]);
end;
ProgressReport(True);
if (Players[CurrentPlayer].Booleans[2]) then
begin
if not BankMyCoins then
Report('Problem Banking Coins!');
end;
if (((((GetTickCount - StartTime) / 1000) * 60) >= Players[CurrentPlayer].Integers[2]) and not (Players[CurrentPlayer].Integers[2] = 0)) then
begin
if LoggedIn then Logout;
BreakTime := (Players[CurrentPlayer].Integers[3] * 60 * 1000) + Random(60000);
Wait(BreakTime);
if not LoggedIn then LoginPlayer;
StartTime := GetTickCount;
end;
until(Players[CurrentPlayer].Integers[50] >= Players[CurrentPlayer].Integers[1]);
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;
end;

{*******************************************************************************
procedure ScriptTerminate;
By: Dgby714
Description: My ScriptTerminate
*******************************************************************************}
procedure ScriptTerminate;
begin
ProgressReport(False);
{$IFNDEF SIMBA}
SVersion := IntToStr(GetSCARVersion);
insert('.', SVersion, 2);
Disguise('Script Finished - SCAR ' + SVersion + ' by Freddy1990');
{$ENDIF}
FreeSRLBitmaps;
end;

begin
Banner;
CFU;
{$IFNDEF SIMBA}
if not (GetSCARVersion = 323) then
begin
srl_Warn('Main', 'Your using a older version of SCAR then recommended!', warn_AllVersions);
Wait(1000);
end;
{$ENDIF}
if (SServer = 0) then
Smart_Server := RandomWorld(Smart_Members, False)
else
Smart_Server := SServer;
Smart_Signed := SSigned;
Smart_SuperDetail := False;
SetupSRL;
Stats_ScriptID := '37';
Stats_UserID := SRLStatsID;
Stats_Password := SRLStatsPass;
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;
DeclarePlayers;
repeat
if not LoggedIn then
LoginPlayer;
if (SRL_Logs < 1) then
SRL_Logs := 1;
Players[CurrentPlayer].Integers[50] := 0;//Temp (Alchs Done)
Players[CurrentPlayer].Integers[51] := 0;//Temp (Alchs Left)
Players[CurrentPlayer].Strings[50] := '';//Temp (Item Alched)
Players[CurrentPlayer].Strings[51] := '';//Temp (Alch Type)
Players[CurrentPlayer].Level[Skill_Mage] := GetSkillLevel(Skill_Mage);
if (Players[CurrentPlayer].Level[Skill_Mage] >= 21) then
MainLoop
else
srl_Warn('Main', Players[CurrentPlayer].Name + '''s Magic Level is too Low!', warn_AllVersions);
if LoggedIn then
Logout;
if (Players[CurrentPlayer].Integers[51] <= 0) then
NextPlayer(False)
else
NextPlayer(True);
until(AllPlayersInactive);
ProgressReport(True);
end.

btw for some reason I cant attach anything to this…
i get
Dgby714, you do not have permission to access this page. This could be due to one of several reasons:
when clicking "Manage Attachments"

Camaro'

2010-03-04 06:55:56

Looks, nice. You have good attitude around the forums, you seem to know what your doing. Well done.

Yes.

You have yet to make a banking script, you should attempt one.

Dgby714

2010-03-04 08:06:44

[QUOTE=Camaro';690922]Looks, nice. You have good attitude around the forums, you seem to know what your doing. Well done.

Yes.

You have yet to make a banking script, you should attempt one.[/QUOTE]

I was thinking of adding banking to my alcher as a option for people, like i know when i alch once my money gets pretty high i bank it =)

Awkwardsaw

2010-03-04 08:28:08

im voting yes.

just from looking at your ivy cutter:

i like your attitude, your standards are good, and you actually describe every single function in your script, which is a good + :)

your script is lacking stuff that would make it awesome, like tpas, dtms, banking + walking, but i really dont care about it :)

Dgby714

2010-03-04 08:42:27

From: Awkwardsaw
im voting yes.

just from looking at your ivy cutter:

i like your attitude, your standards are good, and you actually describe every single function in your script, which is a good + :)

your script is lacking stuff that would make it awesome, like tpas, dtms, banking + walking, but i really dont care about it :)


The ivy cutter is in early stages and prob will be added as a type of tree in my powerchopper =)

Update: Banking added to Alcher =)
Update2: Added ivy support to Powerchopper.

Markus

2010-03-04 10:46:51

Something with walking and some actually advanced scripting (read: more than FindColorTolerance) is a requirment for members imo, so I'm afraid I have to vote No for now.
That doesn't mean however that you should give up, it looks like you're on the right track, but there's still a small way to go :)

Wanted

2010-03-04 10:56:44

Just looking through the power chopper, I'd say it looks alright… no major problems other than you use a function result to return bitmaps, a really bad idea as it's impossible to free the bitmap after that… you need to use global/local variables so they can be freed after you use them… or atleast not loaded everytime they are used.

The script has an interesting level of quality, but it lacks object finding and mapwalking.

From other applications that have been denied recently, I don't think it's fair to accept this one.

Still a good job, but there's more that needs to be learned before you are granted membership based on scripting abilities.

Wizzup?

2010-03-04 10:58:59

Yes.

Dgby714

2010-03-04 10:59:00

From: IceFire908
Just looking through the power chopper, I'd say it looks alright… no major problems other than you use a function result to return bitmaps, a really bad idea as it's impossible to free the bitmap after that… you need to use global/local variables so they can be freed after you use them… or atleast not loaded everytime they are used.

The script has an interesting level of quality, but it lacks object finding and mapwalking.

From other applications that have been denied recently, I don't think it's fair to accept this one.

Still a good job, but there's more that needs to be learned before you are granted membership based on scripting abilities.


About to learn mapwalking and make a new script O.o

Wanted

2010-03-04 11:08:04

From: Dgby714
About to learn mapwalking and make a new script O.o


That's really stuff you should learn before becomming a member.

IMO members should know how to use

At very least FindObj or a basictpa
Mapwalking
Banking

An alcher and a powerchopper are equivalent to the "don't apply with a power miner" policy that used to more strictly enforced.

Voting yes for you would significantly lower the threshold for members, I don't understand whats going on. Maybe some of the people that voted yes can elaborate a little further?

Dgby714

2010-03-04 11:14:52

From: IceFire908
That's really stuff you should learn before becomming a member.

IMO members should know how to use

At very least FindObj or a basictpa
Mapwalking
Banking

An alcher and a powerchopper are equivalent to the "don't apply with a power miner" policy that used to more strictly enforced.

Voting yes for you would significantly lower the threshold for members, I don't understand whats going on. Maybe some of the people that voted yes can elaborate a little further?


btw theres banking in that alcher lol

Blumblebee

2010-03-04 11:21:18

I'm sorry, your scripts are not complex enough to achieve members. Some of the things you do during your script makes me think you actually just copied some stuff for your powerchopper.

why would you load ivy the same way as you load the rest of the tree's but in a different function? To me that shows you copy and pasted a function and didn't understand it, but that's just me.

aside from that your very close, your getting there. Your active and helpful, and you've made two scripts. I think if you put the time into making a script with mapwalking, then I would definatly say yes, but for now its a no.

Dgby714

2010-03-04 11:34:17

From: Blumblebee
I'm sorry, your scripts are not complex enough to achieve members. Some of the things you do during your script makes me think you actually just copied some stuff for your powerchopper.

why would you load ivy the same way as you load the rest of the tree's but in a different function? To me that shows you copy and pasted a function and didn't understand it, but that's just me.

aside from that your very close, your getting there. Your active and helpful, and you've made two scripts. I think if you put the time into making a script with mapwalking, then I would definatly say yes, but for now its a no.


I load ivy a different way because the script will load different info for each location you can find ivy just I've only done 1 atm so i didn't make the case to check what location they have set in Players[].strings[4](guessing not looking at script).

Timer

2010-03-04 17:32:33

Sure.

Blumblebee

2010-03-04 17:48:41

From: Dgby714
I load ivy a different way because the script will load different info for each location you can find ivy just I've only done 1 atm so i didn't make the case to check what location they have set in Players[].strings[4](guessing not looking at script).


I apologize then, There was no use of strings[4], so I assumed it was a useless variable and you had a useless function.

My verdict still stands, but I'm glad you cleared that up for me, I misunderstood the script when I was looking at it.

Awkwardsaw

2010-03-04 17:58:05

From: IceFire908
That's really stuff you should learn before becomming a member.

IMO members should know how to use

At very least FindObj or a basictpa
Mapwalking
Banking

An alcher and a powerchopper are equivalent to the "don't apply with a power miner" policy that used to more strictly enforced.

Voting yes for you would significantly lower the threshold for members, I don't understand whats going on. Maybe some of the people that voted yes can elaborate a little further?


iv never ever made a map walking script, and never even applied for members(exept the alcher, which sucked really bad anyways ;))

so it seems perfectly fair that someone can get into members soely based off of attitude, and willingness to learn, as did I

although the good script helps too :p

RAM

2010-03-04 18:34:07

Yes based on attitude.

Coh3n

2010-03-04 19:24:12

I love your scripting style. It's really organized and easy to read/understand. I love your attitude, and initiative to help fix SRL. I love that you already have two released scripts and you're only a Jr. Member. I think your scripting abilities don't match that of most SRL Members, but I have no doubt that you'll learn the more advanced techniques in no time.

I'm voting yes.

Camaro'

2010-03-04 19:33:44

From: Coh3n
I love your scripting style. It's really organized and easy to read/understand. I love your attitude, and initiative to help fix SRL. I love that you already have two released scripts and you're only a Jr. Member. I think your scripting abilities don't match that of most SRL Members, but I have no doubt that you'll learn the more advanced techniques in no time.

I'm voting yes.


@ Icefire: That post, (and akwardsaw's post) explain why I voted yes.

noidea

2010-03-04 19:44:14

Yes, but _please_ change your avvy :3
I had it before you!

Dgby714

2010-03-04 19:52:38

From: noidea
Yes, but _please_ change your avvy :3
I had it before you!


lol ok i can change it =)

Wanted

2010-03-04 19:58:45

From: IceFire908
Just looking through the power chopper, I'd say it looks alright… no major problems other than you use a function result to return bitmaps, a really bad idea as it's impossible to free the bitmap after that… you need to use global/local variables so they can be freed after you use them… or atleast not loaded everytime they are used.

The script has an interesting level of quality, but it lacks object finding and mapwalking.

From other applications that have been denied recently, I don't think it's fair to accept this one.

Still a good job, but there's more that needs to be learned before you are granted membership based on scripting abilities.


From: Timer
Sure.


From: Awkwardsaw
iv never ever made a map walking script, and never even applied for members(exept the alcher, which sucked really bad anyways ;))

so it seems perfectly fair that someone can get into members soely based off of attitude, and willingness to learn, as did I

although the good script helps too :p


From: RAM
Yes based on attitude.


From: Coh3n
I love your scripting style. It's really organized and easy to read/understand. I love your attitude, and initiative to help fix SRL. I love that you already have two released scripts and you're only a Jr. Member. I think your scripting abilities don't match that of most SRL Members, but I have no doubt that you'll learn the more advanced techniques in no time.

I'm voting yes.


After reading this I approve, but will be very disappointed if you don't live up to it.:shifty:

Camaro'

2010-03-04 20:21:37

From: IceFire908
After reading this I approve, but will be very disappointed if you don't live up to it.:shifty:


Yes! The IceFire seal of approval.

Dgby714

2010-03-04 20:25:49

[QUOTE=Camaro';691073]Yes! The IceFire seal of approval.
[IMG]http://espanol.istockphoto.com/file_thumbview_approve/2381624/2/istockphoto_2381624-seal-of-approval.jpg[/IMG][/QUOTE]

lol

JPHamlett

2010-03-04 20:33:42

yes

noidea

2010-03-04 21:33:13

From: Dgby714
lol ok i can change it =)


Thanks mate :) Voted!

Dgby714

2010-03-04 23:35:32

From: noidea
Thanks mate :) Voted!


Thanks for the vote =)

Edit: Weird! me and noidea both joined Jan 2008 lol

ss23

2010-03-05 09:11:51

From: Coh3n
I love your scripting style. It's really organized and easy to read/understand. I love your attitude, and initiative to help fix SRL. I love that you already have two released scripts and you're only a Jr. Member. I think your scripting abilities don't match that of most SRL Members, but I have no doubt that you'll learn the more advanced techniques in no time.

I'm voting yes.


Don't disappointed me, also, learning more grammar would be nice too ;)

Dgby714

2010-03-05 09:15:39

From: ss23
Don't disappointed me, also, learning more grammar would be nice too ;)


Woo, 16/5 Thanks for the vote, and I won't!

Dgby714

2010-03-06 05:48:31

Anyone else wanna vote?

Sir R. M8gic1an

2010-03-06 10:39:34

Yes please!

Might no use the most advanced techniques but you basically have a great understandment of script structure and your knowledge in other programming languages are a great advantage, you'll pick up the advanced tehniques in no time.

I'd let you in right now, but as there are a couple no votes I'll wait a bit longer.

~RM

Sabzi

2010-03-06 11:08:54

After all I have decided too. I have been paying more attention to your posts the last few days and I think you are member worthy.
Yes.

mixster

2010-03-06 11:19:29

{$IFDEF SIMBA}
{*******************************************************************************
function Implode(Glue : string; Pieces : TStringArray) : string;
Description: srl_Implode
*******************************************************************************}
function Implode(Glue : string; Pieces : TStringArray) : string;
begin
Result := srl_Implode(Pieces, Glue);
end;

{*******************************************************************************
function Explode(str, del: string): TStringArray;
Description: srl_Explode
*******************************************************************************}
function Explode(str, del: string): TStringArray;
begin
Result := srl_Explode(str, del);
end;
{$ENDIF}

While trying to do the right thing, Scar's Explode is delimiter then string, so running under Scar would give incorrect explosion results, but Simba would work fine. Just need to swap over the param order and adjust all the times you used it to follow this, or just use srl_Explode/Implode since both are built to support Scar's builtin Explode/Implode features as well as if not (including when using Simba).

Dgby714

2010-03-06 16:25:45

From: mixster
{$IFDEF SIMBA}
{*******************************************************************************
function Implode(Glue : string; Pieces : TStringArray) : string;
Description: srl_Implode
*******************************************************************************}
function Implode(Glue : string; Pieces : TStringArray) : string;
begin
Result := srl_Implode(Pieces, Glue);
end;

{*******************************************************************************
function Explode(str, del: string): TStringArray;
Description: srl_Explode
*******************************************************************************}
function Explode(str, del: string): TStringArray;
begin
Result := srl_Explode(str, del);
end;
{$ENDIF}

While trying to do the right thing, Scar's Explode is delimiter then string, so running under Scar would give incorrect explosion results, but Simba would work fine. Just need to swap over the param order and adjust all the times you used it to follow this, or just use srl_Explode/Implode since both are built to support Scar's builtin Explode/Implode features as well as if not (including when using Simba).


wow you got a good eye I didn't even notice i had Explodes' parameters backwards =)
I also didn't know srl_Explode was built to support scar's Explode.
this wouldn't of broke it in scar as i have a {$ifdef SIMBA} but it would mean none of the stats would work in simba O.o

mixster

2010-03-06 22:06:40

No, it wouldn't work in Scar as you would have supplied all the params in the wrong order (unless you just had them backwards for the Simba Explode call, but the right Scar way everywhere else). Anyway, it's my job to look for nonsensical things :)

Dgby714

2010-03-07 03:05:13

From: mixster
No, it wouldn't work in Scar as you would have supplied all the params in the wrong order (unless you just had them backwards for the Simba Explode call, but the right Scar way everywhere else). Anyway, it's my job to look for nonsensical things :)


Yeah I made it because stats used explode and implode but it wasn't in Simba yet but i guess i got them backwards =S

Naum

2010-03-07 08:43:52

Yes, nice attitude, good script and helpful in the SVN :).
Keep it up!

Wizzup?

2010-03-07 09:54:51

In!

Markus

2010-03-07 11:38:22

Uhm he's still junior member?
Edit: oh, he just needs the primary rank (it's 2nd now).