Piti & Cepovani potionu

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

Moderátor: Caleb

Odpovědět
Uživatelský avatar
Wizzy
Evil League Of Evil
Příspěvky: 1437
Registrován: 07 zář 2006 19:19
Kontaktovat uživatele:

Piti & Cepovani potionu

Příspěvek od Wizzy »

Cely soubor (c) Tomb:
http://dl.dropbox.com/u/7651700/fena/Drinking.cs

,nalij / ,vypij
- akorat doplnte v hotkeych potiony
- napr ,nalij TMR ,vypij GH atd.

Kód: Vybrat vše

       public struct TMR
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0003;
            public const ushort type = 0x0F09;
            public const ushort color = 0x0003;
        }

        public struct GH
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x08A7;
            public const ushort type = 0x0F0C;
            public const ushort color = 0x0000;
        }

        public struct TR
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x014D;
            public const ushort type = 0x0F0B;
            public const ushort color = 0x0000;

        }

        public struct GC
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0842;
            public const ushort type = 0x0F07;
            public const ushort color = 0x0000;
        }

        public struct GS
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0481;
            public const ushort type = 0x0F09;
            public const ushort color = 0x0000;
        }

        public struct GB
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0025;
            public const ushort type = 0x0F0C;
            public const ushort color = 0x0025;
        }
        public struct IV // invis
        {
            public const ushort type = 0x0F09;
            public const ushort color = 0x0B77;
        }        
        [Executable]
        public void vypij(String napoj) //pije napoj podle jmena
        {
            switch (napoj)
            {
                case "GH":
                    if (UO.Count(GH.type) > 0)
                    {
                        UO.UseType(GH.type);
                        UO.Wait(500);
                        UO.Print(0x0435, "Zbyva " + UO.Count(GH.type) + " GH.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni GH!!");
                    }
                    break;
                case "TMR":
                    if (UO.Count(TMR.type, TMR.color) > 0)
                    {
                        UO.UseType(TMR.type, TMR.color);
                        UO.Wait(500);
                        UO.Print(0x0480, "Zbyva " + UO.Count(TMR.type, TMR.color) + " TMR.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni TMR!!");
                    }
                    break;
                case "TR":
                    if (UO.Count(TR.type) > 0)
                    {
                        UO.UseType(TR.type);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(TR.type) + " TR.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni TR!!");
                    }
                    break;
                case "GS":
                    if (UO.Count(GS.type, GS.color) > 0)
                    {
                        UO.UseType(GS.type, GS.color);
                        UO.Wait(500);
                        UO.Print(0x0481, "Zbyva " + UO.Count(GS.type, GS.color) + " GS.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni GS!!");
                    }
                    break;
                case "GC":
                    if (UO.Count(GC.type) > 0)
                    {
                        UO.UseType(GC.type);
                        UO.Wait(500);
                        UO.Print(0x0553, "Zbyva " + UO.Count(GC.type) + " GC.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni GC!!");
                    }
                    break;
                case "GB":
                    if (UO.Count(GB.type, GB.color) > 0)
                    {
                        UO.UseType(GB.type, GB.color);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(GB.type, GB.color) + " GB.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni GB!!");
                    }
                    break;
                case "IV":
                    if (UO.Count(IV.type, IV.color) > 0)
                    {
                        UO.UseType(IV.type, IV.color);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(IV.type, IV.color) + " Invisek.");
                    }
                    else
                    {
                        UO.Print("Pruser, neni Invis!!");
                    }
			  break;
                default:
                    UO.PrintError("Spatne argumenty, nebo chybi napoj!! vypij \"jmeno_napoje\" (nalij \"TMR\"))");
                    break;
            }
        }

        [Executable]
        public void nalij(String napoj) //cepuje
        {
            UOItem kad;
            UOItem lahve;
            switch (napoj)
            {
                case "GH":
                    kad = World.Player.Backpack.AllItems.FindType(GH.Keg_t, GH.Keg_c);
                    if (kad.Serial != Serial.Invalid)
                    {
                        lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
                        if (lahve.Serial != Serial.Invalid)
                        {
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            lahve.WaitTarget();
                            kad.Use();
                            UO.Print(0x0435, "Cepnuto GH");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GH");
                    }
                    break;
                                    case "GB":
                    kad = World.Player.Backpack.AllItems.FindType(GB.Keg_t, GB.Keg_c);
                    if (kad.Serial != Serial.Invalid)
                    {
                        lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
                        if (lahve.Serial != Serial.Invalid)
                        {
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            lahve.WaitTarget();
                            kad.Use();
                            UO.Print(0x0435, "Cepnuto GB");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GB");
                    }
                    break;
                case "TMR":
                    kad = World.Player.Backpack.AllItems.FindType(TMR.Keg_t, TMR.Keg_c);
                    if (kad.Serial != Serial.Invalid)
                    {
                        lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
                        if (lahve.Serial != Serial.Invalid)
                        {
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            lahve.WaitTarget();
                            kad.Use();
                            UO.Print(0x0480, "Cepnuto TMR");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s TMR");
                    }
                    break;
                case "GC":
                    kad = World.Player.Backpack.AllItems.FindType(GC.Keg_t, GC.Keg_c);
                    if (kad.Serial != Serial.Invalid)
                    {
                        lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
                        if (lahve.Serial != Serial.Invalid)
                        {
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            lahve.WaitTarget();
                            kad.Use();
                            UO.Print(0x0553, "Cepnuto GC");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GC");
                    }
                    break;
                case "GS":
                    kad = World.Player.Backpack.AllItems.FindType(GS.Keg_t, GS.Keg_c);
                    if (kad.Serial != Serial.Invalid)
                    {
                        lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
                        if (lahve.Serial != Serial.Invalid)
                        {
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            lahve.WaitTarget();
                            kad.Use();
                            UO.Print(0x0481, "Cepnuto GS");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GS");
                    }
                    break;
                case "TR":
                    kad = World.Player.Backpack.AllItems.FindType(TR.Keg_t, TR.Keg_c);
                    if (kad.Serial != Serial.Invalid)
                    {
                        lahve = World.Player.Backpack.AllItems.FindType(0x0F0E);
                        if (lahve.Serial != Serial.Invalid)
                        {
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            lahve.WaitTarget();
                            kad.Use();
                            UO.Print("Cepnuto TR");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s TR");
                    }
                    break;
                default:
                    UO.PrintError("Spatne argumenty, nebo chybi napoj!! vypij \"jmeno_napoje\" (nalij \"TMR\"))");
                    break;
            }
        }
ICQ:242676139 | IRC: #dp

... Vision vs Speech test ...
Uživatelský avatar
Winis
Book Snake
Book Snake
Příspěvky: 137
Registrován: 25 pro 2006 18:10
Kontaktovat uživatele:

Re: Piti & Cepovani potionu

Příspěvek od Winis »

mě to nejde :(

c:\Program Files (x86)\EA Games\Phoenix\Scripts\DarkParadise\Nalij vypij.cs(55,20): error CS1518: Bylo očekáváno klíčové slovo class, delegate, enum, interface nebo struct.
c:\Program Files (x86)\EA Games\Phoenix\Scripts\DarkParadise\Nalij vypij.cs(150,20): error CS1518: Bylo očekáváno klíčové slovo class, delegate, enum, interface nebo struct.
Irto
Elder Letter
Elder Letter
Příspěvky: 208
Registrován: 16 říj 2011 11:28
Kontaktovat uživatele:

Re: Piti & Cepovani potionu

Příspěvek od Irto »

Winis píše:mě to nejde :(

c:\Program Files (x86)\EA Games\Phoenix\Scripts\DarkParadise\Nalij vypij.cs(55,20): error CS1518: Bylo očekáváno klíčové slovo class, delegate, enum, interface nebo struct.
c:\Program Files (x86)\EA Games\Phoenix\Scripts\DarkParadise\Nalij vypij.cs(150,20): error CS1518: Bylo očekáváno klíčové slovo class, delegate, enum, interface nebo struct.
ten script zde bohuzel neni komplet, nebo je na tom odkazu ale v tom code na strance ne.

Kód: Vybrat vše

using System;
using System.Collections.Generic;
using System.Text;
using Phoenix;
using Phoenix.WorldData;
 
namespace Script.Drinking
{
  
    public class Drinking
    {
    
 //Příkazy:

 //   ,exec kkad
 //   ,exec vypij "string napoj"
 //   ,exec nalij "string napoj"
 //   ,exec cekani

 
[Executable]
        public static void kkad()
        {//by smoce
            UO.Print(0x027,"Přelejvač..");
            UO.Wait(300);
            UO.PrintInformation("Target Z ktere kade.");
            UOItem kad1 = new UOItem(UIManager.TargetObject());
            UO.Wait(500);
            UO.PrintInformation("Target DO ktere kade.");
            UOItem kad2 = new UOItem(UIManager.TargetObject());
 
            while (kad1.Exist)
            {
                kad1.Use();
                UO.WaitTargetObject(kad2.Serial);
                UO.Wait(600); // prelejvani nastaveni timer ...
            }
        }
        public struct TMR
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0003;
            public const ushort type = 0x0F09;
            public const ushort color = 0x0003;
        }
        
        public struct MR
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0005;
            public const ushort type = 0x0F09;
            public const ushort color = 0x0005;
        }
 
        public struct GH
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x08A7;
            public const ushort type = 0x0F0C;
            public const ushort color = 0x0000;
        }
 
        public struct TR
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x014D;
            public const ushort type = 0x0F0B;
            public const ushort color = 0x0000;
 
        }
 
        public struct GC
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0842;
            public const ushort type = 0x0F07;
            public const ushort color = 0x0000;
        }
 
        public struct GS
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0481;
            public const ushort type = 0x0F09;
            public const ushort color = 0x0000;
        }
 
        public struct GB
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x0025;
            public const ushort type = 0x0F0C;
            public const ushort color = 0x0025;
        }
 
        public struct LA
        {
            public const ushort Keg_t = 0x1843;
            public const ushort Keg_c = 0x000E;
            public const ushort type = 0x0F0D;
            public const ushort color = 0x000E;
        }
 
        [Executable]
        public void vypij(String napoj) //pije napoj podle jmena
        {
            switch (napoj)
            {
                case "GH":
                    if (UO.Count(GH.type) > 0)
                    {
                        UO.UseType(GH.type);
                        UO.Wait(500);
                        UO.Print(0x0435, "Zbyva " + UO.Count(GH.type) + " GH.");
                       
                    }
                    else
                    {
                        UO.Print("Doprdele, neni GH!!");
                    }
                    break;
                case "TMR":
                    if (UO.Count(TMR.type, TMR.color) > 0)
                    {
                        UO.UseType(TMR.type, TMR.color);
                        UO.Wait(500);
                        UO.Print(0x0480, "Zbyva " + UO.Count(TMR.type, TMR.color) + " TMR.");
                    }
                    else
                    {
                        UO.Print("Doprdele, neni TMR!!");
                    }
                    break;
                case "MR":
                    if (UO.Count(MR.type, MR.color) > 0)
                    {
                        UO.UseType(MR.type, MR.color);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(MR.type, MR.color) + " MR.");
                    }
                    else
                    {
                        UO.Print("Doprdele, neni MR!!");
                    }
                    break;
                case "TR":
                    if (UO.Count(TR.type) > 0)
                    {
                        UO.UseType(TR.type);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(TR.type) + " TR.");
                           
                    }
                    else
                    {
                        UO.Print("Doprdele, neni TR!!");
                    }
                    break;
                case "GS":
                    if (UO.Count(GS.type, GS.color) > 0)
                    {
                        UO.UseType(GS.type, GS.color);
                        UO.Wait(500);
                        UO.Print(0x0481, "Zbyva " + UO.Count(GS.type, GS.color) + " GS.");
                    }
                    else
                    {
                        UO.Print("Doprdele, neni GS!!");
                    }
                    break;
                case "GC":
                    if (UO.Count(GC.type) > 0)
                    {
                        UO.UseType(GC.type);
                        UO.Wait(500);
                        UO.Print(0x0553, "Zbyva " + UO.Count(GC.type) + " GC.");
                          
                    }
                    else
                    {
                        UO.Print("Doprdele, neni GC!!");
                    }
                    break;
                case "GB":
                    if (UO.Count(GB.type, GB.color) > 0)
                    {
                        UO.UseType(GB.type, GB.color);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(GB.type, GB.color) + " GB.");
                    }
                    else
                    {
                        UO.Print("Doprdele, neni GB!!");
                    }
                    break;
                 case "LAVA":
                    if (UO.Count(LA.type, LA.color) > 0)
                    {
                        UO.UseType(LA.type, LA.color);
                        UO.Wait(500);
                        UO.Print("Zbyva " + UO.Count(LA.type,LA.color) + " LAva.");
                    }
                    else
                    {
                        UO.Print("Doprdele, neni GB!!");
                    }
                    break;
                default:
                    UO.PrintError("Spatne argumenty, nebo chybi napoj!! vypij \"jmeno_napoje\" (nalij \"TMR\"))");
                    break;
            }
        }
 
        [Executable]
        public void nalij(String napoj) //cepuje
        {
            switch (napoj)
            {
                case "GH":
                    if (UO.Count(GH.Keg_t, GH.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(GH.Keg_t, GH.Keg_c);
                            UO.Print(0x0435, "Cepnuto GH (" + UO.Count(GH.type, GH.color)+ ")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GH");
                    }
                    break;
                  case "GB":
                    if (UO.Count(GB.Keg_t, GB.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(GB.Keg_t, GB.Keg_c);
                            UO.Print("Cepnuto GB ("+ UO.Count(GB.type, GB.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GB");
                    }
                    break;
                case "TMR":
                    if (UO.Count(TMR.Keg_t, TMR.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(TMR.Keg_t, TMR.Keg_c);
                            UO.Print(0x0480, "Cepnuto TMR ("+ UO.Count(TMR.type, TMR.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s TMR");
                    }
                    break;
                case "MR":
                    if (UO.Count(MR.Keg_t, MR.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(MR.Keg_t, MR.Keg_c);
                            UO.Print(0x0480, "Cepnuto MR ("+ UO.Count(MR.type, MR.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s MR");
                    }
                    break;
                case "GC":
                    if (UO.Count(GC.Keg_t, GC.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(GC.Keg_t, GC.Keg_c);
                            UO.Print(0x0553, "Cepnuto GC ("+ UO.Count(GC.type, GC.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GC");
                    }
                    break;
                case "GS":
                    if (UO.Count(GS.Keg_t, GS.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(GS.Keg_t, GS.Keg_c);
                            UO.Print(0x0481, "Cepnuto GS ("+ UO.Count(GS.type, GS.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s GS");
                    }
                    break;
                case "TR":
                    if (UO.Count(TR.Keg_t, TR.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(TR.Keg_t, TR.Keg_c);
                            UO.Print("Cepnuto TR ("+ UO.Count(TR.type, TR.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s TR");
                    }
                    break;
 
                    case "LAVA":
                    if (UO.Count(LA.Keg_t, LA.Keg_c) > 0)
                    {
                        if (World.Player.Backpack.AllItems.Count(0x0F0E) > 0)
                        {
                            //World.Player.ChangeWarmode(WarmodeChange.Switch);
                            UO.WaitTargetObject(World.Player.Backpack.AllItems.FindType(0x0F0E));
                            UO.UseType(LA.Keg_t, LA.Keg_c);
                            UO.Print("Cepnuto LACA Bombiš ("+ UO.Count(LA.type, LA.color)+")");
                        }
                        else
                        {
                            UO.Print("Nemas lahvicky.");
                        }
                    }
                    else
                    {
                        UO.Print("Nemas kad s LAVA");
                    }
                    break;
                default:
                    UO.PrintError("Spatne argumenty, nebo chybi napoj!! vypij \"jmeno_napoje\" (nalij \"TMR\"))");
                    break;
            }
        }
 
// staci doplnit k potiontum cekani(); a je to tam ....
        [Executable]
        public void cekani() //cekani
        {
         UO.Wait(14000);      
         int x = 0;
         do 
         { 
          UO.Wait(1000);
          x++; 
         UO.Print("Zbyva: "+(5-x)+" sec");
         } 
         while (x < 5); 
         UO.Print("!!!!Muzes pit!!!!");
         }
 
    }
}
Odpovědět