private void Run() { Ingame.Tele(spawnObject, 50, true); while (Running) { Objects.GameObject spawner = new Objects.GameObject(0, 0, 0); while (spawner.baseAdd == 0 && Running) { spawner = ObjectManager.GetGameObjectById(spawnObjectId); } Calls.OnRightClickObject(spawner.baseAdd, 0); while (!(Calls.GetText(gossipOpenLua, "troll1", 10).Trim() == "true") && Running) { Thread.Sleep(100); } Thread.Sleep(250); while ((Calls.GetText(gossipOpenLua, "troll1", 10).Trim() == "true") && Running) { Calls.DoString("GossipTitleButton1:Click() QuestFrameCompleteQuestButton:Click()"); } } Exchange.IsEngineRunning = false; Exchange.CurrentEngine = "None"; DupeEngine.engine = null; }
public override void Run() { if (CurWp != Data.curWp) { CurWp = Data.curWp; StuckCounter = 0; StuckTimer.Reset(); } else { if (StuckTimer.IsReady()) { StuckCounter = StuckCounter + 1; } if (StuckCounter >= 1) { if (StuckCounter >= 2) { GrindbotContainer.IsStuck = true; StuckCounter = 0; } } } Ingame.moveForward(); Calls.TurnCharacter(Data.Profile[Data.curWp]); }
/// <summary> /// shape終了処理 /// </summary> void finalize() { // ボードの対応マスにブロックを登録 foreach (var block in Blocks) { // 近い整数値に丸める block.position = Utility.roundVector(block.position); int x = (int)(block.position.x + 0.5f); int y = (int)(block.position.y + 0.5f); // 終了処理のタイミングでブロックがボードの範囲外だった場合はゲームオーバー if (y >= Ingame.Y_SIZE) { Ingame.requestGameOver(); break; } Ingame.Board[x, y] = block; } // 自身を削除 Destroy(this.gameObject); // 次の形状を生成リクエスト Ingame.requestSpawnShape(); }
void Awake() { popupbutton_cs = Button.GetComponent <PopupButton>(); text1 = Text1.GetComponent <Text>(); text2 = Text2.GetComponent <Text>(); Ingame_sc = Canvas.GetComponent <Ingame>(); }
/// <summary> /// 正常位置の確認 /// </summary> /// <param name="pos"></param> /// <returns></returns> bool isValidPos(Vector3 pos) // 引数いらんかも { bool result = true; // 近い整数値に丸める MyTransform.position = Utility.roundVector(MyTransform.position); foreach (var block in Blocks) { // 近い整数値に丸める block.position = Utility.roundVector(block.position); // ボード内かどうかチェック if (!Ingame.insideBorad(block.position)) { return(false); } // ボードの対応マスにすでにブロックが入っている場合はそこは行けないところ int x = (int)(block.position.x + 0.5f); int y = (int)(block.position.y + 0.5f); if (y < Ingame.Y_SIZE) { if (Ingame.Board[x, y] != null) { return(false); } } } return(result); }
internal static void Handle() { if (!Calls.IsFacing(ObjectManager.TargetObject.Pos)) { Calls.TurnCharacter(ObjectManager.TargetObject.Pos); } if (HandleMovement) { if (ObjectManager.PlayerObject.isChanneling == 0 && !ObjectManager.IsCasting) { float disToTarget = ObjectManager.TargetObject.Pos.differenceToPlayer(); if (disToTarget > BotTemplate.Engines.Data.fightRange) { Ingame.moveForward(); } else { if (disToTarget > 0.8) { Calls.StopRunning(); } else { if (!Calls.MovementIsOnly((uint)Offsets.movementFlags.Back)) { Ingame.moveBackwards(); } } } } } }
public void Initialize() { Manager = Ingame.Instance; target = Ingame.Instance.Me.transform.localPosition; StartCoroutine(Attact0(35, 0.01f)); StartCoroutine(bomb_Move0()); }
internal static bool teleToMaster() { try { leader = ObjectManager.leader; if (leader.Pos.differenceToPlayer() > 30 || forceTele) { Objects.Location tmp = clientConnect.requestCoords(); if (tmp.x != 0 && tmp.y != 0 && tmp.z != 0) { Calls.StopRunning(); Ingame.DismissPet(); Thread.CurrentThread.Join(2000); Ingame.Tele(tmp, 60, false); forceTele = false; return(true); } } } catch { } forceTele = false; return(false); }
void Start() { Manager = Ingame.Instance; bomb_color = this.gameObject.GetComponent <SpriteRenderer>(); target = Ingame.Instance.Me.transform.localPosition; StartCoroutine(bomb_Move0()); }
private void OnInitializeUI() { Main = uiProvider.GetPanel <Main>("Main"); Endgame = uiProvider.GetPanel <Endgame>("Endgame"); Ingame = uiProvider.GetPanel <Ingame>("Ingame"); Main.Setup(new UIPanelParameter(localization) { ActionCallbacks = new Dictionary <string, Action> { { "Play", OnPlayCommand } } }); Endgame.Setup(new UIPanelParameter(localization) { ActionCallbacks = new Dictionary <string, Action> { { "Retry", OnRetry }, { "Next", OnNext } } }); Ingame.Setup(new UIPanelParameter(localization) { ActionCallbacks = new Dictionary <string, Action> { { "Pause", OnPause }, { "Success", () => OnIngameUIResult(true) }, { "Fail", () => OnIngameUIResult(false) } } }); Main.Open(); }
public override void SelectMenuItem() { string selectedItem; GetSelectedItem(out selectedItem); var ingameManager = Ingame.GetInstance(); switch (selectedItem) { case NewGame: GameStateManager.State = States.Ingame; ingameManager.Activate(); LevelManager.LoadLevel <Map <TileCode>, TileCode>("Level1"); GameVariableProvider.SaveManager.Save(); break; case Resume: GameStateManager.State = States.Ingame; ingameManager.Activate(); GameVariableProvider.SaveManager.Load(VariableProvider.SaveSlot); break; case Quit: VariableProvider.Exit(); break; } }
public override void Run() { if (MasterContainer.engageGuid != ObjectManager.TargetObject.guid) { blacklistCount = 0; MasterContainer.engageGuid = ObjectManager.TargetObject.guid; BlacklistTimer.Reset(); } if (BlacklistTimer.IsReady()) { blacklistCount = blacklistCount + 1; if (blacklistCount == 1) { MasterContainer.IsStuck = true; } } if (blacklistCount >= 2) { MasterContainer.blacklistGuid.Add(ObjectManager.TargetObject.guid); blacklistCount = 0; BlacklistTimer.Reset(); Calls.SetTarget(0); } MasterFightMovement.Handle(); SpellManager.CheckSpells(); CCManager.FightPulse(); Ingame.CastFinal(); MasterContainer.AfterFight = true; }
internal void GoBack() { IsVendoring = false; locationSaved = false; Ingame.Tele(curPoint, 60, false); GrindbotContainer.StuckTimer.Reset(); GrindbotContainer.IsStuck = false; }
void Awake() { Money_t = Money_gb.GetComponent <Text>(); As = Money_parent.GetComponent <AudioSource>(); ingame_sc = GetComponent <Ingame>(); fiqure_sc = GetComponent <Figure>(); hp_bar_img = hp_bloody.GetComponent <Image>(); }
void Awake() { Camera_AudioSource = Camera_gb.GetComponent <AudioSource>(); pb_sc = Buttons.GetComponent <PopupButton>(); ingame_sc = GetComponent <Ingame>(); // As = Camera.GetComponent<AudioSource>(); MapName_text = MapName_gb.GetComponent <Text>(); }
public override void Run() { if (!Calls.MovementIsOnly((uint)Offsets.movementFlags.None)) { Calls.StopRunning(); } if (Data.needHealth) { IsWaitingForHealth = true; } if (Data.needMana) { IsWaitingForMana = true; } if (UseRestItemTimer.IsReady()) { if (IsWaitingForHealth == true) { if (ObjectManager.PlayerHealthPercent > 90) { IsWaitingForHealth = false; } else { if (Data.UseCcRest) { CCManager.RestHealth(IsWaitingForMana); } else { Ingame.UseFood(); } } } if (IsWaitingForMana == true) { if (ObjectManager.PlayerObject.manaPercent > 95) { IsWaitingForMana = false; } else { if (Data.UseCcRest) { CCManager.RestMana(IsWaitingForHealth); } else { Ingame.UseDrink(); } } } } }
internal static string[] GetText(string command, string[] arguments, int returnLength) { lock (Inject.inject_Lock) { // Create a string array with the number of arguments and fill it with empty strings int num; string[] strArray = new string[arguments.Length]; for (num = 0; num < strArray.Length; num++) { strArray[num] = string.Empty; } if (ObjectManager.ExecuteOnce && ObjectManager.playerPtr != 0) { ObjectManager.ExecuteOnce = false; Register.LuaFunctions(); Ingame.PlaceAutoAttackAndShoot(); } bool firstBool = BmWrapper.memory.WriteASCIIString(Inject.DoStringTextPtr, command + "\0"); String[] asm = new String[] { "mov EDX, 0", "mov ECX, " + (uint)Inject.DoStringTextPtr, "call " + (uint)Offsets.functions.DoString, "retn", }; Inject.InjectAndExecute(asm, false); for (int i = 0; i < arguments.Length; i++) { bool thirdBool = BmWrapper.memory.WriteASCIIString(Inject.GetTextArgumentsPtr, arguments[i] + "\0"); if (thirdBool) { // Write the asm stuff for Lua_DoString String[] asm2 = new String[] { "push 0", "or edx, 0FFFFFFFFh", "mov ecx, " + (uint)Inject.GetTextArgumentsPtr, "call " + (uint)Offsets.functions.GetText, "retn", }; uint argumentValue = Inject.InjectAndExecuteReturn(asm2, true, false); if (argumentValue != 0) { strArray[i] = BmWrapper.memory.ReadASCIIString(argumentValue, returnLength); } } } return(strArray); } }
void Awake() { gold_t = gold_text.GetComponent <Text>(); character_anim = Character.GetComponent <Animator>(); Ad = transform.GetComponent <AttackDecision>(); Die_black_img = Die_black_gb.GetComponent <Image>(); ingame_sc = GetComponent <Ingame>(); fiqure_sc = GetComponent <Figure>(); }
internal static void RestMana(bool firstBool) { if (ObjectManager.PlayerObject.isChanneling == 0 && !ObjectManager.IsCasting) { SpellManager.CheckSpells(); ccs[toUse].RestMana(firstBool); Ingame.CastFinal(); } }
internal void GoBack() { IsVendoring = false; locationSaved = false; Ingame.Tele(curPoint, 60, false); MasterContainer.StuckTimer.Reset(); MasterContainer.IsStuck = false; slaveStates.returnCoords = true; }
void Awake() { Anim = Character.GetComponent <Animator>(); ingame_cs = Canvas.GetComponent <Ingame>(); death_show_img = death_show.GetComponent <Image>(); mapselector_sc = Canvas.GetComponent <MapSelector>(); CharacaterDeathPoup_anim = CharacterDeathPopup.GetComponent <Animator>(); }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); Initialize(); } }
private void OnIngameUIResult(bool isSuccessful) { Ingame.Close(); director.UiIngameStateUpdate(isSuccessful); var result = new ResultParams("Level 2-3", isSuccessful ? "Success" : "Failed", "High score: 3500", "2000", isSuccessful, false); Endgame.SetResult(result); Endgame.Open(); }
protected virtual void OnIngameResult(GameResultParamsBase resultParameterBase) { Ingame.Close(); director.UiIngameStateUpdate(resultParameterBase.HasWon); var result = new UIResultParamsBase("Level 2-3", resultParameterBase.HasWon ? "Success" : "Failed", "High score: 3500", "2000", resultParameterBase.HasWon, false); Endgame.SetResult(result); Endgame.Open(); }
public override void Run() { Objects.UnitObject tmpMob = ObjectManager.GetNextLoot(); if (tmpMob.baseAdd != 0) { CurLootMob = tmpMob.guid; if (CurLootMob != OldLootMob) { OldLootMob = CurLootMob; LootTryOuts = 0; } if (LootTryOuts < 10) { if (ObjectManager.PlayerObject.targetGuid != tmpMob.guid) { Calls.SetTarget(tmpMob.guid); } else { float diff = ObjectManager.PlayerObject.Pos.differenceTo(tmpMob.Pos); if (diff > 3) { Calls.TurnCharacter(tmpMob.Pos); if (!Calls.MovementContainsFlag((uint)Offsets.movementFlags.Forward)) { Ingame.moveForward(); } } else { Calls.DoString("DoEmote('stand')"); Calls.StopRunning(); } if (LootClickTimer.IsReady()) { if (diff <= 5) { Calls.OnRightClickUnit(tmpMob.baseAdd, 1); } LootTryOuts = LootTryOuts + 1; } } } else { if (!ObjectManager.BlacklistedLoot.Contains(tmpMob.guid)) { ObjectManager.BlacklistedLoot.Add(tmpMob.guid); } } } }
public override void Run() { if (MasterContainer.firstBool == false) { Calls.StopRunning(); MasterContainer.firstBool = true; MasterContainer.someBool = true; } else { if (Calls.MovementIsOnly((uint)Offsets.movementFlags.None) && MasterContainer.someBool == true) { MasterContainer.secondBool = true; MasterContainer.someBool = false; } if (MasterContainer.secondBool == true) { Ingame.moveBackwards(); moveBackTimer.Reset(); MasterContainer.thirdBool = true; MasterContainer.secondBool = false; } if (moveBackTimer.IsReady() && MasterContainer.thirdBool == true) { Ingame.moveBackwards(); MasterContainer.thirdBool = false; MasterContainer.fourthBool = true; ChooseRandom(out strafeStart, out strafeStop); Calls.DoString(strafeStart); strafeTimer.Reset(); } if (MasterContainer.fourthBool == true && strafeTimer.IsReady()) { Calls.DoString(strafeStop); MasterContainer.fifthBool = true; MasterContainer.fourthBool = false; } } if (MasterContainer.fifthBool == true) { MasterContainer.IsStuck = false; Calls.StopRunning(); ResetBools(); } //if (jumpTimer.IsReady()) //{ // Ingame.Jump(); //} }
private void objectGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { Ingame.Tele( new Objects.Location( Convert.ToSingle(objectGrid.Rows[e.RowIndex].Cells[startCoord].Value), Convert.ToSingle(objectGrid.Rows[e.RowIndex].Cells[startCoord + 1].Value), Convert.ToSingle(objectGrid.Rows[e.RowIndex].Cells[startCoord + 2].Value) ), 60, false); } }
public override void Run() { if (curHealthPercent == (int)ObjectManager.TargetObject.healthPercent) { if (BlackListTimer.IsReady()) { BlackListCounter = BlackListCounter + 1; if (BlackListCounter == 2) { GrindbotContainer.blacklistGuid.Add(ObjectManager.TargetObject.guid); BlackListCounter = 0; BlackListTimer.Reset(); Calls.SetTarget(0); } else { GrindbotContainer.IsStuck = true; } } } else { curHealthPercent = (int)ObjectManager.TargetObject.healthPercent; BlackListTimer.Reset(); BlackListCounter = 0; } if (ObjectManager.TargetObject.healthPercent == 100) { int curHealth = (int)ObjectManager.TargetObject.healthPercent; } GrindbotFightMovement.Handle(); if (ObjectManager.IsTargetOnMe()) { SpellManager.CheckSpells(); CCManager.FightPulse(); Ingame.CastFinal(); GrindbotContainer.AfterFight = true; } else { UInt64 guid = 0x0; try { guid = ObjectManager.AggroMobs()[0]; } catch { } Calls.SetTarget(guid); } }
public override void Run() { { if (ObjectManager.IsUnitOnGroup(attTarget.targetGuid, attTarget.isTapped, attTarget.healthPercent)) { clientConnect.requestWait(); } FightMovement.Handle(); SpellManager.CheckSpells(); CCManager.FightPulse(); Ingame.CastFinal(); AssistContainer.AfterFight = true; } }
internal static string GetText(string command, string argument, int returnLength) { lock (Inject.inject_Lock) { string str = ""; if (ObjectManager.ExecuteOnce && ObjectManager.playerPtr != 0) { ObjectManager.ExecuteOnce = false; Register.LuaFunctions(); Ingame.PlaceAutoAttackAndShoot(); } bool firstBool = BmWrapper.memory.WriteASCIIString(Inject.DoStringTextPtr, command + "\0"); String[] asm = new String[] { "mov EDX, 0", "mov ECX, " + (uint)Inject.DoStringTextPtr, "call " + (uint)Offsets.functions.DoString, "retn", }; Inject.InjectAndExecute(asm, false); bool thirdBool = BmWrapper.memory.WriteASCIIString(Inject.GetTextArgumentsPtr, argument + "\0"); if (thirdBool) { // Write the asm stuff for Lua_DoString String[] asm2 = new String[] { "push 0", "or edx, 0FFFFFFFFh", "mov ecx, " + Inject.GetTextArgumentsPtr, "call " + (uint)Offsets.functions.GetText, "retn", }; //Console.WriteLine(DateTime.Now.ToString("HH:mm:ss") + " Calling Get Text"); uint argumentValue = Inject.InjectAndExecuteReturn(asm2, true, false); if (argumentValue != 0) { str = BmWrapper.memory.ReadASCIIString(argumentValue, returnLength); } } return(str); } }