Hammerhand

Member
I'm making a WoodenGolem for crafting using DriftWood & other resources. One of them is wood. The regular ClockWorkAssembly that this part is based on calls for just a single type of metal, or in this case, wood. But I want that part to use any of the different types of Boards, not just the regular one (WoodGolems in different hues). Just not quite sure how to go about it. I have the whole thing working except that part. Suggestions?
Code:
            int res = pack.ConsumeTotal(
                new Type[]
                {
                    typeof(PowerCrystal),
                    typeof(DriftWood),
                    typeof(Board), <<
                    typeof(AxleGears),
                    typeof(Hinge)
                },
Of course they have to make its "Heart" first, which is what this is from. Then I just need it to call for wood, but have it cover any of them.
Code:
                case 2:
                    {
                        from.SendMessage("You must have 50 boards to construct the wooden golem.");
                        break;
                    }
I dont make things easy for myself. :oops:
 
Make public bool CheckItemBackpack(Mobile m, Item item, int amount) Function

You need to count all of the items in m's Backpack and count item's amount.
After that, return true or false with checking amounts of item with amount value.

Like this lines, you can add some code.

if ( CheckItemBackpack(m, item, amount) && blah blah blah.. ) {
m.Backpack.Consume( item_A ) blah blah..
}
[doublepost=1476853298][/doublepost]or use 'switch'

switch( HeartType ) {
case ResourceType.RegularWood:
blah blah...
}
 
What if you use boards like in carpentry. Then you would get the selection and color you want. The driftwood would just always be an ingredient in making the items:

Driftwood, 50
Axel,1
Gear,1
Bloodwood,20

or whatever it takes component wise to make the golem :)
 
Solved! Turns out it was quite easy to do once I rested my noggin a bit & thought about it, I simply changed typeof(Board) to typeof(BaseWoodBoard) & it now gives me a wooden golem in the hue of the boards used. Now if I can just get it to show the resource name..... lol Not really needed actually. Showing the hue should be enough to know which wood it was made with... unless you're colorblind or using a black & white monitor. The woods don't add anything to the stats, just the hue.
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back