SCAR Grh generator

From VbGORE Visual Basic Online RPG Engine

Contents

[edit] Introduction

This is a little SCAR script that written by Evil Kukka made to make it easier to add in Grhs.

[edit] What is SCAR?

SCAR (shite compared to AutoRune) is a popular and powerful color clicking macro developed in Delphi. The latest version may be downloaded from http://freddy1990.com/scar.php.

[edit] How to set it up

1. Install SCAR
2. Run SCAR
3. Copy the code(see below) and paste onto SCAR
4. Set the following constants and arrays
FileNumber
Set the number of the texture (*.png) file that you wish to use for all the grhs.
tileheight
The height of all the tiles, in pixels.
tilewidth
The width of all the tiles, in pixels.
gridlineinbetween
If you separated every single tile with some sort of border/line then specify how thick this border/line is, in pixels.
rows
How many tiles are there downwards.
rowtiles
This is an array that depends on the above constant(rows),this is to set how many tiles there are in that row, the default settings has 4 rows, with the 1st row having 75 tiles,2nd row 71 tiles,third row 75 tiles and 4th row 54 tiles.
5. Press the "run script" button
6. the grh codes should now appear in the Debug box

Have questions on it? Post it in this thread http://www.vbgore.com/forums/viewtopic.php?t=1214 or PM Evil Kukka.

[edit] SCAR code

program tilecodegenerator;
var i,newgrh,currwidth,currheight,currrow,totaltiles,tilesremaining:integer;
rowtiles:array of integer;
const
FileNumber=999;//the number of the png image
tileheight=32;//height of ALL the tiles,
tilewidth=32;//height of ALL the tiles,
gridlineinbetween=0;//if you seperated every single tile with a line specify  how many pixels the line is long
rows=4;//how many tiles are there downwards
grhnumber=1561;//starting grh number
begin
setarraylength(rowtiles,rows+1)
rowtiles[1]:=75;//arrays of how many tiles there is on each row, add  more/remove according to teh variable "rows"
rowtiles[2]:=71;
rowtiles[3]:=75;
rowtiles[4]:=54;
currrow:=1;
currheight:=0;
cleardebug;
newgrh:=grhnumber;
repeat
totaltiles:=rowtiles[currrow];
 
repeat      
 writeln('Grh'+IntToStr(newgrh)+'=1-'+IntToStr(FileNumber)+'-'+IntToStr(currWidth)+'-'+InTToStr(currheight)+'-'+IntToSTr(TileWidth)+'-'+IntToSTr(TileHeight));
i:=i+1;
newgrh:=newgrh+1;
currwidth:=currwidth+gridlineinbetween+tilewidth;
tilesremaining:=Totaltiles-i;
if(tilesremaining<1)then break;
until(i=totaltiles)
i:=0;
currwidth:=0;
Readln('starting row:'+intToStr(currrow));
currheight:=currheight+tilewidth+gridlineinbetween;
currrow:=currrow+1;
until(currrow=rows+1)
end.
Personal tools