///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: Magery Train // ///////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; using System.Linq; using Phoenix.Communication; using Phoenix.Runtime; using Phoenix.Runtime.Reflection; namespace Phoenix.Scriptq { public class smoce_traine {//by smoce public const ushort methode = 2;//0-Meditace 1-MR 2-TMR public const ushort TMR_MR_KAD = 0x1843; public const ushort TMR_MR_pot = 0x0F09; public const ushort TMR_barva = 0x0003; public const ushort MR_barva = 0x0005; public const int uspesnostssa = 0; [Executable] public static void sipka_self() { int pocitani = 0; UO.PrintInformation("Script Train Magery"); sipka: if (UO.Count(0x0F7A, 0x0000) == 0 || UO.Count(0x0F88, 0x0000) == 0) { UO.Print("Dosli regy !"); } if (World.Player.Mana > 5 && World.Player.Hits > 10) { UO.Cast("Magic Arrow", Aliases.Self); pocitani++; UO.Wait(2000); goto sipka; } if (World.Player.Hits < 10) { UOItem bandage = World.Player.Backpack.AllItems.FindType(0x0E21); if (bandage.Serial != Serial.Invalid) { while (World.Player.Hits < World.Player.MaxHits) { UO.WaitTargetSelf(); bandage.Use(); UO.Wait(4000); } } else { UO.Print("Nemas bandy !!!"); } goto sipka; } if (World.Player.Mana < 5) { if (methode == 2) { if (UO.Count(TMR_MR_pot, TMR_barva) == 0) { if (Journal.Contains("You are preoccupied with thoughts of battle.")) { World.Player.ChangeWarmode(0); UO.Print("Neni lahvicka!"); } else { UO.UseType(TMR_MR_KAD, TMR_barva); UO.WaitTargetType(0x0f0e); UO.Print("Prelito" + UO.Count(TMR_MR_pot, TMR_barva) + " Total Mana Refles."); UO.Wait(2000); } UO.UseType(TMR_MR_pot, TMR_barva); UO.Wait(100); UO.Print("Zbyva " + UO.Count(TMR_MR_pot, TMR_barva) + " Total Mana Refles."); } else { UO.UseType(TMR_MR_pot, TMR_barva); UO.Wait(100); UO.Print("Zbyva " + UO.Count(TMR_MR_pot, TMR_barva) + " Total Mana Refles."); } goto sipka; } if (methode == 1) { if (UO.Count(TMR_MR_pot, MR_barva) == 0) { if (Journal.Contains("You are preoccupied with thoughts of battle.")) { World.Player.ChangeWarmode(0); UO.Print("Neni lahvicka!"); } else { UO.UseType(0x1843, 0x0003); UO.WaitTargetType(0x0f0e); UO.Print("Prelito" + UO.Count(0x0F09, 0x0003) + " Total Mana"); UO.Wait(2000); } UO.UseType(TMR_MR_pot, MR_barva); UO.Wait(100); UO.Print("Zbyva " + UO.Count(TMR_MR_pot, TMR_barva) + " Total Mana"); } else { UO.UseType(TMR_MR_pot, MR_barva); UO.Wait(100); UO.Print("Zbyva " + UO.Count(TMR_MR_pot, TMR_barva) + " Total Mana"); } goto sipka; } if (methode == 0) { do { meditationa(); } while (World.Player.Mana < World.Player.MaxMana); goto sipka; } } goto sipka; } [Command] public static void meditationa() { UO.DeleteJournal(); UO.UseSkill("Meditation"); CekanisJournala("You enter|You must wait"); do { UO.Wait(100); } while ((UO.InJournal("You lose|You must wait"))); UO.Wait(500); } [Command] public static void CekanisJournala(string text) { do { UO.Wait(200); } while (UO.InJournal(text)); UO.Wait(500); } } }