void pescar() { if (Setting.Lootear == 1) { Looting.AbrirCorpos(); } Pesca.Pescar(); Pescando = false; }
private void HandleLootingTutorialTopics() { // Handle initiating looting of "Tutorial Chest A" if (UiSystems.HelpManager.IsTutorialActive) { if (_state == CharInventoryState.Looting) { if (Looting.GetLootingState() != 0) { if (Looting.LootingContainer?.ProtoId == 1048) { if (GameSystems.Script.GetGlobalFlag(5)) { UiSystems.HelpManager.ShowTutorialTopic(TutorialTopic.LootingSword); GameSystems.Script.SetGlobalFlag(5, false); } } } } } // Handle looting of wand of fireball if (GameSystems.Map.GetCurrentMapId() == 5118 && !GameSystems.Script.GetGlobalFlag(8)) { var lootingTarget = Looting.LootingContainer; if (lootingTarget != null && lootingTarget.IsNPC()) { var hasWandOfFireball = lootingTarget.EnumerateChildren().Any(item => item.ProtoId == 12581); if (hasWandOfFireball) { if (!UiSystems.HelpManager.IsTutorialActive) { UiSystems.HelpManager.ToggleTutorial(); } if (GameSystems.Script.GetGlobalFlag(11)) { UiSystems.HelpManager.ShowTutorialTopic(TutorialTopic.LootPreferenceArielDead); } else { UiSystems.HelpManager.ShowTutorialTopic(TutorialTopic.LootPreference); } // TODO: Might this be a mistake and it should be flag 11? GameSystems.Script.SetGlobalFlag(8, true); } } } }
void start() { if (Setting.PescarSemParar == 1) { Setting.triestotal = 30; } else { Setting.triestotal = 7; } if (Setting.PlayerOnScreen == false) { if (Setting.Atacar == 1 && Setting.AtacarSemTarget == 0) { Ataque.Atacar(); } if (Setting.Pescar == 1 && Setting.PescarSemParar == 0) { if (Setting.Lootear == 1) { Looting.AbrirCorpos(); } if (Setting.catchpoke == 1) { Catch.JogarBall(); } Pesca.Pescar(); } Setting.tries = 0; if (Setting.Atacar == 1) { if (Setting.AtacarSemTarget == 0) { Ataque.Atacar(); } } Setting.Running = true; } Chat.CheckChat(); }
// Use this for initialization void Start() { Health = 10; rb = GetComponent <Rigidbody> (); loot = GameObject.FindObjectOfType(typeof(Looting)) as Looting; }
private void button1_Click(object sender, EventArgs e) { Looting.AbrirCorpos(); }
public void Hide(CharInventoryState newState) { if (CurrentCritter != null) { GameSystems.TimeEvent.ResumeGameTime(); } if (UiSystems.Popup.IsAnyOpen()) { UiSystems.Popup.CloseAll(); } if (CurrentPage >= 1 && CurrentPage <= 4) { CurrentPage = 0; } Inventory.BagIndex = 0; if (GameSystems.Combat.IsCombatActive()) { // Clear the flag that allows us to change more than one item while in the inventory menu, // without losing even more of our turn. var tbStatus = GameSystems.D20.Actions.curSeqGetTurnBasedStatus(); tbStatus.tbsFlags &= ~TurnBasedStatusFlags.ChangedWornItem; } if (Inventory.DraggedObject != null) { Inventory.DraggedObject = null; Tig.Mouse.ClearDraggedIcon(); } _mainWidget.Hide(); Stats.Hide(); Portrait.Hide(); Inventory.Hide(); Skills.Hide(); Feats.Hide(); Spells.Hide(); LevelUp.Hide(); switch (_state) { case CharInventoryState.Closed: break; case CharInventoryState.Looting: case CharInventoryState.Bartering: case CharInventoryState.Unknown6: if (newState != _state) { Looting.Hide(); } break; case CharInventoryState.LevelUp: LevelUp.Hide(); break; case CharInventoryState.CastingSpell: _itemPickedCallback?.Invoke(null); _itemPickedCallback = null; break; case CharInventoryState.PartyPool: break; default: throw new ArgumentOutOfRangeException(); } State = newState; CurrentCritter = null; Help.Hide(); }
public void Show(GameObject obj) { if (CurrentCritter != null) { Hide(_state); } GameSystems.TimeEvent.PauseGameTime(); if (obj != CurrentCritter) { ResetPages(); } CurrentCritter = obj; Inventory.Container = obj; _mainWidget.Visible = true; _mainWidget.BringToFront(); Stats.Show(); Portrait.Show(obj); if (_state == CharInventoryState.Unknown6) { CurrentPage = 7; Spells.Show(CurrentCritter); } else if (_state != CharInventoryState.LevelUp) { switch (CurrentPage) { case 0: case 1: case 2: case 3: case 4: Inventory.Show(obj); break; case 5: Skills.Show(); break; case 6: Feats.Show(CurrentCritter); break; case 7: Spells.Show(CurrentCritter); break; default: Logger.Warn("Showing default character sheet page (inventory)."); Inventory.Show(obj); break; } } switch (_state) { case CharInventoryState.Looting: case CharInventoryState.Bartering: case CharInventoryState.Unknown6: Looting.Show(null); break; case CharInventoryState.LevelUp: CurrentPage = 9; LevelUp.Show(); break; } CenterOnScreen(); Help.Show(); HandleLootingTutorialTopics(); }
private void HandleHotkey() { Setting.UseHk = true; Looting.AbrirCorpos(); Setting.UseHk = false; }