Loot systém

Datum: 22/11/2014 23:47:50

Staženo: 1276x

Popis:

~BOT~ id: 286736282


Hodnocení: 4.0/10 (144 hlasy)

Download file:cs

Příkazy:

  • ,exec [blockmultipleexecutions ""loot""
  • ,exec loot

Kód:

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

namespace Scripts.DarkParadise
{
    public class Loot
    {
        public const ushort SpidersSilk = 0x0F8D;
        public const ushort Bag = 0x0E76;
        public const ushort Corpse = 0x2006;

        [Executable]
        [BlockMultipleExecutions("loot")]
        public void CutAll()
        {
            UOItem lHand = World.Player.Layers[Layer.LeftHand];
            UOItem rHand = World.Player.Layers[Layer.RightHand];

            UOItem cutter = World.Player.Backpack.AllItems.FindType(0x10E4,0x0B80);

            if (!cutter.Exist) {
                ScriptErrorException.Throw("Cannot find anything to cut with.");
                return;
            }

            foreach (UOItem item in World.Ground) {
                if (item.Graphic == Corpse) {
                    Notoriety notoriety = CorpsesNotoriety.Get(item, 5000);

                            item.WaitTarget();
                            cutter.Use();
                            UO.Wait(1000); // TODO
/*
                    switch (notoriety) {
                        case Notoriety.Unknown:
                            UO.PrintWarning("Unknown notoriety of {0}. Corpse skipped.", item);
                            break;

                        case Notoriety.Criminal:
                        case Notoriety.Murderer:
                        case Notoriety.Neutral:
                            item.WaitTarget();
                            cutter.Use();
                            UO.Wait(1000); // TODO
                            break;

                        default:
                            break;
                    }
*/
                }
            }

            lHand.Equip();
            rHand.Equip();
        }

        private struct ItemType
        {
            public ItemType(Graphic graphic, UOColor color)
            {
                Graphic = graphic;
                Color = color;
            }

            public Graphic Graphic;
            public UOColor Color;
        }

        private List<ItemType> lootTypes;

        public Loot()
        {
            lootTypes = new List<ItemType>();

            /*
            AddType(0x0F8D, UOColor.Invariant); // SS
            AddType(0x0EED, UOColor.Invariant); // Gold Coins
            AddType(0x0F7B, UOColor.Invariant); // BM
            AddType(0x0F7A, UOColor.Invariant); // BP
            AddType(0x0F84, UOColor.Invariant); // GA
            AddType(0x0F85, UOColor.Invariant); // GI
            AddType(0x0F86, UOColor.Invariant); // MR
            AddType(0x0F88, UOColor.Invariant); // NS
            AddType(0x0F8C, UOColor.Invariant); // SA
            AddType(0x0F79, UOColor.Invariant); // Blackmoor
            AddType(0x1bd1, UOColor.Invariant); // Peri
            AddType(0x0F78, UOColor.Invariant); // Batwings
            AddType(0x0F87, UOColor.Invariant); // Eyes of Newt
            AddType(0x14EB, UOColor.Invariant); // Treassure Map
             * */
            AddType(0x0E80, UOColor.Invariant); // Poklad
            AddType(0x0F3F, UOColor.Invariant); // Arrow
            AddType(0x1BFB, UOColor.Invariant); // Bolt
            AddType(0x0E76, UOColor.Invariant); // Pytlik
            AddType(0x097A, UOColor.Invariant); // Alligator Hide
            AddType(0x097B, UOColor.Invariant); // Snake skin
            AddType(0x097C, UOColor.Invariant); // nevim, treba dalsi trofej
            AddType(0x097D, UOColor.Invariant); // nevim, treba dalsi trofej
            AddType(0x097E, 0x0037); // a Wolf Pelt
            AddType(0x1bd1, UOColor.Invariant); // Peri
            /*
            AddType(0x0E34, UOColor.Invariant); // Blank Scroll
            AddType(0x0F20, UOColor.Invariant); // Tourmaline
            AddType(0x0F8E, UOColor.Invariant); // Serpent Scales
            AddType(0x0F79, UOColor.Invariant); // Blackmoor
            AddType(0x0F91, UOColor.Invariant); // Wyrms Heart
            AddType(0x0F83, UOColor.Invariant); // Executioner's Cap
            AddType(0x108A, UOColor.Invariant); // Ring
            AddType(0x1086, UOColor.Invariant); // Bracelet
            AddType(0x1088, UOColor.Invariant); // Neclase
            AddType(0x1848, UOColor.Invariant); // Elixir
            AddType(0x0F7E, UOColor.Invariant); // 
            AddType(0x139A, UOColor.Invariant); // Statue
            AddType(0x0F82, UOColor.Invariant); // 
            AddType(0x0F7D, UOColor.Invariant); // 
            AddType(0x0E9C, UOColor.Invariant); // Drums
            AddType(0x0EB2, UOColor.Invariant); // Harp
            AddType(0x0EB2, UOColor.Invariant); // Lute
            AddType(0x14ED, UOColor.Invariant); // Deed 1
            AddType(0x14EE, UOColor.Invariant); // Deed 2
            AddType(0x0F7F, UOColor.Invariant); // 
            AddType(0x0F7C, UOColor.Invariant); // 
            AddType(0x0F79, UOColor.Invariant); // 
            AddType(0x0F89, UOColor.Invariant); // 
            AddType(0x0F81, UOColor.Invariant); // 
            AddType(0x0FF4, UOColor.Invariant); // knihy
            AddType(0x136C, UOColor.Invariant); // HoDF, Myst. Stone
            // AddType(0x1F13, UOColor.Invariant); // skillpointy
            AddType(0x0F8F, UOColor.Invariant); // 
            AddType(0x0F8B, UOColor.Invariant); //

            AddType(0x1406, 0x031E); // a Stunning Warmace
            AddType(0x0D16, 0x00A3); // a Mystical Mushroom
            AddType(0x0DBD, 0x0B9F); // a Mystical Leaf
            AddType(0x1A9D, 0x0481); // a Mystical Stick
            AddType(0x0F5A, 0x0044); // a Mystic Crystal
            AddType(0x0E73, 0x0B9F); // a Mystical Ball
            AddType(0x0E26, 0x049D); // a Spirit of the Rain
            AddType(0x0F91, 0x014D); // Heart of Rainbow Dragon
            AddType(0x1420, 0x0152); // Cobwebby string
            AddType(0x097E, 0x0037); // a Wolf Pelt
            AddType(0x0CB0, 0x0899); // a Mystical Plant
            AddType(0x0DC3, 0x005B); // a Mystical Flower
            AddType(0x1F03, 0x0771); // Mage's robe
            AddType(0x1F03, 0x0455); // Death's robe, pozor, bere to i obyc roby
            AddType(0x13B9, 0x0480); // Ice Viking Sword
            AddType(0x09D0, 0x09B4); // God's Apple
            AddType(0x13FC, 0x0237); // Elven Heavy Crossbow
            AddType(0x379F, 0x0055); // Elfi tetiva
            AddType(0x108B, 0x0BB5); // a Mystical Beeds
            AddType(0x0DC3, 0x005B); // a Mystical Flower
             * */
        }

        public void AddType(Graphic graphic, UOColor color)
        {
            lootTypes.Add(new ItemType(graphic, color));
        }

        [Executable("loot")]
        [BlockMultipleExecutions("loot")]
        public void Run()
        {
            if (!Aliases.RecevingContainer.IsValid) {
                ScriptErrorException.Throw("RecevingContainer not set.");
            }

            ScriptErrorException.ExceptionEnabled = false;
            World.FindDistance = 6;

            UO.PrintInformation("Loot started");
            CutAll();
            UIManager.Reset();
            LootCollection(World.Ground, true);

            UO.PrintInformation("Loot finished");
        }

        private bool CheckCorpse(UOItem item)
        {
            //                                         male    female  imp     garga
            //ushort[] forbiddenCorpses = new ushort[] { 0x0190, 0x0191, 0x0027, 0x0004 };
            // return Array.IndexOf<ushort>(forbiddenCorpses, item.Amount) < 0;

            Notoriety n = CorpsesNotoriety.Get(item, 2000);
            return n != Notoriety.Innocent && n != Notoriety.Guild && n != Notoriety.Unknown;
        }

        private void LootCollection(ItemsCollection collection, bool ignoreSingleSS)
        {
            foreach (UOItem item in collection) {
                /*
                if (item.Graphic == Bag) {
                    using (ItemOpenedEventWaiter ew = new ItemOpenedEventWaiter(item)) {
                        if (!item.Opened) {
                            item.Use();
                            if (ew.Wait(2000))
                                UO.Wait(500);
                        }
                    }

                    UO.EmptyContainer(1000, item);
                }
                else */
                if (item.Graphic == Corpse) {
                    if (CheckCorpse(item)) {
                        if (!item.Opened) {
                            item.Use();
                            UO.Wait(1000);
                        }

                        LootCollection(item.Items, false);
                    }
                }
                else if (ignoreSingleSS && item.Graphic == SpidersSilk && item.Color == 0 && item.Amount < 2) {
                    continue;
                }
                else if (lootTypes.Contains(new ItemType(item.Graphic, item.Color))) {
                    bool ground = item.Container == 0;
                    int pause = ground ? 250 : 2000;

                    using (ItemUpdateEventWaiter ew = new ItemUpdateEventWaiter(item)) {
                        Journal.Clear();
                        if (item.Grab() && ew.Wait(3000)) {
                            UO.Wait(pause);

                            if (!ground) {
                                Journal.WaitForText(true, 2000, "akce skoncila");
                            }
                        }
                    }

                    UO.Wait(50);
                }
            }
        }
    }
}

Strana: 1,2,3,4,5,6,7,8,9,10,11... 33
ทดลองเล่นสล็อตโรม่า
24 Apr 2026

PG SLOT GAME is suitable for players who enjoy simple slots, beautiful graphics, and a wide game selection. Both beginners and regular players can find games that match their style. ทดลองเล่นสล็อตโรม่า

naga game สมัคร
24 Apr 2026

PG SLOT GAME stands out for its mobile-friendly design, colorful graphics, memorable themes, and many popular titles. This makes it a preferred provider for many players. naga game สมัคร

inferno mayhem ทดลองเล่น
24 Apr 2026

Players should choose PG games that match their budget. If the budget is small, starting with low-bet games and trying demo mode first can be a smart choice. inferno mayhem ทดลองเล่น

ทดลองบาคาร่าฟรี
24 Apr 2026

Many PG games include bonus features such as Wilds, Scatters, free spins, and multipliers. These features make the gameplay more exciting and enjoyable. ทดลองบาคาร่าฟรี

nine play slot
24 Apr 2026

PG SLOT works well on mobile devices, including Android and iOS. Players can access games through a browser easily, with responsive visuals and simple controls. nine play slot

ทดลองปั่น
24 Apr 2026

Popular PG games such as Fortune Tiger, Fortune Rabbit, Mahjong Ways, and Lucky Neko are well known for their simple gameplay, interesting themes, and easy-to-understand features. ทดลองปั่น

แจกเครดิตฟรี
24 Apr 2026

The highlights of PG slot games include various themes, sharp graphics, smooth mobile play, and exciting bonus features such as free spins, multipliers, and special symbols. แจกเครดิตฟรี

tga69
24 Apr 2026

Most PG slot games are easy to understand, offer flexible betting options, and provide clear paytables. This makes them suitable for beginners who want to start with confidence. tga69

https://ezslot22.app/
24 Apr 2026

Trying PG demo slots helps players understand the game system, bonus features, and gameplay rhythm before real play. It is a good option for learning without using real money. https://ezslot22.app/

member tgabet
24 Apr 2026

PG SLOT GAME is popular for its attractive graphics, simple gameplay, and wide variety of themes. It is suitable for both beginners and general players who enjoy easy entertainment. member tgabet

22bunny
22 Apr 2026

เว็บตรงเล่นสล็อตฟรี พร้อมทั้งเตรียมตัวเข้าสู่โลกแห่งความลึกลับกับเกมสล็อต เว็บทดลองเล่นสล็อต เล่นสล็อตpg ทดลองเล่นสล็อต สล็อตเครดิตฟรี

22bunny
22 Apr 2026

ทดลองเล่นสล็อต PG เล่นฟรีทุกค่าย เกมใหม่ล่าสุดส่งตรง มีเกมมากกว่า 1,000 เกม สามารถเล่นได้แล้วที่นี่ ขอชื่อเกม

22bunny
22 Apr 2026

22bunny เว็บที่มีการรองรับระบบทดลองเล่นฟรีสำหรับเกมสล็อตยอดนิยม เว็บสล็อตออนไลน์ ที่ดีที่สุดในไทย 2026

https://nagagame89.com/ทดลองเล่นสล็อต/
27 Feb 2026

https://nagagame89.com/ทดลองเล่นสล็อต/ การเล่นอย่างมีสติและวางแผนทุนยังคงเป็นวิธีที่ดีที่สุด หากเข้าใจธรรมชาติของสล็อตอย่างถูกต้อง ผู้เล่นจะสามารถเลือกเกมที่เหมาะกับสไตล์ตัวเองและมีโอกาสทำกำไรได้มากขึ้น

ambslot
27 Feb 2026

ambslot การเลือกเกมอย่างมีข้อมูลจะช่วยลดความเสี่ยงระยะยาว หากผู้เล่นใช้ RTP ร่วมกับการบริหารเงินทุนอย่างเหมาะสม ก็จะเพิ่มโอกาสทำกำไรจากเกมสล็อตได้อย่างมีประสิทธิภาพมากขึ้น

https://naga-slot.net/
27 Feb 2026

https://naga-slot.net/ เกมสล็อตออนไลน์ได้รับความนิยมในไทยเพิ่มขึ้นทุกปี เนื่องจากมีข้อดีหลายด้านที่ตอบโจทย์ผู้เล่นยุคดิจิทัล เกมมีรูปแบบเข้าใจง่าย มือใหม่ก็เริ่มเล่นได้ทันทีโดยไม่ต้องมีประสบการณ์มาก

https://volto59.io/
27 Feb 2026

https://volto59.io/ มือใหม่ก็เริ่มเล่นได้ทันทีโดยไม่ต้องมีประสบการณ์มาก กราฟิกของสล็อตสมัยใหม่มีความสวยงามและมีธีมให้เลือกหลากหลาย ระบบโบนัสช่วยเพิ่มความตื่นเต้นและโอกาสรับเงินรางวัล

https://nineslot.info/
27 Feb 2026

https://nineslot.info/ เป็นคำที่ผู้เล่นมักค้นหาเมื่ออยากเพิ่มโอกาสชนะ ความจริงแล้วสล็อตทุกเกมใช้ระบบสุ่ม RNG ที่ยุติธรรม อย่างไรก็ตาม บางเกมถูกออกแบบให้มีความผันผวนต่ำและโบนัสออกบ่อย

ทดลองเล่นสล็อต
27 Feb 2026

ทดลองเล่นสล็อต ที่ผู้เล่นไม่ควรมองข้าม เพราะช่วยให้เข้าใจรูปแบบเกมโดยไม่ต้องเสี่ยงใช้เงินจริง โหมดทดลองเล่นหรือสล็อตเดโมเปิดโอกาสให้ผู้เล่นได้เรียนรู้กติกา สัญลักษณ์พิเศษ และระบบโบนัสของเกมอย่างครบถ้วน

เครดิตฟรี
27 Feb 2026

เครดิตฟรี ปัจจุบันเว็บสล็อตยังมีโปรโมชั่นมากมาย เช่น โบนัสต้อนรับ เครดิตฟรี และคืนยอดเสีย ทำให้ผู้เล่นใหม่เริ่มต้นได้ง่ายขึ้น ผู้เล่นจะได้รับทั้งความบันเทิงและโอกาสสร้างรายได้เสริมอย่างต่อเนื่อง

Strana: 1,2,3,4,5,6,7,8,9,10,11... 33

Nový komentář