public void gameFlagResets() { ItemTracker itemTracker = FindObjectOfType <ItemTracker>(); if (itemTracker != null) { itemTracker.Add(102, 0); } fsys.allReset(); playerst.clearItemsNum(); menusys.menuSysReStart(); setSystemDataToClothFlag(); MAINWEAPON mainWeapon = MAINWEAPON.NON; SUBWEAPON subWeapon = SUBWEAPON.NON; L2Rando l2Rando = FindObjectOfType <L2Rando>(); if (l2Rando != null && l2Rando.IsRandomising) { Init_Coin_num = l2Rando.StartingMoney; Init_Weight_num = l2Rando.StartingWeights; if (l2Rando.RemoveITStatue) { setFlagData(8, 10, 1); } setFlagData(5, 47, (short)(12 - l2Rando.RequiredSkulls)); ItemInfo itemInfo = ItemDB.GetItemInfo(l2Rando.StartingWeapon); if (itemInfo != null) { if (l2Rando.StartingWeapon == ItemID.Whip1 || l2Rando.StartingWeapon == ItemID.Whip2 || l2Rando.StartingWeapon == ItemID.Whip3) { setFlagData(itemInfo.ItemSheet, itemInfo.ItemFlag, 1); mainWeapon = exchengeMainWeaponNameToEnum("Whip"); } else { mainWeapon = exchengeMainWeaponNameToEnum(itemInfo.BoxName); } subWeapon = exchengeSubWeaponNameToEnum(itemInfo.BoxName); } } playerst.addCoin(Init_Coin_num); playerst.addWait(Init_Weight_num); playerst.resetPlayerStatus(Init_PLayer_lv, 0, 999, Init_Coin_num, Init_Weight_num, 0, mainWeapon, 0, subWeapon, 0, USEITEM.NON, 0); playerst.resetExp(); setFlagData(0, 42, 1); setFlagData(4, 60, 4); setFlagData(4, 62, 2); }
public override bool Farst() { int sta = this.sta; switch (sta) { case 0: break; case 1: if (!sys.getL2Keys(L2KEYS.up, KEYSTATE.REPEAT)) { if (!sys.getL2Keys(L2KEYS.down, KEYSTATE.REPEAT)) { if (!sys.getL2Keys(L2KEYS.left, KEYSTATE.DOWN)) { if (sys.getL2Keys(L2KEYS.right, KEYSTATE.DOWN)) { } } } } if (sys.getL2Keys(L2KEYS.ok, KEYSTATE.DOWN)) { sys.setKeyBlock(true); con.anime.Play("snap scan"); L2Core.seManager.playSE(null, 155); this.sta = 2; } if (sys.getL2Keys(L2KEYS.cancel, KEYSTATE.DOWN)) { } break; case 2: if (con.anime.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1f) { sys.setKeyBlock(false); con.anime.Play("snap scanEnd"); SnapShotTargetSc = L2Core.ScrollSystem.getSnapShotTarget(); L2Core.seManager.playSE(null, 37); if (SnapShotTargetSc == null) { this.sta = 3; } else if (SnapShotTargetSc.mode == SnapShotTargetScript.SnapShotMode.MESSAGE) { con.Contents.SetActive(true); con.ContentsText.text = sys.getMojiText(false, SnapShotTargetSc.sheetName, SnapShotTargetSc.cellName, mojiScriptType.sekihi); this.sta = 4; } else if (SnapShotTargetSc.mode == SnapShotTargetScript.SnapShotMode.SOFTWARE) { sys.setKeyBlock(true); L2Rando rando = GameObject.FindObjectOfType <L2Rando>(); if (rando != null && rando.IsRandomising) { LocationID locationID = rando.GetLocationIDForMural(SnapShotTargetSc); ItemID itemID = rando.GetItemIDForLocation(locationID); ItemInfo itemInfo = ItemDB.GetItemInfo(itemID); GetItemID = itemInfo.BoxName; int flagValue = 0; if (itemID == ItemID.MobileSuperx3P) { flagValue = 1; } if (sys.isHaveItem(itemInfo.ShopName) > flagValue) { HaveItems = true; } else { HaveItems = false; sys.setItem(GetItemID, 1, false, false, true); sys.setEffectFlag(rando.CreateGetFlags(itemID, itemInfo)); } } else { item = L2SystemCore.getItemData(SnapShotTargetSc.itemName); GetItemID = item.getItemId(); if (sys.isHaveItem(GetItemID) > 0) { HaveItems = true; } else { HaveItems = false; sys.setItem(GetItemID, 1, true, false, true); } } DrawBinalyCount = 0; this.sta = 5; } else { Debug.Log("SnapShotTargetScriptはあったけど、何かおかしい" + SnapShotTargetSc.mode); this.sta = 3; } } break; case 3: con.NoContents.SetActive(true); this.sta = 10; break; case 4: CreateBunsyouData_Message(); if (sys.getSoftLive(sys.isNowSoftSet())[3]) { SetHelpBar(1); } this.sta = 9; break; case 5: con.Contents.SetActive(true); for (int i = 0; i < 10; i++) { BinalyData[i] = string.Empty; for (int j = 0; j < 100; j++) { int num = rand() / 10 % 2; BinalyData[i] = BinalyData[i] + num.ToString(); } } con.ContentsText.text = BinalyData[0]; BinalyStart = 0; this.sta = 6; break; case 6: { string text = string.Empty; if (DrawBinalyCount > 7) { int num2 = BinalyStart; for (int k = 0; k < 8; k++) { text += BinalyData[num2]; num2++; if (num2 > 9) { num2 = 0; } } BinalyStart++; if (BinalyStart > 9) { BinalyStart = 0; } } else { text = string.Empty; for (int l = 0; l < DrawBinalyCount; l++) { text += BinalyData[l]; } } con.ContentsText.text = text; DrawBinalyCount++; if (DrawBinalyCount == 120) { if (HaveItems) { con.Contents.gameObject.SetActive(false); con.SameContents.gameObject.SetActive(true); sys.setKeyBlock(false); this.sta = 10; } else { sys.getMenuObjectNF(1).setMess(GetItemID); sys.getMenuObjectNF(1).setMess("snap"); sys.getMenuObjectNF(1).StartSwitch(); sys.getL2SystemCore().seManager.playSE(null, 39); Dialog_on = 1; sys.setKeyBlock(false); this.sta = 10; } } break; } default: switch (sta) { case 80: scroll_count--; if (scroll_count != 0) { scroll_pos += 80f; SnapBase.transform.localPosition = new Vector3(scroll_pos, 0f, 600f); } else { SnapBase.transform.localPosition = new Vector3(0f, 0f, 600f); this.sta = 1; } break; case 81: scroll_count--; if (scroll_count != 0) { scroll_pos -= 80f; SnapBase.transform.localPosition = new Vector3(scroll_pos, 0f, 600f); } else { SnapBase.transform.localPosition = new Vector3(0f, 0f, 600f); this.sta = 1; } break; case 82: scroll_count--; if (scroll_count != 0) { scroll_pos -= 80f; SnapBase.transform.localPosition = new Vector3(scroll_pos, 0f, 600f); } else { con.Contents.SetActive(false); con.NoContents.SetActive(false); con.SameContents.gameObject.SetActive(false); m_obj.SetActive(false); this.sta = 0; sys.callSlideEnd(); } break; case 83: scroll_count--; if (scroll_count != 0) { scroll_pos += 80f; SnapBase.transform.localPosition = new Vector3(scroll_pos, 0f, 600f); } else { con.Contents.SetActive(false); con.NoContents.SetActive(false); con.SameContents.gameObject.SetActive(false); m_obj.SetActive(false); this.sta = 0; sys.callSlideEnd(); } break; default: if (sta != 100) { MonoBehaviour.print("エラーだってよ"); } else { if (Bunsyouemon) { sys.getMenuObjectNF(4).EndSwitch(); } sys.setInfoBar(false, false, 0f); m_obj.SetActive(false); this.sta = 0; } break; } break; case 9: if (sys.getSoftLive(sys.isNowSoftSet())[3] && sys.getL2Keys(L2KEYS.use, KEYSTATE.DOWN)) { SetHelpBar(0); sys.setBunsyouData(ref bun); sys.getMenuObjectNF(4).setMess("w"); sys.getMenuObjectNF(4).StartSwitch(); Bunsyouemon = true; this.sta = 10; } break; case 10: sys.itemCompleteCheck(); sys.softCompleteCheck(); this.sta = 11; break; case 11: break; } return(true); }