public bool Vet() { if (pet == null || pet.Distance > 15) { UO.Print("Zamer mezlicka"); pet = new UOCharacter(UIManager.TargetObject()); } if (pet == null) { return(false); } if (pet.Distance > 6) { UO.PrintError("Moc daleko"); return(false); } if (UIManager.CurrentState != UIManager.State.Ready) { UO.Wait(200); return(true); } Core.UnregisterServerMessageCallback(0x1C, onHeal); Core.RegisterServerMessageCallback(0x1C, onHeal); pet.WaitTarget(); UO.Say(".bandage"); healed = false; harmed = true; DateTime start = DateTime.Now; //TODO eq weapon while (!healed) { UO.Wait(100); if (DateTime.Now - start > TimeSpan.FromSeconds(7)) { break; } if (!harmed) { UO.PrintInformation("Neni zranen"); Core.UnregisterServerMessageCallback(0x1C, onHeal); return(false); } } Core.UnregisterServerMessageCallback(0x1C, onHeal); return(true); }
public void bomba() { UOCharacter cil = new UOCharacter(Aliases.GetObject("laststatus")); if (cil.Distance > 5) { UO.PrintError("Moc daleko"); return; } cil.WaitTarget(); UO.Say(".throwexplosion"); UO.Wait(100); new UOItem(Aliases.GetObject("ActualWeapon")).Equip(); new UOItem(Aliases.GetObject("ActualShield")).Use(); }
private void Peace_Entic(StandardSkill Skill, Serial Target) { if (Target == null) { Core.UnregisterServerMessageCallback(0x1C, OnCalls); MusicDone = true; return; } MusicDoneFailSafe(); UOCharacter tmp = new UOCharacter(Target); MusicDone = false; if (tmp.Distance > 18) { MusicDone = true; return; } tmp.WaitTarget(); UO.UseSkill(Skill); }
private void Provo(Serial Target1, Serial Target2) { if (Target1 == null || Target2 == null) { MusicDone = true; return; } UOCharacter tmp1 = new UOCharacter(Target1); UOCharacter tmp2 = new UOCharacter(Target2); if (tmp1.Distance > 18 || tmp2.Distance > 18) { MusicDone = true; return; } MusicDone = false; MusicDoneFailSafe(); tmp1.WaitTarget(); UO.Say(".provo"); tmp2.WaitTarget(); }