Lafay - the Harvester of Sorrow welcome to my sanctuary, weary stranger! Have a mug of ale, and listen up, for I will reveal to you, the secrets of ancient Medievia. Restless at heart, I started my misadventures at the age of 17, traveling further and further away from the city of Medievia as the years and my experience gained. I always carefully jotted down every detail of what i learned, so that one day my tales would be available for all who seek it. But time goes on, and as the years of my youth end, I may one day have to settle down; therefore, if you have a story or useful information that you would like to pass on, I'd be very happy to include your contribution to my tomes. I can usually be found exploring Medievia, but if not you can send a letter and my clerk will make sure I get it.

Lafay, the Harvester of Sorrow
The 33rd Day of the Month of the Scorpion, Year 498.


Best Traderuns
This one is broken and outdated!

For Covered Wagons only!!!! This script calculates the best traderuns from the mudslinger using a covered wagon. The mudslinger that is used as reference should normally be updated once a day.
open (LES,"Trade_prices.txt") || die ("I could not find the file Trade_prices.txt, this file should be in the same directory as me, and contain the mudslinger tradelist");
@Prices=; close (LES);

foreach $line (@Prices) {
   $line =~ /(^...................................)( *)(\w*)/;
   $tradepost = $1;
   $item = $3;	
   $tradepost =~ s/^ *//;							
   $line =~ /[0-9]+$/;
   $pay = $&;
 
   use Traderun;

   $him = Traderun->new();
   $him->post($tradepost);
   $him->item($item);
   $him->pay($pay);
				
   push @All_TradeRuns, $him;  # save object in array for later
}
 
open (LES,"Trade_goods.txt") || die ("I could not find the file Trade_goods.txt, this file should be in the same directory as me, and contain the list over tradable goods");
@Goods=; close (LES);


foreach $line (@Goods) {
    chop($line);
    $line =~ s/(^\w*)//;
    $tradegood=$1;
    $line =~ s/[0-9]+//;
    $cw=$&;
    $line =~ /\w.+/;
    $loc = $&;
    
    use Tradable;
    
    $him = Tradable->new();
    $him->item($tradegood);
    $him->loc($loc);
    $him->cw($cw);
    
    push @All_TradeGoods, $him;	# save object in array for later
}

$length=@All_TradeGoods;
$teller=0;
for ($i=0;$i < @All_TradeRuns;$i++) {
    $temp1=$All_TradeRuns[$i]->item;
    $temp2=$All_TradeRuns[$i]->post;
    $temp3=$All_TradeRuns[$i]->pay;
    while ($teller < $length) {
	$storage=$All_TradeGoods[$teller]->item;
	$storage2=$All_TradeGoods[$teller]->loc;
	$storage3=$All_TradeGoods[$teller]->cw;
	if ($storage =~ /$temp1/i) {
	
	    $run="$storage from $storage2 to $temp2";
	    $earn=$storage3*$temp3;
	    
	    use Best_run;
	    
	    $him = Best_run->new();
	    $him->run($run);
	    $him->earn($earn);

	    push @All_Best_Runs, $him;
	}
	$teller++;
    }
    $teller=0;
}

$n=@All_Best_Runs;

for ($i=0 ; $i<$n-1 ; $i++) {
    for ($j=$n-1 ; $j>$i ; $j--) {
	$sjekk1=$All_Best_Runs[$j]->earn;
	$sjekk2=$All_Best_Runs[$j-1]->earn;
	if ( $sjekk1 < $sjekk2 ) {
	    $temp=$All_Best_Runs[$j-1];
	    $All_Best_Runs[$j-1]=$All_Best_Runs[$j];
	    $All_Best_Runs[$j]=$temp;
	}
    }
}

for ($i=@All_Best_Runs-1;$i>=0;$i--) {
    print ("",$All_Best_Runs[$i]->earn," ",$All_Best_Runs[$i]->run,", will give ",($All_Best_Runs[$i]->earn)/1000000," mil.\n
"); } print ("
*Mahn-Tor/A Minotaur Trading Outpost is through cpk. Must transfer from wagon to mule to do the run.
*Ur-vile Feeding Hall is Located near the temple of Thanos. Must transfer from wagon to mule to do the run
a LaFay production..");


You are cherry pick six hundred and fifty-three 
All content copyright Ronny Iversen ©2001, reuse of original or modified
content without permission is strictly prohibited.