Loot systém

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

Staženo: 1128x

Popis:

~BOT~ id: 286736282


Hodnocení: 3.6/10 (102 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: 1d,14,15,16,17,18,19,20,21,22,23,24... 26
สล็อต
29 Jan 2023

เว็บที่ได้รวบรวมเกมดังๆ จากหลายค่าย มาไว้ที่นี่ที่เดียว สล็อตเว็บตรง ไม่ผ่านเอเย่นต์ รวมความสนุกมาไว้ มีเกมสล็อตทั้งหมด มีมากกว่า 1000 เกม. เว็บสล็อตที่คนเล่นเยอะที่สุด สามารถทดลองเล่นสล็อตออนไลน์ฟรี ฝาก-ถอน ผ่านระบบอัตโนมัติ เริ่มต้นฝากได้ที่ 1 บาท

สล็อต
29 Jan 2023

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

สล็อต
29 Jan 2023

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

สล็อต
29 Jan 2023

เว็บสล็อตแตกง่ายที่สุดที่เคยเล่นมา แจกรางวัลจัดหนักจัดเต็ม พร้อมระบบฝาก-ถอน ออโต้ ที่สะดวก สบาย เติมเงินผ่านทรูวอลเล็ท แบบไม่มีขั้นต่ำ ค่าเบทเริ่มต้นที่ 1 บาท เงินทุนหลักหน่วยกำไรหลักหมื่น . เกมสล็อตออนไลน์ โปรโมชั่นสำหรับมือใหม่นั้นถือว่าเป็นโปรที่คุ้มค่าสุดๆ เกมดังหลายค่ายรวมอยู่ที่นี่แล้ว มีมากกว่า 1000 เกมให้เลือกเล่น

สล็อต
29 Jan 2023

เกมสล็อตเล่นง่าย จ่ายจริง ได้เงินเร็ว ได้อยู่ที่เว็บนี้ทั้งหมด เกมฮิตจากค่ายดัง เกมสล็อตแตกง่าย โบนัสคอมโบ สามารถซื้อฟรีสปินได้ทุกเกม เว็บบริการสล็อต ครบวงจร จบในเว็บเดียว. รวม mega game มีพนักงานบริการตลอด 24 ชั่วโมง พร้อมตอบทุกคำถาม สล็อตเว็บตรงไม่ผ่านนายหน้า ลงทุนน้อยกำไรสูง

สล็อต
29 Jan 2023

เว็บสล็อตยอดนิยมอันดับ 1 เล่นง่ายได้เงินจริง ถอนได้ไม่อั้น เป็นเว็บที่ได้รับความนิยมเป็นอย่างมาก รวมค่ายเกมทุกค่ายดัง เกมมากกว่า 1000 เกม pg slot มาใหม่ นอกจากจะให้ความบันเทิง ยังสามารถ หารายได้จาก slot onlone ได้ทุกวัน

สล็อต
29 Jan 2023

เว็บ slot online ที่จะทำให้คุณรวย มั่งคั่ง มั่งมี มีเงินเต็มกระเป๋า เว็บสุดฮิต ที่ได้รับการรีวิวมากที่สุด ว่าทำเงินได้จริง แจ็คพอตแตกบ่อย ทดลองสล็อต โบนัสเพียบ พีจี สล็อต เป็นเว็บสล็อต ค่ายเกมดัง ที่มาแรงที่สุดในปีนี้เลย ขอแนะนำ ชี้ทางรวย

สล็อต
29 Jan 2023

สล็อตออนไลน์ เว็บใหญ่ที่สุด เล่นง่ายที่สุด คนเข้าเล่นมากที่สุด เว็บคาสิโนยอกฮิต ที่มีกระแสตอบรับดี pg slot เว็บสล็อตไทย ที่คนไทยเลือกเล่นเยอะมาก pg slot mega game มีเกมน่าเล่นมากมาย ให้ทุกคนได้เลือกเล่น ผู้เขียนได้เข้าไปเล่นมาแล้ว รับรองทำเงินได้มหาศาล

สล็อต
29 Jan 2023

ไม่ต้องมองไปไกล หากจะเล่นสล็อต ออนไลน์ พีจี สล็อต เป็นเว็บที่จะพาคุณไปท่องโลก slot มีแต่ความสนุก สนาน บันเทิง เริงใจ โปรโมชั่น100% เข้าไปทำเงินกับ เว็บสล็อตน่าเล่น ไม่ต้องไปถึงคาสิโน ก้สามารถเล่นได้ ได้เงินไว

สล็อต
29 Jan 2023

เว็บสล็อตรวมค่าย megagame ได้รับการรีวิวมากมาย จากนักพนัน มีเกมสล็อตแตกง่ายทุกค่ายให้เลือกเล่น สมาชิกรับโปรสำรับสมาชิกใหม่ หรือ โปรฝาก100ได้100 . megaslot รวมโปรโมชั่นสล็อต สล็อตทุนน้อย ก็เล่นได้ไม่อั้น ถอนได้ไม่มีขั้นต่ำ ทำรายการ ฝาก-ถอน ออโต้ หรือ wallet เล่นสล็อตฟรีทุกค่ายได้แล้ววันนี้

สล็อต
29 Jan 2023

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

26 Jan 2023

This is really classic songs album which I just one day got to see on red rocks official site and it was fabulous.Termite Control Waco TX

16 Jan 2023

mgw slot, online slots, pg easy to break slots, apply today, free credit 100%, no need to deposit first, add money, withdraw money quickly with an automatic system throughout 1 day and there are many games to choose from.

13 Jan 2023

pgslot Today I would like to recommend a free trial game! Giving away free credits in the trial game for players to try to experience and open up new experiences. There are new camp slot games. Let's try to play together with more than 10 different game camps.

13 Jan 2023

https://ambbet.poker Try playing slots games, easy to play, fast break, get full profits, try playing pg slots, buy free spins, play for free, do not lose money with many popular games such as trying slots Candy Burst, Dragon Hatch, HIPHOP PANDA, Wild. Firework and many other games

13 Jan 2023

pg ทดลองเล่น First Trial Game known all over the world Because the game was released with a standard and modern quality, different from other slot games in the past. Games in PG Slots Camp All have game features based on stories from around the world. make it accepted and known all over the world

13 Jan 2023

พีจีสล็อต The main website, the largest online slot provider, No. 1 in Asia, which is currently the most popular player. Able to play via mobile phone, iPad, computer, PG slot supports all modern operating systems, easy to crack, unlimited giveaways. Available 24 hours a day

13 Jan 2023

mega slot 50รับ100 Try playing PG SLOT games, apply for slot games, direct web, free games, free slots, try to play for free, withdraw today. The website has collected more than 100 interesting slot games for everyone to try for free, the hottest online slot games. Guaranteed fun without boredom

05 Jan 2023

Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.

01 Jan 2023

SexyPG168 เว็บ สล็อตตรง เกมสล็อตที่ดีที่สุด ลิขสิทธิ์แท้จากต่างประเทศ มั่นใจ ปลอดภัย 100% vXsjfN.jpg

Strana: 1d,14,15,16,17,18,19,20,21,22,23,24... 26

Nový komentář