Warning: ob_start(): function 'compress_handler' not found or invalid function name in /www/htdocs/xfmantis/core.php on line 18

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

SYSTEM WARNING: Cannot modify header information - headers already sent by (output started at /www/htdocs/xfmantis/core.php:18)

program YourMapScript; (* Dieses Script genriert Karten fuer das Spiel Xforce v 0.900 Dieses Script steht unter GPL (siehe auch XFORCE). Author: Sarun *) var xposition, yposition : Integer; TerrainType : String; // Die Anzahl der Gegner bestimmt die maxGrösse der Map. Der Multiplikator kann // gestetzt werden (Meine Tests deuten aber darauf hin das eine zu große Karte // nicht lustig ist). // // Damit die ganze Sache jedoch Sinn macht ist die minimale // Größe auf 3 X 3 limitiert. procedure CalculateMapSize(Units: Integer); var maxtile: Integer; begin maxtile:=round(Units*1); if maxtile<3 then maxtile:=3; MapWidth:=random(maxtile); if MapWidth<=3 then MapWidth:=3 MapHeight:=random(maxtile); if MapHeight<=3 then MapHeight:=3 end; (* Currently this always creates a city but later on the location input should guide the terrain type. The maps have to have the two-digit number of the terraintype at the beginning of their name. e.g. 01_RiverVertical ... River in the city 02_RiverVertical ... River in the djungel Different Terraintypes: City=01 Djungel=02 Dessert=03 Mountains=04 Step=05 Ice=06 Temperate=07 Tundra=08 ... *) procedure FindTerrainType(LocationX, LocationY: Integer); begin TerrainType := '01'; //Requires a part that assembles the strings which represent the map-elements end; // Wenn eine collision vorhanden ist, dann kommt false zurueck function checkCollision(var X,Y :Integer) : Boolean; begin result:=false; if (GetRoomAtPos(X,Y) = '') then result:=true; end; // Creates a random position and checks if their is someting placed their. If so // it tries to retrieve antoher position. procedure createPosition(); var X,Y,Versuche : Integer; collision : Boolean; begin collision := false; Versuche:=50; while not collision do begin Versuche:=Versuche-1; if Versuche=-1 then exit; X := random(GetMapWidth); Y := random(GetMapHeight); collision:=checkCollision(X,Y); if collision then begin xposition:=X; yposition:=Y; end continue; end; end; // Die methode erzeugt eine Koordinate wo, abhängig von der rotation, 2 freie // Plätze vorhanden sind. // // Erwartet 1 als input wenn es nach unten checken soll und 2 wenn // es nach links checken soll procedure createDoublePosition(orientation :Integer); var X,Y,Z,Versuche : Integer; firstCollision,secondCollision : Boolean; begin firstCollision := false; secondCollision := false; Versuche:=5; while not firstCollision do begin Versuche:=Versuche-1; if Versuche=-1 then exit; X := random(GetMapWidth); Y := random(GetMapHeight); secondCollision:=checkCollision(X,Y); if (orientation=1) then begin Z := Y+1; if secondCollision and (Z