Re: Razielovy scripty
Napsal: 31.03.2018 01:52:20
díky
ale ako vyhovorka to bolo slabe ....Empair píše:Raziel píše:Protože tenhle kod vychází z dřeva které dělal emp, tak omluvte ten sprasený koddyť jsem to psal 8 let zpátky ještě na škole
Napisal som ti PM tu na forkuRaziel píše:To které mám tady nefunguje ?
Raziel píše:míchání lektvarů přes mortar
,mich "zkratka" například ,mich "tmr" - seznam zkratek ve scriptu (jsou to první písmena názvu potionu nebo u jednoslovných první dvě písmena)
míchání na GM mortaru
,gmmortar
Kód: Vybrat vše
using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; namespace Phoenix.Scripts.Raziel { using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; public class Alchemy { public class Potion { public string Zkratka { get; set; } public string Menu { get; set; } public Graphic Graphic { get; set; } public UOColor Color { get; set; } public Graphic KegGraphic { get; set; } public UOColor KegColor { get; set; } public Potion(string z, string a, Graphic g, UOColor c, Graphic kg, UOColor kc) { Zkratka = z; Menu = a; Graphic = g; Color = c; KegGraphic = kg; KegColor = kc; } } private List<Potion> seznam = new List<Potion>(); public Alchemy() { seznam.Add(new Potion("tmr", "Total Mana Refresh", 0x0F09, 0x0003, 0x1843, 0x003)); seznam.Add(new Potion("mr", "Mana Refresh Potion", 0x0F09, 0x0005, 0x1843, 0x005)); seznam.Add(new Potion("gs", "Greater Strength", 0x0F09, 0x0000, 0x1843, 0x0481)); seznam.Add(new Potion("gh", "Greater Heal", 0x0F0C, 0x0000, 0x1843, 0x08A7)); seznam.Add(new Potion("gc", "Greater Cure", 0x0F07, 0x0000, 0x1843, 0x0842)); seznam.Add(new Potion("tr", "Total Refresh", 0x0F0B, 0x0000, 0x1843, 0x014D)); seznam.Add(new Potion("sh", "Shrink", 0x0F09, 0x045E, 0x1843, 0x0724)); seznam.Add(new Potion("dp", "Deadly Poison", 0x0F0A, 0x0000, 0x1843, 0x08A2)); seznam.Add(new Potion("in", "Invisibility", 0x0F09, 0x0000, 0x1843, 0x000)); seznam.Add(new Potion("lb", "Lava Bomb", 0x0F0D, 0x00E, 0x1843, 0x00E)); seznam.Add(new Potion("ni", "Nightsight", 0x0F06, 0x0000, 0x1843, 0x03C4)); seznam.Add(new Potion("ga", "Greater Agility", 0x0F08, 0x0000, 0x1843, 0x00BD)); seznam.Add(new Potion("ag", "Agility Potion", 0x0F08, 0x0000, 0x1843, 0x00BF)); seznam.Add(new Potion("cu", "Cure Potion", 0x0F07, 0x0000, 0x1843, 0x0090)); seznam.Add(new Potion("he", "Heal Potion", 0x0F0C, 0x0000, 0x1843, 0x08A8)); seznam.Add(new Potion("ge", "Greater Explosion", 0x0F0D, 0x0000, 0x1843, 0x0018)); seznam.Add(new Potion("gp", "Greater Poison", 0x0F0A, 0x0000, 0x1843, 0x08A1)); seznam.Add(new Potion("lp", "Lesser Poison", 0x0F0A, 0x0000, 0x1843, 0x089F)); seznam.Add(new Potion("po", "Poison Potion", 0x0F0A, 0x0000, 0x1843, 0x08A0)); seznam.Add(new Potion("le", "Lesser Explosion Potion", 0x0F0D, 0x0000, 0x1843, 0x001A)); seznam.Add(new Potion("ex", "Explosion Potion", 0x0F0D, 0x0000, 0x1843, 0x0019)); seznam.Add(new Potion("ha", "Hallucination", 0x0F06, 0x0B90, 0x1843, 0x0B90)); seznam.Add(new Potion("lh", "Lesser Heal Potion", 0x0F0C, 0x0000, 0x1843, 0x08A9)); seznam.Add(new Potion("lc", "Lesser Cure Potion", 0x0F07, 0x0000, 0x1843, 0x0091)); seznam.Add(new Potion("re", "Refresh Potion", 0x0F0B, 0x0000, 0x1843, 0x014E)); seznam.Add(new Potion("st", "Strength Potion", 0x0F09, 0x0000, 0x1843, 0x0B87)); } [Command] public void mich(string zkratka) { int pokusu = 0, povedenych = 0; UO.DeleteJournal(); Potion michat = seznam.Find(x => x.Zkratka == zkratka); if (michat == null) { UO.Print("Nenalezen potion se zkratkou " + zkratka); return; } while (true) { if (UO.InJournal("World save has been")) UO.Wait(45000); UO.DeleteJournal(); UO.UseType(0x0E9B); UO.WaitMenu("Vyber typ potionu", michat.Menu); while (!UO.InJournal("You completed") && !UO.InJournal("You toss") && !UO.InJournal("Nemas dost") && !UO.InJournal("World save has been")) { UO.Wait(500); } if (UO.InJournal("Nemas dost")) { UO.Print("Dosly regy..."); return; } pokusu++; if (UO.InJournal("You completed")) { UO.UseType(0x0E9B); UO.Wait(500); while (!UO.InJournal("You pour")) { UO.Wait(100); } povedenych++; UO.UseType(michat.KegGraphic, michat.KegColor); UO.WaitTargetType(michat.Graphic, michat.Color); Journal.WaitForText("Prelil jsi lahvicku do kade"); } UO.Print("Michani: " + pokusu + " pokusu z toho se michlo " + povedenych); } } [Command] public void gmmortar() { string menu = ""; ushort graphic = 0; ushort color = 0x0000; int limit = 0; ushort regGraphic = 0; ushort colorGraphic = 0; UO.Print("Vyber gm mortar"); UOItem gmmortar = World.GetItem(UIManager.TargetObject()); UO.Print("Vyber keg kam prelivat potiony"); UOItem keg = World.GetItem(UIManager.TargetObject()); if (keg.Color == 0x0003) //tmr { menu = "Total Mana Refresh"; graphic = 0x0F09; color = 0x0003; limit = 612; regGraphic = 0x0F87; } if (keg.Color == 0x08A7) //gh { menu = "Greater Heal"; graphic = 0x0F0C; limit = 714; regGraphic = 0x0F85; } if (keg.Color == 0x0481) //gs { menu = "Greater Strength"; graphic = 0x0F09; limit = 612; regGraphic = 0x0F86; } if (keg.Color == 0x014D) //tr { menu = "Total Refresh"; graphic = 0x0F0B; limit = 510; regGraphic = 0x0F7A; } if (keg.Color == 0x0724) //shrink { menu = "Shrink"; graphic = 0x0F09; color = 0x045E; limit = 306; regGraphic = 0x0F78; } if (keg.Color == 0x08A2) //deadly poison { menu = "Deadly Poison"; graphic = 0x0F0A; limit = 1020; regGraphic = 0x0F88; } if (keg.Color == 0x000E) //Lava Bomb { menu = "Lava Bomb"; graphic = 0x0F0D; color = 0x000E; limit = 612; regGraphic = 0x0F8F; } if (keg.Color == 0x00BD) //Greater Agility { menu = "Greater Agility"; graphic = 0x0F08; limit = 306; regGraphic = 0x0F7B; } UO.DeleteJournal(); while (!World.Player.Dead && UO.Count(regGraphic, colorGraphic) >= limit) { UO.DeleteJournal(); gmmortar.Use(); UO.WaitMenu("Vyber typ potionu", menu); Journal.WaitForText("You vylil hotovy lektvar do kade"); UO.Wait(500); UO.DeleteJournal(); foreach (UOItem item in World.Player.Backpack.AllItems) { if (item.Graphic == 0x1843 && item.Color == keg.Color && item.Serial != keg.Serial) { item.Use(); break; } } UO.WaitTargetObject(keg); Journal.WaitForText("Prelil jsi 50 lektvaru"); UO.Wait(500); UO.DeleteJournal(); foreach (UOItem item in World.Player.Backpack.AllItems) { if (item.Graphic == 0x1843 && item.Color == keg.Color && item.Serial != keg.Serial) { item.Use(); break; } } UO.WaitTargetType(0x0F0E); Journal.WaitForText("in your pack"); UO.Wait(500); UO.DeleteJournal(); keg.Use(); UO.WaitTargetType(graphic, color); Journal.WaitForText("in your pack"); UO.Wait(500); } UO.Print("Uz nemas dost regu."); } } }
cucky píše:ahoj zkousel jsem script na michani potionu ale pri vyrobe ex tedy Explosion Potion micha Lesser Explosion Potion nevite v cem by mohl byt problem ? diky
:].Bizon píše:Díky, Dacalebe, za Tvoji práci. Me funguje bez problemu.
Raziel píše:,uklid
uklidí všechny možné nb itemy na kraj batohu at nepřekáží
,posun x y
přesune předmět na dané souřadnice
Kód: Vybrat vše
using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; namespace Phoenix.Scripts.Raziel { public class UpravaBaglu { private void NajdiAPresun(string text, Graphic g, UOColor c, Serial odkud, Serial kam, int x, int y) { UOItem item = UO.FindType(text, g, c, odkud); if (text=="spellbook") { foreach(UOItem itemB in World.Player.Backpack.AllItems) { if (itemB.Graphic == g) { item = itemB; break; } } } if (!item.Exist || (item.X==x && item.Y==y)) return; UO.Print("presouvam "+text); UO.MoveItem(item.Serial, 0, kam, (ushort)x, (ushort)y); UO.Wait(500); while (item.X != x && item.Y != y) UO.Wait(100); if (UO.InJournal("World save")) { UO.Wait(45000); UO.DeleteJournal(); } } [Command] public void uklid() { UO.DeleteJournal(); NajdiAPresun("runebook", 0x0FEF, 0x0482, Aliases.Backpack, UO.Backpack, 40, 10); NajdiAPresun("cestbook", 0x22C5, 0x0000, Aliases.Backpack, Aliases.Backpack, 40, 10); NajdiAPresun("nbkudla", 0x0F51, 0x0B80, Aliases.Backpack, UO.Backpack, 70, 10); NajdiAPresun("vampkudla", 0x10E4, 0x0B80, Aliases.Backpack, UO.Backpack, 70, 10); NajdiAPresun("travelbook", 0x0FF0, 0x08A5, Aliases.Backpack, UO.Backpack, 40, 20); NajdiAPresun("spellbook", 0x0EFA, 0x0413, Aliases.Backpack, UO.Backpack, 52, 10); NajdiAPresun("nbruna", 0x1F14, 0x0B1D, Aliases.Backpack, UO.Backpack, 50, 25); NajdiAPresun("mortar", 0x0E9B, 0x0B87, Aliases.Backpack, UO.Backpack, 60, 10); NajdiAPresun("petleash", 0x1374, 0x0B4C, Aliases.Backpack, UO.Backpack, 80, 10); NajdiAPresun("klicbezp", 0x1012, 0x0003, Aliases.Backpack, UO.Backpack, 90, 10); NajdiAPresun("keyring", 0x1769, 0x0000, Aliases.Backpack, UO.Backpack, 100, 10); NajdiAPresun("keyring2", 0x176A, 0x0000, Aliases.Backpack, UO.Backpack, 100, 10); NajdiAPresun("vendetta", 0x27AB, 0x0B4F, Aliases.Backpack, UO.Backpack, 110, 10); NajdiAPresun("vampkrystal", 0x1F19, 0x0000, Aliases.Backpack, UO.Backpack, 110, 10); NajdiAPresun("vampkrystalstone", 0x1F19, 0x0B87, Aliases.Backpack, UO.Backpack, 120, 10); } [Command] public void posun(ushort x, ushort y) { UO.Print("Co posunout?"); UOItem item = new UOItem(UIManager.TargetObject()); UO.MoveItem(item.Serial, 0, UO.Backpack, x, y); } } }
Kód: Vybrat vše
[Command]
public void blacksmithing()
{
UO.Print("Vyber bagl s ironem");
baglsurky = new UOItem(UIManager.TargetObject());
baglvyrobky = null;
while (((UO.FindType("iron", 0x1BEF, 0x0000, baglsurky.Serial).Amount > 2))
&& (World.Player.Skills["Blacksmithing"].RealValue < 1000))
{
vyrob(1, new Graphic(0x0F51), new UOColor(0x0000), new List<Surka>() { new Surka("",
new Graphic(0x1BEF), new UOColor(0x0000), 2) }, "Blacksmithing", "Iron Weapons",
"Iron Weapons", "Swords & Blades", "Iron Swords & Blades", "Dagger");
if (UO.Count(0x0F51, 0x0000) >= 10)
{
UO.UseType(0x0FB1, 0x0161);
UO.Wait(500);
}
}
UO.Print("Konec scriptu blacksmithing!");
}
Kód: Vybrat vše
static UOColor blank = new UOColor();
List<Graphic> coSbiratItem = new List<Graphic> { 0x1BD1/*peri*/, 0x0E76/*loot pytel*/, 0x0F3F/*arrow*/, 0x1F13/*sipy*/, 0x1BFB/*cro.bolt*/, 0x0E80/*SP*/, 0x1078/*dark hide*/, 0x0E21/*bandy*/, 0x0F0E/*bottle*/,0x0F8F/*Volcanic Ash*/, 0x0F7F/*Brimstone*/, 0x0F8B/*Pumice*/, 0x0F83/*Exe.Cap*/, 0x0F80/*Daemon Bones*/, 0x0F79/*Blackmoor*/, 0x0F7C/*Bloodspawn*/, 0x0F91/*Wyrm's Heart*/, 0x0F89/*Obsidian*/, 0x0F8E/*Serpent's Scales*/, 0x0F7D/*Daemon Blood*/, 0x0F7E/*Bones*/, 0x0F78/*Batwings*/, 0x0F87/*Eyes of Newt*/, 0x0E76/*a bag*/};
List<UOColor> coSbiratColor = new List<UOColor> { blank/*peri*/, 0x049A/*loot pytel*/, blank/*arrow*/, blank/*sipy*/, blank/*cro.bolt*/, blank/*SP*/, 0x0615/*dark hide*/, blank/*bandy*/, blank/*bottle*/, blank/*Volcanic Ash*/, blank/*Brimstone*/, blank/*Pumice*/, blank/*Exe.Cap*/, blank/*Daemon Bones*/, blank/*Blackmoor*/, blank/*Bloodspawn*/, blank/*Wyrm's Heart*/, blank/*Obsidian*/, blank/*Serpent's Scales*/, blank/*Daemon Blood*/, blank/*Bones*/, blank/*Batwings*/, blank/*Eyes of Newt*/, blank/*a bag*/};