,exec poponaseni
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;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Diagnostics;
namespace Scripts.DarkParadise
{
public class Poponaseni
{
[Executable]
public void poponaseni()
{
float x = 0;
float y = 0;
float z = 0;
int check = 0;
UO.Print("Zamer item/y");
UOItem bag = new UOItem(UIManager.TargetObject());
UO.Wait(200);
UO.Print(0x0862,"Zamereno! Muzes bezet!");
Graphic itemtype = bag.Graphic;
UOColor itemcolor = bag.Color;
while (!World.Player.Dead)
{
if (check == 0) {
x = World.Player.X;
y = World.Player.Y;
z = World.Player.Z;
}
UO.Wait(500); //vysoce nedoporucuji davat mensi jak 400! I 500 je limit DP pro scripty! mensi hodnoty na vlastni zodpovednost!
if (World.Player.X != x || World.Player.Y != y || World.Player.Z != z )
{
x = World.Player.X;
y = World.Player.Y;
z = World.Player.Z;
check = 1;
UOItem sa = World.Ground.FindType(itemtype,itemcolor);
if(sa.Exist)
{
UO.MoveItem(sa.Serial,0, World.Player.X, World.Player.Y, World.Player.Z);
} else {
UO.Print(0x0862,"Jsi moc daleko, nebo item zmizel!");
return;
}
}
}
}
}
}