Diesel

Member
I have an old beekeeping system I downloaded from RunUo that creates beekeeping deeds and interface.I am not a programmer and did not program this. But I would like to implement it into my server. It seems like a small job but what do I know lol since I can't code.

There is one Core-modified file SBBeekeper.cs which is a pretty small file and 4 or 5 custom scripts for a deed and the gump to run the beehive.

Once it's up and running we can release it into the Custom Scripts forum for everyone.

Thanks for checking this out and the files are linked if you want to pick up the challenge!
 

Attachments

  • Apiculture 1.2.zip
    19.8 KB · Views: 11
As far as I can tell from first glance, all it needs is the SBBeekeeper file updated. The new format uses List<GenericBuyInfo> instead of Arraylist.
 

Attachments

  • SBBeekeeper[1].cs
    1.3 KB · Views: 9
ummm... what he said 8)
[doublepost=1490971867][/doublepost]Updated with the new SBBeekeeper.cs and got this

--------------------------------------------------------------------------------

Errors:
+ Custom/New Systems/Beekeeping/Apiculture/Items/RawBeeswax.cs:
CS0115: Line 26: 'Server.Items.RawBeeswax.Dupe(int)': no suitable method fou
nd to override
+ Custom/New Systems/Beekeeping/Apiculture/Items/Slumgum.cs:
CS0115: Line 26: 'Server.Items.Slumgum.Dupe(int)': no suitable method found
to override
+ VendorInfo/SBBeekeeper.cs:
CS1715: Line 18: 'Server.Mobiles.SBBeekeeper.BuyInfo': type must be 'System.
Collections.Generic.List<Server.Mobiles.GenericBuyInfo>' to match overridden mem
ber 'Server.Mobiles.SBInfo.BuyInfo'
CS0534: Line 8: 'Server.Mobiles.SBBeekeeper' does not implement inherited ab
stract member 'Server.Mobiles.SBInfo.BuyInfo.get'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
For the Dupe errors, just remove those sections of code. Dupe hasn't been used in years.
For the SBBeekeeper errors
This
Code:
        private ArrayList m_BuyInfo = new InternalBuyInfo();
        private IShopSellInfo m_SellInfo = new InternalSellInfo();

        public SBBeekeeper()
        {
        }

        public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
        public override ArrayList BuyInfo { get { return m_BuyInfo; } }

        public class InternalBuyInfo : ArrayList
needs to be
Code:
       private read only List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();

       private read only IShopSellInfo m_SellInfo = new InternalSellInfo();

        public SBBeekeeper()
        {
        }

        public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
        public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }

        public class InternalBuyInfo : List<GenericBuyInfo>
 
Thanks for the help Hammerhand. I pasted in the new code and have this script now:

using System;
using System.Collections;
using Server.Items;
using Server.Engines.Apiculture;

namespace Server.Mobiles
{
public class SBBeekeeper : SBInfo
{
private read only List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();

private read only IShopSellInfo m_SellInfo = new InternalSellInfo();

public SBBeekeeper()
{
}

public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }

public class InternalBuyInfo : List<GenericBuyInfo>
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( JarHoney ), 3, 20, 0x9EC, 0 ) );
Add( new GenericBuyInfo( typeof( Beeswax ), 1, 20, 0x1422, 0 ) );
Add( new GenericBuyInfo( typeof( apiBeeHiveDeed ), 2000, 10, 2330, 0 ) );
Add( new GenericBuyInfo( typeof( HiveTool ), 100, 20, 2549, 0 ) );
Add( new GenericBuyInfo( typeof( apiSmallWaxPot ), 250, 20, 2532, 0 ) );
Add( new GenericBuyInfo( typeof( apiLargeWaxPot ), 400, 20, 2541, 0 ) );
}
}

public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
Add( typeof( JarHoney ), 1 );
Add( typeof( Beeswax ), 1 );
Add( typeof( apiBeeHiveDeed ), 1000 );
Add( typeof( HiveTool ), 50 );
Add( typeof( apiSmallWaxPot ), 125 );
Add( typeof( apiLargeWaxPot ), 200 );
}
}
}
}


That generated a simple looking error that probably says Diesel can't paste code very well..

--------------------------------------------------------------------------------

ServUO - [http://www.servuo.com] Version 0.5, Build 6297.25977
Publish 54
Core: Optimizing for 8 64-bit processors
RandomImpl: CSPRandom (Software)
Core: Loading config...
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ VendorInfo/SBBeekeeper.cs:
CS1002: Line 10: ; expected
CS1002: Line 12: ; expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

I am going to try and figure out where the end of line Marks should go...maybe the end of the line ? (;)
 
Sorry something happened to my file between the time I edited it, saved it, and tried to upload it. Obviously the changes did not stick.

This is the text of the whole file I "TRIED" to upload:

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Items;
using Server.Engines.Apiculture;

namespace Server.Mobiles
{
    public class SBBeekeeper : SBInfo
    {
        private readonly List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
        private IShopSellInfo m_SellInfo = new InternalSellInfo();

        public SBBeekeeper()
        {
        }

        public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
        public override List<GenericBuyInfo> BuyInfo { get { return this.m_BuyInfo; } }

        public class InternalBuyInfo : List<GenericBuyInfo>
        {
            public InternalBuyInfo()
            {
                Add( new GenericBuyInfo( typeof( JarHoney ), 3, 20, 0x9EC, 0 ) );
                Add( new GenericBuyInfo( typeof( Beeswax ), 1, 20, 0x1422, 0 ) );
                Add( new GenericBuyInfo( typeof( apiBeeHiveDeed ), 2000, 10, 2330, 0 ) );
                Add( new GenericBuyInfo( typeof( HiveTool ), 100, 20, 2549, 0 ) );
                Add( new GenericBuyInfo( typeof( apiSmallWaxPot ), 250, 20, 2532, 0 ) );
                Add( new GenericBuyInfo( typeof( apiLargeWaxPot ), 400, 20, 2541, 0 ) );
            }
        }

        public class InternalSellInfo : GenericSellInfo
        {
            public InternalSellInfo()
            {
                Add( typeof( JarHoney ), 1 );
                Add( typeof( Beeswax ), 1 );
                Add( typeof( apiBeeHiveDeed ), 1000 );
                Add( typeof( HiveTool ), 50 );
                Add( typeof( apiSmallWaxPot ), 125 );
                Add( typeof( apiLargeWaxPot ), 200 );
            }
        }
    }
}
 
That was the ticket. Once I made the last edit that Lokai gave above. Then as Hammerhand suggested I edited out /* the dupe references */ in the Slumgum and RawBeeswax. I reran the compiler and got down to this error


Errors:
+ Custom/New Systems/Beekeeping/Apiculture/BeeHiveHelper.cs:
CS0246: Line 156: The type or namespace name 'Tile' could not be found (are
you missing a using directive or an assembly reference?)
CS0029: Line 156: Cannot implicitly convert type 'Server.StaticTile[]' to
tile[]'
Scripts: One or more scripts failed to compile or no script files were found.
 
I had a system that I had to convert from Tile to StaticTile. It's pretty straight-forward. I can have a look at that one too.
 
I attached the Apiculture system that i have, maybe it helps you to compare and fix the errors u may encounter.

--edit--
Theres the CommunityBeeHive by alari (produces wax and honey, does not get sick or need healing) it works more like a spawner.
 

Attachments

  • Apiculture.rar
    18.2 KB · Views: 20
  • CommunityBeeHive.cs
    10.6 KB · Views: 17
Last edited:
Yes, it really was that simple. Just change Tile[] to StaticTile[] in BeeHiveHelper, line 156.

1 more issue after that: the very old "Dupe()" override method has to be completely removed from RawBeeswax and Slumgum. After that, it compiles fine. Next comes actually testing it out...
 
I will go ahead and alter that in my copy. I just commented out the dupe code in RawBeeswax and slumgum already.
[doublepost=1490997750][/doublepost]Sahisahi, mind if I release yours and mine in custom releases? Mine is now working and has the beehive gump but it will take a few days to test it out. This way I can post both systems and let folks choose.

Thanks for posting your scipts
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back