/* CSF COM BASE Class */ function CSFObject(){ //VERSION this.version="v1,8,3,0"; this.fx_version="1.8.3.0"; //GENERAL -- ActiveX this.ID = "oSkillGround"; this.classid = "clsid:0F733F27-5BBB-4D03-8D6B-19E2143880BF"; this.codebase = "/cab1830/SkillGround.cab#Version=1,8,3,0"; this.width = 0; this.height = 0; //PING this.pingServer; //ping server //INSTALLER this.ftpServer="38.99.165.28"; this.installerFtpServer="38.99.165.28"; this.ftpPort=21; this.ftpUsername="skillplayer"; this.ftpPassword="f0rm1dabl3"; this.ftpRoot="/Deploy/"; this.siteURL="http://www1.skillground.com/sg/index.do"; this.termsURL="http://www1.skillground.com/help/policies.html#1"; this.moreInfoURL="http://www1.skillground.com/help/general.html"; this.playerName=""; this.swfURL="/media/sgm/"; this.FirewallFAQURL="/help/faq.html#17"; this.submitReportUrl= "http://www1.skillground.com/sg"+"/submitReport.do\;jsessionid="+"75626245D9FC048835BA7DF6DDDCB2B4.SkillNode1"; this.submitReportNSUrl = "http://www1.skillground.com/sg"+"/submitReport_NS.do"; this.gameLandingUrl= "gameLanding.do?game_id="; this.postURL = ""; this.sessionRequired = false; //Reza //STATUS this.message = ""; //error message this.status = "UNINTIALIZED"; //CSF Object status, say, "UNINTIALIZED", "INTIALIZED", "PLAYING" this.runs = 0; this.initTimer = new TimerHandler(1); this.isWaiting = false; //EVENT Object if (Browser.isIE) { this.events = { OnLaunchBegin : {name : "OnLaunchBegin(sGameName)", method : ""}, OnLaunchEnd : {name : "OnLaunchEnd(sGameName, fCrashed)", method : ""}, OnLaunchErrorEx : {name : "OnLaunchErrorEx(sGameName,lErrorCode,sDescription)", method : ""}, OnPingEnd : {name : "OnPingEnd(sServerName, nPingTime)", method : ""}, OnPingError : {name : "OnPingError(sServerName, sDescription)", method : ""}, OnInstallInProgress : {name : "OnInstallInProgress()", method : ""}, OnUpgradeComponentsError : {name : "OnUpgradeComponentsError(sDescription)", method : ""}, OnUpgradeComponentsEnd : {name : "OnUpgradeComponentsEnd(fSuccess)", method : ""}, OnVerifyComponentErrorEx : {name : "OnVerifyComponentError(sGameName, lErrorCode, sDescription)",method : ""}, OnVerifyComponentEnd : {name : "OnVerifyComponentEnd(sGameName, fInstalled)", method : ""}, OnInstallErrorEx : {name : "OnInstallErrorEx(lErrorCode, sDescription )", method : ""}, OnInstallEnd : {name : "OnInstallEnd(fSuccess)", method : ""}, OnUninstallError : {name : "OnUninstallError(sDescription)", method : ""}, OnUninstallEnd : {name : "OnUninstallEnd(fSuccess)", method : ""}, OnLaunchUnsecuredBegin : {name : "OnLaunchUnsecuredBegin(sGameName,sMapName)", method : ""}, OnLaunchUnsecuredEnd : {name : "OnLaunchUnsecuredEnd(sGameName,sMapName,fCrashed)", method : ""}, OnLaunchUnsecuredErrorEx : {name : "OnLaunchUnsecuredErrorEx(sGameName,sMapName,lErrorCode,sErrorDescription)", method : ""}, OnAddMapsEnd : {name : "OnAddMapsEnd(sGameName,fSuccess)", method : ""}, OnAddMapsErrorEx : {name : "OnAddMapsErrorEx(sGameName,lErrorCode,sDescription)", method : ""}, OnConfigureBegin : {name : "OnConfigureBegin(sGameName)", method : ""}, OnConfigureEnd : {name : "OnConfigureEnd(sGameName,fCrashed)", method : ""}, OnConfigureErrorEx : {name : "OnConfigureErrorEx(sGameName,lErrorCode,sDescription)", method : ""}, OnRepairErrorEx : {name : "OnRepairErrorEx(sGameName)", method : ""}, OnRepairEnd : {name : "OnRepairEnd(sGameName)", method : ""}, OnAlertPlayerEvent : {name : "OnAlertPlayerEvent(sGameName, sChallengerName)", method : ""}, OnInstallProcessCoreInstalled : {name : "OnInstallProcessCoreInstalled(sGameName)", method : ""}, OnInstallProcessEnd : {name : "OnInstallProcessEnd(sGameName)", method : ""}, OnInstallProcessErrorEx : {name : "OnInstallProcessErrorEx(sGameName,lErrorCode,sDescription)", method : ""} } } else if (Browser.isFirefox) this.events = ""; } /* 2. Launch method */ CSFObject.prototype.launchEx = function(gamename, mapname, serveraddress, nport, sParams, key, fMonitored, nMatchID){ //hack for driving range - map testcourse set to NorthAmerica1 if(mapname == "testcourse") mapname = "NorthAmerica1"; if (this.isInstalled()) { try { this.initRepeat(); this.setPostURL(); this.hackGame(gamename); fMonitored=false; if (Browser.isIE) eval(this.ID).LaunchEx(gamename,mapname, serveraddress, parseInt(nport), sParams, key, fMonitored, nMatchID); else if (Browser.isFirefox) this.ID.LaunchEx(gamename,mapname, serveraddress, parseInt(nport), sParams, key, fMonitored, nMatchID); //alert("nMatchID: " + nMatchID); //if (Browser.isIE) eval(this.ID).LaunchEx(gamename,mapname, serveraddress, parseInt(nport), sParams, key, fMonitored, 999); //else if (Browser.isFirefox) this.ID.LaunchEx(gamename,mapname, serveraddress, parseInt(nport), sParams, key, fMonitored, 99999); } catch ( e ) { this.message = "CSF LaunchEx Script error: " + e.description; // alert("launchEx error: " + this.message); } } } /* 3. Cancel launch when timeout (stops preLaunch) */ CSFObject.prototype.cancelLaunch = function() { if (this.isInstalled()) { try { if (Browser.isIE) eval(this.ID).CancelLaunch( ); else if (Browser.isFirefox) this.ID.CancelLaunch( ); } catch ( e ) { this.message = "CSF stopLaunch Script error: " + e.description; // alert("cancelLaunch error: " + this.message); } } } CSFObject.prototype.setDiagnostics = function(){ try { if (Browser.isIE) eval(this.ID).Diagnostics=false; //eval(this.ID).Diagnostics = true; else if (Browser.isFirefox) this.ID.Diagnostics=false; //else if (Browser.isFirefox) this.ID.Diagnostics = true; } catch ( e ) { this.message = "CSF Set Post URL Script error: " + e.description; // alert(this.message); } } //----EOF-----