動かすために変更するスクリプトの箇所
Main,AccessClass,Sounds の3つのクラスに変更を加えています
これはとりあえず動かすための変更で
このスクリプトではcharaData,partyData,itemData,questDataを(しょうがなく)SharedObejctでローカルに保存しています
一応、自己責任でお願いします
まだログ保存、ログイン、ログアウト、レジスト、リプレイ、ゾンビから復活、レスキューなど対応していない機能も多く、とりあえずでいれているデータも多い
スクリプト内のどの行かを()に書いています、上から順に変更した場合の行数なのでだいたいそのあたりだと思ってください。
Main
追加 | Main にSharedObjectを追加します、"InishieCloneSaveData"の部分はなんでもいいです、それがセーブファイルの名前になります(190,194)
public var mso:SharedObject;
public function Main() { this.mso = SharedObject.getLocal("InishieCloneSaveData","/"); ....
削除 | よくわからないがJavaScriptの呼び出しになんかを設定している?(225)
ExternalInterface.addCallback("flashFunc",this.getJavaScriptCall);
AccessClass
変更 | サーバーと送受信をしている箇所なのでけっこう変えないといけない
ここではxmlファイルから読み込んでいるがデータを読み込めれば他の方法でもよさそう
{xmlファイルをおいてるフォルダ}はxmlファイルを置いてる場所に適宜変える(334)
変更前
this.loader.dataFormat = URLLoaderDataFormat.VARIABLES; this.loader.addEventListener(Event.OPEN,this.loaderOpenFunc); this.loader.addEventListener(Event.COMPLETE,this.loaderCompleteFunc); this.loader.addEventListener(IOErrorEvent.IO_ERROR,this.URLLoaderIOErrorFunc); this.loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.loaderSecurityErrorFunc); this.access_time = getTimer() / 1000; addEventListener(Event.ENTER_FRAME,this.loadEnterFrameFunc); this.loader.load(_loc2_);
変更後
this.loader.data = _loc3_;
var save_path:* = "{xmlファイルをおいてるフォルダ}\\";
var xmlLoader:* = new URLLoader();
if(this.loader.data.mode == "first")
{
save_path += "inishieFirst.xml";
xmlLoader.addEventListener(Event.COMPLETE,this.newFirstLCFunc);
}
else if(this.loader.data.mode == "mapload" || this.loader.data.mode == "mapload2")
{
var areaML:* = this.loader.data.mapname.split("_")[0];
var floorML:* = this.loader.data.mapname.split("_")[1];
xmlLoader.addEventListener(Event.COMPLETE,this.loaderComp_mapload);
if(areaML == 0 || areaML == -1)
{
save_path += "inishieMapTown.xml";
}
else if(1 <= areaML && areaML <= 15)
{
save_path = save_path + "inishieMapA" + areaML + ".xml";
}
else if(500 <= areaML)
{
save_path += "inishieMapPC.xml";
}
else
{
save_path += "inishieXML.xml";
}
}
else
{
save_path += "inishieXML.xml";
xmlLoader.addEventListener(Event.COMPLETE,this.newloaderCompleteFunc);
}
trace(save_path);
xmlLoader.load(new URLRequest(save_path));
追加 | さらにサーバー側で行っていたであろう処理に関する関数を追加する(369)
追加関数
- newFirstLCFunc : 最初にデータをロードする関数
- newloaderCompleteFunc : いろいろサーバーと通信する関数
- loaderComp_mapload : ロードしたマップデータを処理する関数
- avatarSetNL : avatarを表す文字列を設定する関数
- mergeItems : 所持しているアイテムでローカルに保存されたアイテムを上書きする関数
- getEquip : 初期装備の設定を得る関数
- setZukanData : 図鑑を更新する関数
- emergeConv : emergeを変換する関数
private function newFirstLCFunc(param1:Event) : * { var seedAC:* = Math.floor(Math.random() * 2147483647); trace("------ " + this.loader.data.mode + " ------"); for(var entry in this.loader.data) { trace("pr: " + entry + ", val: " + this.loader.data[entry]); } trace("------ " + this.loader.data.mode + " ------"); this.loader.data.playcount = 200; this.loader.data.counttime = 100; var xmlF:* = new XML(param1.target.data); xmlF.seed = seedAC; if(this.Main.mso.data.quest != undefined) { xmlF.charaData = this.Main.mso.data.chara; xmlF.partyData = this.Main.mso.data.party; xmlF.questData = this.Main.mso.data.quest; xmlF.itemData = this.Main.mso.data.item; if(this.Main.mso.data.ezukan == undefined) { xmlF.ezukan = ""; } else { xmlF.ezukan = this.Main.mso.data.ezukan; } if(this.Main.mso.data.izukan == undefined) { xmlF.izukan = ""; } else { xmlF.izukan = this.Main.mso.data.izukan; } } this.Main.accessEnd(this.loader.data.mode,xmlF); }
private function newloaderCompleteFunc(param1:Event) : * { var seedAC:* = Math.floor(Math.random() * 2147483647); trace("------ " + this.loader.data.mode + " ------"); for(var entry in this.loader.data) { trace("pr: " + entry + ", val: " + this.loader.data[entry]); } trace("------ " + this.loader.data.mode + " ------"); this.loader.data.playcount = 200; this.loader.data.counttime = 100; var inmode:* = this.loader.data.mode; if(inmode == "charamake") { this.loader.data.id = "testID"; this.loader.data.pass = "testPass"; this.loader.data.counttime = 1; this.loader.data.loginkey = "testLK"; var temp0:* = "cID" + this.loader.data.slot; var newcharabase:* = [temp0,this.loader.data.slot,this.loader.data.name,this.loader.data.job,this.avatarSetNL(this.loader.data.seed,this.loader.data.index),1,0,50,-1,-1,-1]; newcharabase[14] = 0; this.loader.data.newchara = newcharabase.join(","); if(this.Main.mso.data.chara != undefined && this.Main.mso.data.chara != "") { var temp1:* = this.Main.mso.data.chara.split("/"); temp1[this.loader.data.slot] = this.loader.data.newchara; this.Main.mso.data.chara = temp1.join("/"); } else { this.Main.mso.data.chara = this.loader.data.newchara; } temp1 = []; if(this.Main.mso.data.item != undefined && this.Main.mso.data.item != null && this.Main.mso.data.item != "") { temp1.push(this.Main.mso.data.item); } temp1.push(this.getEquip(this.loader.data.seed,this.loader.data.index,temp0,this.loader.data.job,true)); temp1 = temp1.join("/"); this.loader.data.itemData = temp1; this.Main.mso.data.item = temp1; this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "gamestart") { this.loader.data.seed = seedAC; this.loader.data.time = 100; this.loader.data.playkey = "testPK"; this.loader.data.zombieid = ""; this.loader.data.practice = 0; this.loader.data.zindex = 0; var pTIME:* = "0000000000"; this.loader.data.charaData = this.Main.mso.data.chara; temp0 = this.Main.mso.data.party; if(temp0 == undefined || temp0 == "" || temp0 == null) { this.loader.data.partyData = "1,1,0,0," + seedAC + "," + pTIME + "<>" + this.loader.data.partydata; } else { this.loader.data.partyData = temp0.split("<>")[0] + "<>" + this.loader.data.partydata; } this.Main.mso.data.party = this.loader.data.partyData; var sd:* = this.Main.playData.getSaveData(); this.loader.data.questData = sd[4]; this.Main.mso.data.quest = sd[4]; this.loader.data.itemData = this.Main.mso.data.item; if(this.Main.mso.data.souko != undefined && this.Main.mso.data.souko != "") { this.loader.data.itemData = this.loader.data.itemData + "/" + this.Main.mso.data.souko; } this.Main.mso.data.dropRandIndex = 0; this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "datasave" || inmode == "saveware" || inmode == "savelog" || inmode == "saveend" || inmode == "wareend") { this.setZukanData(this.loader.data.killdata,this.loader.data.pickupdata,false); temp0 = this.loader.data.charadata.split("/"); temp1 = this.loader.data.partydata.split("<>")[1].split("/"); temp2 = this.Main.mso.data.chara.split("/"); var i:* = 0; while(i < temp0.length) { if(temp0[i] != "") { flag = false; if(inmode == "savelog") { var j:* = 0; while(j < temp1.length) { if(temp0[i].split(",")[0] == temp1[j].split(",")[0]) { flag = true; break; } j++; } } var temp3:* = temp0[i].split(","); if(flag) { temp3[14] = int(temp2[i].split(",")[14]) + 1; } else { temp3[14] = int(temp2[i].split(",")[14]); } temp0[i] = temp3.join(","); } i++; } this.loader.data.charadata = temp0.join("/"); this.loader.data.charaData = this.loader.data.charadata; this.Main.mso.data.chara = this.loader.data.charadata; temp1 = this.loader.data.partydata.split("<>"); temp2 = temp1[0].split(","); areaNL = temp2[0]; var floorNL:* = temp2[1]; var xNL:* = temp2[2]; var yNL:* = temp2[3]; if(areaNL == 0 && floorNL == 0) { temp3 = this.Main.mso.data.party.split("<>")[0].split(",")[0]; if(temp3 == 1) { temp2[2] = 29; temp2[3] = 7; } else if(temp3 == 2) { temp2[2] = 46; temp2[3] = 4; } else if(temp3 == 3) { temp2[2] = 8; temp2[3] = 5; } else if(temp3 == 4) { temp2[2] = 38; temp2[3] = 6; } else if(temp3 == 5) { temp2[2] = 41; temp2[3] = 20; } else if(temp3 == 6) { temp2[2] = 29; temp2[3] = 5; } else if(temp3 == 7) { temp2[2] = 17; temp2[3] = 20; } else if(temp3 == 8) { if(this.Main.mso.data.party.split("<>")[0].split(",")[1] == 40) { temp2[2] = 26; temp2[3] = 7; } else { temp2[2] = 46; temp2[3] = 21; } } else if(8 < temp3) { temp2[2] = 29; temp2[3] = 7; } } else if(areaNL == 0 && floorNL == 1) { if(xNL == 29 && yNL == 38) { temp2[0] = 5; temp2[1] = 1; } else if(xNL == 29 && yNL == 7) { temp2[0] = 1; temp2[1] = 1; } else if(xNL == 46 && yNL == 4) { temp2[0] = 2; temp2[1] = 6; } else if(xNL == 8 && yNL == 5) { temp2[0] = 3; temp2[1] = 11; } else if(xNL == 38 && yNL == 6) { temp2[0] = 4; temp2[1] = 16; } else if(xNL == 41 && yNL == 20) { temp2[0] = 5; temp2[1] = 21; } else if(xNL == 29 && yNL == 5) { temp2[0] = 6; temp2[1] = 26; temp2[2] = 31; temp2[3] = 36; } else if(xNL == 17 && yNL == 20) { temp2[0] = 7; temp2[1] = 31; } else if(xNL == 46 && yNL == 21) { temp2[0] = 8; temp2[1] = 36; } else if(xNL == 26 && yNL == 7) { temp2[0] = 8; temp2[1] = 40; } else if(xNL == 37 && yNL == 27) { temp2[0] = -1; } else { temp2[0] = 1; } } else if(areaNL == 1 && floorNL == -1) { temp2[0] = 0; temp2[2] = 5; temp2[3] = 16; } else if(areaNL == -1 && floorNL == 0) { temp2[0] = 0; } else if(areaNL == -2 && floorNL == 0) { temp2[0] = 0; } else if(areaNL == 1 && floorNL == 6) { temp2[0] = 2; } else if(areaNL == 2 && floorNL == 11) { temp2[0] = 3; } else if(areaNL == 3 && floorNL == 16) { temp2[0] = 4; } else if(areaNL == 4 && floorNL == 21) { temp2[0] = 5; } else if(areaNL == 5 && floorNL == 26) { temp2[0] = 6; temp2[2] = 31; temp2[3] = 36; } else if(areaNL == 6 && floorNL == 31) { temp2[0] = 7; } else if(areaNL == 7 && floorNL == 36) { temp2[0] = 8; } else if(areaNL == 8 && floorNL == 41) { temp2[0] = 9; } else if(areaNL == 9 && floorNL == 51) { temp2[0] = 10; } else if(areaNL == 10 && floorNL == 61) { temp2[0] = 11; } else if(areaNL == 11 && floorNL == 71) { temp2[0] = 12; } else if(areaNL == 12 && floorNL == 81) { temp2[0] = 13; } else if(areaNL == 13 && floorNL == 91) { temp2[0] = 14; } else if(areaNL == 14 && floorNL == 101) { temp2[0] = 15; } temp2[4] = seedAC; pTIME = "0000000000"; temp2[5] = pTIME; temp1[0] = temp2.join(","); if(!(inmode == "saveware" || inmode == "wareend")) { this.loader.data.warehouse = ""; } temp3 = mergeItems(temp1[1],this.loader.data.itemdata,this.loader.data.warehouse,this.Main.mso.data.item); this.loader.data.partyData = temp1.join("<>"); this.Main.mso.data.party = temp1.join("<>"); temp1 = this.loader.data.questdata.split("/"); if(inmode == "datasave") { temp1[29] = temp1[29].split(",")[0] + ",0"; } this.loader.data.questData = temp1.join("/"); this.Main.mso.data.quest = this.loader.data.questData; this.loader.data.itemData = temp3; this.Main.mso.data.item = temp3; this.Main.mso.data.dropRandIndex = 0; this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "eventsave") { if(this.loader.data.eventtype.substr(0,7) == "upgrade") { trace("soul upgrade"); } else if(this.loader.data.eventtype.substr(0,4) == "boss") { trace("boss defeat"); } else if(this.loader.data.eventtype == "undead") { temp0 = this.loader.data.mydata.split(",")[0]; temp1 = this.Main.mso.data.chara.split("/"); i = 0; while(i < temp1.length) { temp2 = temp1[i].split(","); if(temp2[0] == temp0) { temp2[13] = 1; temp1[i] = temp2.join(","); break; } temp; i++; } this.Main.mso.data.chara = temp1.join("/"); this.Main.mso.flush(); } else if(this.loader.data.eventtype.substr(0,3) == "job") { trace(); } else if(this.loader.data.eventtype.substr(0,6) == "lifeup") { setZukanData(this.loader.data.eventtype.split("_")[1],"",true); var qs:* = this.Main.mso.data.quest.split("/"); qs[37] = String(int(qs[37].split(",")[0]) + 1) + "," + qs[37].split(",")[1]; this.Main.mso.data.quest = qs.join("/"); this.Main.mso.flush(); } else { this.Main.accessError("",this.loader.data); } this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "upreset") { this.loader.data.seed = seedAC; temp0 = [9,10,21,22,11,13,5,6,2,3,4,30]; temp1 = this.Main.mso.data.quest.split("/"); i = 0; while(i < temp0.length) { temp2 = temp1[temp0[i]].split(","); temp2[0] = 0; temp1[temp0[i]] = temp2.join(","); i++; } this.Main.mso.data.quest = temp1.join("/"); this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "giftcount") { this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "charadel") { this.loader.data.seed = seedAC; temp0 = this.Main.mso.data.chara.split("/"); temp1 = temp0[this.loader.data.slot].split(",")[0]; temp0[this.loader.data.slot] = ""; this.Main.mso.data.chara = temp0.join("/"); temp0 = this.Main.mso.data.party.split("<>"); temp2 = temp0[1].split("/"); temp3 = []; i = 0; while(i < temp2.length) { if(temp2[i].split(",")[0] != temp1) { temp3.push(temp2[i]); } i++; } this.Main.mso.data.party = temp0[0] + "<>" + temp3.join("/"); temp2 = this.Main.mso.data.item.split("/"); temp3 = []; i = 0; while(i < temp2.length) { if(temp2[i].split(",")[3] != temp1) { temp3.push(temp2[i]); } i++; } this.Main.mso.data.item = temp3.join("/"); this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "milkyway") { var pSEED:* = int(this.Main.mso.data.party.split("<>")[0].split(",")[4]); pTIME = this.Main.mso.data.party.split("<>")[0].split(",")[5]; var pTIME1:* = int(String(pTIME).substr(-6,1)); var pTIME2:* = int(String(pTIME).substr(-1,1)); var pTIME3:* = int(String(pTIME).substr(-4,1)); var pTIME4:* = int(String(pTIME).substr(-2,1)); var dropRandNL:* = new MTrandom(pSEED + pTIME1 * 100000000 + pTIME2 * 10000000 + pTIME3 * 1000000 + pTIME4 * 100000); i = 0; while(i < this.Main.mso.data.dropRandIndex) { dropRandNL.nextInt(1); i++; } temp0 = this.loader.data.mydata.split("<>")[0].split(",")[10]; temp1 = this.loader.data.mydata.split("<>")[1].split("/"); if(this.loader.data.gameover) { temp3 = 0; } else { temp3 = 2 + 2 * int(this.loader.data.questdata.split("/")[4].split(",")[0]); } i = 0; while(i < temp1.length) { temp2 = temp1[i].split(","); if(temp2[5] == temp0 && 800 <= temp2[0] && temp2[0] < 900) { temp3 += 50; break; } i++; } temp0 = this.loader.data.charadata.split("/"); flag = false; i = 0; while(i < temp0.length) { temp1 = temp0[i].split(","); if(temp1[0] == this.loader.data.dieid) { var dora:* = dropRandNL.nextInt(100); if(dora < temp3) { temp1[12] = 1; flag = true; } else { dropRandNL.index += 4; } temp1[7] = 0; temp0[i] = temp1.join(","); break; } i++; } this.Main.mso.data.dropRandIndex = dropRandNL.index; this.Main.mso.data.chara = temp0.join("/"); this.loader.data.charaData = temp0.join("/"); this.Main.mso.data.party = this.loader.data.partydata; this.loader.data.partyData = this.loader.data.partydata; this.Main.mso.data.quest = this.loader.data.questdata; this.loader.data.questData = this.loader.data.questdata; temp1 = this.loader.data.itemdata.split("/"); if(flag) { temp0 = this.loader.data.mydata.split("<>")[1].split("/"); j = 4; i = 0; while(i < temp0.length) { if(Math.floor(Math.random() * j) == 0 && 0 < j) { j = -1; } else { temp1.push(temp0[i]); j--; } i++; } } temp0 = this.loader.data.partydata.split("<>")[1].split("/"); if(temp0.length == 0) { temp3 = this.loader.data.dieid + ",,"; } else { temp0.push(this.loader.data.dieid + ",,"); temp3 = temp0.join("/"); } temp2 = mergeItems(temp3,temp1.join("/"),"",this.Main.mso.data.item); this.Main.mso.data.item = temp2; this.loader.data.itemData = temp2; this.Main.mso.flush(); if(this.loader.data.gameover == 1) { this.loader.data.mode = "deadsave"; } else { this.loader.data.mode = "savelog"; } this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "graveload") { this.loader.data.logver = "logver"; this.loader.data.logdata = this.Main.compressData(">>>>>>>>>"); this.loader.data.infodata = "lID,lIP,lT1,lT2,,,lType,lVer,lHelpID"; this.loader.data.mainchara = ",,,,,,,,,,,,100"; this.loader.data.charadata = this.Main.mso.data.chara; this.loader.data.partydata = this.Main.mso.data.party; this.loader.data.questdata = this.Main.mso.data.quest; this.loader.data.itemdata = this.Main.mso.data.item; this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "charareset") { this.loader.data.seed = seedAC; temp0 = this.Main.mso.data.chara.split("/"); temp1 = temp0[this.loader.data.slot].split(","); temp1[5] = 1; temp1[6] = 0; temp1[7] = 50; temp1[14] = 0; this.loader.data.newchara = temp1.join(","); temp0[this.loader.data.slot] = temp1.join(","); this.Main.mso.data.chara = temp0.join("/"); temp2 = this.Main.mso.data.item.split("/"); temp2.push(getEquip(this.loader.data.seed,0,temp1[0],temp1[3],false)); this.loader.data.itemData = temp2.join("/"); this.Main.mso.data.item = temp2.join("/"); this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "chararevive") { this.loader.data.seed = seedAC; this.loader.data.soul = -1; temp0 = this.Main.mso.data.chara.split("/"); temp1 = temp0[this.loader.data.slot].split(","); if(1 < temp1[5]) { temp1[5] -= 1; } temp1[6] = 0; temp1[7] = 50; temp1[12] = 0; temp1[14] = 0; temp0[this.loader.data.slot] = temp1.join(","); this.loader.data.newchara = temp1.join(","); this.Main.mso.data.chara = temp0.join("/"); this.loader.data.itemData = this.Main.mso.data.item; this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "partybreak") { this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "gameclear") { this.loader.data.seed = seedAC; this.Main.mso.data.chara = ""; this.Main.mso.data.party = ""; this.Main.mso.data.quest = ""; this.Main.mso.data.item = ""; this.Main.mso.data.ezukan = ""; this.Main.mso.data.izukan = ""; this.Main.mso.flush(); this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else if(inmode == "practice") { this.Main.accessEnd(this.loader.data.mode,this.loader.data); } else { trace(this.mymode); this.Main.accessError(this.loader.data.mode,this.loader.data.error); } }
private function loaderComp_mapload(param1:Event) : * { var entry:*; var xml:*; var areaNL:*; var mapNoNL:*; var qv:*; var qp:*; var md0:*; var map_select:*; var emerge_select:*; var seedAC:* = Math.floor(Math.random() * 2147483647); trace("------ " + this.loader.data.mode + " ------"); for(entry in this.loader.data) { trace("pr: " + entry + ", val: " + this.loader.data[entry]); } trace("------ " + this.loader.data.mode + " ------"); trace(this.Main.myPlayScreen.myPC.zombie_rate); xml = new XML(param1.target.data); trace(this.loader.data.mapname); areaNL = this.loader.data.mapname.split("_")[0]; mapNoNL = this.loader.data.mapname.split("_")[1]; temp0 = this.Main.mso.data.quest.split("/"); qv = []; qp = []; i = 0; while(i < 40) { qv.push(temp0[i].split(",")[0]); qp.push(temp0[i].split(",")[1]); i++; } if(areaNL == 0 || areaNL == -1) { this.loader.data.mapdata1 = xml.mapdata1; this.loader.data.mapdata2 = xml.mapdata2; this.loader.data.mapdata3 = xml.mapdata3; this.loader.data.soukomap = xml.soukomap; this.loader.data.emerge = xml.emerge; } else if(1 <= areaNL && areaNL <= 15) { md0 = xml.mapdata.(@map_no == mapNoNL); if(1000 <= int(mapNoNL)) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL); if(areaNL == 1 && mapNoNL == 1000) { temp0 = 1; i = 0; while(i < 10) { if(!(qp[35] & temp0)) { this.loader.data.emerge = xml.emerges_yaneura.child("emerge")[i]; break; } temp0 *= 4; i++; } } else if(areaNL == 2 && mapNoNL == 1000 && qp[16] >= 2) { this.loader.data.emerge = xml.emerge; } else if(areaNL == 3 && mapNoNL == 1000 && qp[24] & 2) { this.loader.data.emerge = ""; } else if(areaNL == 4 && mapNoNL == 1000) { this.loader.data.emerge = ""; if(!(qp[24] & 4)) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "M"); } else if(!(qp[24] & 512)) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "N"); } } else if(areaNL == 5 && mapNoNL == 1000 && qp[24] & 8) { this.loader.data.emerge = ""; } else if(areaNL == 5 && mapNoNL == 1002 && qp[25] & 4) { this.loader.data.emerge = ""; } else if(areaNL == 5 && mapNoNL == 1003 && qp[25] & 16) { this.loader.data.emerge = ""; } else if(areaNL == 6 && mapNoNL == 1000 && qp[24] & 16) { this.loader.data.emerge = ""; } else if(areaNL == 7 && mapNoNL == 1000 && qp[24] & 32) { this.loader.data.emerge = ""; } else if(areaNL == 8 && mapNoNL == 1000) { if(qp[24] & 128) { this.loader.data.emerge = ""; } else if(qp[24] & 64) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "A"); } else { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "GA"); } } else if(areaNL == 9 && mapNoNL == 1000 && qp[29] & 1) { this.loader.data.emerge = ""; } else if(areaNL == 10 && mapNoNL == 1000 && qp[29] & 2) { this.loader.data.emerge = ""; } else if(areaNL == 11 && mapNoNL == 1000 && qp[29] & 4) { this.loader.data.emerge = ""; } else if(areaNL == 12 && mapNoNL == 1000 && qp[29] & 8) { this.loader.data.emerge = ""; } else if(areaNL == 13 && mapNoNL == 1000 && qp[29] & 16) { this.loader.data.emerge = ""; } else if(areaNL == 14 && mapNoNL == 1000) { if(!(qp[29] & 32) && !(qp[24] & 256)) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "KS"); } else if(qp[29] & 32 && !(qp[24] & 256)) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "S"); } if(!(qp[29] & 32) && qp[24] & 256) { this.loader.data.emerge = xml.emergeX.(@emerge_no == mapNoNL && @ene == "S"); } else { this.loader.data.emerge = ""; } } else if(areaNL == 14 && mapNoNL == 1001 && qp[24] & 512) { this.loader.data.emerge = ""; } } else { map_select = Math.floor(Math.random() * xml.child("mapdata").length()); md0 = xml.mapdata.(@map_no == mapNoNL); if(1 <= areaNL && areaNL <= 8) { emerge_select = Math.floor(Math.random() * xml.child("emerge").length()); temp1 = xml.child("emerge")[emerge_select]; if(2 <= areaNL && qp[23] == 1) { temp1 = temp1 + "/" + xml.emerge_rareEnemy; } if(areaNL == 7) { if(qp[25] & 16384 && !(qp[25] & 32768)) { temp1 = temp1 + "/" + xml.emerge_Glutton.(@ene == "224"); } else if(qp[25] & 16384 && !(qp[25] & 65536)) { temp1 = temp1 + "/" + xml.emerge_Glutton.(@ene == "225"); } } } else { temp2 = this.Main.mso.data.party.split("<>")[0].split(",")[1].substr(-1,1); if(temp2 < 5) { emerge_select = Math.floor(Math.random() * xml.emergesA.child("emerge").length()); temp1 = xml.emergesA.child("emerge")[emerge_select]; } else { emerge_select = Math.floor(Math.random() * xml.emergesB.child("emerge").length()); temp1 = xml.emergesB.child("emerge")[emerge_select]; } } this.loader.data.emerge = this.emergeConv(temp1); if(xml.no_variation == 1) { this.Main.myPlayScreen.map_name = "1_1001"; } } if(md0.toString() == "") { md0 = xml.mapdata.(@map_no == "1"); } this.loader.data.mapdata = md0; } else if(500 <= areaNL) { this.loader.data.mapdata = xml.mapdata.(@map_no == this.loader.data.mapname); this.loader.data.emerge = ""; } else { trace(); } this.loader.data.rescue = 0; this.loader.data.encount = ""; this.Main.accessEnd("mapload",this.loader.data); }
private function avatarSetNL(seed:*, index:*) : String { var ra:* = new MTrandom(seed); var i:* = 0; while(i < index) { ra.nextInt(1); i++; } var temp:int = 0; var avatarInt:* = new Vector.<int>(4,true); avatarInt[0] = ra.nextInt(52); avatarInt[1] = ra.nextInt(52); avatarInt[2] = ra.nextInt(61) + 1; avatarInt[3] = ra.nextInt(52) + 1; temp = int(ra.nextInt(100)); if(temp < 60) { avatarInt[2] = 0; } temp = int(ra.nextInt(500)); if(temp == 0) { avatarInt[3] = 0; } var words62:* = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; var avatarString:* = ""; i = 0; while(i < 4) { avatarString += words62.substr(avatarInt[i],1); i++; } return avatarString; }
private function mergeItems(party:String, items1:String, souko:String, items2:String) : String { var partyList:* = party.split("/"); if(items1 == "") { var itemList1:* = []; } else { itemList1 = items1.split("/"); } if(souko == "") { var soukoList:* = []; } else { soukoList = souko.split("/"); } var itemList2:* = items2.split("/"); var i:* = 0; while(i < itemList2.length) { var item:* = itemList2[i].split(","); if(item[4] == 0) { flag = true; var j:* = 0; while(j < partyList.length) { if(item[3] == partyList[j].split(",")[0]) { flag = false; } j++; } if(flag) { itemList1.push(item.join(",")); } } else if(item[4] == 2 && souko == "") { itemList1.push(item.join(",")); } i++; } i = 0; while(i < soukoList.length) { itemList1.push(soukoList[i]); i++; } return itemList1.join("/"); }
private function getEquip(seed:int, index:int, cID:String, job:int, nc:*) : String { var ra:* = new MTrandom(seed); var i:* = 0; while(i < index + 4) { ra.nextInt(1); i++; } var randD:* = this.Main.titleRand; if(nc) { this.Main.titleRand = ra; } var equipList:* = this.Main.myTitleScreen.startEquip(job,0); var equipSet:* = []; i = 0; while(i < equipList.length) { if(equipList[i] != null && equipList[i] != "") { var equip:* = equipList[i].split(","); equipSet.push([equip[0],equip[1],"",cID,0,i].join(",")); } i++; } this.Main.titleRand = randD; return equipSet.join("/"); }
private function setZukanData(ez:String, iz:String, ch:*) : * { if(ez == null || ez == "") { var ezList:* = []; } else { ezList = ez.split(","); } if(iz == null || iz == "") { var izList:* = []; } else { izList = iz.split(","); } if(this.Main.mso.data.ezukan == undefined || this.Main.mso.data.ezukan == "") { var ezList_old:* = []; } else { ezList_old = this.Main.mso.data.ezukan.split("/"); } if(this.Main.mso.data.izukan == undefined || this.Main.mso.data.izukan == "") { var izList_old:* = []; } else { izList_old = this.Main.mso.data.izukan.split("/"); } var i:* = 0; while(i < ezList.length) { var flag:* = true; var j:* = 0; while(j < ezList_old.length) { var id:* = ezList_old[j].split(",")[0]; if(ezList[i] < id) { break; } if(ezList[i] == id) { if(ch) { flag = true; } else { flag = false; } break; } j++; } if(flag) { if(ch) { ezList_old[j] = ezList[i] + ",1"; } else { ezList_old.insertAt(j,ezList[i] + ",0"); } } i++; } i = 0; while(i < izList.length) { flag = true; j = 0; while(j < izList_old.length) { id = izList_old[j].split(",")[0]; if(izList[i] < id) { break; } if(izList[i] == id) { flag = false; break; } j++; } if(flag) { izList_old.insertAt(j,izList[i]); } i++; } this.Main.mso.data.ezukan = ezList_old.join("/"); this.Main.mso.data.izukan = izList_old.join("/"); }
private function emergeConv(emerge:String) : String { var emes:* = emerge.split("/"); var eCo:* = []; var e99:* = []; var rt:* = 0; var i:* = 0; while(i < emes.length) { var em:* = emes[i].split(","); if(em[5] == 99999) { e99.push(emes[i]); } else { em[5] = Number(em[5]) + rt; eCo.push(em); rt = Number(em[5]); } i++; } i = 0; while(i < eCo.length) { var er:* = eCo[i][5]; if(95000 < rt) { eCo[i][5] = Math.floor(eCo[i][5] / rt * 95000); } e99.push(eCo[i].join(",")); i++; } return e99.join("/"); }
Sound
変更 | 対応するbgmがswfファイルに含まれてないので
ゲーム中、bgmはならなくなります(効果音はあります)
もしくはaudio stockで対応するbgmを手に入れてフォルダに入れる
(注意、下の変更する場所は2箇所あります 619,624)
変更前
this.bgm[bgm_no] = new Sound(url);
変更後
this.bgm[bgm_no] = new BGM0();