public void UseHerbalist(Mobile.Casting cast, Character c, GameObject go)
        {
            Hashtable diff = new Hashtable();

            diff[29] = 0;
            diff[8]  = 20;
            diff[9]  = 50;
            diff[10] = 75;
            diff[11] = 100;
            diff[26] = 125;
            diff[27] = 150;
            diff[35] = 140;
            diff[45] = 125;
            diff[47] = 160;
            diff[48] = 215;
            diff[49] = 185;
            diff[50] = 205;
            diff[51] = 195;
            int rdiff = CurrentVal(c) - (int)diff[(int)go.Sound[0]];
            int res   = IqSkillCheck(c, rdiff);

            if (res > 50)
            {
                if (Current < Cap(c) && c.SkillUp(Current, rdiff, 1))
                {
                    Current++;
                    c.SendSkillUpdate();
                    //c.SendSmallUpdate( new int[]{ Index, Index + 1, Index + 2 }, new object[]{ (int)Id, (short)CurrentVal(c), (short)Cap( c ), (int)0 } );
                }
                c.SpellSuccess();
                float reussite = (float)res;

                reussite = reussite / 10f;
                string str = "Reussite : " + reussite.ToString();
                c.SendMessage(str);
                if (!go.CheckLoot(c, reussite))
                {
                    c.SpellFaillure(SpellFailedReason.FailedAttempt);
                }
            }
            else
            {
                //	Console.WriteLine("SPELL RESULT :{0}", result );
                c.SpellFaillure(SpellFailedReason.FailedAttempt);
            }
        }
        public void UseMining(Mobile.Casting cast, Character c, GameObject go)
        {
            Hashtable diff = new Hashtable();

            diff[18] = 25;
            diff[19] = 50;
            diff[20] = 75;
            diff[21] = 100;
            diff[22] = 125;
            diff[25] = 150;
            diff[38] = 0;              //	Copper
            diff[39] = 50;             // Tin
            diff[40] = 100;            //	Silver
            diff[41] = 150;            // Iron
            diff[42] = 200;            //	Gold
            int rdiff = CurrentVal(c) - (int)diff[(int)go.Sound[0]];
            int res   = StrSkillCheck(c, rdiff);

            if (res > 50)
            {
                if (Current < Cap(c) && c.SkillUp(Current, rdiff, 1))
                {
                    Current++;
                    c.SendSkillUpdate();
                }
                c.SpellSuccess();
                float reussite = (float)res;

                reussite = reussite / 10f;
                //	string str = "Reussite : " + reussite.ToString();
                //	c.SendMessage( str );
                if (!go.CheckLoot(c, reussite))
                {
                    c.SpellFaillure(SpellFailedReason.FailedAttempt);
                }
            }
            else
            {
                //	Console.WriteLine("SPELL RESULT :{0}", result );
                c.SpellFaillure(SpellFailedReason.FailedAttempt);
            }
        }
        public void UseFishing(Mobile.Casting cast, Character c)
        {
            GameObject desc = c.InsideFishingZone();

            if (desc == null)
            {
                c.SpellFaillure(SpellFailedReason.TheyArentAnyFishHere);
                return;
            }
            int rdiff = CurrentVal(c);
            int res   = AgiSkillCheck(c, rdiff);

            if (res > 50)
            {
                if (Current < Cap(c) && c.SkillUp(Current, rdiff, 1))
                {
                    Current++;
                    c.SendSkillUpdate();
                }
                c.SpellSuccess();
                float reussite = (float)res;

                reussite = reussite / 10f;
                string str = "Reussite : " + reussite.ToString();
                c.SendMessage(str);
                if (!desc.CheckLoot(c, reussite))
                {
                    c.SpellFaillure(SpellFailedReason.FailedAttempt);
                }
            }
            else
            {
                //	Console.WriteLine("SPELL RESULT :{0}", result );
                c.SpellFaillure(SpellFailedReason.FailedAttempt);
            }
        }
Exemple #4
0
		public void UseMining(Mobile.Casting cast, Character c, GameObject go )
		{
			Hashtable diff = new Hashtable();
			diff[ 18 ] = 25;
			diff[ 19 ] = 50;
			diff[ 20 ] = 75;
			diff[ 21 ] = 100;
			diff[ 22 ] = 125;
			diff[ 25 ] = 150;
			diff[ 38 ] = 0;//	Copper
			diff[ 39 ] = 50;// Tin
			diff[ 40 ] = 100;//	Silver
			diff[ 41 ] = 150;// Iron
			diff[ 42 ] = 200;//	Gold
			int rdiff = CurrentVal(c) - (int)diff[ (int)go.Sound[ 0 ] ];
			int res = StrSkillCheck( c, rdiff );

			if ( res > 50 )
			{
				if ( Current < Cap( c ) && c.SkillUp( Current, rdiff, 1 ) )
				{
					Current++;
					c.SendSkillUpdate();
				}
				c.SpellSuccess();
				float reussite = (float)res;

				reussite = reussite / 10f;
			//	string str = "Reussite : " + reussite.ToString();
			//	c.SendMessage( str );
				if(	!go.CheckLoot( c, reussite ) )
					c.SpellFaillure( SpellFailedReason.FailedAttempt );
				
			}
			else
			{
			//	Console.WriteLine("SPELL RESULT :{0}", result );
				c.SpellFaillure( SpellFailedReason.FailedAttempt );
			}
		}
Exemple #5
0
		public void UseHerbalist(Mobile.Casting cast, Character c, GameObject go )
		{
			Hashtable diff = new Hashtable();
			diff[ 29 ] = 0;
			diff[ 8 ] = 20;
			diff[ 9 ] = 50;
			diff[ 10 ] = 75;
			diff[ 11 ] = 100;
			diff[ 26 ] = 125;
			diff[ 27 ] = 150;
			diff[ 35 ] = 140;
			diff[ 45 ] = 125;
			diff[ 47 ] = 160;
			diff[ 48 ] = 215;
			diff[ 49 ] = 185;
			diff[ 50 ] = 205;
			diff[ 51 ] = 195;
			int rdiff = CurrentVal(c) - (int)diff[ (int)go.Sound[ 0 ] ];
			int res = IqSkillCheck( c, rdiff );
			
			if ( res > 50 )
			{
				if ( Current < Cap( c ) && c.SkillUp( Current, rdiff, 1 ) )
				{
					Current++;
					c.SendSkillUpdate();
					//c.SendSmallUpdate( new int[]{ Index, Index + 1, Index + 2 }, new object[]{ (int)Id, (short)CurrentVal(c), (short)Cap( c ), (int)0 } );
				}
				c.SpellSuccess();
				float reussite = (float)res;

				reussite = reussite / 10f;
				string str = "Reussite : " + reussite.ToString();
				c.SendMessage( str );
				if ( !go.CheckLoot( c, reussite ) )
					c.SpellFaillure( SpellFailedReason.FailedAttempt );
			}
			else
			{
				//	Console.WriteLine("SPELL RESULT :{0}", result );
				c.SpellFaillure( SpellFailedReason.FailedAttempt );
			}
		}