home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / dragracer.swf / scripts / frame_318 / DoAction.as
Encoding:
Text File  |  2005-10-06  |  16.2 KB  |  579 lines

  1. function BuyCar(playcar, buycar)
  2. {
  3.    var _loc1_ = playcar;
  4.    var _loc3_ = buycar;
  5.    _loc1_.NAME = _loc3_.NAME;
  6.    _loc1_.HP = _root[_loc3_.NAME].HP;
  7.    _loc1_.TQ = _root[_loc3_.NAME].TQ;
  8.    _loc1_.CL = _root[_loc3_.NAME].CL;
  9.    _loc1_.WT = _root[_loc3_.NAME].WT;
  10.    _loc1_.FR = _root[_loc3_.NAME].FR;
  11.    _loc1_.carworth = _root[_loc3_.NAME].carworth;
  12.    _loc1_._frame = _loc3_._frame;
  13.    _loc1_._base = "BASE";
  14.    _loc1_.rimnum = 0;
  15.    _loc1_._wheels = "WHEEL_1";
  16.    _loc1_.wingnum = 0;
  17.    _loc1_._wing = 1;
  18.    _loc1_._fkit = "BLANK";
  19.    _loc1_._skit = "BLANK";
  20.    _loc1_._bkit = "BLANK";
  21.    _loc1_._light = _loc3_._light;
  22.    _loc1_.cols = {rb:0,bb:0,gb:0};
  23.    _loc1_.rimcols = {rb:0,bb:0,gb:0};
  24.    _loc1_.rimcols.rb = -100;
  25.    _loc1_.rimcols.bb = -100;
  26.    _loc1_.rimcols.gb = -100;
  27.    _loc1_.kscols = {rb:0,bb:0,gb:0};
  28.    _loc1_.calcols = {rb:-100,bb:-100,gb:-100};
  29.    _loc1_.neoncols = {rb:-215,bb:-215,gb:-215};
  30.    _loc1_.wintint = 0;
  31.    _loc1_.wheelsize = 10;
  32.    _loc1_.rideheight = 0;
  33.    _loc1_.kitnum = 0;
  34.    _loc1_.lightnum = 0;
  35.    _loc1_.paintnum = 1;
  36.    _loc1_.NOS = 1;
  37.    _loc1_._exhaust = "MUFFLER_2";
  38.    _loc1_.frameangle = 0;
  39.    _loc1_.decalnum = 1;
  40.    _loc1_.intnum = 1;
  41.    _loc1_.hoodnum = 1;
  42.    _loc1_.gearRatio = new Array();
  43.    var _loc2_ = 1;
  44.    while(_loc2_ <= GEAR_NUM)
  45.    {
  46.       _loc1_.gearRatio[_loc2_] = 1;
  47.       _loc2_ = _loc2_ + 1;
  48.    }
  49.    _loc2_ = 0;
  50.    while(_loc2_ < UPGRADE_NUM)
  51.    {
  52.       _loc1_["UPGRADE" add _loc2_] = false;
  53.       _loc2_ = _loc2_ + 1;
  54.    }
  55.    calFriction();
  56. }
  57. function newGame()
  58. {
  59.    player = new Object();
  60.    player.level = 1;
  61.    car = new Object();
  62.    car1 = new Object();
  63.    car2 = new Object();
  64.    car3 = new Object();
  65. }
  66. function gotoCarBuy()
  67. {
  68.    gotoAndStop("carshop");
  69.    play();
  70. }
  71. function WS_UPDATEHUD()
  72. {
  73.    var _loc1_ = _root;
  74.    STATS = _loc1_.car;
  75.    carname = STATS.NAME;
  76.    nickname = STATS.NICK;
  77.    framename = STATS._frame;
  78.    basename = STATS._base;
  79.    kitname = STATS._fkit;
  80.    wingname = STATS._wing;
  81.    lightname = STATS._light;
  82.    lwheelname = STATS._wheels;
  83.    rg = STATS.cols.rb + 255;
  84.    gg = STATS.cols.gb + 255;
  85.    bg = STATS.cols.bb + 255;
  86.    RIMS_r = STATS.rimcols.rb + 255;
  87.    RIMS_g = STATS.rimcols.gb + 255;
  88.    RIMS_b = STATS.rimcols.bb + 255;
  89.    KS_r = STATS.kscols.rb + 255;
  90.    KS_g = STATS.kscols.gb + 255;
  91.    KS_b = STATS.kscols.bb + 255;
  92.    SPO_r = STATS.spocols.rb + 255;
  93.    SPO_g = STATS.spocols.gb + 255;
  94.    SPO_b = STATS.spocols.bb + 255;
  95.    NEON_r = STATS.neoncols.rb + 255;
  96.    NEON_g = STATS.neoncols.gb + 255;
  97.    NEON_b = STATS.neoncols.bb + 255;
  98.    calr = STATS.calcols.rb + 255;
  99.    calg = STATS.calcols.gb + 255;
  100.    calb = STATS.calcols.bb + 255;
  101.    RIMNUMBR = STATS.rimnum;
  102.    WINGNUMBR = STATS.wingnum;
  103.    LIGHTNUMBR = STATS.lightnum;
  104.    KITNUMBR = STATS.kitnum;
  105.    PAINTNUMBR = STATS.paintnum;
  106.    rideh = _loc1_.car.rideheight;
  107.    wheels = _loc1_.car.wheelsize;
  108. }
  109. function SetProperties(object, cn, nn, fn, bn, kn, wn, ln, rn, rh, ws, pn)
  110. {
  111.    var _loc1_ = object;
  112.    _loc1_.NAME = cn;
  113.    _loc1_.NICK = nn;
  114.    _loc1_.rideheight = rh;
  115.    _loc1_.wheelsize = ws;
  116.    _loc1_.paintnum = pn;
  117. }
  118. function SetColour(object, rr, gr, br, rimsr, rimsg, rimsb, ksr, ksg, ksb, spor, spog, spob, nr, ng, nb, calr, calb, calg)
  119. {
  120.    var _loc1_ = object;
  121.    _loc1_.cols = {rb:rr - 255,gb:gr - 255,bb:br - 255};
  122.    _loc1_.rimcols = {rb:rimsr - 255,gb:rimsg - 255,bb:rimsb - 255};
  123.    _loc1_.kscols = {rb:ksr - 255,gb:ksg - 255,bb:ksb - 255};
  124.    _loc1_.spocols = {rb:spor - 255,gb:spog - 255,bb:spob - 255};
  125.    _loc1_.neoncols = {rb:nr - 255,gb:ng - 255,bb:nb - 255};
  126.    _loc1_.calcols = {rb:calr - 255,gb:calg - 255,bb:calb - 255};
  127. }
  128. function BuildCar(BUILD, x, y, name)
  129. {
  130.    var _loc1_ = name;
  131.    var _loc2_ = _root;
  132.    var _loc3_ = BUILD;
  133.    _loc2_[_loc1_].attachMovie(_loc3_._exhaust,"_exhaust",25);
  134.    _loc2_[_loc1_].attachMovie(_loc3_._frame,"_frame",50);
  135.    _loc2_[_loc1_].attachMovie("BASE","_base",20);
  136.    _loc2_[_loc1_].attachMovie(_loc3_._wheels,"_lwheel",30);
  137.    _loc2_[_loc1_].attachMovie(_loc3_._wheels,"_rwheel",40);
  138.    _loc2_[_loc1_].attachMovie("CALIPER","_lcaliper",29);
  139.    _loc2_[_loc1_].attachMovie("CALIPER","_rcaliper",39);
  140.    _loc2_[_loc1_].attachMovie(_loc3_._fkit,"_fkit",70);
  141.    _loc2_[_loc1_].attachMovie(_loc3_._skit,"_skit",80);
  142.    _loc2_[_loc1_].attachMovie(_loc3_._bkit,"_bkit",90);
  143.    if(_loc2_[_loc1_]._frame.SPOILER != undefined || Number(_loc3_._wing) != Math.NaN)
  144.    {
  145.       _loc2_[_loc1_]._frame.SPOILER.gotoAndStop(_loc3_._wing);
  146.    }
  147.    else
  148.    {
  149.       _loc2_[_loc1_]._frame.SPOILER.gotoAndStop(1);
  150.    }
  151.    _loc2_[_loc1_].attachMovie(_loc3_._light,"_light",60);
  152.    _loc2_[_loc1_].attachMovie("NEON","_neon",10);
  153.    _loc2_[_loc1_]._exhaust._x = _loc2_[_loc1_]._frame.XX._x;
  154.    _loc2_[_loc1_]._exhaust._y = _loc2_[_loc1_]._frame.XX._y - _loc3_.rideheight;
  155.    _loc2_[_loc1_]._lwheel._x = _loc2_[_loc1_]._frame.LWX._x;
  156.    _loc2_[_loc1_]._lwheel._y = _loc2_[_loc1_]._frame.LWX._y;
  157.    _loc2_[_loc1_]._rwheel._x = _loc2_[_loc1_]._frame.RWX._x;
  158.    _loc2_[_loc1_]._rwheel._y = _loc2_[_loc1_]._frame.RWX._y;
  159.    _loc2_[_loc1_]._lsus._x = _loc2_[_loc1_]._frame.LWX._x;
  160.    _loc2_[_loc1_]._lsus._y = _loc2_[_loc1_]._frame.LWX._y;
  161.    _loc2_[_loc1_]._rsus._x = _loc2_[_loc1_]._frame.RWX._x;
  162.    _loc2_[_loc1_]._rsus._y = _loc2_[_loc1_]._frame.RWX._y;
  163.    _loc2_[_loc1_]._lcaliper._x = _loc2_[_loc1_]._frame.LWX._x;
  164.    _loc2_[_loc1_]._lcaliper._y = _loc2_[_loc1_]._frame.LWX._y;
  165.    _loc2_[_loc1_]._rcaliper._x = _loc2_[_loc1_]._frame.RWX._x;
  166.    _loc2_[_loc1_]._rcaliper._y = _loc2_[_loc1_]._frame.RWX._y;
  167.    _loc2_[_loc1_]._rwheel._width += _loc3_.wheelsize;
  168.    _loc2_[_loc1_]._rwheel._height += _loc3_.wheelsize;
  169.    _loc2_[_loc1_]._lwheel._width += _loc3_.wheelsize;
  170.    _loc2_[_loc1_]._lwheel._height += _loc3_.wheelsize;
  171.    _loc2_[_loc1_]._wing._x = _loc2_[_loc1_]._frame.SP._x;
  172.    _loc2_[_loc1_]._wing._y = _loc2_[_loc1_]._frame.SP._y;
  173.    _loc2_[_loc1_]._x = x;
  174.    _loc2_[_loc1_]._y = y;
  175.    _loc2_[_loc1_]._frame._alpha = 100 + _loc3_.wintint;
  176.    _loc2_[_loc1_]._frame._y -= _loc3_.rideheight;
  177.    _loc2_[_loc1_]._light._y -= _loc3_.rideheight;
  178.    _loc2_[_loc1_]._fkit._y -= _loc3_.rideheight;
  179.    _loc2_[_loc1_]._skit._y -= _loc3_.rideheight;
  180.    _loc2_[_loc1_]._bkit._y -= _loc3_.rideheight;
  181.    _loc2_[_loc1_]._wing._y -= _loc3_.rideheight;
  182.    _loc2_[_loc1_]._base._y -= _loc3_.rideheight;
  183.    _loc2_[_loc1_]._neon._width = _loc2_[_loc1_]._frame._width + 30;
  184.    _loc2_[_loc1_]._neon._x = 0;
  185.    _loc2_[_loc1_]._neon._y = _loc2_[_loc1_]._lwheel._y + _loc2_[_loc1_]._lwheel._height / 2 - 15;
  186.    _loc2_[_loc1_]._frame.gotoAndStop(_loc3_.paintnum);
  187.    _loc2_[_loc1_]._frame.DECAL.gotoAndStop(_loc3_.decalnum);
  188.    _loc2_[_loc1_]._frame.BONNET.gotoAndStop(_loc3_.hoodnum);
  189.    setcol = new Color(_loc2_[_loc1_]._frame);
  190.    setcol.setTransform(_loc3_.cols);
  191.    setcol = new Color(_loc2_[_loc1_]._frame.DECAL);
  192.    setcol.setTransform({rb:- _loc3_.cols.rb,bb:- _loc3_.cols.bb,gb:- _loc3_.cols.gb});
  193.    if(_loc3_.hoodnum > 1)
  194.    {
  195.       setcol = new Color(_loc2_[_loc1_]._frame.BONNET);
  196.       setcol.setTransform({rb:- _loc3_.cols.rb,bb:- _loc3_.cols.bb,gb:- _loc3_.cols.gb});
  197.    }
  198.    if(_loc3_.hoodnum == undefined)
  199.    {
  200.       _loc2_[_loc1_]._frame.BONNET.gotoAndStop(1);
  201.    }
  202.    if(_loc3_._wing == 6 || _loc3_._wing == 13)
  203.    {
  204.       setcol = new Color(_loc2_[_loc1_]._frame.SPOILER);
  205.       setcol.setTransform({rb:- _loc3_.cols.rb,bb:- _loc3_.cols.bb,gb:- _loc3_.cols.gb});
  206.    }
  207.    setcol = new Color(_loc2_[_loc1_]._frame.INTERIOR);
  208.    setcol.setTransform({rb:- _loc3_.cols.rb,bb:- _loc3_.cols.bb,gb:- _loc3_.cols.gb});
  209.    setcol = new Color(_loc2_[_loc1_]._lcaliper);
  210.    setcol.setTransform(_loc3_.calcols);
  211.    setcol = new Color(_loc2_[_loc1_]._rcaliper);
  212.    setcol.setTransform(_loc3_.calcols);
  213.    setcol = new Color(_loc2_[_loc1_]._lwheel);
  214.    setcol.setTransform(_loc3_.rimcols);
  215.    setcol = new Color(_loc2_[_loc1_]._rwheel);
  216.    setcol.setTransform(_loc3_.rimcols);
  217.    setcol = new Color(_loc2_[_loc1_]._fkit);
  218.    setcol.setTransform(_loc3_.kscols);
  219.    setcol = new Color(_loc2_[_loc1_]._skit);
  220.    setcol.setTransform(_loc3_.kscols);
  221.    setcol = new Color(_loc2_[_loc1_]._bkit);
  222.    setcol.setTransform(_loc3_.kscols);
  223.    setcol = new Color(_loc2_[_loc1_]._neon);
  224.    setcol.setTransform(_loc3_.neoncols);
  225.    _loc2_[_loc1_]._frame.INTERIOR.gotoAndStop(_loc3_.intnum);
  226.    _loc2_[_loc1_]._rotation = _loc3_.frameangle;
  227.    _loc2_[_loc1_]._neon._rotation = - _loc3_.frameangle;
  228.    _loc2_[_loc1_]._lwheel._y = (- Math.sin(_loc2_[_loc1_]._rotation * 3.141592653589793 / 180)) * _loc2_[_loc1_]._frame.LWX._x + _loc2_[_loc1_]._frame.LWX._y;
  229.    _loc2_[_loc1_]._rwheel._y = (- Math.sin(_loc2_[_loc1_]._rotation * 3.141592653589793 / 180)) * _loc2_[_loc1_]._frame.RWX._x + _loc2_[_loc1_]._frame.RWX._y;
  230.    _loc2_[_loc1_]._lcaliper._y = (- Math.sin(_loc2_[_loc1_]._rotation * 3.141592653589793 / 180)) * _loc2_[_loc1_]._frame.LWX._x + _loc2_[_loc1_]._frame.LWX._y;
  231.    _loc2_[_loc1_]._rcaliper._y = (- Math.sin(_loc2_[_loc1_]._rotation * 3.141592653589793 / 180)) * _loc2_[_loc1_]._frame.RWX._x + _loc2_[_loc1_]._frame.RWX._y;
  232. }
  233. function WindowTint(b, a)
  234. {
  235.    var _loc1_ = b;
  236.    _loc1_.wintint += a;
  237.    if(_loc1_.wintint > 150)
  238.    {
  239.       _loc1_.wintint = 150;
  240.    }
  241.    else if(_loc1_.wintint < 0)
  242.    {
  243.       _loc1_.wintint = 0;
  244.    }
  245. }
  246. function toHex(j)
  247. {
  248.    c1 = Math.floor(j / 16);
  249.    r = j - c1 * 16;
  250.    c2 = r;
  251.    if(c1 >= 10)
  252.    {
  253.       if(c1 == 10)
  254.       {
  255.          c1 = "A";
  256.       }
  257.       if(c1 == 11)
  258.       {
  259.          c1 = "B";
  260.       }
  261.       if(c1 == 12)
  262.       {
  263.          c1 = "C";
  264.       }
  265.       if(c1 == 13)
  266.       {
  267.          c1 = "D";
  268.       }
  269.       if(c1 == 14)
  270.       {
  271.          c1 = "E";
  272.       }
  273.       if(c1 == 15)
  274.       {
  275.          c1 = "F";
  276.       }
  277.    }
  278.    if(c2 >= 10)
  279.    {
  280.       if(c2 == 10)
  281.       {
  282.          c2 = "A";
  283.       }
  284.       if(c2 == 11)
  285.       {
  286.          c2 = "B";
  287.       }
  288.       if(c2 == 12)
  289.       {
  290.          c2 = "C";
  291.       }
  292.       if(c2 == 13)
  293.       {
  294.          c2 = "D";
  295.       }
  296.       if(c2 == 14)
  297.       {
  298.          c2 = "E";
  299.       }
  300.       if(c2 == 15)
  301.       {
  302.          c2 = "F";
  303.       }
  304.    }
  305.    return c1 add c2;
  306. }
  307. function savegame(player, obj1, obj2)
  308. {
  309.    var _loc2_ = obj1;
  310.    var _loc1_ = new LoadVars();
  311.    dir = appdir add "\\SAVE\\" add player add ".drs";
  312.    dircont = "";
  313.    _loc1_.PC = _loc2_.cash;
  314.    _loc1_.PN = _loc2_.name;
  315.    _loc1_.LVL = _loc2_.level;
  316.    SaveGarage(_loc1_,"");
  317.    SaveGarage(_loc1_,1);
  318.    SaveGarage(_loc1_,2);
  319.    SaveGarage(_loc1_,3);
  320.    dircont = ENCODE(_loc1_.toString() add "&",1);
  321.    fscommand("flashstudio.savetofile","dir,dircont");
  322. }
  323. function ENCODE(str, offset)
  324. {
  325.    var _loc2_ = str;
  326.    var _loc3_ = "";
  327.    var _loc1_ = 0;
  328.    while(_loc1_ < _loc2_.length)
  329.    {
  330.       _loc3_ += chr(ord(_loc2_.charAt(_loc1_)) + offset);
  331.       _loc1_ = _loc1_ + 1;
  332.    }
  333.    return _loc3_;
  334. }
  335. function DECODE(str, offset)
  336. {
  337.    return ENCODE(str,- offset);
  338. }
  339. function LoadVar(bigstr, str)
  340. {
  341.    var _loc1_ = str;
  342.    var _loc2_ = bigstr;
  343.    index = _loc2_.indexOf(_loc1_ add "=") + _loc1_.length + 1;
  344.    index2 = _loc2_.indexOf("&",index);
  345.    subst = _loc2_.substring(index,index2);
  346.    if(subst.indexOf("%5F") != -1)
  347.    {
  348.       if(subst.indexOf("%5F") == 0)
  349.       {
  350.          subst = "_" add subst.slice(3);
  351.       }
  352.       else
  353.       {
  354.          subst = subst.slice(0,subst.indexOf("%5F")) add "_" add subst.slice(subst.indexOf("%5F") + 3);
  355.       }
  356.    }
  357.    if(subst.indexOf("%5F") != -1)
  358.    {
  359.       if(subst.indexOf("%5F") == 0)
  360.       {
  361.          subst = "_" add subst.slice(3);
  362.       }
  363.       else
  364.       {
  365.          subst = subst.slice(0,subst.indexOf("%5F")) add "_" add subst.slice(subst.indexOf("%5F") + 3);
  366.       }
  367.    }
  368.    if(subst.indexOf("%2D") != -1)
  369.    {
  370.       subst = "-" add subst.slice(3);
  371.    }
  372.    if(subst.indexOf("%2E") != -1)
  373.    {
  374.       if(subst.indexOf("%2E") == 0)
  375.       {
  376.          subst = "." add subst.slice(3);
  377.       }
  378.       else
  379.       {
  380.          subst = subst.slice(0,subst.indexOf("%2E")) add "." add subst.slice(subst.indexOf("%2E") + 3);
  381.       }
  382.    }
  383.    if(subst == undefined)
  384.    {
  385.       return "...";
  386.    }
  387.    return subst;
  388. }
  389. function LoadGame(bigstr)
  390. {
  391.    var _loc1_ = DECODE(bigstr,1);
  392.    player = new Object();
  393.    player.name = LOADNAME;
  394.    car = new Object();
  395.    player.cash = Number(LoadVar(_loc1_,"PC"));
  396.    if(isNaN(player.cash))
  397.    {
  398.       return false;
  399.    }
  400.    player.name = LoadVar(_loc1_,"PN");
  401.    player.level = Number(LoadVar(_loc1_,"LVL"));
  402.    if(player.level == Math.NaN)
  403.    {
  404.       player.level = 1;
  405.    }
  406.    LoadGarage(_loc1_,"");
  407.    LoadGarage(_loc1_,1);
  408.    LoadGarage(_loc1_,2);
  409.    LoadGarage(_loc1_,3);
  410.    return true;
  411. }
  412. function prompt(title, message, icon)
  413. {
  414.    var _loc1_ = _root;
  415.    _loc1_.attachMovie("WINDOW_PROMPT","promptwindow",1779);
  416.    _loc1_.promptwindow.titletext = title;
  417.    _loc1_.promptwindow.message = message;
  418.    _loc1_.promptwindow.icon.gotoAndStop(icon);
  419. }
  420. function buyMenu(obj, buyingwhat)
  421. {
  422.    var _loc1_ = _root;
  423.    _loc1_.attachMovie("WINDOW_BUY","promptwindow",666);
  424.    _loc1_.promptwindow.m_buyingwhat = buyingwhat;
  425.    _loc1_.promptwindow.car = obj;
  426. }
  427. function buyItem(ccar, item, bought)
  428. {
  429.    var _loc1_ = item;
  430.    var _loc2_ = ccar;
  431.    if(_loc1_.length < 4)
  432.    {
  433.       _loc2_[_loc1_] += bought;
  434.       if(_loc2_[_loc1_] > _root[_loc1_ add "MAX"])
  435.       {
  436.          _loc2_[_loc1_] = _root[_loc1_ add "MAX"];
  437.       }
  438.       if(_loc1_ == "WT" && _loc2_[_loc1_] < WTMIN)
  439.       {
  440.          _loc2_[_loc1_] = WTMIN;
  441.       }
  442.    }
  443.    else
  444.    {
  445.       _loc2_[_loc1_] = bought;
  446.    }
  447. }
  448. function calFriction()
  449. {
  450.    heightbon = Math.round(Math.abs(car.rideheight + 10) / 35 * 10);
  451.    anglebon = Math.round(Math.abs(car.frameangle) / 3 * 5);
  452.    car.FR = heightbon + anglebon;
  453. }
  454. function gotoRace()
  455. {
  456.    gotoAndPlay(459);
  457. }
  458. function gotoStory()
  459. {
  460.    gotoAndStop("STORY");
  461.    play();
  462. }
  463. function loadFromFile(filenm)
  464. {
  465.    FILENAME = filenm;
  466.    CONTENT = new String();
  467.    fscommand("flashstudio.loadfromfile","FILENAME,CONTENT");
  468. }
  469. UPGRADE_NUM = 34;
  470. GEAR_NUM = 6;
  471. RACEquality = "low";
  472. appdir = "C:\\";
  473. fscommand("flashstudio.appdir","appdir");
  474. CARS = new Array();
  475. CARS.push("BMWM5");
  476. CARS.push("ACCORD");
  477. CARS.push("CARRERAGT");
  478. CARS.push("CELICA");
  479. CARS.push("SX240");
  480. CARS.push("CHARGER");
  481. CARS.push("CIVIC");
  482. CARS.push("COMET");
  483. CARS.push("COOPER");
  484. CARS.push("CRX");
  485. CARS.push("ECLIPSE");
  486. CARS.push("FERRARI");
  487. CARS.push("FTO");
  488. CARS.push("G35");
  489. CARS.push("HUMMER");
  490. CARS.push("IMPREZA");
  491. CARS.push("INTEGRA");
  492. CARS.push("IS300");
  493. CARS.push("LANCER");
  494. CARS.push("M3");
  495. CARS.push("MCLAREN");
  496. CARS.push("MODENA");
  497. CARS.push("MR2");
  498. CARS.push("NECLIPSE");
  499. CARS.push("NSX");
  500. CARS.push("P911");
  501. CARS.push("PRELUDE");
  502. CARS.push("RSX");
  503. CARS.push("RX7");
  504. CARS.push("RX7GEN3");
  505. CARS.push("RX8");
  506. CARS.push("S4");
  507. CARS.push("S2000");
  508. CARS.push("SALEEN");
  509. CARS.push("SC430");
  510. CARS.push("SHELBY");
  511. CARS.push("SILVIA");
  512. CARS.push("SKYLINE");
  513. CARS.push("SKYLINER34");
  514. CARS.push("SUPRA");
  515. CARS.push("TIBURON");
  516. CARS.push("TT");
  517. CARS.push("VANQUISH");
  518. CARS.push("VIPER");
  519. CARS.push("VIPERSRT");
  520. CARS.push("P911GT1");
  521. CARS.push("ELISE");
  522. CARS.push("MURCIELAGO");
  523. CARS.push("GT40");
  524. CARS.push("PROTEGE");
  525. CARS.push("Z");
  526. CARS.push("Z4");
  527. CARS.push("Z8");
  528. CARS.push("GOLF");
  529. CARS.push("ZX300");
  530. CARS.push("SENTRA");
  531. CARS.push("BARACUDA");
  532. CARS.push("CORVETTEZ");
  533. CARS.push("STEALTH");
  534. CARS.push("ZX3002");
  535. CARS.push("CIVICH");
  536. CARS.push("MUSTANG");
  537. CARS.push("TIBURON2");
  538. RIMS = new Array();
  539. RIMS.push("WHEEL_1");
  540. RIMS.push("WHEEL_2");
  541. RIMS.push("WHEEL_3");
  542. RIMS.push("WHEEL_4");
  543. RIMS.push("WHEEL_5");
  544. RIMS.push("WHEEL_6");
  545. RIMS.push("WHEEL_7");
  546. RIMS.push("WHEEL_8");
  547. RIMS.push("WHEEL_9");
  548. RIMS.push("WHEEL_10");
  549. RIMS.push("WHEEL_11");
  550. RIMS.push("WHEEL_12");
  551. RIMS.push("WHEEL_13");
  552. RIMS.push("WHEEL_14");
  553. RIMS.push("WHEEL_15");
  554. RIMS.push("WHEEL_16");
  555. LIGHT = new Array();
  556. LIGHT.push("_1");
  557. LIGHT.push("_2");
  558. LIGHT.push("_3");
  559. LIGHT.push("_4");
  560. LIGHT.push("_5");
  561. LIGHT.push("_6");
  562. LIGHT.push("_7");
  563. WING = new Array();
  564. WING.push("BLANK");
  565. WING.push("WING_1");
  566. WING.push("WING_2");
  567. WING.push("WING_3");
  568. WING.push("WING_4");
  569. WING.push("WING_5");
  570. HPMAX = 1100;
  571. TQMAX = 800;
  572. CLMAX = 5;
  573. WTMAX = 2500;
  574. WTMIN = 1000;
  575. FRMAX = 15;
  576. NOSMAX = 100;
  577. RIMMAX = 21;
  578. SPOILERMAX = 14;
  579.