- Joined
- Apr 3, 2007
- Sythe Gold
- 0
- Messages
- 241
i made this in my spare time. Its a calculator that when you type in how much attack or strength exp you will get when you reach your goal it will tell you how much hp exp you will get. Also dont say this is in the wrong section because its for rs and its a scar script. Credits go to [email protected] for the help of creating the form. If you use it plz reply.
hope you like it
///////////////////////
/////Hp Calculator/////
///////////////////////
/////By 9pyro9mage9////
///////////////////////
/////Figures out /////
/////how much hp /////
/////exp you will /////
/////get from str /////
/////or att exp /////
/////that you type/////
/////in above. /////
///////////////////////
var
frmDesign : TForm;
Label1: TLabel;
Edit1, Edit2: TEdit;
Button1: TButton;
procedure CalculateNow(Sender: TObject);
var
exp: Integer;
hp: Extended;
begin
try
exp:= StrToInt(Edit1.Text);
hp:= exp / 3.0;
Edit2.Text:= FloatToStr(hp);
except
end
end;
procedure InitForm;
begin
frmDesign:= CreateForm;
frmDesign.Left:= 250;
frmDesign.Top:= 114;
frmDesign.BorderIcons:= [biSystemMenu, biMinimize];
frmDesign.BorderStyle:= bsSingle;
frmDesign.Caption:= 'HpCalculator';
frmDesign.ClientHeight:= 145;
frmDesign.ClientWidth:= 154;
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;
Label1:= TLabel.Create(frmDesign);
Label1.Parent:= frmDesign;
Label1.Left:= 53;
Label1.Top:= 15;
Label1.Width:= 47;
Label1.Height:= 13;
Label1.Caption:= 'Type your';
Edit1:= TEdit.Create(frmDesign);
Edit1.Parent:= frmDesign;
Edit1.Left:= 16;
Edit1.Top:= 35;
Edit1.Width:= 121;
Edit1.Height:= 21;
Edit1.TabOrder:= 8;
Edit1.Text:= 'Exp';
Button1:= TButton.Create(frmDesign);
Button1.Parent:= frmDesign;
Button1.OnClick:= @CalculateNow;
Button1.Left:= 38;
Button1.Top:= 64;
Button1.Width:= 75;
Button1.Height:= 25;
Button1.Caption:= 'Calculate';
Button1.TabOrder:= 9;
Edit2:= TEdit.Create(frmDesign);
Edit2.Parent:= frmDesign;
Edit2.Left:= 16;
Edit2.Top:= 99;
Edit2.Width:= 121;
Edit2.Height:= 21;
Edit2.TabOrder:= 10;
Edit2.Text:= 'HpExp';
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
SafeInitForm;
SafeShowFormModal;
FreeForm(frmDesign);
end.
//////////////////////////////////////////////////////////////////////////////////////////////////
///////////////Credits to [email protected] for helping me with the form///////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
hope you like it





