
Originally Posted by
outlaw321
All this isn't that hard.
Then why haven't you released it yet?
Emulated this one from ijji. My ActiveX kinda fails and it's not button-included.
Code:
<script language="javascript" type="text/javascript">
var objActiveX;
function install() {
if (!isMSIE()) return;
var obj = '<object id="HGPlugin9USA" width="0" Height="0" CLASSID="CLSID:CD995117-98E5-4169-9920-6C12D4C0B548" CODEBASE="http://gamedownload.ijjimax.com/gamedownload/dist/hgstart/HGPlugin9USA.cab#version=9,0,0,0" style="display:none"></object>';
document.write(obj);
objActiveX=eval("HGPlugin9USA");
}
function goLogin() {
document.location.href="http://login.ijji.com/login.nhn?nextURL=http%3A%2F%2Fgunbound.ijji.com%2Findex.nhn";
}
function startGame(launchScript){
if ( preStartGame(launchScript) == false ) return;
_launchScript = launchScript.launchScript;
if (!check(launchScript.gameId)) return false;
if (launchScript =="") {
alert("Invalid Game Information");
return false;
}
if( !launchScript.isLogin ) {
goLogin();
return false;
}
if (!launchScript.isValid) {
alert("This channel does not exist.");
return false;
}
wbersPosLog(launchScript.gameId, "110");
objActiveX.hgs_startGame(launchScript.launchScript);
postStartGame(launchScript);
}
function wbersPosLog(gameId, code) {
ajaxHttpRequest("http://wbers.ijji.com/wbers/post.php?project=" + gameId + "&id=ideal&subject=poslog&value=" + code);
}
function preStartGame(launchScript) {
// override for doing something
return true;
}
function postStartGame(launchScript) {
// override for doing something
return true;
}
function getLaunchScript(gameId, subId, channelId, callback) {
if (typeof(gameId) =="undefined" || typeof(subId) == "undefined" ) {
alert("Invalid Game Information");
return false;
}
if (!check(gameId)) return false;
var channelString = "";
if ( channelId != '' && typeof(channelId) != "undefined" ) {
channelString = "&channelId=" + channelId;
}
if ( callback == '' || typeof(callback) == "undefined" ) {
callback = "startGame";
}
ajaxHttpRequest("/common/launch.nhn?gameId=" + gameId + "&subId=" + subId + channelString, callback);
}
function check(gameId) {
if (!isMSIE()) {
document.location.href="/common/activex.nhn?msie=" + isMSIE() + "&xpsp2=" + isXPSP2() + "&next=http%3A%2F%2Fgunbound.ijji.com%2Findex.nhn";
return false;
}
var o = document.getElementById("HGPlugin9USA");
try {
o.hgs_chkDown();
if ( typeof(o)=="object" ) {
o.style.pixelWidth = 0;
o.style.pixelHeight = 0;
}
} catch (e) {
goInstallActivexPage(gameId);
return false;
}
deleteCookie(COOKIE_AVX_TR);
return true;
}
var COOKIE_AVX_TR = "S_TRAX";
function goInstallActivexPage(gameId) {
activexInstallTracking(gameId);
document.location.href="/common/activex.nhn?msie=" + isMSIE() + "&xpsp2=" + isXPSP2() + "&next=http%3A%2F%2Fgunbound.ijji.com%2Findex.nhn";
}
function activexInstallTracking(gameId) {
wbersPosLog(gameId, "0000");
if ( getCookie(COOKIE_AVX_TR) == "true") {
wbersPosLog(gameId, "0001");
} else {
setCookie(COOKIE_AVX_TR, "true");
}
}
function isInstall(){
if (!isMSIE()) {
return true;
}
var o = document.getElementById("HGPlugin9USA");
try {
o.hgs_chkDown();
if ( typeof(o)=="object" ) {
o.style.pixelWidth = 0;
o.style.pixelHeight = 0;
}
} catch (e) {
return false;
}
return true;
}
function downActiveX(url) {
if ( check() ) {
document.location.href =url;
}
}
install();
</script>