Craftman

Datum: 22/11/2014 23:35:45

Staženo: 579x

Popis:

~BOT~   id: 7625278

 

Autor neznámý

 

 

 private ushort _ironWiresG = 0x1876;
        private ushort _copperStringG = 0x1879;
        private ushort _silverStringG = 0x1877;
        private ushort _goldStringG = 0x1878;
        private ushort _ironStringG = 0x1420;
        private ushort _formaLahveG = 0x0E7F;


Hodnocení: 3.6/10 (120 hlasy)

Download file:cs

Příkazy:

  • ,exec ironwire
  • ,exec ironwire "int pocetv"
  • ,exec ironstring
  • ,exec ironstring "int pocetv"
  • ,exec copperwire
  • ,exec copperwire "int pocetv"
  • ,exec silverwire
  • ,exec silverwire "int pocetv"
  • ,exec goldwire
  • ,exec goldwire "int pocetv"
  • ,exec formalahve
  • ,exec formalahve "int pocetv"

Kód:

using Phoenix;
using Phoenix.WorldData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Collections;
using System.Threading;
using System.Diagnostics;
using System.Drawing;

namespace Scripts.DarkParadise
{
    public class Craftsman
    {
        private UOItem _zdrojB;
        private UOItem _cielB;
        private string[] _hlasky = { "You put", "You fail", "Tinkering failed", "You have failed" };
        private int _podarky;
        private int _nepodarky;

        //grafika materiálu
        private ushort _ironG = 0x1BEF;
        private ushort _copperG = 0x1BE3;
        private ushort _silverG = 0x1BF5;
        private ushort _goldG = 0x1BE9;
        private ushort _iStringG = 0x1876;
        private ushort _barrelLidG = 0x1DB8;
        private ushort _barrelStavesG = 0x1EB1;

        //color materiálu
        //_nullC - pre všetko, čo má color hodnotu 0x0000
        private ushort _nullC = 0x0000;

        //grafika nástrojov pre crafta
        private ushort _tinkerTools = 0x1EBC;

        //grafika výrobkov
        private ushort _ironWiresG = 0x1876;
        private ushort _copperStringG = 0x1879;
        private ushort _silverStringG = 0x1877;
        private ushort _goldStringG = 0x1878;
        private ushort _ironStringG = 0x1420;
        private ushort _formaLahveG = 0x0E7F;

        //color vyrobkov
        private ushort _formaLahveC = 0x0909;

        //jednotlivé menu výroby
        private string[] _iWires = { "Tinkering", "Wires", "Wires", "Iron Wire" };
        private string[] _cWires = { "Tinkering", "Wires", "Wires", "Copper Wire" };
        private string[] _sWires = { "Tinkering", "Wires", "Wires", "Silver Wire" };
        private string[] _gWires = { "Tinkering", "Wires", "Wires", "Gold Wire" };
        private string[] _iString = { "Tinkering", "Wires", "Wires", "Iron String" };
        private string[] _formaL = { "Carpentry", "Containers & Cont. parts", "Containers & Cont. parts", "Forma na lahve" };

        /// <summary>
        /// Materiál -- 1 Iron ingot 
        /// Skill -- Tinkering 0.0
        /// </summary>
        [Executable]
        public void IronWire()
        {
            IronWire(0);
        }
        [Executable]
        public void IronWire(int pocetV)
        {
            Hashtable table = new Hashtable();
            ushort[] material = { _iStringG, _nullC };
            table.Add(1, material);

            Craftenie(_iWires, pocetV, _tinkerTools, table, _ironWiresG, _nullC);
        }

        /// <summary>
        /// Materiál -- 1 Iron wire 
        /// Skill -- Tinkering 35 + 35 blacksmithy 
        /// </summary>
        [Executable]
        public void IronString()
        {
            IronString(0);
        }
        [Executable]
        public void IronString(int pocetV)
        {
            Hashtable table = new Hashtable();
            ushort[] material = { _ironG, _nullC };
            table.Add(1, material);

            Craftenie(_iString, pocetV, _tinkerTools, table, _ironStringG, _nullC);
        }

        /// <summary>
        /// Materiál -- 1 copper ingot 
        /// Skill -- Tinkering 15,0 
        /// </summary>
        [Executable]
        public void CopperWire()
        {
            CopperWire(0);
        }
        [Executable]
        public void CopperWire(int pocetV)
        {
            Hashtable table = new Hashtable();
            ushort[] material = { _copperG, _nullC };
            table.Add(1, material);

            Craftenie(_cWires, pocetV, _tinkerTools, table, _copperStringG, _nullC);
        }

        /// <summary>
        /// Materiál -- 1 sivler ingot 
        /// Skill -- Tinkering 20,0 
        /// </summary>
        [Executable]
        public void SilverWire()
        {
            SilverWire(0);
        }
        [Executable]
        public void SilverWire(int pocetV)
        {
            Hashtable table = new Hashtable();
            ushort[] material = { _silverG, _nullC };
            table.Add(1, material);

            Craftenie(_sWires, pocetV, _tinkerTools, table, _silverStringG, _nullC);
        }

        /// <summary>
        /// Materiál -- 1 gold ingot 
        /// Skill -- Tinkering 25,0 
        /// </summary>
        [Executable]
        public void GoldWire()
        {
            GoldWire(0);
        }
        [Executable]
        public void GoldWire(int pocetV)
        {
            Hashtable table = new Hashtable();
            ushort[] material = { _goldG, _nullC };
            table.Add(1, material);

            Craftenie(_gWires, pocetV, _tinkerTools, table, _goldStringG, _nullC);
        }

        /// <summary>
        /// Materiál -- 2 barrel staves, 2 barrel lid 
        /// Skill -- Carpentry 90,0
        /// </summary>
        [Executable]
        public void FormaLahve()
        {
            FormaLahve(0);
        }
        [Executable]
        public void FormaLahve(int pocetV)
        {
            Hashtable table = new Hashtable();
            ushort[] material1 = { _barrelLidG, _nullC, 2 };
            ushort[] material2 = { _barrelStavesG, _nullC, 2 };

            table.Add(1, material1);
            table.Add(2, material2);

            Craftenie(_formaL, pocetV, _tinkerTools, table, _formaLahveG, _formaLahveC);
        }

        /// <summary>
        /// Základ craftenia pre výrobky, pre ktoré je potrebné len jeden materiál na výrobu
        /// menu - craftské menu pre daný výrobok
        /// pocet - udáva číslo, koľko výrobkov chce vyrobiť
        /// tool - grafika crafstkého nástroja, ktoré je potrebné pre daný výrobok
        /// mastros - hashtabulka kde  value = pole s hodnotami materiálu,  grafika, color a počet daného materiálu
        /// vyrobokG - grafika výsledného výrobku
        /// vyrobokC - color výsledného výrobku
        /// </summary>
        public void Craftenie(string[] menu, int pocet, ushort tool, Hashtable matros, ushort vyrobokG, ushort vyrobokC)
        {
            //grafika a množštvo materiálu, ktorého počet je najmenší pri výrobe
            ushort matG = 0x000;
            int amount = 0;
            _podarky = 0;
            _nepodarky = 0;

            //kontrola nástrojov
            UOItem tools = World.Player.Backpack.AllItems.FindType(tool, _nullC);
            if (tools.Amount < 1)
            {
                UO.PrintWarning("Chyba ti nastroj, koncim!");
                return;
            }
            
            TargetContainers();
        
        slucka:
            foreach (DictionaryEntry de in matros)
            {
                ushort[] temp = (ushort[])de.Value;
                //ushort mnozstvo = (ushort)((int)de.Key * 20);

                if (amount > temp[2])
                {
                    amount = (int)temp[2];
                    matG = temp[0];
                }

                if (UO.Count(temp[0]) < temp[2])
                {
                    UOItem material = _zdrojB.AllItems.FindType(temp[0], temp[1]);
                    if (material.Amount > 0)
                        material.Move((ushort)(temp[2] * 20), World.Player.Backpack.Serial);
                    else
                    {
                        UO.PrintWarning("Nedostatok materialu u zdroje, koncim!");
                        Presun(vyrobokG, vyrobokC, matros);
                        return;
                    }
                }
            }

            do
            {
                UO.Print(_podarky == pocet);
                if (pocet > 0)
                {
                    if (_podarky == pocet)
                    {
                        Presun(vyrobokG, vyrobokC, matros);
                        return;
                    }
                }

                //UO.PrintInformation("Vyrabam");
                UO.WaitMenu(_iWires);
                tools.Use();
                Journal.WaitForText(true, _hlasky);

                if (UO.InJournal("You put"))
                    _podarky++;
                else
                    _nepodarky++;

                UO.DeleteJournal();
            }
            while (UO.Count(matG) > amount);

        goto slucka;
        }

        private void Presun(ushort vyrobokG, ushort vyrobokC, Hashtable matros)
        {
            foreach (DictionaryEntry de in matros)
            {
                ushort[] temp = (ushort[])de.Value;

                //prenesiem výrobky do bedne + vrátim materiál na pôvodné miesto
                UO.PrintInformation("Prenasam vyrobky a materialy");
                UOItem vyrobky = World.Player.Backpack.AllItems.FindType(vyrobokG, vyrobokC);
                UOItem materialy = World.Player.Backpack.AllItems.FindType(temp[0], temp[1]);

                vyrobky.Move(0, _cielB.Serial);
                materialy.Move(0, _zdrojB.Serial);
            }
        }

        private void TargetContainers()
        {
            UO.PrintInformation("Vyber bednu z matrosom!");
            _zdrojB = new UOItem(UIManager.TargetObject());
            UO.Wait(100);
            UO.PrintInformation("Vyber bednu na hotove vyrobky");
            _cielB = new UOItem(UIManager.TargetObject());

            _zdrojB.Use();
            _cielB.Use();
        }
    }
}

Strana: 1,2
02 Jun 2023

Mainkan segera dewibola dan dapatkan event menariknya.

26 May 2023

Situs agen bola terpercaya di Indonesia

27 Apr 2023

Sebagai situs judi bola yang memiliki berbagai macam jenis taruhan bola dewibola juga memiliki satu nama yang sangat besar di Indonesia. https://dewibolaofficial.com

27 Apr 2023

Selamat Datang di Situs Agen Bola Terpercaya Dewibola.

22 Apr 2023

Daftar dewibola cukup dengan 1id bisa bermain seluruh permainan yang tersedia disini : https://nuansadewibola.com/

jhon set
27 Mar 2023

I just want to let you know that I just check out your site and I find it very interesting and informative.. Niagara Day Tour

jhon set
01 Mar 2023

Es hat viele Vorteile, Gespräche mit Mehrdeutigkeiten zu provozieren. Das Provozieren von Sprüche mit Mehrdeutigkeiten ist eine Möglichkeit, ein Gespräch mit anderen zu beginnen, Sprüche zum Nachdenken

jhon set
15 Feb 2023

This was a shocking post. It has some look at here fundamental data on this subject. 英文補習

jhon set
14 Feb 2023

I know your bent on this. I should state we should have an online talk on this. Creating just comments will close the discussion straight away! In addition, will restrict the favorable circumstances from this information. physics 補習

jhon set
24 Jan 2023

This will help the driver choose the best route so you can get to the destination as soon as possible. After all, you don't have a lot of time to waste. Coach Canada

jhon set
06 Dec 2022

you want to navigate in a larger and more powerful craft, you will need a longer course. patente nautica

19 Nov 2022

PTLIGA menyediakan kemudahan deposit menggunakan pulsa dan E-money yang online selama 24 jam.

17 Nov 2022

https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com https://ptligaslot.com

12 Aug 2022

https://www.robot-maker.com/forum/user/19629-slotonlinemudah/ https://myspace.com/donaldjvierra78 https://giphy.com/channel/slotpalinggampang https://www.redbubble.com/people/bocorangacor/ https://sharetv.com/user/slotonlinemudah https://participez.nancy.fr/profiles/judislotterbaik/activity https://www.instapaper.com/p/11062868

21 Jul 2022

PTBOLA : Merupakan agen bola resmi terbaik dan terpercaya untuk anda ingin bertaruh mix parlay jitu dan daftar agen resmi piala dunia 2022. PTBOLA PTBOLA

jhon set
03 Jul 2022

is easy to fall in love with a mattress based on price or how it feels in the showroom. Unless your mattress has burnt down and you have nowhere to sleep that night (or if a sale ends that specific day), there is no need to make a rushed decision about a mattress. Custom RV mattress

Strana: 1,2

Nový komentář