Razielovy scripty

Skripty týkající se tohoto externího programu

Moderátor: Caleb

Líbí se vám scripty ?

Ano, některé použiju.
87
82%
Ne, žádný jsem nepoužil.
10
9%
Mám svoje scripty.
9
8%
 
Celkem hlasů: 106

Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,herding

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Herding
    {        
        [Command]
        public void herding()
        {
            if (UO.Count(0x0E81)==0) {
                UO.Print("Nemas shepherds stafku.");
                return;
            }
            UO.Print("Vyber zvíře.");
            UOCharacter zvire=new UOCharacter(UIManager.TargetObject());
            while (true) {
                UO.DeleteJournal();
                UO.UseType(0x0E81);
                zvire.WaitTarget();               
                zvire.WaitTarget(); 
                while (!UO.InJournal("You don") && !UO.InJournal("animal")) {
                    UO.Wait(300);
                }
            }
        }
    }
}
Naposledy upravil(a) Raziel dne 18.11.2017 22:26:31, celkem upraveno 1 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,medit

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Meditace
    {
        [Command]
        public void medit()
        {
            while (World.Player.Mana<World.Player.Intelligence) {
                UO.UseSkill("Meditation");
                UO.Wait(2500);
            }
            UO.PlayWav("E:\\games\\uo\\generic_error.wav");
        }
    }
}
oprava předmětů s craftem
,repair

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Repair
    {
        [Command]
        public void repair()
        {
            if (UO.Count(0x0E81)==0) {
                UO.Print("Nemas iron.");
                return;
            }
            UO.UseType(0x1BEF);
            UO.WaitMenu("Blacksmithing", "Repair");
        }
    }
}
Naposledy upravil(a) Raziel dne 18.11.2017 22:26:47, celkem upraveno 1 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

mění bishop hat a obyč helmu
,bishopka

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Bishopka
    {
        [Command]
        public void bishopka()
        {  
            UO.DeleteJournal();
            
            if (World.Player.Layers[Layer.Hat].Graphic==0x1DB9){
                UO.UseType(0x1412);//Helma               
            }            
            else {
                UO.UseType(0x1DB9);//Bishopka
            }
        }
    }
}
Naposledy upravil(a) Raziel dne 18.11.2017 22:27:11, celkem upraveno 1 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

nakupování od obchodníků
,buy

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Nakup
    {        
        [Command]
        public void buy()
        {
            UO.Print("Zamer obchodnika");
            UOCharacter obchodnik = new UOCharacter(UIManager.TargetObject());
            UO.Say(obchodnik.Name+" buy");
        }
    }
}
Naposledy upravil(a) Raziel dne 18.11.2017 22:27:24, celkem upraveno 1 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

přemístí stejné itemy do vybraného kontejneru
,massmove
,massmoveb to stejné jen ignoruje barvu
to stejné jenom je přemístí na stejné místo v kontejneru
,mass1
,mass1 to stejné jen ignoruje barvu
přemístí stejné itemy (se stejnou plusovostí)
,massmove1
přemístí + zbraně a zbroje - číslo je síla 1- defense a ruin 2-might a guarding atd
,mass <cislo 1-5>
nahazi stejne veci do bedny na stejne veci (šperky, zvířata do boxů, elixiry ... )
,ukliddobedny
použije druhou bednu pokud item do první bedny nepasuje (pro stejně vypadající klamáky které musíte dávat do druhé bedny)
,ukliddo2bedny

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Massmove
    {
        [Command]
        public void massmove(){
            massmove(false);
        }
        [Command]
        public void massmoveB(){
            massmove(true);
        }

        [Command]
        public void massmove(bool bezbarva)
        {
            UO.Print("Ktere itemy premistit?");
            UOItem itemhlavni=new UOItem(UIManager.TargetObject());
            UO.Print("Kam? Vyber bagl.");
            UOItem pytelcil=new UOItem(UIManager.TargetObject());
            
            ItemsCollection col=new UOItem(itemhlavni.Container).AllItems;
            IEnumerator<UOItem> en=col.GetEnumerator();
            
            while (en.MoveNext()) {
                UOItem item=en.Current;
                if (itemhlavni.Graphic==item.Graphic && (bezbarva?true:itemhlavni.Color==item.Color))
                    UO.MoveItem(item.Serial, 0, pytelcil.Serial);
            }
        }
        
        [Command]
        public void massmove1()
        {
            UO.Print("Ktere itemy premistit?");
            UOItem itemhlavni=new UOItem(UIManager.TargetObject());
            UO.Print("Kam? Vyber bagl.");
            UOItem pytelcil=new UOItem(UIManager.TargetObject());
            Serial pytelzdroj=itemhlavni.Container;
            ItemsCollection col=new UOItem(itemhlavni.Container).AllItems;
            IEnumerator<UOItem> en=col.GetEnumerator();
            UO.DeleteJournal();
            itemhlavni.Click();
            UO.Wait(500);
            String text="x";
            if (UO.InJournal("Ruin")){
                text="Ruin";
            }
            if (UO.InJournal("Defense")){
                text="Defense";
            }
            if (UO.InJournal("Might")){
                text="Might";
            }
            if (UO.InJournal("Guarding")){
                text="Guarding";
            }
            if (UO.InJournal("Force")){
                text="Force";
            }
            if (UO.InJournal("Hardening")){
                text="Hardening";
            }
            if (UO.InJournal("Power")){
                text="Power";
            }
            if (UO.InJournal("Fortification")){
                text="Fortification";
            }
            if (UO.InJournal("Vanquishing")){
                text="Vanquishing";
            }
            if (UO.InJournal("Invulnerability")){
                text="Invulnerability";
            }
            
            while (en.MoveNext()) {
                UOItem item=en.Current;
                if (itemhlavni.Graphic==item.Graphic && itemhlavni.Color==item.Color){
                    UO.DeleteJournal();
                    item.Click();
                    UO.Wait(500);
                    if (UO.InJournal("World save has been"))
                        UO.Wait(45000);
                    if (UO.InJournal(text)){
                        UO.MoveItem(item.Serial, 0, pytelcil.Serial);
                        UO.Wait(500);
                        while (item.Container==pytelzdroj)
                            UO.Wait(500);
                    }
                }
            }
        }
        
        [Command]
        public void mass(int plusovost)
        {
            UO.Print("odkud itemy premistit?");
            UOItem pytelhlavni=new UOItem(UIManager.TargetObject());
            UO.Print("Kam? Vyber bagl.");
            UOItem pytelcil=new UOItem(UIManager.TargetObject());
            
            ItemsCollection col=pytelhlavni.AllItems;
            IEnumerator<UOItem> en=col.GetEnumerator();
            String zbrane="x";
            String zbroje="x";
            
            switch (plusovost){
                case 1: zbrane="Ruin"; zbroje="Defense";break;
                case 2: zbrane="Might"; zbroje="Guarding";break;
                case 3: zbrane="Force"; zbroje="Hardening";break;
                case 4: zbrane="Power"; zbroje="Fortification";break;
                case 5: zbrane="Vanquishing"; zbroje="Invulnerability";break;
            }
            
            while (en.MoveNext()) {
                UOItem item=en.Current;
                UO.DeleteJournal();
                item.Click();
                UO.Wait(500);
                if (UO.InJournal("World save has been"))
                    UO.Wait(45000);
                if (UO.InJournal(zbrane)||UO.InJournal(zbroje)){
                    UO.MoveItem(item.Serial, 0, pytelcil.Serial);
                }
            }
        }
        
        [Command]
        public void mass1()
        {
            mass1(false);
        }
        
        [Command]
        public void mass1B()
        {
            mass1(true);
        }
        
        [Command]
        public void mass1(bool bezbarva)
        {
            UO.Print("Ktere itemy premistit?");
            UOItem itemhlavni=new UOItem(UIManager.TargetObject());
            ItemsCollection col=new UOItem(itemhlavni.Container).AllItems;
            IEnumerator<UOItem> en=col.GetEnumerator();
            UO.Print("Pohni s itemem tam kam chces vsechny ostatni a napis ok nebo pockej 6sec.");
            
            ushort x=itemhlavni.X;
            ushort y=itemhlavni.Y;
            UO.Wait(500);
            UO.DeleteJournal();
            int pocet=0;
            while (!UO.InJournal("ok")&&pocet<12) {
                UO.Wait(500);
                pocet++;
            }
            UO.Print("Pohnuto, presunuji...");
            Serial pytel=itemhlavni.Container;
            x=itemhlavni.X;
            y=itemhlavni.Y;
            pocet=0;
            
            while (en.MoveNext()) {
                UOItem item=en.Current;
                if (itemhlavni.Graphic==item.Graphic && (bezbarva?true:itemhlavni.Color==item.Color)){
                    pocet++;
                    UO.MoveItem(item.Serial, 0, pytel, x, y);
                    UO.Wait(500);
                }
            }
            UO.Print("Presunuto "+pocet+" itemu.");
        }
        
        [Command]
        public void ukliddobedny()
        {
            ukliddobedny(false);
        }
        
        [Command]
        public void ukliddo2bedny()
        {
            ukliddobedny(true);
        }
        
        [Command]
        public void ukliddobedny(bool dveBedny)
        {
            Graphic gr;
            UOColor color;
            UO.Print("Vyber bednu(ab, uab, sperkovnici a podobne) kam ukladat itemy.");
            UOItem bedna=new UOItem(UIManager.TargetObject());
            UOItem bedna2=null;
            if (dveBedny)
            {
                UO.Print("Vyber druhou bednu(ab, uab, sperkovnici a podobne) kam se da predmet pokud nepujde do prvni.");
                bedna2=new UOItem(UIManager.TargetObject());
            }

            UO.Print("Vyber predmet ktery se do bedny dava.");
            UOItem itemVzor=new UOItem(UIManager.TargetObject());
            Serial baglsitemy=itemVzor.Container;
            gr=itemVzor.Graphic;
            color=itemVzor.Color;
            ItemsCollection col=new UOItem(UO.Backpack).AllItems;
            IEnumerator<UOItem> en=col.GetEnumerator();
            
            while (true) 
            {
                UO.DeleteJournal();
                UOItem item=UO.FindType("item", gr, color, baglsitemy);                
                if (item==null || !item.Exist)
                    break;
                if (item.Container!=UO.Backpack) 
                {
                    UO.MoveItem(item.Serial, 0, Aliases.Backpack);
                    UO.Wait(500);
                    while (item.Container!=UO.Backpack)
                        UO.Wait(500);
                }
                bedna.Use();
                item.WaitTarget();
                UO.Wait(500);
                while ((item.Exist)&&(!UO.InJournal("nepatri")))
                    UO.Wait(500);
                if (UO.InJournal("nepatri"))
                {
                    UO.DeleteJournal();
                    if (bedna2==null)
                    {
                        UO.Print("bohuzel, bude to treba kliknout rucne");
                        return ;
                    }
                    bedna2.Use();
                    item.WaitTarget();
                    UO.Wait(500);    
                    while (item.Exist&&!UO.InJournal("nepatri"))
                        UO.Wait(500);
                    if (UO.InJournal("nepatri"))
                    {
                        UO.Print("bohuzel, bude to treba kliknout rucne");
                        return ;
                    }
                }
            }
            UO.Print("danzerino");
        }
    }
}
Naposledy upravil(a) Raziel dne 27.11.2017 19:56:36, celkem upraveno 3 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

Dobíjení věcí recharge krystalama.
,recharge <pocet>
<pocet> pocet pouzitých krystalů

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Recharge
    {
        public Recharge()
        {
        }
        
        [Command]
        public void recharge(int pocet)
        {  
            UO.Print("Vyber krystal");
            UOItem krystal=new UOItem(UIManager.TargetObject());
            Graphic g=krystal.Graphic;
            UOColor c=krystal.Color;
            
            UO.Print("Vyber co nabijet");
            UOItem cil=new UOItem(UIManager.TargetObject());
            for (int i=1;i<=pocet;i++) {
                UO.DeleteJournal();
                UO.UseType(g, c);
                cil.WaitTarget();
                UO.Wait(500);
                while (!UO.InJournal("Item has been recharged"))
                    UO.Wait(500);
            }
            UO.Print("Hotovo.");
        
        }
    }
}
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,snooping

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Snooping
    {
        [Command]
        public void snooping() {
            UO.Print("Vyber bágl kde se chces hrabat");
            UOItem zdroj=new UOItem(UIManager.TargetObject());
            while (true){
                zdroj.Use();
                UO.Wait(2500);
                if (UO.InJournal("World save has been")) {
                    UO.Wait(45000);
                    UO.DeleteJournal();
                }
                    
            }
        }
    }
}
Naposledy upravil(a) Raziel dne 18.11.2017 22:27:47, celkem upraveno 1 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

léčí dvě zvířata
,veterina
léčí 4 zvířata
,veterina4

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Veterina
    {        
        [Command]
        public void veterina4(){
            float f, f1;
            bool pokracuj;
            
            UO.DeleteJournal();
            UO.Print("Vyber 1 zvire");
            UOCharacter zvire1=new UOCharacter(UIManager.TargetObject());
            UO.Print("Vyber 2 zvire");
            UOCharacter zvire2=new UOCharacter(UIManager.TargetObject());
            zvire1.RequestStatus(5000);
            zvire2.RequestStatus(5000);
            
            UO.Print("Vyber 3 zvire");
            UOCharacter zvire3=new UOCharacter(UIManager.TargetObject());
            UO.Print("Vyber 4 zvire");
            UOCharacter zvire4=new UOCharacter(UIManager.TargetObject());
            zvire1.RequestStatus(5000);
            zvire2.RequestStatus(5000);
            
            UO.Say(zvire1.Name+" kill");
            zvire2.WaitTarget();
            UO.Wait(500);
            UO.Say(zvire2.Name+" kill");
            zvire1.WaitTarget();
            UO.Wait(500);

            zvire3.RequestStatus(5000);
            zvire4.RequestStatus(5000);
            
            UO.Say(zvire3.Name+" kill");
            zvire4.WaitTarget();
            UO.Wait(500);
            UO.Say(zvire4.Name+" kill");
            zvire3.WaitTarget();
            UO.Wait(500);

            pokracuj=true;
            
            while (World.Player.Skills["Veterinary"].RealValue<1000){
                if (UO.Count(0x0E21)==0) {
                    UO.Say("all stay");
                    UO.Print("Nemas bandy.");
                    return ;
                }
                if (pokracuj==false && zvire1.Hits>50 && zvire2.Hits>50&& zvire3.Hits>50 && zvire4.Hits>50){
                    UO.Say(zvire1.Name+" kill");
                    zvire2.WaitTarget();
                    UO.Wait(500);
                    UO.Say(zvire2.Name+" kill");
                    zvire1.WaitTarget();
                    UO.Wait(500);
                    
                    UO.Say(zvire3.Name+" kill");
                    zvire4.WaitTarget();
                    UO.Wait(500);
                    UO.Say(zvire4.Name+" kill");
                    zvire3.WaitTarget();
                    UO.Wait(500);
                    pokracuj=true;
                }
                UO.DeleteJournal();
                f=zvire1.MaxHits-zvire1.Hits+zvire2.MaxHits-zvire2.Hits;
                f1=zvire3.MaxHits-zvire3.Hits+zvire4.MaxHits-zvire4.Hits;
                if (f>f1) {
                
                    if (zvire1.MaxHits-zvire1.Hits>zvire2.MaxHits-zvire2.Hits) {
                        if (zvire1.Hits<zvire1.MaxHits){
                            UO.UseType(0x0E21);
                            zvire1.WaitTarget();
                            UO.Wait(500);
                            while (!UO.InJournal("barely") &&!UO.InJournal("You put the bloody band")&&!UO.InJournal("mumii")){
                	            UO.Wait(100);
                            }
                        }
                    }
                    else {
                        if (zvire2.Hits<zvire2.MaxHits){
                            UO.UseType(0x0E21);
                            zvire2.WaitTarget();
                            UO.Wait(500);
                            while (!UO.InJournal("barely") &&!UO.InJournal("You put the bloody band")&&!UO.InJournal("mumii")){
                	            UO.Wait(100);
                            }                        
                        }
                    }
                }
                else {
                    if (zvire3.MaxHits-zvire3.Hits>zvire4.MaxHits-zvire4.Hits) {
                        if (zvire3.Hits<zvire3.MaxHits){
                            UO.UseType(0x0E21);
                            zvire3.WaitTarget();
                            UO.Wait(500);
                            while (!UO.InJournal("barely") &&!UO.InJournal("You put the bloody band")&&!UO.InJournal("mumii")){
                	            UO.Wait(100);
                            }
                        }
                    }
                    else {
                        if (zvire4.Hits<zvire4.MaxHits){
                            UO.UseType(0x0E21);
                            zvire4.WaitTarget();
                            UO.Wait(500);
                            while (!UO.InJournal("barely") &&!UO.InJournal("You put the bloody band")&&!UO.InJournal("mumii")){
                	            UO.Wait(100);
                            }                        
                        }
                    }                
                }
    
                if (pokracuj==true &&(zvire1.Hits<40 || zvire2.Hits<40||zvire3.Hits<40 || zvire4.Hits<40)){
                    UO.Say("all stay");
                    UO.Wait(500);
                    pokracuj=false;
                }
            }
            UO.Say("all stay");
        }
        
        [Command]
        public void veterina(){
            float f;
            bool pokracuj;
            
            UO.DeleteJournal();
            UO.Print("Vyber 1 zvire");
            UOCharacter zvire1=new UOCharacter(UIManager.TargetObject());
            UO.Print("Vyber 2 zvire");
            UOCharacter zvire2=new UOCharacter(UIManager.TargetObject());
            zvire1.RequestStatus(5000);
            zvire2.RequestStatus(5000);
            zvire1.RequestStatus(5000);
            zvire2.RequestStatus(5000);
            
            UO.Say(zvire1.Name+" kill");
            zvire2.WaitTarget();
            UO.Wait(500);
            UO.Say(zvire2.Name+" kill");
            zvire1.WaitTarget();
            UO.Wait(500);
            pokracuj=true;
            
            while (World.Player.Skills["Veterinary"].RealValue<1000){
                if (UO.Count(0x0E21)==0) {
                    UO.Say("all stay");
                    UO.Print("Nemas bandy.");
                    return ;
                }
                if (pokracuj==false && zvire1.Hits>50 && zvire2.Hits>50){
                    UO.Say(zvire1.Name+" kill");
                    zvire2.WaitTarget();
                    UO.Wait(500);
                    UO.Say(zvire2.Name+" kill");
                    zvire1.WaitTarget();
                    UO.Wait(500);
                    pokracuj=true;
                }
                UO.DeleteJournal();
                
                f=(zvire1.Hits/(float)zvire1.MaxHits)/(zvire2.Hits/(float)zvire2.MaxHits);
                if (f<1) {
                    if (zvire1.Hits<zvire1.MaxHits){
                        UO.UseType(0x0E21);
                        zvire1.WaitTarget();
                        UO.Wait(500);
                        while (!UO.InJournal("barely") &&!UO.InJournal("You put the bloody band")&&!UO.InJournal("mumii")){
            	            UO.Wait(100);
                        }
                    }
                }
                else {
                    if (zvire2.Hits<zvire2.MaxHits){
                        UO.UseType(0x0E21);
                        zvire2.WaitTarget();
                        UO.Wait(500);
                        while (!UO.InJournal("barely") &&!UO.InJournal("You put the bloody band")&&!UO.InJournal("mumii")){
            	            UO.Wait(100);
                        }                        
                    }
                }

                if (pokracuj==true &&(zvire1.Hits<40 || zvire2.Hits<40)){
                    UO.Say("all stay");
                    UO.Wait(500);
                    pokracuj=false;
                }
            }
            UO.Say("all stay");
        }  
    }
}
Naposledy upravil(a) Raziel dne 18.11.2017 22:28:01, celkem upraveno 2 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,cartography

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Cartography
    {
        [Command]
        public void cartography(){
            while (!UO.InJournal("prazdny")) {
		        UO.DeleteJournal();
		        UO.UseType(0x0FBE,0x0B98);
		        UO.WaitTargetSelf();
		        UO.Wait(500);
		        while (!UO.InJournal("in your pack"))
		            UO.Wait(200);
                	UO.DeleteJournal();		            
		        UO.UseType(0x14EB);
		        UO.WaitMenu("What sort of map do you want to draw ?","Detail Map");
		        UO.Wait(500);
		        while (!UO.InJournal("unusable map")&&!UO.InJournal("in your pack"))
		            UO.Wait(200);
		        UO.UseType(0x0FBE,0x0B98);
		        UO.WaitTargetType(0x14EB);
		        while (!UO.InJournal("Zrecykloval")&&!UO.InJournal("Uschoval jsi mapu"))
		            UO.Wait(200);
            }
        }
    }
}
Naposledy upravil(a) Raziel dne 27.11.2018 20:55:27, celkem upraveno 3 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,uklid
uklidí všechny možné nb itemy na kraj batohu at nepřekáží

,posun x y
přesune předmět na dané souřadnice

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class UpravaBaglu
    {
        private void NajdiAPresun(string text, Graphic g, UOColor c, Serial odkud, Serial kam, int x, int y)
        {
            UOItem item = UO.FindType(text, g, c, odkud);
            if (text=="spellbook")
            {
                foreach(UOItem itemB in World.Player.Backpack.AllItems)
                {
                    if (itemB.Graphic == g)
                    {
                        item = itemB;
                        break;
                    }
                }
            }
            if (!item.Exist || (item.X==x && item.Y==y))
                return;
            UO.Print("presouvam "+text);
            UO.MoveItem(item.Serial, 0, kam, (ushort)x, (ushort)y);
            UO.Wait(500);
            while (item.X != x && item.Y != y)
                UO.Wait(100);
            if (UO.InJournal("World save"))
            {
                UO.Wait(45000);
                UO.DeleteJournal();
            }
        }

        [Command]
        public void uklid()
        {
            UO.DeleteJournal();
            NajdiAPresun("runebook", 0x0FEF, 0x0482, Aliases.Backpack, UO.Backpack, 40, 10);
            NajdiAPresun("cestbook", 0x22C5, 0x0000, Aliases.Backpack, Aliases.Backpack, 40, 10);
            NajdiAPresun("nbkudla", 0x0F51, 0x0B80, Aliases.Backpack, UO.Backpack, 70, 10);
            NajdiAPresun("vampkudla", 0x10E4, 0x0B80, Aliases.Backpack, UO.Backpack, 70, 10);
            NajdiAPresun("travelbook", 0x0FF0, 0x08A5, Aliases.Backpack, UO.Backpack, 40, 20);
            NajdiAPresun("spellbook", 0x0EFA, 0x0413, Aliases.Backpack, UO.Backpack, 52, 10);
            NajdiAPresun("nbruna", 0x1F14, 0x0B1D, Aliases.Backpack, UO.Backpack, 50, 25);
            NajdiAPresun("mortar", 0x0E9B, 0x0B87, Aliases.Backpack, UO.Backpack, 60, 10);
            NajdiAPresun("petleash", 0x1374, 0x0B4C, Aliases.Backpack, UO.Backpack, 80, 10);
            NajdiAPresun("klicbezp", 0x1012, 0x0003, Aliases.Backpack, UO.Backpack, 90, 10);
            NajdiAPresun("keyring", 0x1769, 0x0000, Aliases.Backpack, UO.Backpack, 100, 10);
            NajdiAPresun("keyring2", 0x176A, 0x0000, Aliases.Backpack, UO.Backpack, 100, 10);
            NajdiAPresun("vendetta", 0x27AB, 0x0B4F, Aliases.Backpack, UO.Backpack, 110, 10);
            NajdiAPresun("vampkrystal", 0x1F19, 0x0000, Aliases.Backpack, UO.Backpack, 110, 10);
            NajdiAPresun("vampkrystalstone", 0x1F19, 0x0B87, Aliases.Backpack, UO.Backpack, 120, 10);
        }

        [Command]
        public void posun(ushort x, ushort y)
        {
            UO.Print("Co posunout?");
            UOItem item = new UOItem(UIManager.TargetObject());

            UO.MoveItem(item.Serial, 0, UO.Backpack, x, y);
        }
    }
}
Naposledy upravil(a) Raziel dne 15.01.2018 21:37:25, celkem upraveno 5 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

přepisování map
,prepisovac

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Prepisovac
    {
        [Command]
        public void prepisovac()
        {
            UO.Print("Kde mas mapky?");
            UOItem mapky = new UOItem(UIManager.TargetObject());
            UO.Print("Kde davat prepsane mapky?");
            UOItem mapkyCil = new UOItem(UIManager.TargetObject());

            mapky.Use();
            UO.Wait(500);
            while (!mapky.Opened)
                UO.Wait(100);

            foreach (UOItem mapka in mapky.AllItems)
            {
                UO.DeleteJournal();
                if (mapka.Graphic != 0x14EB)
                    continue;
                while (!UO.InJournal("Mapa ziskala"))
                {
                    UO.UseType(0x0FBF, 0x0B85);
                    mapka.WaitTarget();
                    UO.Wait(500);
		    while (!UO.InJournal("Mapa ziskala tyto souradnice")&&(!UO.InJournal("nepovedlo")))
                        UO.Wait(100);
                    if (UO.InJournal("nepovedlo"))
                    {
                        UO.DeleteJournal();
                        continue;
                    }
                    if (mapkyCil != null && mapkyCil.Exist)
                    {
                        Serial s = mapka.Container;
                        UO.MoveItem(mapka.Serial, 0, mapkyCil.Serial);
                        UO.Wait(500);
                        while (mapka.Container == s)
                            UO.Wait(100);
                    }
                }
            }
            UO.Print("Mapky zmeneny.");
        }
    }
}
Naposledy upravil(a) Raziel dne 22.01.2018 16:32:43, celkem upraveno 4 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,enemyAll

vytáhne vám záložky z potvor jak nevidíte přes sumy, nebo nemůžete moba nakliknout myší
nutno mít nemizí záložky (statusbar)
upravte si statusbar.cs
řádek cca 26 na "public static bool StatusExists(Serial id)"

ignoruje obyčejné mirror spider kopie, a dread chameleon bird kopie - takže vám vytáhne jen originály

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;
using Scripts.Status;

namespace Phoenix.Scripts.Raziel
{
    public class AllStatus
    {
        public static List<MyMob> summi;
        
        public AllStatus()
        {
            if (summi==null) 
            {
                summi=new List<MyMob>();
                //Ranger
                summi.Add(new MyMob(0x00D3, 0x0712));// brown bear
                summi.Add(new MyMob(0x00E1, 0x0712));// wolf
                summi.Add(new MyMob(0x00D4, 0x0712));// grizzly                
                summi.Add(new MyMob(0x0005, 0x0712));// orel
                summi.Add(new MyMob(0x0005, 0x0BA4));// phoenix
                //Mage
                summi.Add(new MyMob(0x0015, 0x0757));// giant viper 
                summi.Add(new MyMob(0x0030, 0x0751));// giant scorpion
                summi.Add(new MyMob(0x001C, 0x0751));// giant spider
                summi.Add(new MyMob(0x000E, 0x0000));// earth elemental
                summi.Add(new MyMob(0x000D, 0x0000));// air elemental
                summi.Add(new MyMob(0x003C, 0x0751));// dragon
                //Clerik
                summi.Add(new MyMob(0x003A, 0x0B87));// spirit
                summi.Add(new MyMob(0x003A, 0x0000));// spirit
                summi.Add(new MyMob(0x003A, 0x084C));// spirit 
                summi.Add(new MyMob(0x0090, 0x4001));// eternal spirit 
                //Necromancer
                summi.Add(new MyMob(0x00EE, 0x01BB));// krysa
                summi.Add(new MyMob(0x00D2, 0x0966));// dark oclock
                summi.Add(new MyMob(0x0018, 0x0835));// liche 
                summi.Add(new MyMob(0x0018, 0x0835));// liche 
                summi.Add(new MyMob(0x0039, 0x0835));// skeleton sword & shield
                summi.Add(new MyMob(0x001A, 0x0835));// wraith
                summi.Add(new MyMob(0x0003, 0x0835));// mummy
                summi.Add(new MyMob(0x0003, 0x058D));// ghoul
                summi.Add(new MyMob(0x000D, 0x0B77));// death vortex
                summi.Add(new MyMob(0x0018, 0x0837));// demiliche
                summi.Add(new MyMob(0x0018, 0x058D));// demiliche
            }
        }
        //hadi model 0x0034   dread 178 hp bird 0x0006  
        [Command]
        public void enemyAll()
        {
            foreach (UOCharacter mob in World.Characters)
            {
                mob.RequestStatus(5000);
                if (mob.Distance > 20 || summi.Contains(new MyMob(mob.Model, mob.Color))
                    ||(mob.Name=="Mirror Spider" && mob.MaxHits<100)
                    ||(mob.Name=="Dread Chameleon Bird" && mob.MaxHits<140))
                    continue;
                if (mob.Notoriety != Notoriety.Enemy&& mob.Notoriety != Notoriety.Murderer)
                    continue;
                
                if (!StatusBar.StatusExists(mob.Serial))
                {
                    UO.Exec("statusbar", mob.Serial);
                }
            }
        }
    }
    
    public class MyMob : IEquatable<MyMob>
    {
        public Graphic Model {get; set;}
        public UOColor Color {get; set;}
        
        public MyMob(Graphic g, UOColor c)
        {
            Model=g;
            Color=c;
        }
        
        public override bool Equals(object obj)
        {
            MyMob p=obj as MyMob;
            if (Model==p.Model && Color==p.Color)
                return true;
            return false;
        }
        
        public override int GetHashCode()
        {
            return 0;
        }
        
        public bool Equals(MyMob other)
        {
            if (other == null) return false;
                return (Model==other.Model && Color==other.Color);
        }
    }
}
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

zapalování ohnů
,camping

kutání dřeva nb dýkou
,campdrevo

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Camping
    {
        [Command]
        public void camping(){
            
            while (true) {
                UOItem drevo= UO.FindType("drevo", 0x0DE1, 0x0000, Aliases.Backpack);
                if (drevo==null || !drevo.Exist)
                    return ;
                UO.DropHere(1, drevo.Serial);
                UO.Wait(500);
                foreach (UOItem item in World.Ground) {
                    if (item.Distance<4 && item.Graphic==0x0DE1) {
                        while (item.Graphic==0x0DE1) {
                            item.Use();
                            UO.Wait(500);
                        }
                    }
                }
            }
        }
        
        [Command]
        public void campdrevo(){
            while (!UO.InJournal("There is no wood")) {
                UO.DeleteJournal();
                UO.UseType(0x0F51);
                UO.WaitTargetLast();
                UO.Wait(500);
                while (!UO.InJournal("You put the kind"))
                   UO.Wait(100);
            }
        }
    }
}
Naposledy upravil(a) Raziel dne 09.02.2018 09:28:31, celkem upraveno 1 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

vaření - musíte mít kotlík
,cooking
trénink s panvičkou
,cookPanev

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Cooking
    {
        [Command]
        public void cooking()
        {
            UO.Print("Vyber kotlik.");
            UOItem kotlik=new UOItem(UIManager.TargetObject());
            while (!UO.InJournal("make anything with what you have")) {
                UO.DeleteJournal();
                kotlik.Use();
                UO.Wait(4700);
                while (!UO.InJournal("burn") && !UO.InJournal("in your pack")&& !UO.InJournal("make anything with what you have")) {
                    UO.Wait(300);
                }
                if (UO.InJournal("World save has been")) {
                    UO.Wait(45000);
                }
            }
        }
        
        [Command]
        public void cookPanev()
        {
            UO.Print("Vyber bagl Kde mas steaky?");
            UOItem bag=new UOItem(UIManager.TargetObject());
            bag.Use();
            UO.Wait(500);
            while (!bag.Opened)
                UO.Wait(100);
            while (bag.AllItems.Count(0x097A,0x0000)>0 || UO.Count(0x097A,0x0000)>0) {
                UO.DeleteJournal();
                if (UO.Count(0x097A,0x0000)==0)
                {
                    UOItem steaky=UO.FindType("steaky", 0x097A,0x0000, bag.Serial);
                    UO.MoveItem(steaky.Serial, 50, Aliases.Backpack);
                    UO.Wait(500);
                    steaky=UO.FindType("steaky", 0x097B,0x0000, Aliases.Backpack);
                    if (steaky.Exist)
                    {
                        UO.MoveItem(steaky.Serial, 0, bag.Serial);
                        UO.Wait(500);
                    }
                }
                
                UO.UseType(0x097F);
                UO.WaitTargetType(0x097A,0x0000);
                UO.Wait(500);
                while (!UO.InJournal("akce skoncila")) {
                    UO.Wait(100);
                }
                if (UO.InJournal("World save has been")) {
                    UO.Wait(45000);
                }
            }
        }
    }
}
Naposledy upravil(a) Raziel dne 16.03.2018 09:04:43, celkem upraveno 2 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

roztažení hracího okna - protože už mi dva lidi napsali že neví jak ten sc nahrát tak ho hodím sem
abyste zrušili ten rámeček okna musíte v configu zrušit možnost posouvat hrací okno přidat řádek
allowWindowResize=Off

Kód: Vybrat vše

using System;
using Phoenix.Gui;
using System.Diagnostics;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Phoenix.Scripts
{[RuntimeObject]
    public class GameWindowSize
    {
        private const int width = 1024;
        private const int height = 720;

        public GameWindowSize()//TODO: asi neni moc rychly, pustit v jinym threadu? dost mozna by se to mohlo ukladat
        {
            try
            {
                int offset;
                if (FindPattern(sizePatternOld, out offset))
                {
                    int sizeOffset = Patch((IntPtr)offset, true);

                    Marshal.WriteInt32((IntPtr)sizeOffset, 0, width);
                    Marshal.WriteInt32((IntPtr)sizeOffset, 4, height);
                    Debug.WriteLine("Actual GameWindowSize patched.", "GameWindowSize");

                    if (!FindPattern(thingiePattern, out offset))
                        throw new Exception("Old thingie pattern not found!");
                    Marshal.WriteInt32(Marshal.ReadIntPtr((IntPtr)offset, 25), width);
                    Marshal.WriteInt32(Marshal.ReadIntPtr((IntPtr)offset, 35), height);
                    Debug.WriteLine("Old thingie patched.", "GameWindowSize");
                }
                else if (FindPattern(sizePatternNew, out offset))
                    Patch((IntPtr)offset, false);
                else
                    throw new Exception("SetGameWindowSize pattern not found!");
            }
            catch (Exception ex) { ExceptionDialog.Show(ex, "GameWindowSize exception."); }
        }

        private int Patch(IntPtr offset, bool old)
        {
            Debug.WriteLine("SetGameWindowSize " + (old ? "old" : "new") + " pattern found.", "GameWindowSize");

            uint oldProtect;
            if (!VirtualProtect(offset, 22, 0x40, out oldProtect))
                throw new Win32Exception();

            int sizeOffset = Marshal.ReadInt32(offset, old ? 0x16 : 0x18);

            Marshal.WriteByte(offset, 0, 0xC7);
            Marshal.WriteByte(offset, 1, 0x05);
            Marshal.WriteInt32(offset, 2, sizeOffset);
            Marshal.WriteInt32(offset, 6, width);

            Marshal.WriteByte(offset, 10, 0xC7);
            Marshal.WriteByte(offset, 11, 0x05);
            Marshal.WriteInt32(offset, 12, sizeOffset + 4);
            Marshal.WriteInt32(offset, 16, height);

            Marshal.WriteByte(offset, 20, (byte)(old ? 0xC3 : 0xEB));//old ? retn : jmp short -27
            Marshal.WriteByte(offset, 21, unchecked((byte)-27));

            Debug.WriteLine("SetGameWindowSize patched.", "GameWindowSize");
            return sizeOffset;
        }

        [DllImport("kernel32.dll")]
        private static extern bool VirtualProtect(IntPtr lpAddress, uint dwSize, uint flNewProtect, out uint lpflOldProtect);

        private bool FindPattern(byte[] pattern, out int offset)
        {
            ProcessModule module = Process.GetCurrentProcess().MainModule;
            for (offset = module.BaseAddress.ToInt32(); offset < module.BaseAddress.ToInt32() + module.ModuleMemorySize - pattern.Length; offset++)
                for (int x = 0; x < pattern.Length; x++)
                {
                    if (pattern[x] != 0xFF && Marshal.ReadByte((IntPtr)offset, x) != pattern[x])
                        break;
                    if (x == pattern.Length - 1)
                        return true;
                }
            return false;
        }

        private readonly byte[] sizePatternOld = new byte[]
                                        {
                                            0x3D, 0x20, 0x03, 0x00, 0x00,   //cmp   eax, 320h
                                            0x75, 0x1D,                     //jnz   0x1D
                                            0x8B, 0x4C, 0x24, 0x08,         //mov   ecx, [esp+arg_4]
                                            0xB8, 0x58, 0x02, 0x00, 0x00,   //mov   eax, 258h
                                            0x3B, 0xC8,                     //cmp   ecx, eax
                                            0x75, 0x10                      //jnz   0x10
                                        };

        private readonly byte[] sizePatternNew = new byte[]
                                        {
                                            0x3D, 0x20, 0x03, 0x00, 0x00,   //cmp   eax, 320h
                                            0x75, 0xE8,                     //jnz   0xE8
                                            0x56,                           //push  esi
                                            0x8B, 0x74, 0x24, 0x0C,         //mov   esi, [esp+4+arg_4]
                                            0xB8, 0x58, 0x02, 0x00, 0x00,   //mov   eax, 258h
                                            0x3B, 0xF0,                     //cmp   esi, eax
                                            0x5E,                           //pop   esi
                                            0x75, 0xD9                      //jnz   0xD9
                                        };

        private readonly byte[] thingiePattern = new byte[]
                                                 {
                                                     0xA0, 0xFF, 0xFF, 0xFF, 0x00, 
                                                     0x83, 0xEC, 0x08,
                                                     0xA8, 0x01,
                                                     0x75, 0x1B,
                                                     0x0C, 0x01,
                                                     0xA2, 0xFF, 0xFF, 0xFF, 0x00,
                                                     0xE8, 0xFF, 0xFF, 0xFF, 0x00
                                                 };
    }
} 
Uživatelský avatar
Tommy
Paper Elemental
Paper Elemental
Příspěvky: 319
Registrován: 24.10.2006 21:06:43

Re: Razielovy scripty

Příspěvek od Tommy »

EDIT:
C:\Program Files\Ultima Online\uo.cfg
zde přidat řádek allowWindowResize=Off

(Já to prvně zkoušel dávat do desktopu, tam to nefungovalo a uplně jsem zapoměl na uo.cfg)


Původní dotaz:
Raziel píše: abyste zrušili ten rámeček okna musíte v configu zrušit možnost posouvat hrací okno přidat řádek
allowWindowResize=Off
Co je tímhle přesně myšleno? Okno mám sice 1024x768 ale rámeček mám 800x600 tzn mi tam překáží... dle toho popisu výše moc nechápu kde co udělat.
Neberte život tak vážně, stejně z něj nevyváznete živí.
UO - Dark Paradise - YoutubeChannel
https://www.youtube.com/channel/UCDX--rk_wDwG-gYSUyOE_FA
Uživatelský avatar
Johny Matovic
Lord Ancestral Grafoman
Lord Ancestral Grafoman
Příspěvky: 1317
Registrován: 22.12.2007 12:29:24
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Johny Matovic »

Tommy píše:Co je tímhle přesně myšleno? Okno mám sice 1024x768 ale rámeček mám 800x600 tzn mi tam překáží... dle toho popisu výše moc nechápu kde co udělat.
Si daj quidovho klienta, ten prepisuje rozlisenie na tvrdo, na neakom nastaveni v uo.cfg mu nezalezi.
Sklb - okrasny clovek
Please, for fuck sake, no revolution.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

trocha vylepšení starých scriptů:

(nejen) portění přes knížky a nb runu
,nbruna - portí nb runou
,cestovnibook <cislo>- porti cestovni knihou cislo je destinace (8 je jhelom, 19 je moonglow atd)
,travelbook <cislo>- porti travel knihou cislo je destinace (podle pořadí tlačítek 1-dobití knihy, 4 vlastní místo atd)
,runebook <cislo>- porti rune knihou cislo je destinace (1 je jhelom 9 je nabít)

Kód: Vybrat vše

using System;
using Phoenix;
using Phoenix.Communication;
using Phoenix.WorldData;

namespace Scripts.DarkParadise.Raziel
{
    public class Cestovani
    {
        private DateTime requestTime;
        private uint? buttonId;
        private bool travel;
        private bool mark;
        
        [Command]
        public void nbruna()
        {
            UOItem nbruna = UO.Backpack.AllItems.FindType(0x1F14, 0x0B1D);
            if (!nbruna.Exist)
                throw new ScriptErrorException("NB Rune not found.");

            buttonId = 1;
            requestTime = DateTime.Now;

            nbruna.Use();
        }
        
        [Command]
        public void cestovniBook(uint destinationId)
        {
            UOItem book = UO.Backpack.AllItems.FindType(0x22C5, 0x0000);
            if (!book.Exist)
                throw new ScriptErrorException("Cestovni kniha nenalezena.");

            buttonId = destinationId;
            requestTime = DateTime.Now;
            
            book.Use();
        }
        
        [Command]
        public void travelbook(uint destinationId)
        {
            UOItem book = UO.Backpack.AllItems.FindType(0x0FEF, 0x0482);
            if (!book.Exist)
                throw new ScriptErrorException("Travelbook nenalezen.");

            buttonId = destinationId;
            requestTime = DateTime.Now;
            if (destinationId==4 || destinationId==40)
            {
                buttonId=4;
                if (destinationId==40)
                    mark=true;
                else
                    travel=true;
                    
            }
            book.Use();
        }

        [Command]
        public void runebook(uint destinationId)
        {
            UOItem book = UO.Backpack.AllItems.FindType(0x0FF0, 0x08A5);
            if (!book.Exist)
                throw new ScriptErrorException("Runebook nenalezen.");

            buttonId = destinationId;
            requestTime = DateTime.Now;

            book.Use();
        }

        [ServerMessageHandler(0xB0)]
        public CallbackResult OnGenericGump(byte[] data, CallbackResult prevResult)
        {
            if (prevResult != CallbackResult.Normal)
                return prevResult;

            if (buttonId != null && DateTime.Now - requestTime < TimeSpan.FromSeconds(6)) {
                // Respond automatically
                uint gumpSerial = ByteConverter.BigEndian.ToUInt32(data, 7);
 
                PacketWriter reply = new PacketWriter(0xB1);
                reply.WriteBlockSize();
                reply.Write(World.Player.Serial);
                reply.Write(gumpSerial);
                reply.Write(buttonId.Value);
                reply.Write(0); // Switches count
                reply.Write(0); // Entries count

                Core.SendToServer(reply.GetBytes());

                // Do not pass gump further
                buttonId = null;
                if (travel)
                    buttonId = 1;
                if (mark)
                    buttonId = 3;
                travel=false;
                mark=false;
                return CallbackResult.Sent;
            }

            return CallbackResult.Normal;
        }
    }
}
,staty - uloží equip (pokud ještě neexistuje) a opraví staty a nahodí equip zpátky (používá script výše pro opravu statů)
,ulozequip - zapamatuje si co máte na sobě /pro uložení jiného equipu je třeba pustit znova ultimu, nebudu to měnit je to takhle rychlejší
,nahodequip nahodí uložený equip
,naramek obleče náramek pro wary/paly a robu není to ve scriptu protože to je jen pro wara/pala tak to mám spešl bokem

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;
using Phoenix.Communication;

namespace Phoenix.Scripts.Raziel
{
    public class Oprava
    {
        public static List<UOItem> equip=new List<UOItem>();
        
        [Command]
        public void naramek()
        {
            UO.UseType(0x1086, 0x0480);
            UO.Wait(500);
            UO.UseType(0x1F03);
        }
        
        [Command]
        public void staty()
        {
            ulozequip();
            UOItem book = UO.Backpack.AllItems.FindType(0x22C5);
            if (book.Exist)
                UO.RunCmd("cestovniBook", (uint)2);
             else 
             {
                UO.RunCmd("travelBook", (uint)2);
             }

            UO.WaitMenu("Po pouziti vam budou opraveny staty na spravne hodnoty. Pozor, pri oprave vam spadne vase brneni do batuzku!", "Ano, oprav");
            Journal.WaitForText("You put");
            nahodequip();
        }
        
        [Command]
        public void ulozequip(){
            if (equip.Count>0)
                return;
            equip=new List<UOItem>();
            UOItem hlavnipytel=new UOItem(Aliases.Self);
            ItemsCollection col=hlavnipytel.AllItems;
            IEnumerator<UOItem> en=col.GetEnumerator();
            while (en.MoveNext()) {
                UOItem item=en.Current;                
                if (item.Layer!=Layer.FacialHair&& item.Layer!=Layer.Hair&&item.Layer!=Layer.None&& item.Layer!=Layer.Unused&&
                 item.Layer!=Layer.Unused2&&item.Layer!=Layer.Backpack){
                        equip.Add(item);
                }
            }
            UO.Wait(500);
        }
        
        [Command]
        public void nahodequip(){
            foreach (UOItem item in equip){
                if (item.Layer!=Layer.None&&item.Layer!=Layer.Backpack) {
                    continue;
                }
                if (!(item.Graphic==0x1086&&item.Color==0x0480)){
                    item.Use();
                    UO.Wait(500);
                }
            }        
        }
    }
}
Naposledy upravil(a) Raziel dne 02.04.2020 22:46:47, celkem upraveno 3 x.
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,tracking - hledá jméno podle prvního makra, at to nemusíte psát dokola když hledáte nějaké konkrétní NPC
,tracking <jmeno>
například ,tracking "Mestska straz"

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class Tracking
    {
        [Command]
        public void tracking(){
            tracking("Alida");
        }
    
        [Command]
        public void tracking(string name){
            UO.Print(name);
            UO.DeleteJournal();
            while (!World.Player.Dead)
            {
                UO.UseSkill("Tracking");
                UO.Wait(100);
                if (UO.InJournal("You must wait"))
                {
                    UO.Print("Uz nalezeno...");
                    return ;
                }
                UO.WaitMenu("Tracking", "Humans", "Tracking", name);
                UO.Wait(1000);
                if (UO.InJournal("World save"))
                {
                    UO.Wait(45000);
                }
                UO.DeleteJournal();
            }
        }
    }
}
Uživatelský avatar
Raziel
Undead Scriber
Undead Scriber
Příspěvky: 650
Registrován: 07.09.2006 19:12:21
Kontaktovat uživatele:

Re: Razielovy scripty

Příspěvek od Raziel »

,whheal - nasadí před bandou meč na heal
,whhid - nasadí před hidem meč na hid

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;

namespace Phoenix.Scripts.Raziel
{
    public class WH
    {
        Serial idhid=0;
        Serial idheal=0;
        [Command]
        public Serial NajdiZbran(UOColor color)
        {
            if (World.Player.Layers[Layer.RightHand].Color==color)
                return World.Player.Layers[Layer.RightHand].Serial;
            if (World.Player.Layers[Layer.LeftHand].Color==color)
                return World.Player.Layers[Layer.LeftHand].Serial;
                
            foreach (UOItem item in World.Player.Backpack.AllItems){
                if (item.Color==color) {    
                    return item.Serial;
                }            
            }
            return 0;
        }
        
        [Command]
        public void whheal()
        {
            UO.DeleteJournal();
            
            if (idheal==0|| !(new UOItem(idheal)).Exist)
                idheal=NajdiZbran(0x0B88);
            
            if (idheal!=0 && World.Player.Layers[Layer.RightHand].Serial!=idheal
                &&World.Player.Layers[Layer.LeftHand].Serial!=idheal){
                UO.UseObject(idheal);//heal mec
                UO.WaitTargetSelf();
                UO.Wait(500);
            }
            UO.BandageSelf();
        }

        [Command]
        public void whhid()
        {  
            UO.DeleteJournal();
            NajdiZbran(0x0B60);
            if (idhid==0|| !(new UOItem(idhid)).Exist)
                idhid=NajdiZbran(0x0B60);
            
            if (idhid!=0 && World.Player.Layers[Layer.RightHand].Serial!=idhid
                &&World.Player.Layers[Layer.LeftHand].Serial!=idhid){
                UO.UseObject(idhid);//hid mec
                UO.WaitTargetSelf();
                UO.Wait(500);
            }
            UO.UseSkill(StandardSkill.Hiding);
        }
    }
}
Odpovědět