Beispiel #1
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile      f    = sender.Mobile;
            NubiaPlayer from = f as NubiaPlayer;

            if (info.ButtonID >= 100 && info.ButtonID < 200)               //Jutsu Cast
            {
                from.Magie.executeSort(info.ButtonID - 100);
            }
            if (info.ButtonID >= 200 && info.ButtonID < 300)
            {
                from.CloseGump(typeof(SortInfoGump));
                from.SendGump(new SortInfoGump(m_owner.Magie.getSort(info.ButtonID - 200)));
            }
            if (info.ButtonID >= 300 && info.ButtonID < 500)
            {
                from.CloseGump(typeof(SortInfoGump));
                from.SendGump(new PropertiesGump(from, m_owner.Magie.getSort(info.ButtonID - 300)));
            }
            if (info.ButtonID >= 500)              //Extraire un parchemin
            {
                from.CloseGump(typeof(SortInfoGump));
                try
                {
                    SortNubia jutsu = (SortNubia)NubiaHelper.CopyItem(m_owner.Magie.getSort(info.ButtonID - 500));
                    jutsu.MoveToWorld(from.Location, from.Map);
                    from.SendMessage("Copy faite");
                }
                catch { from.SendMessage("Copy impossible!"); }
                //from.SendGump(  new PropertiesGump( from, from.getJutsu(info.ButtonID-300) ) );
            }
        }
Beispiel #2
0
        public void FinishSequence(Mobile cible)
        {
            Owner.Animate(17, 7, 1, true, false, 0);
            double time = (int)(Owner.Niveau / 3) * (Maitrise / 5.0);

            time *= getRatio();

            SortNubiaHelper.makeBigSmoke(Owner.Location, Owner.Map);

            //SAVES
            m_saveItems = new ArrayList();
            m_copyItems = new ArrayList();

            /*private int m_hair = 0;
             * private int m_beard = 0;*/
            m_hair    = Owner.HairItemID;
            m_beard   = Owner.FacialHairItemID;
            m_hue     = Owner.Hue;
            m_hairHue = Owner.HairHue;
            m_body    = Owner.BodyValue;
            m_name    = Owner.Name;

            for (int i = 0; i < 24; i++)
            {
                Item it = Owner.FindItemOnLayer((Layer)i) as Item;
                if (it != null && !(it is Backpack))
                {
                    m_saveItems.Add(it);
                    try{ Owner.Backpack.AddItem(it); }
                    catch {}
                }
            }


            //Clone
            for (int c = 0; c < 24; c++)
            {
                Item it = NubiaHelper.CopyItem(cible.FindItemOnLayer((Layer)c) as Item);
                if (it != null && !(it is Backpack))
                {
                    m_copyItems.Add(it);
                    Owner.EquipItem(it);
                    it.Movable = false;
                }
            }
            Owner.Name             = cible.Name;
            Owner.BodyValue        = cible.BodyValue;
            Owner.HueMod           = cible.Hue;
            Owner.HairItemID       = cible.HairItemID;
            Owner.HairHue          = cible.HairHue;
            Owner.FacialHairItemID = cible.FacialHairItemID;
            Owner.FacialHairHue    = cible.FacialHairHue;

            m_timer = new InternalTimer(this, time);
            Owner.SendMessage("Vous garderez cette apparence pour {0} secondes", ((int)time).ToString());
            m_timer.Start();
            return;
        }
Beispiel #3
0
 public override void OnDoubleClick(Mobile f)
 {
     if (f is NubiaPlayer)
     {
         SortNubia cop = (SortNubia)NubiaHelper.CopyItem(this);
         ((NubiaPlayer)f).Magie.addSort(cop);
         f.SendMessage("Sort {0} assimilé", Name);
         Delete();
     }
 }
Beispiel #4
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile      f    = sender.Mobile;
            NubiaPlayer from = f as NubiaPlayer;

            if (info.ButtonID == 6)            //refus
            {
                m_maitre.SendMessage("Votre élève refuse votre proposition d'apprentissage");
                m_eleve.SendMessage("Vous refusez l'apprentissage");
                return;
            }
            if (info.ButtonID >= 10)            //Choix
            {
                SortNubia newSortNubia;
                newSortNubia         = (SortNubia)NubiaHelper.CopyItem(m_owner);
                newSortNubia.energie = (SortEnergie)m_cp[info.ButtonID - 10];
                //	newSortNubia.skill = KonohaCompHelper.getSkillFromCat(newSortNubia.categorie);
                if (!newSortNubia.canCast(m_eleve, false))
                {
                    m_eleve.SendMessage("Vous n'arrivez pas à adapter ces connaissances pour ce SortNubia");
                    m_eleve.SendGump(new  enseignementSortChoixComp(m_owner, m_maitre, m_eleve, m_cp));
                }
                else
                {
                    m_eleve.SendMessage("Vous arrivez à adapter ces connaissances pour ce SortNubia !");
                    m_maitre.SendMessage("Votre élève s'en sort plutôt bien et adapte votre technique");
                    if (newSortNubia.couleur == MagieColor.Chakra && (newSortNubia.energie != SortEnergie.Mental && newSortNubia.energie != SortEnergie.Terre))
                    {
                        newSortNubia.couleur = MagieColor.Connaissance;
                    }
                    newSortNubia.Maitrise = 0.0;
                    newSortNubia.Owner    = m_eleve;

                    if (newSortNubia is SortNubiaTransformation)
                    {
                        m_eleve.Target = new InternalTransformationTarget((SortNubiaTransformation)newSortNubia, m_maitre, m_eleve);
                    }
                    else
                    {
                        if (!newSortNubia.isUnique)
                        {
                            m_eleve.SendGump(new enseignementSortPerso(newSortNubia, m_maitre, m_eleve));
                        }
                        else
                        {
                            from.SendMessage("Nouveau SortNubia '" + newSortNubia.Nom + "' appris. Félicitation !");
                            from.SendGump(new SortCreationConfirm(m_eleve, newSortNubia, false));
                        }
                    }
                }
                return;
            }
        }
        public override bool Cast()
        {
            if (!base.Cast())
            {
                return(false);
            }

            double time = (int)(Owner.Niveau) * (Maitrise / 2.0);

            time *= getRatio();

            if (m_toClone == null)
            {
                return(false);
            }

            if (!Owner.makeTransfo(this))
            {
                Owner.SendMessage("Vous êtes déjà sous l'effet d'une transformation");
                return(true);
            }

            NubiaPlayer m = Owner as NubiaPlayer;

            Owner.BodyValue = m_toClone.BodyValue;
            Owner.HueMod    = m_toClone.Hue;
            m_nom           = Owner.Name;
            if (m_toClone.Name != "noname")
            {
                Owner.NameMod = m_toClone.Name;
            }

            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z + 4), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y, m.Z - 4), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z + 4), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X, m.Y + 1, m.Z - 4), m.Map, 0x3728, 13);

            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 11), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 7), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z + 3), m.Map, 0x3728, 13);
            Effects.SendLocationEffect(new Point3D(m.X + 1, m.Y + 1, m.Z - 1), m.Map, 0x3728, 13);

            m.PlaySound(0x228);

            m_listItem = new ArrayList();

            for (int i = 0; i < m_toClone.Items.Count; i++)
            {
                Item item = NubiaHelper.CopyItem(m_toClone.Items[i]);
                Owner.AddItem(item);
                item.Movable = false;
                m_listItem.Add(item);
            }

            int level = m_toClone.Niveau;// KonohaSkillHelper.getCreatureNiveau(m_toClone);

            m_bonusStr = (int)((level * 2) * TransfoHelper.getModusStr(energie));
            m_bonusDex = (int)((level * 2) * TransfoHelper.getModusDex(energie));
            m_bonusInt = (int)((level * 2) * TransfoHelper.getModusInt(energie));

            m_bonusStr = (int)(m_bonusStr * getRatio());
            m_bonusDex = (int)(m_bonusDex * getRatio());
            m_bonusInt = (int)(m_bonusInt * getRatio());

            m_bonusSkill  = (level * 2);
            m_bonusSkill *= getRatio();

            Owner.Str += m_bonusStr;
            Owner.Dex += m_bonusDex;
            Owner.Int += m_bonusInt;

/*SkillName[] sk = TransfoHelper.getSkillBonus(competence);
 *                      for(int i = 0; i < sk.Length; i++)
 *                      {
 *                              Owner.Skills[sk[i]].Cap += m_bonusSkill;
 *                              Owner.Skills[sk[i]].Base += m_bonusSkill;
 *                      }*/
            m_timer = new InternalTimer(this, time);
            m_timer.Start();
            return(true);
        }