Alchemy, new s targetem

Skripty týkající se tohoto externího programu

Moderátor: Caleb

Odpovědět
Uživatelský avatar
Rod Sacketts II
Paper Elemental
Paper Elemental
Příspěvky: 387
Registrován: 04 dub 2009 22:02
Kontaktovat uživatele:

Alchemy, new s targetem

Příspěvek od Rod Sacketts II »

,michani
Zatargetujete následně pouze káď

-> !! Není "blbu" vzdornej ... Takže když máte dva různé potiony od Poisonu ( deadly + Lesser třeba ) ... tak script skončí.

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix.WorldData;
using Phoenix.Runtime;
using Phoenix.Runtime.Reflection;
using Phoenix;
using Phoenix.Communication;
using System.Linq;

namespace Scripts.Alchemy
{
    public class Alchemista
    {
		[Command("michani")]
        public static void alchemy()
        {
		ushort regtyp;
		ushort pottyp;
		ushort potcol;
		string menicko;

			UO.PrintInformation("Najdi Kad");
            UOItem kad = new UOItem(UIManager.TargetObject());
            UOColor kadcol = kad.Color;
		
			if (kadcol == 0x000E)
			{
				regtyp = 0x0F8F;
				pottyp = 0x0F0D;
				potcol = 0x000E;
				menicko = "Lava Bomb";
			}
			else if (kadcol == 0x0003)
			{
				regtyp = 0x0F87;
				pottyp = 0x0F09;
				potcol = 0x0003;
				menicko = "Total Mana Refresh";
			}
			else if (kadcol == 0x0005)
			{
				regtyp = 0x0F87;
				pottyp = 0x0F09;
				potcol = 0x0005;
				menicko = "Mana Refresh Potion";
			}
			else if (kadcol == 0x0481)
			{
				regtyp = 0x0F86;
				pottyp = 0x0F09;
				potcol = 0x0000;
				menicko = "Greater Strength";
			}
			else if (kadcol == 0x08A7)
			{
				regtyp = 0x0F85;
				pottyp = 0x0F0C;
				potcol = 0x0000;
				menicko = "Greater Heal";
			}
			else if (kadcol == 0x0842)
			{
				regtyp = 0x0F84;
				pottyp = 0x0F07;
				potcol = 0x0000;
				menicko = "Greater Cure";
			}
			else if (kadcol == 0x014D)
			{
				regtyp = 0x0F7A;
				pottyp = 0x0F0B;
				potcol = 0x0000;
				menicko = "Total Refresh";
			}
			else if (kadcol == 0x0724)
			{
				regtyp = 0x0F78;
				pottyp = 0x0F09;
				potcol = 0x045E;
				menicko = "Shrink";
			}
			else if (kadcol == 0x08A2)
			{
				regtyp = 0x0F88;
				pottyp = 0x0F0A;
				potcol = 0x0000;
				menicko = "Deadly Poison";
			}
			else if (kadcol == 0x0B77)
			{
				regtyp = 0x0F91;
				pottyp = 0x0F09;
				potcol = 0x0B77;
				menicko = "Invisibility";
			}
			else if (kadcol == 0x03C4)
			{
				regtyp = 0x0F8D;
				pottyp = 0x0F06;
				potcol = 0x0000;
				menicko = "Nightsight";
			}
			else if (kadcol == 0x00BD)
			{
				regtyp = 0x0F7B;
				pottyp = 0x0F08;
				potcol = 0x0000;
				menicko = "Greater Agility";
			}
			else if (kadcol == 0x00BF)
			{
				regtyp = 0x0F7B;
				pottyp = 0x0F08;
				potcol = 0x0000;
				menicko = "Agility Potion";
			}
			else if (kadcol == 0x0090)
			{
				regtyp = 0x0F84;
				pottyp = 0x0F07;
				potcol = 0x0000;
				menicko = "Cure Potion";
			}
			else if (kadcol == 0x08A8)
			{
				regtyp = 0x0F85;
				pottyp = 0x0F0C;
				potcol = 0x0000;
				menicko = "Heal Potion";
			}
			else if (kadcol == 0x0018)
			{
				regtyp = 0x0F8C;
				pottyp = 0x0F0D;
				potcol = 0x0000;
				menicko = "Greater Explosion";
			}
			else if (kadcol == 0x08A1)
			{
				regtyp = 0x0F88;
				pottyp = 0x0F0A;
				potcol = 0x0000;
				menicko = "Greater Poison";
			}
			else if (kadcol == 0x089F)
			{
				regtyp = 0x0F88;
				pottyp = 0x0F0A;
				potcol = 0x0000;
				menicko = "Lesser Poison";
			}
			else if (kadcol == 0x08A0)
			{
				regtyp = 0x0F88;
				pottyp = 0x0F0A;
				potcol = 0x0000;
				menicko = "Poison Potion";
			}
			else if (kadcol == 0x001A)
			{
				regtyp = 0x0F8C;
				pottyp = 0x0F0D;
				potcol = 0x0000;
				menicko = "Lesser Explosion potion";
			}
			else if (kadcol == 0x0019)
			{
				regtyp = 0x0F8C;
				pottyp = 0x0F0D;
				potcol = 0x0000;
				menicko = "Explosion potion";
			}
			else if (kadcol == 0x08A9)
			{
				regtyp = 0x0F85;
				pottyp = 0x0F0C;
				potcol = 0x0000;
				menicko = "Lesser Heal Potion";
			}
			else if (kadcol == 0x0091)
			{
				regtyp = 0x0F84;
				pottyp = 0x0F07;
				potcol = 0x0000;
				menicko = "Lesser Cure Potion";
			}
			else if (kadcol == 0x014E)
			{
				regtyp = 0x0F7A;
				pottyp = 0x0F0B;
				potcol = 0x0000;
				menicko = "Refresh Potion";
			}
			else if (kadcol == 0x0B87)
			{
				regtyp = 0x0F86;
				pottyp = 0x0F09;
				potcol = 0x0000;
				menicko = "Strength Potion";
			}
			else if (kadcol == 0x0B90)
			{
				regtyp = 0x0F8E;
				pottyp = 0x0F06;
				potcol = 0x0B90;
				menicko = "Hallucination";
			}
			else
			{
				return;
			}
		
			while (!World.Player.Dead)
			{
				if ((UO.Count(0x0F0E) < 1) || (!kad.Exist))
				{
					UO.PrintInformation("Schazi ti lahvicky... a nebo kad!");
					return;
				}
				if (UO.Count(regtyp) < 11)
				{
					UO.PrintInformation("Nejde tvorit potion z niceho.. a nebo z mala");
					return;
				}
				while (UO.Count(pottyp, potcol) >= 1)
				{
					UO.Print("Naplnuji kad");
					kad.Use();
					UO.WaitTargetType(pottyp, potcol);
					if (UO.InJournal("Tohle nejde!"))
					{
						return;
					}
					Journal.WaitForText("Prelil jsi lahvicku");
					UO.Wait(500);
					SvetovySave();
				}
				UO.DeleteJournal();
				UO.UseType(0x0E9B);
				UO.WaitMenu("Vyber typ potionu", menicko);
				string[] uspesnost = { "You toss","You completed the mixture in the mortar"};
				Journal.WaitForText(uspesnost);
				UO.Wait(750);
				if (UO.InJournal("You completed the mixture in the mortar"))
				{
					UO.Wait(250);
					UO.UseType(0x0E9B);
					UO.Wait(1500);
					SvetovySave();
					do
					{
						UO.Print("Naplnuji kad");
						kad.Use();
						UO.WaitTargetType(pottyp, potcol);
						if (UO.InJournal("Tohle nejde!"))
						{
							return;
						}
						Journal.WaitForText("Prelil jsi lahvicku");
						UO.Wait(500);
						SvetovySave();
					} while (UO.Count(pottyp, potcol) >= 1);
				}
				UO.Wait(500);
				SvetovySave();
			}
		}
		
		[Command]
        static private void SvetovySave()
        {
			while (UO.InJournal("World save") || UO.InJournal("Resync") || UO.InJournal("resync"))
			{
				UO.DeleteJournal();
				UO.Wait(19000);
			}
		}
	}
}
Odpovědět