Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

minimap.php for X4 karte code but its obfuscated

Status
Not open for further replies.
Newbie Spellweaver
Joined
Feb 13, 2012
Messages
21
Reaction score
19
Any change you guys reversed eng. this one? If not, heads up please, what should i use cause normally i tend to use ollydbg but sice its php, javascript with firebug?

Regards, oh and attached is the minimap :D but this one uses the gpack --> travian_Travian_4.0_Ilyas from U8. Let me know if its usefull cause i've just wgot it :D

Nevertheless would really apreciate a help on this one people..

Regards
tHe_sTrYnG
 

Attachments

You must be registered for see attachments list
Joined
May 15, 2009
Messages
799
Reaction score
558
basicly the mini map in t4 is a php file that has a representation of each pixel, players are red dots, certain tiles are certain shades of green, grey zone is gray. the size of the mini map is based on the maps size and resized on the fly other wise the picture would be to big.

hope this helps you figure it out all you got is a gif image with a php extension you can not reverse engineer that man sorry
 
Newbie Spellweaver
Joined
Feb 13, 2012
Messages
21
Reaction score
19
:), i must confess that was my bad, sorry about it :) just did a head on the file and your right......GIF .... :)
 
Junior Spellweaver
Joined
Oct 10, 2008
Messages
149
Reaction score
20
I tried around and that's what I got:

PHP:
<?php  
  if(isset($_GET['size'])) {
    $size = $_GET['size'];
  } else {
    $size = 1;
  }

  $img = ImageCreate((WORLD_MAX*2+1)*$size, (WORLD_MAX*2+1)*$size);
  $white = ImageColorAllocate($img, 255, 255, 255);

  // Overview
  $size4 = ImageColorAllocate($img, 255, 0, 0);
  $size3 = ImageColorAllocate($img, 255, 50, 0);
  $size2 = ImageColorAllocate($img, 255, 100, 0);
  $size1 = ImageColorAllocate($img, 255, 150, 0);
  $oasisfree = ImageColorAllocate($img, 0, 150, 0);
  $oasistaken = ImageColorAllocate($img, 150, 150, 0);
  $free = ImageColorAllocate($img, 150, 200, 0);

  // Player overview
  $own = ImageColorAllocate($img, 255, 255, 0);
  $ownally = ImageColorAllocate($img, 0, 0, 255);
  $confederatedally = ImageColorAllocate($img, 0, 255, 0);
  $napally = ImageColorAllocate($img, 0, 255, 0);
  $warally = ImageColorAllocate($img, 0, 0, 0);

  $x1 = (WORLD_MAX*2+1)*$size;
  $y1 = $size;
  
  for($i=0;$i < (WORLD_MAX*2+1)*(WORLD_MAX*2+1);$i++) {
    $mapinfo = $database->getMInfo($i+1);    
    if ($y1 > (WORLD_MAX*2+1)*$size) {
      $x1 -= $size;
      $y1 = $size; 
    }
    $x = $x1-$size;    
    $y = $y1-$size;
    if ($mapinfo['occupied'] == 0) {
      if($mapinfo['oasistype'] == 0) {
        ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $free);
      } else {
        ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $oasisfree);
      }
    } else {
      if($mapinfo['oasistype'] != 0) {
        ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $oasistaken);
      } else {
        if($mapinfo['pop'] <= 50) {
          ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $size1);
        } elseif($mapinfo['pop'] <= 100) {
          ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $size2);
        } elseif($mapinfo['pop'] <= 200) {
          ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $size3);
        } else {
          ImageFilledRectangle ($img, $x, $y, $x1 ,$y1, $size4);
        }
      }
    }
    $y1 += $size;
  }
  
  Header("Content-Type: image/png");
  ImagePNG($img); # Hier wird das Bild PNG zugewiesen
  ImageDestroy($img) # Hier wird der Speicherplatz für andere Sachen geereinigt


?>
 
Status
Not open for further replies.
Back
Top