ShamanBoost Automat

Datum: 25/02/2020 20:42:32

Staženo: 90x

Popis:

Script dělaný na ObscuroPhoenix (http://www.obscurophoenix.www3.cz)

Nejnovější verze na bitbucketu

Nastavení:

Jde o to mít v phoenixovi soubor Players.txt kde se zapisujou jména hráčů kteří mají dovoleno používat boost. O nic víc není třeba se starat, samosebou přenastavit některé proměnné + hlavy se musí dávat do batohu odkud si ten hráč "potvrdí" že opravdu se mu bude házet boost.

Jelikož na Ereboru nehraju, tak lidi co mají shamana asi budou vědět co a jak.

Script je dokonale univerzální, stačí jen měnit soubor a o zbytek se stará script.

Script byl vytvořen aby předčil všechny dosud vytvořené scripty, bohužel byl na zakázku a majitel si mě místo zaplacení hodil do ignoru tak ho dávám veřejně :)


Hodnocení: 3.8/10 (18 hlasy)

Download file:cs

Příkazy:

  • ,start_shaman

Kód:

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

namespace Phoenix.Scriptss
{
    public struct PlayerData
    {
        public Serial Head;
        public Serial Player;

        public PlayerData(Serial aHead, Serial aPlayer)
        {
            this.Head = aHead;
            this.Player = aPlayer;
        }
    }

    public struct BoostData
    {
        public Boost Boost;
        public Serial Player;

        public BoostData(Boost aBoost, Serial aPlayer)
        {
            this.Boost = aBoost;
            this.Player = aPlayer;
        }
    }

    public enum Boost : byte
    {
        Str = 0,
        Dex = 1,
        Int = 2,
        Ar = 3
    }

    public class Shaman
    {
        // true = ON | false = OFF
        bool m_Active = true;

        string m_Players = Path.Combine(Core.Directory, "Players.txt");
        string m_PlayersData = Path.Combine(Core.Directory, "PlayersData.txt");

        List<string> m_AvailablePlayers = new List<string>();
        List<PlayerData> m_Data = new List<PlayerData>();
        List<BoostData> m_BoostData = new List<BoostData>();
        List<BoostData> m_TempBoostData = new List<BoostData>();

        ushort[] m_Potions = new ushort[4];
        ushort[] m_PotionsColor = new ushort[4];
        ushort[] m_Heads = new ushort[2];

        DateTime m_FoodTime = DateTime.Now;

        // Uživatelské proměnné
        uint m_Bag = 0x40073871; // bag kde budou hlavy

        public Shaman()
        {
            if (!m_Active)
            {
                UO.Print("ShamanBoosts disabled!");
                return;
            }

            Initialize();

            Journal.EntryAdded += Journal_EntryAdded;
            UO.Print("ShamanBoosts initialize");
        }

        public void Initialize()
        {
            m_Potions[0] = 0x0F0E; // str
            m_Potions[1] = 0x0F0E; // dex
            m_Potions[2] = 0x0F0E; // int
            m_Potions[3] = 0x0F0E; // ar

            m_PotionsColor[0] = 0x0835;
            m_PotionsColor[1] = 0x0006;
            m_PotionsColor[2] = 0x06C2;
            m_PotionsColor[3] = 0x0999;

            m_Heads[0] = 0x1DAE; // graphic hlavy
            m_Heads[1] = 0x1CE1; // graphic hlavy
        }

        [Command]
        public void Start_Shaman()
        {
            StreamReader lSr;
            string lLine;

            if (File.Exists(m_Players))
            {
                m_AvailablePlayers.Clear();
                lSr = new StreamReader(m_Players);
                while ((lLine = lSr.ReadLine()) != null)
                {
                    m_AvailablePlayers.Add(lLine);
                    UO.Print("Registred: " + lLine);
                }
                lSr.Close();
            }

            if (File.Exists(m_PlayersData))
            {
                m_Data.Clear();
                lSr = new StreamReader(m_PlayersData);
                while ((lLine = lSr.ReadLine()) != null)
                    m_Data.Add(new PlayerData(Convert.ToUInt32(lLine.Split(',')[0], 16), Convert.ToUInt32(lLine.Split(',')[1], 16)));
                lSr.Close();
                UO.Print("PlayerData loaded!");
            }

            while (!World.Player.DeathStatus)
            {
                foreach (BoostData lBoost in m_BoostData)
                    MakeBoost(lBoost.Boost, lBoost.Player);
                m_BoostData.Clear();
                if (m_TempBoostData.Count > 0)
                {
                    m_BoostData.AddRange(m_TempBoostData);
                    m_TempBoostData.Clear();
                }
                UO.Wait(1000);
                CheckBag();

                if (m_FoodTime < DateTime.Now)
                {
                    Feeding();
                    m_FoodTime = DateTime.Now.AddMinutes(15);
                }
            }
        }

        public void Feeding()
        {
            ushort lFood = 0x097B;

            UOItem lMeat = World.Ground.FindType(lFood);
            while (lMeat != null)
            {
                UO.DeleteJournal();
                lMeat.Use();
                lMeat = World.Ground.FindType(lFood);
                UO.Wait(500);
                if (UO.InJournal("You are simply too full to eat any more"))
                    lMeat = null;
            }
        }

        public void Journal_EntryAdded(object sender, JournalEntryAddedEventArgs e)
        {
            bool lReact = false;
            foreach (PlayerData lData in m_Data)
            {
                if (lData.Player == e.Entry.Serial)
                {
                    UOCharacter lChar = new UOCharacter(e.Entry.Serial);
                    if (lChar.Name == null)
                    {
                        lChar.RequestStatus();
                        UO.Wait(250);
                    }

                    if (m_AvailablePlayers.Contains(lChar.Name))
                    {
                        lReact = true;
                        break;
                    }
                    else
                    {
                        lReact = false;
                        break;
                    }
                }
            }

            if (lReact)
            {
                UOCharacter lPlayer = new UOCharacter(e.Entry.Serial);
                if (lPlayer.Name == null)
                {
                    lPlayer.RequestStatus();
                    UO.Wait(250);
                }

                switch (e.Entry.Text.ToLower().Trim())
                {
                    case "str":
                        m_TempBoostData.Add(new BoostData(Boost.Str, e.Entry.Serial));
                        UO.Print("Added 'STR' boost to '" + lPlayer.Name + "'");
                        break;
                    case "dex":
                        m_TempBoostData.Add(new BoostData(Boost.Dex, e.Entry.Serial));
                        UO.Print("Added 'DEX' boost to '" + lPlayer.Name + "'");
                        break;
                    case "int":
                        m_TempBoostData.Add(new BoostData(Boost.Int, e.Entry.Serial));
                        UO.Print("Added 'INT' boost to '" + lPlayer.Name + "'");
                        break;
                    case "ar":
                        m_TempBoostData.Add(new BoostData(Boost.Ar, e.Entry.Serial));
                        UO.Print("Added 'AR' boost to '" + lPlayer.Name + "'");
                        break;
                }
            }
        }

        public void MakeBoost(Boost aBoost, Serial aPlayer)
        {
            foreach (PlayerData lData in m_Data)
            {
                if (lData.Player == aPlayer)
                {
                MakeBoostAgain:

                    UOCharacter lChar = new UOCharacter(aPlayer);
                    if (lChar.Name == null)
                    {
                        lChar.RequestStatus();
                        UO.Wait(250);
                    }
                    UO.Say("Hazim '" + aBoost.ToString() + "' playerovi " + lChar.Name);

                    UO.DeleteJournal();
                    UO.WaitTargetType(m_Potions[(byte)aBoost], m_PotionsColor[(byte)aBoost]);
                    UO.UseObject(lData.Head);

                    bool lWait = true;
                    while (lWait)
                    {
                        UO.Wait(100);
                        if (UO.InJournal("Cil podlehl voodoo") || UO.InJournal("Nepovedlo se") || UO.InJournal("Prokleti nenalezlo cil"))
                            lWait = false;
                    }

                    if (UO.InJournal("Nepovedlo se"))
                    {
                        UO.Say("Boost se nepovedl, hazim znova!");
                        goto MakeBoostAgain;
                    }

                    break;
                }
            }
        }

        public void CheckBag()
        {
            UOItem lBag = new UOItem(m_Bag);
            if (!lBag.Opened)
            {
                lBag.Use();
                UO.Wait(1000);
            }
            bool lNewHead = false;
            for (int i = 0; i < m_Heads.Length; i++)
            {
                IEnumerable<UOItem> lHeads = lBag.AllItems.Where(x => x.Graphic == m_Heads[i]);
                if (lHeads != null && lHeads.Count() > 0)
                {
                    List<UOItem> lFoundedHeads = lHeads.ToList();
                    foreach (UOItem lHead in lFoundedHeads)
                    {
                        if (lHead.Name == null)
                        {
                            lHead.Click();
                            UO.Wait(1000);
                        }

                        string lHeadName = lHead.Name;
                        if (m_AvailablePlayers.Contains(lHeadName))
                        {
                            // Hlava existuje v seznamu lidí 
                            bool lHeadExistInData = false;

                            if (m_Data.Count() > 0)
                            {
                                foreach (PlayerData lData in m_Data)
                                {
                                    if (lData.Head == lHead.Serial)
                                    {
                                        lHeadExistInData = true;
                                        break;
                                    }
                                }
                            }

                            if (!lHeadExistInData)
                            {
                                UOCharacter lChar = FindPlayer(lHeadName);
                                if (lChar != null)
                                {
                                    m_Data.Add(new PlayerData(lHead.Serial, lChar.Serial));
                                    UO.Say("Registred: " + lHeadName);
                                    lHead.Move(lHead.Amount, World.Player.Backpack);
                                    UO.Wait(1000);
                                    lNewHead = true;
                                }
                                else
                                    UO.Print(lHeadName + " nebyl nalezen v blizkem okoli");
                            }
                        }
                    }
                }
            }

            if (lNewHead)
                SaveData();
        }

        public UOCharacter FindPlayer(string aName)
        {
            foreach (UOCharacter lChar in World.Characters)
            {
                if (lChar.Name == null)
                {
                    lChar.RequestStatus();
                    UO.Wait(1000);
                }
                if (lChar.Name == aName)
                    return lChar;
            }
            return null;
        }

        public void SaveData()
        {
            StreamWriter lWr = new StreamWriter(File.Open(m_PlayersData, FileMode.OpenOrCreate));
            foreach (PlayerData lData in m_Data)
                lWr.WriteLine(lData.Head.ToString() + "," + lData.Player.ToString());
            lWr.Close();
            UO.Print("Data updated!!!");
        }
    }
}
17 Dec 2021

The author has inserted a critical 123 คา สิ โน comment. And creativity Content and expressions in the language are appropriate for the บา คา ร่า 123 general audience, not specific, have the 123 ค่า สิ โน correct format and style of writing and essays Read and get knowledge Or additional ideas. The subject matter บาคาร่า123 of the article must be updated. Have appropriate content and expressions คาสิโน123 in language There is a title that is interesting to read. Tell me 123คาสิโน how interesting this story is. What benefit the reader? Different from general articles Articles may 1234gold also have an emphasis on future goal123link events and trends. Essays are a sort of essay, which serves a variety of purposes, has evidences, credible 123goal ดี ไหม reasons.

16 Dec 2021

There is a selection of subjects that เกม 123 the author is interested in, knowledgeable and experienced in that subject, thus ct855 helping the writer to convey the article easily and 123goalsmoothly. And it is a matter that is currently in the interest of the general public It tends to have a lot of interest to read. Read it and learn more 123goal เครดิตฟรี about it. The subject of the article must be up-to-date. How to write this article There are สล็อต 123goalwriting techniques that allow readers to เว็บ 123 stay interested in keeping up with the subject. This article is quite a mix. This type of article therefore happens to สล็อต123 have a purpose. Invite, suggest, or encourage others to แฮนดิแคป gain knowledge and want to try to follow.

02 Dec 2021

Articles are essays that contain stories ameba slot from the truth. It's a matter that is in the public's attention right now. Comments that are credible and rational are 123คาสิโน inserted in the writing. Have analytical thinking Has arrived as well, therefore able to understand completely Because some 123gold articles may contain specific terms and academic terms in the content. This blog is very attraction to me .I really like this 123goal สูตรสล็อต article and your writing skill is very fantastic and beautiful . thanks a lot for the good language.Is an ลิงค์รับทรัพย์ article that has an opinion or suggestion Beneficial to society In addition to giving knowledge and thinking Also โหลด บา คา ร่า ออนไลน์ providing enjoyment. The author also inserts credible เกม123 and rational opinions for the writing of the article. Such comments Must have analytical thinking Well arrived The reader ทางเข้า goal123 has a background of knowledge and interest in that subject.

19 Nov 2021

There are convincing and logical comments in 123maxx the writing. Articles are articles that contain stories from the truth. It's a matter that is in the public สล็อต123 interest right now. The authors ct855 should have opinions that are interesting, novel, useful in social building, analytical ราคาบอล thinking. It was here as well, so it was completely understood. It is an educational pg article that provides thorough knowledge. And improve reading skills to make it relaxed and fun wm casino with style It has an analytical mind as well, so it can be completely understood as some articles may contain specific vocabulary and 123bet เข้าสู่ระบบ technical terms. It is beneficial to society. This article is quite a mix of 123goal สูตรสล็อต both the essence and the secret.

Olivia Davis
13 May 2021

This Free Essay Writer review was very important to me as I was able to get my questions answered. Now I will never order my papers from here. https://onlineessaywritingservice.review/reviews/freeessaywriter-review

Nový komentář