For question 1:
Username generator: (The one I am using)
SCAR Code:
// Made by Zyt3x
const
HowMany = 50; // How many accounts do you want? Min 1. Max 50.
AddNumb = False; // True = Asdf1, Asdf2. False = Asdf, Qwer.
First = False; // True = 1Asdf, 2Asdf. False = Asdf1, Asdf2.
NumC = 5; // How many numbers after the name?
LongNames = True; // True = ~9 chars. False = ~5 chars.
Consonant = False; // Consonant heavy names? (Wekthlor, Zhaphg...)
Vowel = False; // Vowel heavy names? (Elaythu, Amoseiti...)
Randomize = False; // Randomizes the name, none of the booleans above count
var
Usernames : TStringArray;
f, S : String;
I, J, P, H : Integer;
begin
if HowMany > 50 then
H := 50
else
if HowMany < 2 then
H := 2
else
H := HowMany;
f := '2';
if LongNames then f := '3';
if Consonant then f := '4';
if Vowel then f := '5';
if Randomize then f := '6';
S := GetPage('http://www.rinkworks.com/namegen/fnames.cgi?id=checked&f=' + f);
Usernames := Explode('<li>', Between('<table><tr><td><ul></ul></td><td><ul><li>', '</ul></td></tr></table></center>', S));
SetArrayLength(Usernames, H);
for I := 0 to H-1 do
begin
P := Pos('<', Usernames[I]);
if P > 0 then
Delete(Usernames[I], P, 18);
if Length(Usernames[I]) < 5 then
Usernames[I] := Usernames[I] + Copy(Lowercase(Usernames[Random(H-1)]), 0, 12);
if AddNumb then
Delete(Usernames[I], 11, 20)
else
Delete(Usernames[I], 12, 20);
end;
ClearDebug;
for I := 0 to H-1 do
begin
if AddNumb then
begin
for J := 1 to NumC do
if First then
WriteLn(IntToStr(J) + Usernames[I])
else
WriteLn(Usernames[I] + IntToStr(J));
I := I + NumC
end else
WriteLn(Usernames[I]);
end;
end.
Write to INI: (Taken from my include)
SCAR Code:
// Made by Zyt3x
function WritePlayer(Player, Password, Nick, Pin : String): Boolean;
var
F : String;
begin
if Player = '' then Exit;
F := ScriptPath + Capitalize(Player) + '.ini';
if Player <> 'nil' then
WriteINI('Information', 'Username', Player, F);
if Password <> 'nil' then
if Password <> '' then
WriteINI('Information', 'Password', Password, F);
if (Nick <> '') then
if (Nick <> Player) then
if Nick <> 'nil' then
WriteINI('Information', 'Nick', Nick, F);
if Pin <> 'nil' then
WriteINI('Information', 'Pin', Pin, F);
Result := True;
end;
EDIT: This isn't for runescape? If so then you'd have to edit the WritePlayer procedure...