Potiont Manager
Datum: 22/11/2014 23:32:28
Staženo: 300x
Popis:
Nalejvani a sosani
Příkazy:
- ,fill "int count"
- ,fill "string type" " int count"
- ,use "string type"
Kód:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Phoenix; using Phoenix.WorldData; namespace Scripts { public class PotionManager { public struct PotionInfo { public string name; public ushort cPotion; public ushort tPotion; public ushort cKeg; public PotionInfo(string name, ushort cPotion, ushort tPotion, ushort cKeg) { this.name = name; this.cPotion = cPotion; this.tPotion = tPotion; this.cKeg = cKeg; } } public const ushort EmptyBottle = 0x0F0E; public const ushort Keg = 0x1843; private static Dictionary<string, PotionInfo> potions = new Dictionary<string, PotionInfo>(); public PotionManager() { potions.Add("tmr", new PotionInfo("Total Mana Refresh", 0x0003, 0x0F09, 0x0003)); potions.Add("gh", new PotionInfo("Greater Heal", 0x0000, 0x0F0C, 0x08A7)); potions.Add("gs", new PotionInfo("Greater Strength", 0x0000, 0x0F09, 0x0481)); potions.Add("tr", new PotionInfo("Total Refresh", 0x0000, 0x0F0B, 0x014D)); potions.Add("gc", new PotionInfo("Greater Cure", 0x0000, 0x0F07, 0x0842)); potions.Add("shrink", new PotionInfo("Shrink", 0x045E, 0x0F09, 0x0724)); potions.Add("invis", new PotionInfo("Invisibility", 0x0B77, 0x0F09, 0x0B77)); potions.Add("lb", new PotionInfo("Lava Bomb", 0x000E, 0x0F0D, 0x000E)); potions.Add("gb", new PotionInfo("Greater Blood", 0x0025, 0x0F0C, 0x0025)); potions.Add("lp", new PotionInfo("Lesser Poison", 0x0000, 0x0F0A, 0x089F)); } [Command("use")] public void UsePotion(string type) { type = type.ToLower(); if (!potions.ContainsKey(type)) throw new ScriptErrorException("Neznamy typ potionu."); Journal.Clear(); if (UO.Count(potions[type].tPotion, potions[type].cPotion) != 0 || UO.Count(Keg, potions[type].cKeg) != 0) { if (UO.Count(potions[type].tPotion, potions[type].cPotion) > 0) UO.UseType(potions[type].tPotion, potions[type].cPotion); else if (UO.Count(EmptyBottle, 0x0000) > 0 && UO.Count(Keg, potions[type].cKeg) > 0) { UO.Warmode(false); UO.WaitTargetType(EmptyBottle, 0x0000); UO.UseType(Keg, potions[type].cKeg); Journal.WaitForText("You put the {0} Potion in your pack.", potions[type].name); UO.UseType(potions[type].tPotion, potions[type].cPotion); } else throw new ScriptErrorException("Nemas prazdne lahvicky!"); UO.Wait(1000); if (Journal.Contains("You can't drink another potion yet")) return; UO.Print("{0} : {1}.", potions[type].name, UO.Count(potions[type].tPotion, potions[type].cPotion)); ; UO.Wait(14000); UO.Print("JESTE 5 SUKUND."); UO.Wait(5000); UO.Print("UZ MUZES DALSIHO LAHVACE"); } else UO.Print("Nemas {0} potion!", potions[type].name); } [Command] public void Fill(int count) { Fill(UIManager.TargetObject(), count); } [Command] public void Fill(string type, int count) { if (!potions.ContainsKey(type)) throw new ScriptErrorException("Neznamy typ potionu."); if (World.Player.Backpack.AllItems.Count(Keg, potions[type].cKeg) > 0) { Serial keg = World.Player.Backpack.AllItems.FindType(Keg, potions[type].cKeg).Serial; Fill(keg, count); } else UO.Print("Nemas kad."); } private void Fill(Serial keg, int count) { for (int i = 0; i < count; i++) { Journal.Clear(); if (UO.Count(EmptyBottle, 0x0000) == 0) throw new ScriptErrorException("Nemas prazdne lahvicky!"); else { UO.Warmode(false); UO.WaitTargetType(EmptyBottle, 0x0000); UO.UseObject(keg); Journal.WaitForText("You put"); UO.Wait(500); } } UO.Print("Done!"); } #region - Properties - public static Dictionary<string, PotionInfo> Potions { get { return potions; } } #endregion } }
cc20181108
timberland boots outlet
gucci outlet
ralph lauren sale clearance
kate spade handbag
christian louboutin shoes
kate spade outlet
kevin durant shoes
louis vuitton
cheap jordans free shipping
coach outlet store
coach outlet
air more uptempo
ysl handbags
canada goose outlet
birkenstock shoes
mont blanc pens
uggs canada
canada goose jackets
cheap jordans for sale
adidas outlet
fendi handbags
jimmy choo outlet
true religion outlet online
kate spade handbags
michael kors handbags
pandora jewelry
replica watches
asics outlet
nike air max
kate spade outlet store
coach factory outlet
adidas shoes
nike zoom
canada goose outlet
tory burch outlet
canada goose outlet
moncler jackets
discount oakley sunglasses
ray ban sunglasses discount
cincinnati reds jerseys
toms outlet
canada goose outlet
pandora jewelry
michael kors outlet
seattle mariners jerseys
pandora charms
hermes handbags
birkenstock outlet
coach outlet store
coach outlet
kansas city royals jerseys
ugg australia
fitflops sale clearance
birkenstock sandals
kobe shoes
uggs outlet
polo outlet
salvatore ferragamo
pandora jewelry
timberland boots
coach factorty outlet
pandora charms
nike cortez
red bottom shoes
fitflops
yeezy boost 350
ugg outlet
polo outlet
coach handbags
pandora charms
canada goose jackets
kate spade outlet
ralph lauren sale
uggs
uggs
birkenstock sandals
air jordans
fitflops
canada goose outlet
pandora jewelry
louis vuitton outlet
air max 2017
tory burch outlet
polo ralph lauren outlet online
underarmour shoes
swarovski outlet
florida marlins jerseys
nike outlet online
nike dunks
adidas stan smith
cheap jordan shoes
uggs outlet
fitflops sale clearance
canada goose sale
michael kors outlet clearance
adidas nmd
houston astros jerseys
kate spade outlet
uggs canada
dr martens boots
pandora jewelry official site
north face jackets
tampa bay devil rays jerseys
coach outlet
oakley sunglasses
fitflops sale
ray ban sunglasses
nike shoes for men
pandora charms sale clearance
los angeles angels jerseys
pandora charms
converse shoes
pandora outlet
coach factory outlet online
ecco shoes for men
coach outlet
coach factory outlet
moncler jackets
rolex watches
ugg outlet store
ysl outlet
coach factory outlet
kate spade
pandora jewelry outlet