ScriptUO
Scripting Resources & Utilities => Stealth Client => Stealth scripts => Topic started by: Papang- on December 27, 2017, 11:34:11 AM
-
After a first week full of C # and Stealth discoveries, I share my first contribution to the community.
I want to thank Crome969 for his invaluable help and all the team of "Stealth".
This is a trainer for Magery, Chivalry, Necro and Mysticism skills (maybe sooner).
You do not need to equip a weapon
(https://www2.pic-upload.de/img/34545932/papangtrainer.png)
I wanted to create a console application, so I added a menu from the console.
I hope that this project will help you to train your characters,
All ideas for innovation and feedback are welcome.
using System;
using StealthAPI;
using ScriptSDK.Mobiles;
using ScriptSDK.Targets;
namespace PapangTrainer
{
class Program
{
public static PlayerMobile Me = PlayerMobile.GetPlayer();
public static bool IsBusy = false;
public static void Main(string[] args)
{
var table = new[]
{ @" ///////////////////////////////////////////////////",
@" ██████╗ █████╗ ██████╗ █████╗ ███╗ ██╗ ██████╗ ",
@" ██╔══██╗██╔══██╗██╔══██╗██╔══██╗████╗ ██║██╔════╝ ",
@" ██████╔╝███████║██████╔╝███████║██╔██╗ ██║██║ ███╗",
@" ██╔═══╝ ██╔══██║██╔═══╝ ██╔══██║██║╚██╗██║██║ ██║",
@" ██║ ██║ ██║██║ ██║ ██║██║ ╚████║╚██████╔╝",
@" ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ",
@" Casting Trainer EA Shards 27/12/2017 ",
@" Version 0.1////////////////////////////////////////",
@" Magery / Chivalry / Necromancy / Mysticism ////////",
@" Your character need FC2 / FCR 6 ///////////////////",
@" LMC 40 and a maximum of MR ////////////////////////",
@" //////////////////////////Papang- @www.scriptuo.com",
};
Console.WriteLine("\n\n");
foreach (string PapangDesign in table)
Console.WriteLine(PapangDesign);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Hey " + Me.Name + " , what we train today ?");
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine("Press [1] for Magery (Buy skill 40)");
Console.WriteLine("Press [2] for Chivalry (Buy skill 30)");
Console.WriteLine("Press [3] for Necromancy (Buy skill 40)");
Console.WriteLine("Press [4] for Mysticism (Buy skill 40)");
string SelectedOption = Console.ReadLine();
var Target = new EntityTarget(1000);
while (Me.Client.Connected) {
switch (SelectedOption)
{
case "1":
IsBusy = true;
while (IsBusy)
{
var _MageMax = Me.Skills.Magery.Cap;
var _CurMage = Me.Skills.Magery.Value;
Console.ForegroundColor = ConsoleColor.Cyan;
Console.Write("\r " + "[magery @ " + _CurMage + "/" + _MageMax + "]");
if (Me.Mana < 25)
Medit();
if (_CurMage >= 0 && _CurMage < 34)
{
Me.Cast("Bless");
Stealth.Client.Wait(850);
Target.Action(Target.Entity);
}
else if (_CurMage >= 34 && _CurMage < 45)
{
Me.Cast("Greater Heal");
Me.Targeting.WaitForTarget(1000);
Target.Action(Target.Entity);
}
else if (_CurMage >= 45 && _CurMage < 67)
{
Me.Cast("Dispel Field");
Me.Targeting.WaitForTarget(1250);
Target.Action(Target.Entity);
}
else if (_CurMage >= 67 && _CurMage < 82)
{
Me.Cast("Invisibility");
Me.Targeting.WaitForTarget(1500);
Target.Action(Target.Entity);
}
else if (_CurMage >= 82 && _CurMage < 95)
{
Me.Cast("Mass Dispel");
Me.Targeting.WaitForTarget(2000);
Target.Action(Target.Entity);
}
else if (_CurMage >= 95 && _CurMage < 120)
{
if (Me.Mana < 40)
Medit();
Me.Cast("Earthquake");
Stealth.Client.Wait(1500);
}
else
{
Console.WriteLine("Magery Cap Raised ! Congratulation.");
IsBusy = false;
}
}
break;
case "2":
IsBusy = true;
while (IsBusy)
{
var _ChivMax = Me.Skills.Chivalry.Cap;
var _CurChiv = Me.Skills.Chivalry.Value;
Console.ForegroundColor = ConsoleColor.Cyan;
Console.Write("\r " + "[chivalry @ " + _CurChiv + "/" + _ChivMax + "]");
if (Me.Mana < 25)
Medit();
if (_CurChiv >= 0 && _CurChiv < 25 || _CurChiv >= 41 && _CurChiv < 51)
{
Me.Cast("Dispel Evil");
Stealth.Client.Wait(100);
}
else if (_CurChiv >= 25 && _CurChiv < 41)
{
Me.Cast("Remove Curse");
Me.Targeting.WaitForTarget(1000);
Target.Action(Target.Entity);
}
else if (_CurChiv >= 51 && _CurChiv < 70)
{
Me.Cast("Enemy of One");
Stealth.Client.Wait(650);
}
else if (_CurChiv >= 70 && _CurChiv < 90)
{
Me.Cast("Holy Light");
Stealth.Client.Wait(1750);
}
else if (_CurChiv >= 90 && _CurChiv < 120)
{
Me.Cast("Noble Sacrifice");
Stealth.Client.Wait(1750);
}
else
{
Console.WriteLine("Chivalry Cap Raised ! Congratulation.");
IsBusy = false;
}
}
break;
case "3":
IsBusy = true;
while (IsBusy)
{
var _NecroMax = Me.Skills.Necromancy.Cap;
var _CurNecro = Me.Skills.Necromancy.Value;
Console.ForegroundColor = ConsoleColor.Cyan;
Console.Write("\r " + "[necromancy @ " + _CurNecro + "/" + _NecroMax + "]");
if (Me.Mana < 25)
Medit();
if (_CurNecro >= 40 && _CurNecro < 50)
{
Me.Cast("Wraith Form");
Stealth.Client.Wait(1250);
}
else if (_CurNecro >= 50 && _CurNecro < 70)
{
Me.Cast("Horrific Beast");
Stealth.Client.Wait(1500);
}
else if (_CurNecro >= 70 && _CurNecro < 90)
{
Me.Cast("Wither");
Stealth.Client.Wait(1000);
}
else if (_CurNecro >= 90 && _CurNecro < 100)
{
Me.Cast("Lich Form");
Stealth.Client.Wait(850);
}
else if (_CurNecro >= 100 && _CurNecro < 120)
{
Me.Cast("Vampiric Embrace");
Stealth.Client.Wait(850);
}
else
{
Console.WriteLine("Necromancy Cap Raised ! Congratulation.");
IsBusy = false;
}
}
break;
case "4":
IsBusy = true;
while (IsBusy)
{
var _MystMax = Me.Skills.Mysticism.Cap;
var _CurMyst = Me.Skills.Mysticism.Value;
Console.ForegroundColor = ConsoleColor.Cyan;
Console.Write("\r " + "[mysticism @ " + _CurMyst + "/" + _MystMax + "]");
if (Me.Mana < 25)
Medit();
if (_CurMyst >= 40 && _CurMyst < 65)
{
Me.Cast("Stone Form");
Stealth.Client.Wait(1000);
}
else if (_CurMyst >= 65 && _CurMyst < 85)
{
Me.Cast("Cleansing Winds");
Me.Targeting.WaitForTarget(1800);
Target.Action(Target.Entity);
}
else if (_CurMyst >= 85 && _CurMyst < 95)
{
if (Me.Mana < 40)
Medit();
Me.Cast("Hail Storm");
Me.Targeting.WaitForTarget(2000);
Target.Action(Target.Entity);
}
else if (_CurMyst >= 95 && _CurMyst < 120)
{
if (Me.Mana < 40)
Medit();
Me.Cast("Nether Cyclone");
Me.Targeting.WaitForTarget(2000);
Target.Action(Target.Entity);
}
else
{
Console.WriteLine("Mysticism Cap Raised ! Congratulation.");
IsBusy = false;
}
}
break;
default:
break;
}
}
}
public static void Medit()
{
do {
Console.ForegroundColor = ConsoleColor.DarkCyan;
Console.Write("\r" + "Meditating ... MWaah !");
Stealth.Client.CancelTarget();
Me.Skills.Meditation.Use();
Stealth.Client.Wait(500);
} while (Me.Mana < Me.MaxMana);
}
}
}