Popis: přimo ve scriptu si můžete nastavit jakym způsoben se při tréningu bude doplňovat mana a to u každé verze treningu zvlášt.
1 - Total Mana refresh potion.(když neni total mana refres kad ani prazdna lahev začne meditovat)
2 - Když dojde mana vypije jeden mana refresh a pokračuje v kastění zas dojde mana zas vypije atd.(když neni mana refres kad ani prazdna lahev začne meditovat)
3 - Když dojde mana začne meditovat.
4 - Když dojde mana vypije jednu mana refresh potku a zbytek domedituje.
Spouštění:
,exec train_clumsy - spusti trening Necromancery
,exec train_svetlo - spusti trening Magery
,exec train_sipka - spusti trening Magery, zároven je potřeba u sebe mit bandáže
Kód: Vybrat vše
//////////////////////////////////////////////////////////////////////////////
//
// www.ultima.smoce.net
// Name: Train magery - svetlo,sipka , necromancery - clumsy
// Popis: 3 scripty pro trening Magery a Necromancery původně autor smoce
// jen sem to trochu upravil a doplnil (Koryn)
// Verze Phoenixu: 0.7.x
//
//////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;
using System.Linq;
using Phoenix.Communication;
using Phoenix.Runtime;
using Phoenix.Runtime.Reflection;
namespace Phoenix.Scriptq
{
public class TrainMN
{
#pragma warning disable 162
//Nasteveni zpusobu obnovy many//----------------------------------------------------------------------------
public const int methoden = 4;//Necro - Clumsy: 1-TMR;2-MR;3-Meditace;4-Vypije manapotku zbytek domedituje
public const int methode = 3;//Magery - Svetlo: 1-TMR;2-MR;3-Meditace;4-Vypije manapotku zbytek domedituje
public const int methodes = 4;//Magery - Sipka: 1-TMR;2-MR;3-Meditace;4-Vypije manapotku zbytek domedituje
//-----------------------------------------------------------------------------------------------------------
public const ushort TMR_MR_KAD = 0x1843;
public const ushort TMR_MR_pot = 0x0F09;
public const ushort TMR_barva = 0x0003;
public const ushort MR_barva = 0x0005;
public const ushort CL_svitek = 0x0E35;
public const ushort CL_barva = 0x0079;
public const ushort jedenReg = 0x0F8B;
public const ushort druhyReg = 0x0F8F;
public static void pitimr(ushort ManaColor)
{
ushort MMR_barva = ManaColor;
if (World.Player.Backpack.AllItems.Count(TMR_MR_pot, MMR_barva) > 0)
{
UO.UseType(TMR_MR_pot, MMR_barva);
UO.Print(0x0435, "Vypil(a) si Mana refresh potion.");
}
else
{
if (World.Player.Backpack.AllItems.Count(TMR_MR_KAD, MMR_barva) > 0)
{
if ((World.Player.Backpack.AllItems.Count(0x0F0E, 0x0000) > 0) || (World.Player.Backpack.AllItems.Count(0x0F09, 0x0000) > 0))
{
UO.UseType(TMR_MR_KAD, MMR_barva);
if (World.Player.Backpack.AllItems.Count(0x0F0E, 0x0000) == 0)
{
UO.WaitTargetType(TMR_MR_pot, 0x0000);
UO.Wait(500);
}
else
{
UO.WaitTargetType(0x0F0E, 0x0000);
UO.Wait(500);
}
UO.UseType(TMR_MR_pot, MMR_barva);
UO.Print(0x0435, "Vypil(a) si Mana refresh potion.");
UO.Wait(500);
}
else
{
UO.Print("Nemas prazdnou lahev !");
UO.Wait(3000);
meditka();
return;
}
}
else
{
UO.Print("Nemas kad s Mana refresh!");
UO.Wait(3000);
meditka();
return;
}
}
}
//----------------------------------------------------------------------------------------
public static void meditka()
{
while (World.Player.Mana < World.Player.MaxMana)
{
UO.UseSkill("Meditation");
if (World.Player.Mana <= 100)
{
UO.Print("Medituji Mana: " + World.Player.Mana + " / " + World.Player.MaxMana);
}
else
{
UO.Print(0x00B3, "Medituji Mana: " + World.Player.Mana + " / " + World.Player.MaxMana);
}
UO.Wait(3500);
}
}
//--------------------------------------------------------------------------------------
[Executable]
public static void train_clumsy()
{
UO.PrintInformation("Script Train Necromancery");
clumsy:
if (UO.Count(jedenReg) == 0 || (UO.Count(druhyReg) == 0))
{
UO.Print("Dosli regy !");
return;
}
if (World.Player.Backpack.AllItems.Count(CL_svitek, CL_barva) == 0)
{
UO.PrintError("Dosly Clumsy svitky, pouzij knihu k doplneni svitku !!!");
return;
}
if (World.Player.Mana >= 20)
{
if (World.Player.Backpack.AllItems.Count(CL_svitek, CL_barva) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Clumsy svitku !", World.Player.Backpack.AllItems.Count(CL_svitek, CL_barva));
}
else
{
UO.Print("Zbyva {0} Clumsy svitku !", World.Player.Backpack.AllItems.Count(CL_svitek, CL_barva));
}
if (World.Player.Backpack.AllItems.Count(jedenReg) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Pumice !", World.Player.Backpack.AllItems.Count(jedenReg));
}
else
{
UO.Print("Zbyva {0} Pumice !", World.Player.Backpack.AllItems.Count(jedenReg));
}
if (World.Player.Backpack.AllItems.Count(druhyReg) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Volcanic Ash !", World.Player.Backpack.AllItems.Count(druhyReg));
}
else
{
UO.Print("Zbyva {0} Volcanic Ash !", World.Player.Backpack.AllItems.Count(druhyReg));
}
UOItem svitek = World.Player.Backpack.AllItems.FindType(CL_svitek, CL_barva);
UO.WaitTargetObject(Aliases.Self);
UO.UseObject(svitek);
UO.Wait(4000);
goto clumsy;
}
if (World.Player.Mana <= 20)
{
switch (methoden)
{
case (1):
pitimr(TMR_barva);
goto clumsy;
case (2):
pitimr(MR_barva);
goto clumsy;
case (3):
meditka();
goto clumsy;
case (4):
pitimr(MR_barva);
meditka();
goto clumsy;
}
goto clumsy;
}
}
//----------------------------------------------------------------------------------------------------------------
[Executable]
public static void train_svetlo()
{
int pocitani = 0;
UO.PrintInformation("Script Train Magery - Svetlo");
svetlo:
if (UO.Count(0x0F8D, 0x0000) == 0 || UO.Count(0x0F8C, 0x0000) == 0)
{
UO.Print("Dosli regy !");
return;
}
if (World.Player.Mana >= 20)
{
UO.Cast("Night Sight", Aliases.Self);
if (World.Player.Backpack.AllItems.Count(0x0F8D) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Spider silk !", World.Player.Backpack.AllItems.Count(0x0F8D));
}
else
{
UO.Print("Zbyva {0} Spider silk !", World.Player.Backpack.AllItems.Count(0x0F8D));
}
if (World.Player.Backpack.AllItems.Count(0x0F8C) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Sulfurous Ash !", World.Player.Backpack.AllItems.Count(0x0F8C));
}
else
{
UO.Print("Zbyva {0} Sulfurous Ash !", World.Player.Backpack.AllItems.Count(0x0F8C));
}
pocitani++;
UO.Wait(2000);
goto svetlo;
}
if (World.Player.Mana <= 20)
{
switch (methode)
{
case (1):
pitimr(TMR_barva);
goto svetlo;
case (2):
pitimr(MR_barva);
goto svetlo;
case (3):
meditka();
goto svetlo;
case (4):
pitimr(MR_barva);
meditka();
goto svetlo;
}
goto svetlo;
}
}
//----------------------------------------------------------------------------------------
[Executable]
public static void train_sipka()
{
UO.PrintInformation("Script Train Magery - Sipka");
sipka:
if (World.Player.Hits <= 30)
{
int bandage = World.Player.Backpack.AllItems.Count(0x0E21);
if (bandage > 0)
{
while (World.Player.Hits < World.Player.MaxHits)
{
if (bandage == 0)
{
UO.Print("Nemas bandy !!!");
return;
}
if (World.Player.Backpack.AllItems.Count(0x0E21) > 10)
{
UO.Print(0x00B3, "Zbyva {0} bandazi !", World.Player.Backpack.AllItems.Count(0x0E21));
}
else
{
UO.Print( "Zbyva {0} bandazi !", World.Player.Backpack.AllItems.Count(0x0E21));
}
int pred = World.Player.Hits;
UO.WaitTargetSelf();
UO.UseType(0x0E21);
UO.Wait(4000);
int po = World.Player.Hits;
if (pred != po)
{
int vyleceno = po - pred;
UO.Print(0x0435, "Vylecil si +" + vyleceno);
}
}
}
else
{
UO.Print("Nemas zadne bandy !!!");
return;
}
}
if (UO.Count(0x0F7A, 0x0000) == 0 || UO.Count(0x0F88, 0x0000) == 0 /*|| UO.Count(0x0F8D, 0x0000) == 0*/)
{
UO.Print("Dosli regy !");
return;
}
if (World.Player.Mana >= 20)
{
UO.Cast("Magic Arrow", Aliases.Self);
if (World.Player.Backpack.AllItems.Count(0x0F7A) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Black Pearls !", World.Player.Backpack.AllItems.Count(0x0F7A));
}
else
{
UO.Print("Zbyva {0} Black Pearls !", World.Player.Backpack.AllItems.Count(0x0F7A));
}
if (World.Player.Backpack.AllItems.Count(0x0F88) > 15)
{
UO.Print(0x00B3, "Zbyva {0} Nightshade !", World.Player.Backpack.AllItems.Count(0x0F88));
}
else
{
UO.Print("Zbyva {0} Nightshade !", World.Player.Backpack.AllItems.Count(0x0F88));
}
UO.Wait(2500);
goto sipka;
}
if (World.Player.Mana <= 20)
{
switch (methodes)
{
case (1):
pitimr(TMR_barva);
goto sipka;
case (2):
pitimr(MR_barva);
goto sipka;
case (3):
meditka();
goto sipka;
case (4):
pitimr(MR_barva);
meditka();
goto sipka;
}
goto sipka;
}
}
}
}