Loot systém

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

Staženo: 1226x

Popis:

~BOT~ id: 286736282


Hodnocení: 3.9/10 (141 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... 30
09 Jan 2026

Online slots are immensely popular casino games due to their convenience of playing over the internet. They come with various styles and intriguing features such as jackpot prizes, bonuses, high rewards, game selection diversity, and beautiful graphics. However, playing online slots may have financial risks, so it's advisable to play cautiously and responsibly. tgabet

stitch
14 Dec 2025

เว็บสล็อตออนไลน์ เว็บไซต์ที่มีโปรโมชั่นต้อนรับสมาชิกใหม่ สมัครเข้าเกมสล็อตฟรีไม่มีขั้นต่ำ ฝากถอนได้ไม่อั้น รองรับระบบอัตโนมัติ Slot Auto Wallet ลงเดิมพันขั้นต่ำ 1 บาท ถอนได้จริง นากาเกม89

stitch
14 Dec 2025

สล็อตpgแท้ เว็บไซต์ที่มีเกม สล็อตค่ายpg แจกโบนัสมากที่สุด พร้อม รวมเกมสล็อตแตกง่าย แตกบ่อย แจกโบนัสให้ไม่อั้น สมาชิกใหม่รับเครดิตฟรี สมัครฟรี ไม่เสียค่าสมัคร พร้อมเข้าถึง เกมสล็อตค่าย pg แตกหนัก พร้อมสร้างรายได้หลักแสน หลักล้าน https://amb-slot.app/

stitch
14 Dec 2025

เว็บสล็อตที่ดีที่สุด คนเข้าเล่นเยอะที่สุด พร้อมแนะนำ ค่ายเกมสล็อตทั้งหมด เว็บตรงระดับโลก ที่รวมเกมสล็อตค่ายใหญ่เว็บตรง ส่งตรงจาก คาสิโนต่างประเทศ ซึ่งมีเกมสล็อตจากค่ายต่างให้เลือกเล่นสูงถึง 20 ค่าย มากกว่า 10,000 เกม ทดลองเล่นสล็อต

stitch
14 Dec 2025

pg slot เว็บตรงไม่ผ่านเอเย่นต์ ล่าสุด เว็บรวมเกมสล็อตค่าย pg ใหม่ล่าสุด พร้อมอัปเดตเกมสล็อตใหม่มาแรง เข้าเล่นได้ไม่อั้น ผู้เล่นใหม่สามารถเข้าเล่น เกมสล็อตpg มีเกมให้เลือกเล่นมากกว่า 1,000 เกม พร้อมแจกโบนัสฟรี ไม่มีขั้นต่ำ ทดลองเล่นยิงปลาฟรี ทุกค่าย

stitch
14 Dec 2025

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

stitch
14 Dec 2025

สมัครใหมรับโบนัสฟรี โปรโมชั่นเข้าเล่น เกมสล็อตทุกค่าย รวมเว็บสล็อตแจกเครดิตฟรี เข้าเล่นได้ผ่านเว็บสล็อตอันดับ1 เว็บตรงไม่ผ่านเอเย่นต์ ทุนน้อยก็เล่นได้ สมัครเข้าเล่นเกมสล็อต ฝาก50รับ100 ถอนได้ไม่มีขั้นต่ำ ทดลองเล่นpg

stitch
14 Dec 2025

โบนัส แจกทุนเล่นสล็อตฟรี มาพร้อมทางเข้า เว็บสล็อตที่ดีที่สุด แจกเครดิต 100 เล่นเกมสล็อตทุกค่าย สมาชิกใหม่เข้าไป ทดลองเล่นสล็อตฟรีทุกค่าย เล่นได้รับทุนฟรี แจกเครดิตฟรี ไม่ต้องฝาก ไม่ต้องแชร์ รองรับการเข้าเล่นมือถือ ตั้งแต่เครือข่าย 3G ขึ้นไป ทั้ง IOS และ Android pglucky

stitch
14 Dec 2025

โปรโมชั่นสล็อต แจกเครดิตฟรี 50 ไม่ต้องแชร์ เปิดทางเข้า ทดลองเล่นสล็อตฟรี ไม่ต้องสมัคร เล่นได้รับโบนัสแจกให้ไม่อั้น สมาชิกใหม่สามารถเข้าทำเงินจากการเล่นสล็อตได้จริง โปรสล็อตทดลองเล่นเกมสล็อตฟรีทุกค่าย รองรับความต้องการของนักเล่นสล็อตออนไลน์ทุกท่าน tga69 สล็อต

stitch
14 Dec 2025

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

stitch
14 Dec 2025

สล็อต เว็บตรง ไม่ผ่านเอเย่นต์ แจกเครดิตเล่นสล็อตฟรีทุกค่าย ทุกเกม เล่นได้รับโบนัสจัดเต็ม สมัครใหม่รับโบนัสฟรี 100% เข้าเดิมพันออนไลน์ สล็อตเว็บตรงขั้นต่ำ 1 บาท ถอนได้จริง tga89

นากาเกม89
11 Dec 2025

นากาเกม89 สัมผัสกับความสนุกครั้งใหม่ กับเว็บสล็อตออนไลน์ NagaGames 89 สล็อตนากาเกม89 ระบบใหม่ทันสมัย ฝาก-ถอน เร็วทันใจ AUTO รวมค่ายเกมสล็อตชั้นนำมากกว่า 20 ค่ายเกม ให้เลือกเล่นได้อย่างจุใจ พิเศษสุดกว่าใคร

https://amb-slot.app/
11 Dec 2025

https://amb-slot.app/ สล็อต AMB SUPERSLOT เว็บให้บริการเกมสล็อต สล็อตออนไลน์ คาสิโนออนไลน์ เกมยิงปลา ครบทุกค่ายสล็อต ใหม่รวมเกมสล็อตไว้ในเว็บเดียว! เว็บ slot เล่นเกมสล็อตออนไลน์ อันดับ 1 ในประเทศไทย 2024 ระบบทันสมัย ฝาก-ถอน อัตโนมัติ (AUTO)

ทดลองเล่นสล็อต
11 Dec 2025

ทดลองเล่นสล็อต Landslot เว็บสล็อตออนไลน์ ทดลองเล่นสล็อต เว็บเปิดใหม่ล่าสุด 2023 รวม Demo slot ทดลองเล่น เกมสล็อตออนไลน์ทั้งหมด ทดลองเล่นไว้ทั้งหมดที่นี่ ท่านจะเพลิดเพลินกับเกมสล็อต มาตราฐานระดับสากล

ทดลองเล่นยิงปลาฟรี ทุกค่าย
11 Dec 2025

ทดลองเล่นยิงปลาฟรี ทุกค่าย เกมสล็อตตกปลาใหม่ล่าสุด เกมตกปลาออนไลน์ที่จะพาคุณเข้าสู่ใต้ทะเลลึกไปพบกับการล่าปลาชนิดต่างๆมากมายที่จะทำให้คุณรวย เกมยิงปลาแตกง่าย ปลาตายไวที่สุดสามารถเบทขั้นต่ำได้ตั้งแต่ 0.01เป็นต้นไป เล่นได้แล้วที่นี่ PG SLOT

volto slot
11 Dec 2025

volto slot ทางเข้าเล่นเว็บสล็อตออนไลน์ VOLTO89 เว็บตรง ไม่ผ่านเอเย่นต์ เว็บน้องใหม่มาแรง ที่พร้อมให้บริการ เกมสล็อตรวมค่าย พร้อมนำพาผู้เล่นสล็อตเข้าสู่เกมเดิมพันออนไลน์ VOLTO89 ที่สร้างโอกาสจากการเล่นสล็อตได้เงินจริง

ทดลองเล่นpg
11 Dec 2025

ทดลองเล่นpg ทดลองเล่นสล็อต PG SLOT เกมสล็อตออนไลน์เล่นฟรี ทุกค่าย 2023 สล็อตpgทดลองเล่น ไม่ต้องสมัครก็เล่นได้ ทุกเกมจากทุกค่าย ไม่ว่าจะเป็น PG SLOT และ อื่น ๆ อีกเพียบ อัพเดทเกมสล็อตใหม่ทุกวัน สล็อตทดลองเล่นใหม่ล่าสุด

pglucky
11 Dec 2025

pglucky ทดลองเล่นสล็อต Pg Slot เว็บตรง สล็อตที่คุณไม่ควรพลาด PG SLOT ได้รับความนิยมอย่างสูง ค่ายเกมที่ได้รับรางวัลและเป็นค่ายเกมยอดนิยมสูงจากผู้เล่นทั่วโลก เกมสล็ตแตกง่ายทำให้ผู้เล่นมีโอกาสได้รับรางวัลใหญ่ได้ง่ายขึ้น

tga69 สล็อต
11 Dec 2025

tga69 สล็อต TGA BET เปิดระบบใหม่ล่าสุด ที่อัพเดทระบบฝาก-ถอนไวที่สุดในตอนนี้ tgabet 69 สมัครฟรี พร้อมให้คุณสัมผัสประสบการณ์การเดิมพัน ที่ครบวงจรผ่านระบบ 1 User เล่นได้ทุกเกม ไม่ว่าจะเป็นเกมสล็อตจากค่าย pg slot รวมถึง เกมจากค่ายชั้นนำอื่น ๆ กว่า 1,000 เกม ศูนย์รวมเกมสล็อตออนไลน์บนมือถือ ที่ดีที่สุดในปี 2025

ทดลองเล่นสล็อตฟรี
11 Dec 2025

ทดลองเล่นสล็อตฟรี ทดลองเล่นสล็อต เกมใหม่มาแรง2024 เว็บทดลองเล่นสล็อตฟรี รวมค่ายเว็บดังยอดนิยม อีซี่สล็อต22 พร้อมอัพเดทตลอดเกมใหม่ล่าสุดทุกวัน ไม่มีพลาด ไม่ว่าจะเป็น เกมล่าสุดของค่าย PGสล็อต ทางทีมงานเว็บไซค์ ezslot22 ได้รวบรวมเกมสล็อตแตกง่าย มาไว้ให้สมาชิกทุกท่านได้วางเดิมพันกันทั้งหมดแล้ว

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

Nový komentář