Originally Posted by
pascal 1.2 code
uses graphabc;
var int,mana,crit,sp,hltime,foltime:real;
pleatime:integer;
bloodelf:boolean;
type criticalmp5=record
HL,FoL:real;
end;
type manaregen=record
replenish,racial,plea,poolregen:real;
crit:criticalmp5;
function inittotal(IsHlCrit:boolean):real;
begin
result:=replenish+racial+plea+poolregen;
if IsHlCrit then
result+=crit.HL else result+=crit.fol;
end;
end;
var mp5:manaregen;
procedure describeINT(x:integer);
begin
int:=x*1.21;
sp:=int*0.2;
textout(10,2,'amount of int - '+x.ToString+'('+int.ToString+' with talents&BoK)');
textout(10,20,'sp - '+sp.ToString);
mana:=int*15;
textout(10,40,'mana - '+mana.ToString);
mp5.poolregen:=mana/7/60*5;
textout(10,60,'regen from mana pool in 7min fight - '+mp5.poolregen.tostring);
crit:=(int/166.66667)/100;
///replenish
mp5.replenish:=mana*0.01;
textout(10,80,'replenish mp5 - '+mp5.replenish.ToString);
///dp
mp5.plea:=(mana*0.25/pleatime)*5;
textout(10,100,'mp5 from plea every '+pleatime.tostring+' - '+mp5.plea.ToString);
///racial
if bloodelf then
begin
mp5.racial:=(mana*0.06/120)*5;
textout(10,120,'mp5 from racial every 120s - '+mp5.racial.ToString);
end
else mp5.racial:=0;
textout(10,140,'crit - '+(crit*100).ToString+'%');
///regen from crits
mp5.crit.hl:=crit*1274/hltime*0.3*5;
mp5.crit.FoL:=crit*307/foltime*0.3*5;
textout(10,160,'crit mp5 from HL spam - '+mp5.crit.HL.ToString+', FoL spam - '+mp5.crit.FoL.ToString);
var hlregen:=mp5.inittotal(true);
var folregen:=mp5.inittotal(false);
textout(10,180,'total mp5 - '+hlregen.ToString+'(with hl spam) to '+folregen.ToString+'(with FoL spam)');
end;
begin
window.Height:=250;
window.Width:=520;
window.Caption:='Intellect calculator';
mainform.TopMost:=false;
repeat
textout(10,window.Height - 30,'input amount of intellect (integer value)');
var intellect:integer;
readln(intellect);
textout(10,window.Height - 30,'input interval between Divine Pleas (in seconds, integer value) ');
readln(pleatime);
textout(10,window.Height - 30,'input your HL casting time (in seconds, real value) ');
readln(HLtime);
textout(10,window.Height - 30,'input your FoL casting time (in seconds, real value) ');
readln(FoLtime);
textout(10,window.Height - 30,'are you Blood Elf? print 1 if you are or 0 if you are not ');
var x:char;
readln(x);
if x='1' then BloodElf:=true
else BloodElf:=false;
describeint(intellect);
textout(10,window.Height - 30,'would you like to save results to "IntCalc.jpg"? print 1/0 ');
readln(x);
var BEracial:string;
if Bloodelf then BEracial:=' with BE racial' else beracial:=' w/o BE racial';
textout(10,window.Height - 30,FoLtime.ToString+' FoL cast, '+hltime.ToString+' HL cast, plea used every '+pleatime.ToString+'s'+BEracial);
if Bloodelf then BEracial:='+BE' else beracial:='w-o BE';
var s:string;
s:='int calc -'+intellect.ToString + '-'+pleatime.ToString +'-'+hltime.ToString+'-'+foltime.ToString+beracial+'.jpg';
sleep(10);
if x='1' then window.Save(s);
textout(10,window.Height - 30,'would you like to perform another calculations? print 1/0 ');
readln(x);
if x='1' then window.Clear
else window.Close;
until false;
end.