From: SlipperyPickle
Are you suggesting I stole it from you? Because I wrote that myself?
Only got the getItemPrice() function from The Mayor. The part below was inspired on Bonsais powerminer:
type
BarVar = record
name : string;
oreTextArray : TStringArray;
xpGain : extended;
coalNeeded : integer;
end;
Why yes, how very astute of you.
Okay, i'll let this go:
//mine
type
Bar = record
barType, oreType:String;
barXP, coalReq:Integer;
maxCasts, profit:Integer;
end;
//yours
type
BarVar = record
name : string;
oreTextArray : TStringArray;
xpGain : extended;
coalNeeded : integer;
end;
I'm sure you got the inspiration from bonsai's script, days after you used my superheater. However, Coh3n's had the same bar storing method so I can't take credit for it either.
Price grabbing:
//mine
function getProfitBar(oreName, barName:String; coalAmt:Integer):integer;
var
orePrice, barPrice, natPrice:Integer;
begin
orePrice := getItemPrice(oreName, 1);
barPrice := getItemPrice(barName, 1);
natPrice := getitemPrice('Nature_rune', 1);
Result := barPrice - orePrice - natPrice - (coalAmt * getItemPrice('Coal', 1));
end;
//yours
function calculateProfit(): integer;
begin
orePrice := getItemPrice(barVariables.oreTextArray[2], 1);
barPrice := getItemPrice(barVariables.oreTextArray[3], 1);
natPrice := getitemPrice('Nature_rune', 1);
coalPrice := barVariables.coalNeeded * getItemPrice('Coal', 1);
Result := barPrice - coalPrice - orePrice - natPrice;
end;
I'll let this one go too, since there aren't many ways to grab a price. Might wanna consider using different variable names though, just to avoid giving others the misconception that you lifted it off their script.
This is what i'm most pissed about -_-
//mine
writeln('Loading variables, hang on - this might take a while!');
//yours
writeLn('Be patient! Takes a few seconds.');
Come on man, be original. There's other stuff, but I have more pressing matters to deal, namely a midterm which I know jack shit about. But it's alright man, everyone copies things in the beginning. I know I did. I just wish you gave a little credit.
Best of luck with your script.
P.S., might wanna kill a few of those infinite loops. This place needs some
#turnitin