ShamanBoost Automat
Datum: 25/02/2020 20:42:32
Staženo: 361x
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ě :)
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!!!");
}
}
}


https://pinterest.com/million719 https://unsplash.com/@million719 https://www.quora.com/profile/Trezoriostart-5 https://linktr.ee/rexete1528 https://www.blogger.com/profile/13732850944774849738 https://million719.livejournal.com/profile/ https://thedyrt.com/member/trezor-io-start-2/settings https://ncnews.co/profile/https:sites.google.comtrozriostart.comtrezoriohome https://www.highpriceddatinguk.com/million719 https://www.youtube.com/@justinmartin-g9m https://jobs.nefeshinternational.org/employers/3939343-trezor-io-start https://www.provenexpert.com/trezor-iostart9/ https://activepages.com.au/profile/million719 https://thedyrt.com/member/million719/reviews https://www.investagrams.com/Profile/trezor3351495 https://www.heavyironjobs.com/employers/3d8ae874-bfba-4962-93d8-5e36111474c4 https://github.com/million719 https://devpost.com/pagani2674?ref_content=user-portfolio&ref_feature=portfolio&ref_medium=global-nav https://knowyourmeme.com/users/trezor-iostart https://www.meetup.com/members/477978397/ https://www.slideshare.net/pagani2674?tab=about https://www.deviantart.com/trzriostart https://www.kickstarter.com/profile/1148607662 https://wordpress.com/log-in/link?client_id=1854&redirect_to=https%3A%2F%2Fpublic-api.wordpress.com%2Foauth2%2Fauthorize%3Fclient_id%3D1854%26response_type%3Dcode%26blog_id%3D0%26state%3D212407d67e0275b48429c6594cc580c883d3d8d1d488a396eb9d06d542dd5d07%26redirect_uri%3Dhttps%3A%2F%2Fgravatar.com%2Fconnect%2F%3Faction%3Drequest_access_token%26from-calypso%3D1 https://www.ted.com/profiles/50880487 https://www.indiegogo.com/en/profile/trzr#/overview https://www.sbnation.com/account/profile https://www.alltrails.com/signup?returnTo=%2Fmembers%2Frahul-gulati-7%3Fref%3Dheader https://www.goodreads.com/user/show/196927172-million719 https://seekingalpha.com/user/63893262 https://www.superpages.com/settings/about_me https://www.twitch.tv/manbot_global/videos https://chatterchat.com/million719 https://ekcochat.com/million719 https://www.friend007.com/stevegonzales https://medium.com/@m9u2gfd/about https://www.maanation.com/setting/million719/profile-setting https://profitability-movement.mn.co/members/37481262 https://d6united.mn.co/members/37481314 https://cybrvrs3.mn.co/members/37481379 https://freesaloneducation.mn.co/members/37481423 https://jasa-seo.mn.co/members/37481452 https://www.wowonder.xyz/start-up https://justpaste.it/u/million719 https://www.vevioz.com/start-up https://whatchats.com/million123 https://www.aleviforum.com/million719 https://kyourc.com/1767083454742833_149911 https://vherso.com/register