Hlídaní - Containeru

Datum: 22/11/2014 23:49:59

Staženo: 337x

Popis:


Hodnocení: 3.5/10 (104 hlasy)

Download file:cs

Příkazy:

  • ,exec hlidej

Kód:

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts
{
    public class hlidac
    {
      UOItem tamburinaContainer = new UOItem(0x401682BF);
        [Executable]
        public void Hlidej()
        {
            //UO.PrintObject(World.Player.Serial, "Zamer container na hlidani");
            //UOItem checkContainer = World.GetItem(UIManager.TargetObject());;
            tamburyny(tamburinaContainer);
        }    
            
            
            public void tamburyny(UOItem container)
            {
            
              while (!World.Player.Dead)
                {
                  UO.Wait(5000);
              
                 if (!container.Opened)
                 {
                   using (ItemOpenedEventWaiter ew = new ItemOpenedEventWaiter(container.Serial))
                   {
			               container.Use();
                    if (!ew.Wait(60000))
                    {
                        UO.PrintWarning("Item open timeout");
                        return;
                    }
                   }
                 }
                    if ((container.AllItems.Count(0x0E9D) > 250))
                      {
                        System.Media.SoundPlayer sound = new System.Media.SoundPlayer("c:windowsmediaWindows XP - dokončení tisku.wav");
                        sound.PlaySync();
                       UO.Say(",terminateall");
                      }
              
                }
             }   
                        
    }         
}        

Zde ještě není žádný komentář.

Nový komentář