Trideni klamaku (na levely)

Datum: 22/11/2014 23:25:56

Staženo: 225x

Popis:

Nevím jestli se měnilo něco ale snad ok ..


Hodnocení: 3.8/10 (31 hlasy)

Download file:cs

Příkazy:

  • ,exec rozdel_klamaky

Kód:

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 Scripts.Rangers
    {
        public class Rangers_taming_sadsdsn
        {

     
          UOItem level1;
          UOItem level2;
          UOItem level3;
          UOItem level4;
          UOItem level5;

         
        [Executable]
        public void rozdel_klamaky()
        {
            UO.PrintInformation("Tridim klamaky od levelu 1 do levelu 5.");
            UO.Wait(300);
            UO.PrintInformation("Target BAG level 1");
            level1 = new UOItem(UIManager.TargetObject());
            UO.Wait(500);
            UO.PrintInformation("Target BAG level 2");
            level2 = new UOItem(UIManager.TargetObject());
            UO.Wait(500);
            UO.PrintInformation("Target BAG level 3");
            level3 = new UOItem(UIManager.TargetObject());
            UO.Wait(500);
            UO.PrintInformation("Target BAG level 4");
            level4 = new UOItem(UIManager.TargetObject());
            UO.Wait(500);
            UO.PrintInformation("Target BAG level 5");
            level5 = new UOItem(UIManager.TargetObject());
            UO.Wait(500);

            klamak_level1();
            klamak_level2();
            klamak_level3();
            klamak_level4();
            klamak_level5(); 

        }

        private void klamak_level1()
        {
            //povolani - všechna
            ushort[] klamak = new ushort[5];
            klamak[0] = 0x20EE; // bird
            klamak[1] = 0x20D1; // chicken
            klamak[2] = 0x2123; // rat
            klamak[3] = 0x20E2; // rabbit
            klamak[4] = 0x20D0; // rat(big)

            vyhodit(klamak, 1);
        } 

        private void klamak_level2()
        {
            //povolani -    Paladin, Ranger, Vampire, Craftsman, Clerik, Warrior
            ushort[] klamak = new ushort[8];
            klamak[0] = 0x2130; // bullforg
            klamak[1] = 0x2101; // pig
            klamak[2] = 0x2D97; // Squirrel
            klamak[3] = 0x211C; // dog1
            klamak[4] = 0x20D5; // dog2
            klamak[5] = 0x211B; // cat
            klamak[6] = 0x20EA; // wolf1
            klamak[7] = 0x2122; // wolf2

            vyhodit(klamak, 2);
        }

        private void klamak_level3()
        {
            //povolani -        Ranger, Vampire, Craftsman, Clerik, Paladin
            ushort[] klamak = new ushort[9];
            klamak[0] = 0x2103; // cow1
            klamak[1] = 0x20EF; // bull1
            klamak[2] = 0x20F0; // bull2
            klamak[3] = 0x20E6; // sheep
            klamak[4] = 0x2108; // goat
            klamak[5] = 0x20F5; // gorilla
            klamak[6] = 0x20F1; // dolphin
            klamak[7] = 0x20D4; // hind/hart
            klamak[8] = 0x20F7; // panther, walrus
            vyhodit(klamak, 3);
        }

        private void klamak_level4()
        {
            //povolani -     Ranger (bez specializace), Shaman, Druid
            ushort[] klamak = new ushort[7];
            klamak[0] = 0x20EA; // wolf1
            klamak[1] = 0x2122; // wolf2
            klamak[2] = 0x20E1; // polar bear
            klamak[3] = 0x20F7; // panther, walrus
            klamak[4] = 0x211D; // eagle
            klamak[5] = 0x2119; // leopard/snow leopard1
            klamak[6] = 0x2102; // leopard/snow leopard2
            vyhodit(klamak, 4);
        }

        private void klamak_level5()
        {
            //povolani -    Shaman, Druid
            ushort[] klamak = new ushort[6];
            klamak[0] = 0x20DB; // grizzly1
            klamak[1] = 0x211E; // grizzly2
            klamak[2] = 0x20FC; // snake
            klamak[3] = 0x2119; // leopard/snow leopard1
            klamak[4] = 0x2102; // leopard/snow leopard2
            klamak[5] = 0x2131; // alligator
            vyhodit(klamak, 5);
        }


        private void vyhodit(ushort[] klamak, int level)
        {
            UO.Print("Tridim klamaky Level: "+level.ToString());

            foreach (UOItem klamos in World.Player.Backpack.AllItems)
            {
                for (int i = 0; i < klamak.Length; i++)
                {
                    if (klamos.Graphic == klamak[i])
                    { 
                            switch (level)
                            {
                                case 1:
                                    klamos.Move(0,level1.Serial,(ushort)Math.Abs(i*10),10);
                                    break;
                                case 2:
                                    klamos.Move(0, level2.Serial, (ushort)Math.Abs(i * 10), 10);
                                    break;
                                case 3:
                                    klamos.Move(0, level3.Serial, (ushort)Math.Abs(i * 10), 10);
                                    break;
                                case 4:
                                    klamos.Move(0, level4.Serial, (ushort)Math.Abs(i * 10), 10);
                                    break;
                                case 5:
                                    klamos.Move(0, level5.Serial, (ushort)Math.Abs(i * 10), 10);
                                    break;
                                default:
                                    UO.Print("Error neznama chyba!  s level:" + level.ToString());
                                    break;
                            }
                            UO.Wait(300);
                    }
                }
            }
            UO.Print("Klamaci level {0} byli spotrebovani.. ", level.ToString());
        }
 


    }
}
 
Strana: 1,2,3,4
Strana: 1,2,3,4

Nový komentář