diff -ur irpgsite.v0.5/config.php irpgsite.v0.5+johm+chschu/config.php --- irpgsite.v0.5/config.php Mon Jul 19 12:31:10 2004 +++ irpgsite.v0.5+johm+chschu/config.php Mon Jul 19 21:37:44 2004 @@ -17,6 +17,9 @@ // character database $irpg_db="/home/jotun/irpg.db"; +// item database +$irpg_itemdb="../mapitems.db"; + // time modifiers file $irpg_mod="/home/jotun/modifiers.txt"; @@ -35,5 +38,8 @@ // length-wise dimension of your map file $mapy = 500; + +// size of crosses for players and items on world map +$crosssize = 3; ?> diff -ur irpgsite.v0.5/makeworldmap.php irpgsite.v0.5+johm+chschu/makeworldmap.php --- irpgsite.v0.5/makeworldmap.php Mon Jul 19 12:31:10 2004 +++ irpgsite.v0.5+johm+chschu/makeworldmap.php Mon Jul 19 21:37:44 2004 @@ -1,7 +1,9 @@ include("config.php"); $file = fopen($irpg_db,"r"); - fgets($file); + fgets($file,1024); + $itemfile = fopen($irpg_itemdb,"r"); + fgets($itemfile,1024); session_start(); // sessions to generate only one map / person / 20s if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) { @@ -14,11 +16,22 @@ $magenta = ImageColorAllocate($map, 255, 0, 255); $blue = imageColorAllocate($map, 0, 128, 255); $red = imageColorAllocate($map, 211, 0, 0); + $orange = imageColorAllocate($map, 255, 128, 0); + $yellow = imageColorAllocate($map, 255, 192, 0); ImageColorTransparent($map, $magenta); - while ($line=fgets($file)) { + while ($line=fgets($file,1024)) { list(,,,,,,,,$online,,$x,$y) = explode("\t",trim($line)); - if ($online == 1) imageFilledEllipse($map, $x, $y, 3, 3, $blue); - else imageFilledEllipse($map, $x, $y, 3, 3, $red); + if ($online == 1) $color = $blue; + else $color = $red; + imageLine($map, $x-$crosssize, $y, $x+$crosssize, $y, $color); + imageLine($map, $x, $y-$crosssize, $x, $y+$crosssize, $color); + } + while ($line=fgets($itemfile,1024)) { + list($x,$y,,$level) = explode("\t",trim($line)); + if (is_numeric($level)) $color = $orange; + else $color = $yellow; + imageLine($map, $x-$crosssize, $y-$crosssize, $x+$crosssize, $y+$crosssize, $color); + imageLine($map, $x+$crosssize, $y-$crosssize, $x-$crosssize, $y+$crosssize, $color); } header("Content-type: image/png"); imagePNG($map); diff -ur irpgsite.v0.5/worldmap.php irpgsite.v0.5+johm+chschu/worldmap.php --- irpgsite.v0.5/worldmap.php Mon Jul 19 12:31:10 2004 +++ irpgsite.v0.5+johm+chschu/worldmap.php Mon Jul 19 21:37:44 2004 @@ -5,7 +5,7 @@ ?>
[offline users are red, online users are blue]
+[offline users are red, online users are blue, normal items are orange, unique items are yellow]