demented

Member
i am try to make mining Golem Having Problems with these Lines .....
Code:
            BaseOre ore = Mining.System.Construct(res.Types[0], null) as BaseOre;
            if (ore == null) return false;
            if (ore.Resource > CraftResource.Iron)
            {
                double minskill = 0.0;
                double minskill2 = 0.0;
                double maxskill = 0.0;
                double skillbase = this.Skills.Mining.Base;
                if (this.Skills.Mining.Base < 120.0) this.Say("skill = {0}", Convert.ToString(skillbase));
                switch (ore.Resource)
                {
                    case CraftResource.Iron: { minskill = 00.0; minskill2 = 00.0; maxskill = 100.0; } break;
                    case CraftResource.DullCopper: { minskill = 60.0; minskill2 = 25.0; maxskill = 105.0; } break;
                    case CraftResource.ShadowIron: { minskill = 65.0; minskill2 = 30.0; maxskill = 110.0; } break;
                    case CraftResource.Copper: { minskill = 70.0; minskill2 = 35.0; maxskill = 115.0; } break;
                    case CraftResource.Gold: { minskill = 75.0; minskill2 = 40.0; maxskill = 120.0; } break;
                    case CraftResource.Agapite: { minskill = 80.0; minskill2 = 45.0; maxskill = 120.0; } break;
                    case CraftResource.Verite: { minskill = 85.0; minskill2 = 50.0; maxskill = 120.0; } break;
                    case CraftResource.Valorite: { minskill = 90.0; minskill2 = 55.0; maxskill = 120.0; } break;
                /*    case CraftResource.Blaze: { minskill = 90.0; minskill2 = 60.0; maxskill = 120.0; } break;
                    case CraftResource.Ice: { minskill = 90.0; minskill2 = 65.0; maxskill = 120.0; } break;
                    case CraftResource.Toxic: { minskill = 90.0; minskill2 = 70.0; maxskill = 120.0; } break;
                    case CraftResource.Electrum: { minskill = 90.0; minskill2 = 75.0; maxskill = 120.0; } break;
                    case CraftResource.Platinum: { minskill = 90.0; minskill2 = 75.0; maxskill = 120.0; } break; */
                }
                if (Utility.RandomDouble() <= 0.30 || skillbase < minskill) { ore = new IronOre(); minskill = 00.0; minskill2 = 00.0; maxskill = 100.0; }
                if (!(from.CheckSkill(SkillName.Mining, minskill2, maxskill)))
                {
                    ore.Delete();
                    return false;
                }
            }
            ore.Amount = (map == Map.Felucca ? 2 : 1);
            if (from != null) from.AddToBackpack(ore);
            else ore.Delete();
            bank.Consume( ore.Amount, this);
            this.Hue = ore.Hue;
           
            return true;
        }
included is entire script
 

Attachments

  • MiningGolem.cs
    19.9 KB · Views: 17
Maybe try using the new IronBeetle for your golem? That's a "really" old version. Especially if you're using ServUO.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back