SRL Archive - RS3 Outdated / Broken Scripts

King's Alchemy Table Script


King of the Nites

2008-07-02 21:51:00

King's Alchemy Table Script


What it Does:
It finds out how much you will gain or lose by alching any item of your choice.

Instructions:
Fill out the 3 lines for the information.
-One line is for how much you are going to buy your nats for.
-Second line is for how much you are going to buy the item for that you are going to alch.
-Third line is for how much you get for alching that item.

Then just press play and you will see how much you gain or lose!
Just to warn all, i did this in like 2 minutes.

What to Alch Section!


What this section is for is for finding what the best item to alch is.
I am going to make a nice proggy that will have all of the information you put into the constants/form(If i make) section of the script so you can post your proggy and others can find out what to alch or what not to alch. Get it?

Updated!!!
Better proggy.
Start posting your results here!!!!!

skilld u

2008-07-02 21:55:06

Make a form.

King of the Nites

2008-07-02 22:07:27

From: skilld u
Make a form.


I know. I was just too tired and wanted to make a fast script before I update my other script. :) ok so future updates include a form!!! Yay!!! Should be done by the end of this weekend because I'm lazy.:cartman:

Timer

2008-07-03 09:18:59

Hahaha!!! You don't even know math, I saw this as soon as i opened it…

function Add:extended;
Begin
Result:= Priceofnature + priceofitemtoalch;
end;

function Dothestuff:extended;
Begin
Result:= Add - highalchemyaward;
end;

the cost of getting the stuff, minus the reward… Duh, uhh, wtf?

function Dothestuff:extended;
Begin
Result:= highalchemyaward - Add;
end;
Please?

Other then that, good job.

King of the Nites

2008-07-03 17:19:01

Hah. Woops. I just tried to run through it quickly. CHANGED Script to V.2

skilld u

2008-07-03 17:34:39

I can make a form for you.

are you the one who I gave my account to?

King of the Nites

2008-07-04 09:56:04

Yea. And you could make the form for me? I would love that because i have a busy weekend.
UPDATED! V.5
Check it out!
All i did was make a better proggy!
I want everyone to know, post there proggies!!We need to find out the best item to alch!!! Have Fun!

skilld u

2008-07-04 11:52:13

program TheAlchemyTable;
{.include SRL/SRL.scar}

var
frmDesign : TForm;
PriceofNatureLabel : TLabel;
ItemPriceLabel : TLabel;
RewardLabel : TLabel;
PriceThingy : TMemo;
CalculateButton, CloseButton : TButton;
Edit1 : TEdit;
Edit2 : TEdit;
Edit3 : TEdit;

function Add:extended;
begin
Result:= StrToInt(Edit1.text) + StrToInt(Edit2.Text);
end;

function Dothestuff:extended;
begin
Result:= StrToInt(Edit3.text) - Add;
end;

procedure CalculateThem(Sender: TObject);
begin
PriceThingy.Lines.Clear;
PriceThingy.Lines.Add('It costs '+ floattostr(Add)+' gp total for each load.');
PriceThingy.Lines.Add(' ');
PriceThingy.Lines.Add('You are going to gain/lose'+ floattostr(DotheStuff)+' gps per alch');
end;

procedure CloseTheForm(sender: TObject);
begin
frmDesign.ModalResult := mrOk;
end;

procedure InitForm;
begin
frmDesign := CreateForm;
with frmDesign do
begin
Left := 250;
Top := 114;
Width := 330;
Height := 171;
Caption := 'Alchemy Table';
Color := clBtnFace;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
PixelsPerInch := 96;
end;
PriceofNatureLabel := TLabel.Create(frmDesign);
with PriceofNatureLabel do
begin
Parent := frmDesign;
Left := 8;
Top := 24;
Width := 71;
Height := 13;
Caption := 'Price of Nature';
end;
ItemPriceLabel := TLabel.Create(frmDesign);
with ItemPriceLabel do
begin
Parent := frmDesign;
Left := 8;
Top := 56;
Width := 95;
Height := 13;
Caption := 'Price of Item to Alch';
end;
RewardLabel := TLabel.Create(frmDesign);
with RewardLabel do
begin
Parent := frmDesign;
Left := 8;
Top := 88;
Width := 74;
Height := 13;
Caption := 'Alcemy Reward';
end;
PriceThingy := TMemo.Create(frmDesign);
with PriceThingy do
begin
Parent := frmDesign;
Left := 224;
Top := 8;
Width := 89;
Height := 121;
with PriceThingy.Lines do
begin
Add('king of the nites!'); //Change this to whatever you want it to say.
end;
ReadOnly := True;
TabOrder := 8;
end;
CalculateButton := TButton.Create(frmDesign);
with CalculateButton do
begin
Parent := frmDesign;
Left := 5;
Top := 112;
Width := 121;
Height := 17;
Caption := 'Calculate';
TabOrder := 9;
OnClick := @CalculateThem;
end;
CloseButton := TButton.Create(frmDesign);
with CloseButton do
begin
Parent := frmDesign;
Left := 145;
Top := 112;
Width := 55;
Height := 17;
Caption := 'Close';
TabOrder := 13;
OnClick := @CloseTheForm;
end;
Edit1 := TEdit.Create(frmDesign);
with Edit1 do
begin
Parent := frmDesign;
Left := 120;
Top := 48;
Width := 81;
Height := 21;
TabOrder := 10;
Text := '';
end;
Edit2 := TEdit.Create(frmDesign);
with Edit2 do
begin
Parent := frmDesign;
Left := 120;
Top := 16;
Width := 81;
Height := 21;
TabOrder := 11;
Text := '';
end;
Edit3 := TEdit.Create(frmDesign);
with Edit3 do
begin
Parent := frmDesign;
Left := 120;
Top := 80;
Width := 81;
Height := 21;
TabOrder := 12;
Text := '';
end;
end;

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

procedure ShowInitFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowInitFormModal;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowInitFormModal', V);
end;

procedure MainInitForm;
begin
SafeInitForm;
SafeShowInitFormModal;
FreeForm(frmDesign);
end;

begin
ClearDebug;
MainInitForm;
end.

Vincent_WIebe

2008-08-09 21:12:42

You should make the script look up the price of the item, and also look up how much it will high alch for. Using Internet functions in scar. Would be pretty sweet.