Loot systém

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

Staženo: 1127x

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: 1,2,3,4,5,6,7,8,9,10,11... 26
15 Jan 2025

Ingranditi trasognato dormissero ah conservare improvvisa accostarmi si.

nine slot
14 Jan 2025

เกมของ PG SLOT ถูกออกแบบมาให้ใช้งานง่าย ไม่ซับซ้อน nine slot ผู้เล่นสามารถเรียนรู้วิธีการเล่นได้อย่างรวดเร็ว โดยไม่จำเป็นต้องมีประสบการณ์การเล่นเกมสล็อตมาก่อน

ทดลองเล่นสล็อต pg
14 Jan 2025

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

https://inkspin.org/
14 Jan 2025

นอกจากสล็อตที่แตกง่ายแล้ว PG SLOT ยังมีอัตราการจ่ายเงินที่สูง https://inkspin.org/ ทำให้ผู้เล่นมีโอกาสได้รับรางวัลที่มีมูลค่าสูงกว่าเกมสล็อตจากค่ายอื่น ๆ

pgslot
14 Jan 2025

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

ทดลองเล่นสล็อต
14 Jan 2025

เกมของ PG SLOT มักมาพร้อมกับฟีเจอร์พิเศษ เช่น ฟรีสปิน, โบนัสเกม, และสัญลักษณ์พิเศษที่ช่วยเพิ่มโอกาสในการชนะ ทดลองเล่นสล็อต ฟีเจอร์เหล่านี้ทำให้การเล่นเกมมีความสนุกและน่าตื่นเต้นมากยิ่งขึ้น

naga game
14 Jan 2025

PG SLOT มีเกมให้เลือกเล่นมากมายหลายร้อยเกม แต่ละเกมมีธีมและกราฟิกที่แตกต่างกันไป naga game การที่มีเกมหลากหลายทำให้ผู้เล่นไม่รู้สึกเบื่อและสามารถเปลี่ยนเกมเล่นได้ตามความชอบ

ทดลองเล่นสล็อตทุกค่ายฟรี
14 Jan 2025

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

ทดลองเล่นสล็อต pg ซื้อฟรีสปิน
14 Jan 2025

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

13 Jan 2025

Tu su delirio monella ho sognato so avvenne.

09 Jan 2025

omega-game.com เว็บสล็อตออนไลน์ที่คุณต้องลอง แหล่งรวมเกมสล็อตออนไลน์ที่มาแรงที่สุดในตอนนี้ พบกับประสบการณ์การเล่นเกมที่สนุก ตื่นเต้น และลุ้นรางวัลใหญ่อย่างไม่มีที่สิ้นสุด

09 Jan 2025

สมัครง่าย คลิกเลย https://omega-game.com/ รวมเกมยอดฮิตจากค่ายดังมากมาย แจ็คพอตแตกง่าย โบนัสแจกจริงทุกวัน! เกมสล็อตหลากหลายสไตล์ เลือกเล่นได้ไม่มีเบื่อ โบนัสแตกง่าย แจ็คพอตแตกไว ได้เงินจริง

25 Dec 2024

But ronds ici celui comme car eux patre poids. Saute est alors moi nul son moins.

04 Nov 2024

slot wallet, direct website, no minimum, all brands, no agents, pg slot entrance, direct slot website, deposit-withdraw true wallet, no minimum 2024 or slotwallet, direct slot website, deposit-withdraw true wallet, no minimum 2567, authentic copyright from abroad, the latest slot website, direct website, slot auto wallet, slot deposit, withdraw true wallet, make money online, get real money, just play fun mobile games, whether iOS17 or Android14, you can earn extra income at home, generate online income, no need to invest, 1 baht can play because slot game online, 100% direct slot website, easy to play via mobile phone slot wallet

29 Oct 2024

เว็บคาสิโนออนไลน์ ที่รวบรวมคาสิโนสดค่ายดังในเว็บเดียว ที่มาพร้อมกับระบบออโต้ ที่เสถียรรวดเร็วทันใจมากที่สุด ศูนย์รวมเกมฮอตฮิตที่รวบรวมทั้ง คาสิโนออนไลน์ บาคาร่า สล็อต บอล หวย เสือมังกร และเกมอื่นๆ อีกมากมาย เว็บพนันออนไลน์ อันดับ 1 ของประเทศไทย https://posextension.com/

29 Oct 2024

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

29 Oct 2024

สล็อตเว็บใหม่ MEGA88 SLOT เว็บตรง PG SLOT รวมทุกค่าย รวมทุกเกม อัพเดทเกมใหม่ล่าสุด จากค่ายเกมยักษ์ทั่วทุกมุมโลก ให้ได้สัมผัสก่อนใคร เว็บสล็อตเปิดใหม่ ล่าสุด รับความบันเทิงรูปแบบใหม่ ตื่นเต้นเร้าใจ น่าสัมผัสยิ่งกว่าเดิม รับประสบการณ์ครั้งยิ่งใหญ่ https://bestcb.info/

29 Oct 2024

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

29 Oct 2024

เปิดแล้ว SUPER SLOT เว็บสล็อตเว็บตรง ใหม่ล่าสุด รวมสล็อตค่ายใหญ่ทุกค่ายเกม เว็บไซต์พนันออนไลน์ที่ดีที่สุดมาแรงในปี 2024 พร้อมให้บริการผู้เล่นทุกท่านมาร่วมสนุก การันตียูสใหม่แตกง่าย เพราะเราคือเว็บเกมลิขสิทธิ์แท้จากผู้ให้บริการโดยตรง https://doriclodge44.org/

29 Oct 2024

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

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

Nový komentář