CastScroll
Datum: 27/07/2011 14:18:14
Staženo: 670x
Popis:
Svítek
CastScroll "0x1F49" "0x0000" "self" "IVM Svitek na Sebe"
a podobně
CastScroll "0x1F49" "0x0000" "IVM Svitek Target"
Příkazy:
- ,castscroll "graphic graphic" " uocolor color" " string name"
- ,castscroll "graphic graphic" " uocolor color" " serial target" " string name"
Kód:
using Phoenix.WorldData;
namespace Phoenix.Plugins
{
public static partial class Commands
{
[Command("CastScroll")]
public static void CastScroll(Graphic graphic, UOColor color, string name) { CastScroll(graphic, color, UIManager.TargetObject(), name); }
[Command("CastScroll")]
public static void CastScroll(Graphic graphic, UOColor color, Serial target, string name)
{
UO.Print(0x008F,"Svitek " + name + "");
UOItem scroll = World.Player.Backpack.AllItems.FindType(graphic, color);
if (!scroll.Exist)
ScriptErrorException.Throw("Scroll not found");
UOCharacter ch = World.GetCharacter(target);
if (ch.Exist && ch.Distance <= 18)
ch.WaitTarget();
scroll.Use();
}
}
}

