Gvozd спасибо почитал статью и вот что получилось:
var fso, tf;
fso = new ActiveXObject("Scripting.FileSystemObject");
file=fso.openTextFile("index.map", 1, true);
file.readLine();
file.readLine();
file.readLine();
file.readLine();
file.readLine();
file.readLine();
file.readLine();
function drowbrush(){
var newbrush = "";
var repls = "";
newbrush=newbrush+file.readLine()+"\n";
repls = file.ReadLine();
repls = repls.replace(/\s/, "kp\"+(x*1+");
repls = repls.replace(/\s/, "*1)+\"kp\"+(y*1+");
repls = repls.replace(/\s/, "*1)+\"kp");
repls = repls.replace(/\s/, "kp");
repls = repls.replace(/\s/, "kp");
repls = repls.replace(/\s/, "kp\"+(x*1+");
repls = repls.replace(/\s/, "*1)+\"kp\"+(y*1+");
repls = repls.replace(/\s/, "*1)+\"kp");
repls = repls.replace(/\s/, "kp");
repls = repls.replace(/\s/, "kp");
repls = repls.replace(/\s/, "kp\"+(x*1+");
repls = repls.replace(/\s/, "*1)+\"kp\"+(y*1+");
repls = repls.replace(/\s/, "*1)+\"kp");
repls = repls.replace(/\s/, "kp");
repls = repls.replace(/\s/, "kp");
repls = repls.replace(/kp/g, " ");
alert(repls);
}
drowbrush();
в файле index.map хранится
{
"classname" "worldspawn"
"classname" "worldspawn"
"MaxRange" "4096"
"mapversion" "220"
"mapversion" "220"
"wad" "\program files\valve\valve\halflife.wad;\program files\valve\valve\decals.wad"
{
( 0 128 128 ) ( 128 128 128 ) ( 128 0 128 ) SKY [ 1 0 0 -64 ] [ 0 -1 0 64 ] 0 1 1
( 0 0 0 ) ( 128 0 0 ) ( 128 128 0 ) SKY [ 1 0 0 -64 ] [ 0 -1 0 64 ] 0 1 1
( 0 128 128 ) ( 0 0 128 ) ( 0 0 0 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1
( 128 128 0 ) ( 128 0 0 ) ( 128 0 128 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1
( 128 128 128 ) ( 0 128 128 ) ( 0 128 0 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1
( 128 0 0 ) ( 0 0 0 ) ( 0 0 128 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1
}
}
вот начало но по крайней мере получаю то что нужно чуть доработаю и все Спасибо, тему можно закрывать.