public static GUILayoutOption ExpandHeight(bool expand) { var ilValue = new Il2CppSystem.Int32 { m_value = (!expand) ? 0 : 1 }; var option = new GUILayoutOption(GUILayoutOption.Type.stretchHeight, ilValue.BoxIl2CppObject()); return(option); }
public static Object[] getRPCObjectEmf(int i, Vector3 pos, int type = 0) { Debug.Msg("getRPCObjectEmf", 3); Object[] obj = new Object[i]; if (i > 0) { Vector3 vector = default(Vector3); Int32 integer = default(Int32); vector = pos; integer.m_value = type; obj[0] = vector.BoxIl2CppObject(); obj[1] = integer.BoxIl2CppObject(); } return(obj); }
public static Object[] getRPCObject(int i, bool isTrue = true, int rangeMin = 0, int rangeMax = 0, bool rangeFirst = false, bool isPosition = false, Vector3 pos = new Vector3()) { Debug.Msg("getRPCObject", 3); Object[] obj = new Object[i]; if (i > 0) { Boolean boolean = default(Boolean); if (!rangeFirst) { if (isTrue) { boolean.m_value = true; } else { boolean.m_value = false; } obj[0] = boolean.BoxIl2CppObject(); if (i == 2) { Int32 integer = default(Int32); integer.m_value = Random.Range(rangeMin, rangeMax); obj[1] = integer.BoxIl2CppObject(); } } else { Int32 integer = default(Int32); integer.m_value = Random.Range(rangeMin, rangeMax); obj[0] = integer.BoxIl2CppObject(); } } if (isPosition) { Vector3 vector = default(Vector3); vector = pos; obj[0] = vector.BoxIl2CppObject(); } return(obj); }
private static Object[] getRPCObject(int i, bool isTrue = true, int rangeMin = 0, int rangeMax = 0, bool rangeFirst = false) { Debug.Out("getRPCObject"); Object[] obj = new Object[i]; if (i > 0) { Boolean boolean = default(Boolean); if (!rangeFirst) { if (isTrue) { boolean.m_value = true; } else { boolean.m_value = false; } obj[0] = boolean.BoxIl2CppObject(); if (i == 2) { Int32 integer = default(Int32); integer.m_value = Random.Range(rangeMin, rangeMax); obj[1] = integer.BoxIl2CppObject(); } } else { Int32 integer = default(Int32); integer.m_value = Random.Range(rangeMin, rangeMax); obj[0] = integer.BoxIl2CppObject(); } } return(obj); }
private void ShitIStoleFromYude2000() { string[] allitems = new string[] { "BasementKey", "CarKey", "GarageKey", "MainKey", "Blacklight Flashlight", "Glowstick", "Flashlight", "StrongFlashlight", "EMF Reader", "EVP Recorder", "Thermometer", "IR Light Sensor", "Motion Sensor", "SoundSensor", "Ghost Writing Book", "Parabolic Microphone", "DSLRCamera", "Tripod", "Head Mounted Camera", "Candle", "Crucifix", "Lighter", "SaltShaker", "Bone", "Ouija board", "PainKillers", "WhiteSage", "Hellephant", "Hanging Body", "monsterprefab", "WiccanAltar", "ZomBear", "ZomBunny", "ButcherKnife", "HumanSkull", "VHS Tape", "TarotCardBox", "VoodooDoll", "Bug", "GhostOrb", "EMF Spot", "Footstep", "PhotoPaper", "Noise Spot", "SaltSpot", "SanitySoundSpot", "TornCloth", "Camera", "Walkie Talkie", "BoxFlashPrefab", }; if (!PhotonNetwork.InRoom) { GUI.Label(new Rect(720f, 0f, 200f, 20f), "Custom Room Creator:"); this.serverName = GUI.TextArea(new Rect(720f, 25f, 200f, 20f), this.serverName); this.serverSlots = GUI.HorizontalSlider(new Rect(720f, 50f, 200f, 20f), (float)((int)this.serverSlots), 4f, 90f); GUI.Label(new Rect(720f, 65f, 200f, 20f), "Slots: " + ((int)this.serverSlots).ToString()); if (GUI.Toggle(new Rect(720f, 80f, 200f, 20f), this.isPrivateServer, "Private Room") != this.isPrivateServer) { this.isPrivateServer = !isPrivateServer; } if (GUI.Button(new Rect(720f, 105f, 200f, 20f), "Create Custom Room")) { if (this.isPrivateServer) { PlayerPrefs.SetInt("isPublicServer", 0); RoomOptions roomOptions = new RoomOptions { IsOpen = true, IsVisible = false, MaxPlayers = Convert.ToByte((int)this.serverSlots), PlayerTtl = 2000 }; PhotonNetwork.CreateRoom(UnityEngine.Random.Range(0, 999999).ToString("000000"), roomOptions, TypedLobby.Default); } if (!this.isPrivateServer) { PlayerPrefs.SetInt("isPublicServer", 1); RoomOptions roomOptions2 = new RoomOptions { IsOpen = true, IsVisible = true, MaxPlayers = Convert.ToByte((int)this.serverSlots), PlayerTtl = 2000 }; PhotonNetwork.CreateRoom(this.serverName + "#" + UnityEngine.Random.Range(0, 999999).ToString("000000"), roomOptions2, TypedLobby.Default); } } } if (Main.levelController != null) { if (GUI.Button(new Rect(520f, 120f, 200f, 20f), "Random Event") && Main.ghostAI != null) { Main.ghostAI.field_Public_GhostActivity_0.InteractWithARandomDoor(); Main.ghostAI.field_Public_GhostActivity_0.InteractWithARandomProp(); Main.ghostAI.field_Public_GhostActivity_0.Interact(); Main.ghostAI.RandomEvent(); } //if (GUI.Button(new Rect(520f, 120f, 200f, 20f), "Sound")) //{ // Main.ghostAudio.PlaySound(1, false, false); // Main.ghostAudio.PlaySound(0, false, false); // Main.ghostInteraction.GetComponent<PhotonView>().RPC("SpawnFootstepNetworked", 0, new Il2CppSystem.Object[] // { // ghostAI.transform.position, // ghostAI.transform.rotation, // new Il2CppSystem.Int32(){ m_value = UnityEngine.Random.Range(0, 3) }.BoxIl2CppObject() // }); //} if (GUI.Button(new Rect(520f, 145f, 200f, 20f), "Wander")) { Main.ghostAI.field_Public_Boolean_6 = true; Main.ghostAI.field_Public_Animator_0.SetBool("isIdle", false); Vector3 destination = Vector3.zero; NavMeshHit navMeshHit; if (NavMesh.SamplePosition(UnityEngine.Random.insideUnitSphere * 3f + Main.ghostAI.transform.position, out navMeshHit, 3f, 1)) { destination = navMeshHit.position; } Main.ghostAI.field_Public_NavMeshAgent_0.destination = destination; Main.ghostAI.ChangeState((GhostAI.EnumNPublicSealedvaidwahufalidothfuapUnique) 1, null, null); Main.ghostAI.field_Public_PhotonView_0.RPC("Hunting", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); Main.ghostAI.field_Public_PhotonView_0.RPC("SyncChasingPlayer", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); } if (GUI.Button(new Rect(520f, 170f, 200f, 20f), "Hunt")) { SetupPhaseController.field_Public_Static_SetupPhaseController_0.field_Public_Boolean_0 = false; Main.ghostAI.field_Public_Boolean_4 = true; Main.ghostAI.field_Public_Boolean_2 = true; Main.ghostAI.field_Public_Animator_0.SetBool("isIdle", false); Main.ghostAI.field_Public_Animator_0.SetInteger("WalkType", 1); Main.ghostAI.field_Public_NavMeshAgent_0.speed = Main.ghostAI.field_Public_Single_0; Main.ghostAI.field_Public_GhostInteraction_0.CreateAppearedEMF(Main.ghostAI.transform.position); Vector3 destination2 = Vector3.zero; float num = UnityEngine.Random.Range(2f, 15f); NavMeshHit navMeshHit2; if (NavMesh.SamplePosition(UnityEngine.Random.insideUnitSphere * num + Main.ghostAI.transform.position, out navMeshHit2, num, 1)) { destination2 = navMeshHit2.position; } else { destination2 = Vector3.zero; } Main.ghostAI.field_Public_NavMeshAgent_0.SetDestination(destination2); SetupPhaseController.field_Public_Static_SetupPhaseController_0.ForceEnterHuntingPhase(); Main.ghostAI.ChangeState((GhostAI.EnumNPublicSealedvaidwahufalidothfuapUnique) 2, null, null); Main.ghostAI.field_Public_PhotonView_0.RPC("Hunting", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean() { m_value = true }.BoxIl2CppObject() }); Main.ghostAI.field_Public_PhotonView_0.RPC("SyncChasingPlayer", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean() { m_value = true }.BoxIl2CppObject() }); } if (GUI.Button(new Rect(520f, 195f, 200f, 20f), "Idle")) { Main.ghostAI.field_Public_Animator_0.SetInteger("IdleNumber", UnityEngine.Random.Range(0, 2)); Main.ghostAI.field_Public_Animator_0.SetBool("isIdle", true); Main.ghostAI.UnAppear(false); Main.ghostAI.field_Public_GhostAudio_0.TurnOnOrOffAppearSource(false); Main.ghostAI.field_Public_GhostAudio_0.PlayOrStopAppearSource(false); Main.ghostAI.ChangeState(0, null, null); Main.ghostAI.field_Public_PhotonView_0.RPC("Hunting", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); Main.ghostAI.field_Public_PhotonView_0.RPC("SyncChasingPlayer", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); } Il2CppSystem.Int32 appearRand = new Il2CppSystem.Int32(); appearRand.m_value = UnityEngine.Random.Range(0, 3); if (GUI.Button(new Rect(520f, 220f, 200f, 20f), "Appear")) { Main.ghostAI.field_Public_PhotonView_0.RPC("MakeGhostAppear", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean() { m_value = true }.BoxIl2CppObject(), new Il2CppSystem.Int32() { m_value = UnityEngine.Random.Range(0, 3) }.BoxIl2CppObject() }); } if (GUI.Button(new Rect(520f, 245f, 200f, 20f), "Unappear")) { Main.ghostAI.field_Public_PhotonView_0.RPC("MakeGhostAppear", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject(), new Il2CppSystem.Int32() { m_value = UnityEngine.Random.Range(0, 3) }.BoxIl2CppObject() }); } if (GUI.Toggle(new Rect(1120f, 325f, 200f, 20f), this.showItemList, "Show Item Spawner") != this.showItemList) { this.showItemList = !this.showItemList; } if (this.showItemList) { GUI.Label(new Rect(520f, 225f, 200f, 20f), "Item Spawner:"); this.scrollViewVector = GUI.BeginScrollView(new Rect(this.dropDownRect2.x - 100f, this.dropDownRect2.y + 25f, this.dropDownRect2.width, this.dropDownRect2.height), this.scrollViewVector, new Rect(0f, 0f, this.dropDownRect2.width, Mathf.Max(this.dropDownRect2.height, (float)(allitems.Length * 25)))); GUI.Box(new Rect(0f, 0f, this.dropDownRect2.width, Mathf.Max(this.dropDownRect2.height, (float)(allitems.Length * 25))), ""); for (int l = 0; l < allitems.Length; l++) { if (GUI.Button(new Rect(0f, (float)(l * 25), this.dropDownRect2.height, 25f), "")) { this.selecteditem = l; if (PhotonNetwork.InRoom) { MyPlayer = GetLocalPlayer(); MelonLogger.Log(allitems[this.selecteditem].ToString()); PhotonNetwork.Instantiate(allitems[this.selecteditem], MyPlayer.transform.position, Quaternion.identity, 0, null); } } GUI.Label(new Rect(5f, (float)(l * 25), this.dropDownRect2.height, 25f), allitems[l]); } GUI.EndScrollView(); } GUI.Label(new Rect(920f, 295f, 200f, 20f), "ESP:"); if (GUI.Toggle(new Rect(920f, 320f, 200f, 20f), this.GhostESP, "Ghost") != this.GhostESP) { this.GhostESP = !this.GhostESP; } if (GUI.Toggle(new Rect(920f, 370f, 200f, 20f), this.PlayerESP, "Player") != this.PlayerESP) { this.PlayerESP = !this.PlayerESP; } if (GUI.Toggle(new Rect(920f, 395f, 200f, 20f), this.OuijaESP, "Ouija Board") != this.OuijaESP) { this.OuijaESP = !this.OuijaESP; } if (GUI.Toggle(new Rect(920f, 420f, 200f, 20f), this.KeyESP, "Key") != this.KeyESP) { this.KeyESP = !this.KeyESP; } if (GUI.Toggle(new Rect(920f, 445f, 200f, 20f), this.EvidenceESP, "Evidence") != this.EvidenceESP) { this.EvidenceESP = !this.EvidenceESP; } if (GUI.Toggle(new Rect(1120f, 300f, 200f, 20f), this.ShowInfoGhost, "Show Ghost Info") != this.ShowInfoGhost) { this.ShowInfoGhost = !this.ShowInfoGhost; } if (GUI.Toggle(new Rect(1120f, 250f, 200f, 20f), this.ShowInfoPlayer, "Show Player Info") != this.ShowInfoPlayer) { this.ShowInfoPlayer = !this.ShowInfoPlayer; } } if (Main.levelController == null) { GUI.SetNextControlName("changename"); this.Name = GUI.TextArea(new Rect(320f, 25f, 200f, 20f), this.Name); if (GUI.Button(new Rect(320f, 45f, 200f, 20f), "Change Name")) { GUI.FocusControl("changename"); PhotonNetwork.NickName = this.Name; } if (GUI.Button(new Rect(320f, 145f, 200f, 20f), "Force Start")) { Main.serverManager.StartGame(); } if (GUI.Button(new Rect(520f, 50f, 200f, 20f), "Add 100$")) { FileBasedPrefs.SetInt("PlayersMoney", FileBasedPrefs.GetInt("PlayersMoney", 0) + 100); } if (GUI.Button(new Rect(520f, 75f, 200f, 20f), "Add 1 Level")) { FileBasedPrefs.SetInt("myTotalExp", FileBasedPrefs.GetInt("myTotalExp", 0) + 100); } //GUI.Label(new Rect(920f, 0f, 200f, 20f), "Join Room:"); //this.roomName = GUI.TextArea(new Rect(920f, 25f, 200f, 20f), this.roomName); //this.steamID = GUI.TextArea(new Rect(920f, 50f, 200f, 20f), this.steamID); //if (GUI.Button(new Rect(920f, 75f, 200f, 20f), "Join Room by Name")) //{ // PhotonNetwork.JoinRoom(this.roomName); //} //if (GUI.Button(new Rect(920f, 100f, 200f, 20f), "Join Room by ID")) //{ // object[] FriendIDList; // bool test = PhotonNetwork.FindFriends(new string[] // { // this.steamID // }); // MelonLogger.Log("steamID = " + steamID); // //foreach (FriendInfo friendInfo in PhotonNetwork.Friends) // //{ // //PhotonNetwork.JoinRoom(friendInfo.Room); // //} //} } }
private static void ghostActions() { GUI.Label(new Rect(520f, 95f, 200f, 20f), "Ghost:"); if (GUI.Button(new Rect(520f, 120f, 200f, 20f), "Random Event") && Main.ghostAI != null) { Main.ghostAI.field_Public_GhostActivity_0.InteractWithARandomDoor(); Main.ghostAI.field_Public_GhostActivity_0.InteractWithARandomProp(); Main.ghostAI.field_Public_GhostActivity_0.Interact(); Main.ghostAI.RandomEvent(); } //if (GUI.Button(new Rect(520f, 120f, 200f, 20f), "Sound")) //{ // Main.ghostAudio.PlaySound(1, false, false); // Main.ghostAudio.PlaySound(0, false, false); // Main.ghostInteraction.GetComponent<PhotonView>().RPC("SpawnFootstepNetworked", 0, new Il2CppSystem.Object[] // { // ghostAI.transform.position, // ghostAI.transform.rotation, // new Il2CppSystem.Int32(){ m_value = UnityEngine.Random.Range(0, 3) }.BoxIl2CppObject() // }); //} if (GUI.Button(new Rect(520f, 145f, 200f, 20f), "Wander")) { Main.ghostAI.field_Public_Boolean_6 = true; Main.ghostAI.field_Public_Animator_0.SetBool("isIdle", false); Vector3 destination = Vector3.zero; NavMeshHit navMeshHit; if (NavMesh.SamplePosition(UnityEngine.Random.insideUnitSphere * 3f + Main.ghostAI.transform.position, out navMeshHit, 3f, 1)) { destination = navMeshHit.position; } Main.ghostAI.field_Public_NavMeshAgent_0.destination = destination; Main.ghostAI.ChangeState((GhostAI.EnumNPublicSealedvaidwahufalidothfuapUnique) 1, null, null); Main.ghostAI.field_Public_PhotonView_0.RPC("Hunting", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); Main.ghostAI.field_Public_PhotonView_0.RPC("SyncChasingPlayer", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); } if (GUI.Button(new Rect(520f, 170f, 200f, 20f), "Hunt")) { SetupPhaseController.field_Public_Static_SetupPhaseController_0.field_Public_Boolean_0 = false; Main.ghostAI.field_Public_Boolean_4 = true; Main.ghostAI.field_Public_Boolean_2 = true; Main.ghostAI.field_Public_Animator_0.SetBool("isIdle", false); Main.ghostAI.field_Public_Animator_0.SetInteger("WalkType", 1); Main.ghostAI.field_Public_NavMeshAgent_0.speed = Main.ghostAI.field_Public_Single_0; Main.ghostAI.field_Public_GhostInteraction_0.CreateAppearedEMF(Main.ghostAI.transform.position); Vector3 destination2 = Vector3.zero; float num = UnityEngine.Random.Range(2f, 15f); NavMeshHit navMeshHit2; if (NavMesh.SamplePosition(UnityEngine.Random.insideUnitSphere * num + Main.ghostAI.transform.position, out navMeshHit2, num, 1)) { destination2 = navMeshHit2.position; } else { destination2 = Vector3.zero; } Main.ghostAI.field_Public_NavMeshAgent_0.SetDestination(destination2); SetupPhaseController.field_Public_Static_SetupPhaseController_0.ForceEnterHuntingPhase(); Main.ghostAI.ChangeState((GhostAI.EnumNPublicSealedvaidwahufalidothfuapUnique) 2, null, null); Main.ghostAI.field_Public_PhotonView_0.RPC("Hunting", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean() { m_value = true }.BoxIl2CppObject() }); Main.ghostAI.field_Public_PhotonView_0.RPC("SyncChasingPlayer", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean() { m_value = true }.BoxIl2CppObject() }); } if (GUI.Button(new Rect(520f, 195f, 200f, 20f), "Idle")) { Main.ghostAI.field_Public_Animator_0.SetInteger("IdleNumber", UnityEngine.Random.Range(0, 2)); Main.ghostAI.field_Public_Animator_0.SetBool("isIdle", true); Main.ghostAI.UnAppear(false); Main.ghostAI.field_Public_GhostAudio_0.TurnOnOrOffAppearSource(false); Main.ghostAI.field_Public_GhostAudio_0.PlayOrStopAppearSource(false); Main.ghostAI.ChangeState(0, null, null); Main.ghostAI.field_Public_PhotonView_0.RPC("Hunting", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); Main.ghostAI.field_Public_PhotonView_0.RPC("SyncChasingPlayer", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject() }); } Il2CppSystem.Int32 appearRand = new Il2CppSystem.Int32 { m_value = UnityEngine.Random.Range(0, 3) }; if (GUI.Button(new Rect(520f, 220f, 200f, 20f), "Appear")) { Main.ghostAI.field_Public_PhotonView_0.RPC("MakeGhostAppear", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean() { m_value = true }.BoxIl2CppObject(), new Il2CppSystem.Int32() { m_value = UnityEngine.Random.Range(0, 3) }.BoxIl2CppObject() }); } if (GUI.Button(new Rect(520f, 245f, 200f, 20f), "Unappear")) { Main.ghostAI.field_Public_PhotonView_0.RPC("MakeGhostAppear", 0, new Il2CppSystem.Object[] { new Il2CppSystem.Boolean().BoxIl2CppObject(), new Il2CppSystem.Int32() { m_value = UnityEngine.Random.Range(0, 3) }.BoxIl2CppObject() }); } }