BobboHobbo
2009-05-03 11:31:24
Ive currently made it if you get over 80 points you should get in for members. (80 points pretty much means everything that you got everything useful in your script *im not entirely sure thats the correct amount of points* so i need your opionion what to add and what to get rid of.
I tested with a few scripts it seems to be pretty accurate
Zephs Yew Cutter - 106 points
Barb Willow cutter - 122 points
My willow cutter - 130 points
can you post what your scripts got so i can make some changes and stuff.
Thanks.
New version
SCRIPT:
program SRLMemberAppTool;
var
frmDesign: TForm;
LabelTop: TLabel;
Label1: TLabel;
MarkingL: TLabel;
AnswerL: TLabel;
PercentL: TLabel;
ScriptAreaE: TEdit;
GenerateB: TButton;
EndMainForm: boolean;
Memo1: TMemo;
var
Scripttext: string;
I: integer;
// When the form is closed, this code will be executed.
procedure MainFormOnClose(Sender: TObject; var Action: TCloseAction);
begin
if (not (frmDesign.ModalResult = 1)) then
EndMainForm := True;
end;
function CountTextInString(S, T: string; Worth: integer; plusminus: boolean): Integer; //By Garret. Modded by me :)
var
N, tt: Integer;
begin
repeat
TT := TT + 1;
if PlusMinus then
begin
I := I + worth;
end else
I := I - worth;
N := Pos(LowerCase(T), LowerCase(S));
Delete(S, N, Length(T));
if TT = 2 then
begin
break;
end;
until (N = 0);
end;
function Information(Word: string): boolean;
begin
if Pos(lowercase(Word), LowerCase(ScriptText)) > 0 then
begin
Result := true;
end;
end;
procedure Generate;
begin
ScriptText := Memo1.Text;
if Information('exit;') then
begin
CountTextInString(LowerCase(ScriptText), 'exit;', 2, true);
end else Writeln('Add exit!');
if Information('radial') then
begin
CountTextInString(LowerCase(ScriptText), 'radial', 6, true);
end else Writeln('Add radial!');
if Information('bitmapfromstring') then
begin
CountTextInString(LowerCase(ScriptText), 'bitmapfromstring', 2, true);
end else Writeln('Add bitmapfromstring!');
if Information('dtmfromstring') then
begin
CountTextInString(LowerCase(ScriptText), 'dtmfromstring', 2, true);
end else Writeln('Add dtmfromstring!');
if Information('dtmrotated(') then
begin
CountTextInString(LowerCase(ScriptText), 'dtmrotated', 3, true);
end else Writeln('Add dtmrotated!');
if Information('finddtm') then
begin
CountTextInString(LowerCase(ScriptText), 'finddtm', 1, true);
end else Writeln('Add finddtm!');
if Information('tform') then
begin
CountTextInString(LowerCase(ScriptText), 'tform', 1, true);
end else Writeln('Add tform!');
if Information('fflag(') then
begin
CountTextInString(LowerCase(ScriptText), 'fflag(', 4, true);
end else Writeln('Add fflag!');
if Information('players') and Information('nextplayer(') then
begin
CountTextInString(LowerCase(ScriptText), 'players', 5, true);
end else Writeln('Add Players!');
if Information('findfastrandoms') then
begin
CountTextInString(LowerCase(ScriptText), 'findfastrandoms', 25, false);
Writeln('GET RID OF FINDFASTRANDOMS');
end;
if Information('{.include srl/srl.scar}') or Information('{.include srl\srl.scar}') then
begin
if Information('{.include srl/srl.scar}') then
CountTextInString(LowerCase(ScriptText), '{.include srl/srl.scar}', 5, true)
else
CountTextInString(LowerCase(ScriptText), '{.include srl\srl.scar}', 5, true);
end else Writeln('Add SRL!');
if Information('not loggedin') then
begin
CountTextInString(LowerCase(ScriptText), 'not loggedin', 5, true);
end else Writeln('Add if not loggedin then exit!');
if Information('freedtm') then
begin
CountTextInString(LowerCase(ScriptText), 'freedtm', 5, true);
end else Writeln('Add freedtm!');
if Information('freebitmap') then
begin
CountTextInString(LowerCase(ScriptText), 'freebitmap', 5, true);
end else Writeln('Add freebitmap!');
if Information('freeform') then
begin
CountTextInString(LowerCase(ScriptText), 'freeform', 1, true);
end else Writeln('Add freeform!');
if Information('clickmouse') then
begin
CountTextInString(LowerCase(ScriptText), 'clickmouse', 25, false);
Writeln('Remove clickmouse!');
end;
if Information('movemouse') and not Information('sleepandmovemouse') then
begin
CountTextInString(LowerCase(ScriptText), 'movemouse', 25, false);
Writeln('Remove movemouse!');
end;
if Information('tdtmpointdef') then
begin
CountTextInString(LowerCase(ScriptText), 'tdtmpointdef', 3, true);
end else Writeln('Add tdtmpointdef!');
if Information('tpa') then
begin
CountTextInString(LowerCase(ScriptText), 'tpa', 8, true);
end else Writeln('Add tpa!');
if Information('walkpath(') and Information('radial') then
begin
CountTextInString(LowerCase(ScriptText), 'walkpath(', 7, true);
end else Writeln('Add walkpath!');
if Information('tpointarray') then
begin
CountTextInString(LowerCase(ScriptText), 'tpointarray', 1, true);
end else Writeln('Add tpointarray!');
if Information('reportvars') then
begin
CountTextInString(LowerCase(ScriptText), 'reportvars', 1, true);
end else Writeln('Add reportvars!');
if Information('tpoint') then
begin
CountTextInString(LowerCase(ScriptText), 'tpoint', 3, true);
end else Writeln('Add tpoint!');
if Information('label') then
begin
CountTextInString(LowerCase(ScriptText), 'label', 1, true);
end else Writeln('Add labels!');
if Information('repeat') then
begin
CountTextInString(LowerCase(ScriptText), 'repeat', 1, true);
end else Writeln('Add repeat until loops!');
if Information('case') then
begin
CountTextInString(LowerCase(ScriptText), 'case', 1, true);
end else Writeln('Add case of!');
if Information('terminatescript') then
begin
CountTextInString(LowerCase(ScriptText), 'terminatescript', 1, false);
writeln('remove terminatescript. And add Logout!, if u use multiplayer!');
end;
if Information('srlplayerform(') then
begin
CountTextInString(LowerCase(ScriptText), 'srlplayerform(', 2, false);
writeln('Whats the point of a form with no SRLPlayerForm!');
end;
AnswerL.Caption := IntToStr(I);
Writeln('[===============================]');
Writeln('[ ~ Result = ' + IntToStr(I) +' Points');
Writeln('[===============================]');
if I < 80 then
begin
writeln('Sorry, Your script isnt SRL-Members Worthy.');
exit;
end else
Writeln('Apply for members, Only if you think your script is good enough');
Writeln('This script isnt 100% correct.');
end;
procedure HandleButtons(Sender: TObject);
begin
case Sender of
generateB: begin
Generate;
frmDesign.ModalResult := 1
end;
end;
end;
// This form was parsed using: DFM Form Parser v.25 by Ron.
procedure MainForm;
var
TimeMainForm: Integer;
begin
TimeMainForm := GetSystemTime;
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 741;
frmDesign.Height := 480;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
LabelTop := TLabel.Create(frmDesign);
LabelTop.Parent := frmDesign;
LabelTop.Left := 32;
LabelTop.Top := 32;
LabelTop.Width := 543;
LabelTop.Height := 37;
LabelTop.Caption := 'SRL-Forums SRL Member Application';
LabelTop.Font.Color := clWindowText;
LabelTop.Font.Height := -33;
LabelTop.Font.Name := 'MS Sans Serif';
LabelTop.Font.Style := [];
LabelTop.ParentFont := False;
MarkingL := TLabel.Create(frmDesign);
MarkingL.Parent := frmDesign;
MarkingL.Left := 424;
MarkingL.Top := 424;
MarkingL.Width := 73;
MarkingL.Height := 13;
MarkingL.Caption := 'Score:';
AnswerL := TLabel.Create(frmDesign);
AnswerL.Parent := frmDesign;
AnswerL.Left := 505;
AnswerL.Top := 424;
AnswerL.Width := 16;
AnswerL.Height := 13;
AnswerL.Caption := '0';
PercentL := TLabel.Create(frmDesign);
PercentL.Parent := frmDesign;
PercentL.Left := 520;
PercentL.Top := 424;
PercentL.Width := 8;
PercentL.Height := 13;
PercentL.Caption := '%';
Memo1 := TMemo.Create(frmDesign);
Memo1.Parent := frmDesign;
Memo1.Left := 32;
Memo1.Top := 128;
Memo1.Width := 657;
Memo1.Height := 273;
Memo1.Lines.Add('Script Here!');
Memo1.ScrollBars := ssVertical;
Memo1.TabOrder := 9;
GenerateB := TButton.Create(frmDesign);
GenerateB.Parent := frmDesign;
GenerateB.Left := 536;
GenerateB.Top := 80;
GenerateB.Width := 145;
GenerateB.Height := 41;
GenerateB.Caption := 'Generate Mark';
GenerateB.TabOrder := 9;
generateB.OnClick := @HandleButtons;
WriteLn('MainForm compiled in ' + IntToStr(GetSystemTime - TimeMainForm) + ' milliseconds!');
end;
procedure SafeMainForm;
var
V: TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('MainForm', V);
end;
procedure ShowMainFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowMainFormModal;
var
V: TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowMainFormModal', V);
end;
procedure MainMainForm;
begin
try
SafeMainForm;
SafeShowMainFormModal;
finally
FreeForm(frmDesign);
except
WriteLn('An error seems to have occurred in: MainForm');
end;
end;
begin
ClearDebug;
MainMainForm;
if (EndMainForm) then
TerminateScript;
end.