FS - Taming BOD System

jase giffin

Squire
Sep 14, 2013
271
91
28
38
in a box
Shard Name
The Grove
Donate
Donate money to this user
Or alternatively.. if you have 0 skill in taming it doesn't give you the option to obtain. as a player char simply buy into the skill from ronins npc and the option should become available.
 

jase giffin

Squire
Sep 14, 2013
271
91
28
38
in a box
Shard Name
The Grove
Donate
Donate money to this user
Did you move the data file into the proper area? main folder/data/bulk orders. that would give you the message that you can get a bod but if it wasnt in data then you prolly wouldnt get a bod. that was how i fixed it.
 
  • Like
Reactions: Greed

jase giffin

Squire
Sep 14, 2013
271
91
28
38
in a box
Shard Name
The Grove
Donate
Donate money to this user
This might be off but lets try it. in FS - Animal Taming BODs/Core/AnimalBODCore.cs
Line 20
public AnimalBODCore() : base()
{
this.Enabled = true; ///line 20 here<---------------
}
when i first got this. i changed this because my system turned of after reset. its a long shot but its about the last thing i can think of.
 
  • Like
Reactions: Greed

ObiOne

Rookie
Oct 6, 2014
59
0
6
46
Shard Name
Slayden's Realm
Just a question: When I use the pet brush why does it freeze the server? Then locks us all out and it doesn't even leave a crash error or nothing.
 

Milva

Admin
Moderator
Mar 3, 2013
4,535
595
113
Donate
Donate money to this user
Is the brush a reward item? Maybe post the brush script(in code tags)
 

ObiOne

Rookie
Oct 6, 2014
59
0
6
46
Shard Name
Slayden's Realm
I got a script from some one else it works fine now i will post the script in case someone else needs it but no it wasn't a reward it was in with the shrink system. also one more question on the deftamingcraft i was trying to add Taming Bulk Order Book in deftamingcraft.cs to be crafted but I get error saying:

Animal Taming BODs/Core/DefTamingCraft.cs:
CS0246: Line 227: The type or namespace name 'TamingBulkOrderBook' could not
be found (are you missing a using directive or an assembly reference?)
Here is the code in deftamingcraft.cs not sure why its saying its not there.

Code:
 index = AddCraft(typeof(PetDyeTub), "Misc.", "Pet Dye Tub", 80.0, 95.0, typeof(BarrelStaves), "Barrel Staves", 10);
            AddSkill(index, SkillName.AnimalLore, 80.0, 95.0);
            AddRes(index, typeof(RedPetDye), "Red Pet Dye", 1);
            AddRes(index, typeof(BluePetDye), "Blue Pet Dye", 1);
            AddRes(index, typeof(GreenPetDye), "Green Pet Dye", 1);
            //SetUseAllRes( index, true );

           
            index = AddCraft(typeof(TamingBulkOrderBook), "Taming Bulk Order Book", "Taming Bulk Order Book", 80.0, 120.0, typeof(BlueBook), "A Blue Book", 1);
            AddRes(index, typeof(BlankScroll), "Blank Scroll", 50);
            AddRes(index, typeof(NoxCrystal), "Nox Crystal", 100);
            AddRes(index, typeof(PowerCrystal), "Power Crystal", 15);

            index = AddCraft(typeof(PetPowerScrollBook), "Pet Power Scroll Book", "Pet Power Scroll Book", 80.0, 120.0, typeof(BlueBook), "A Blue Book", 1);
            AddRes(index, typeof(BlankScroll), "Blank Scroll", 200);
            AddRes(index, typeof(NoxCrystal), "Nox Crystal", 100);
            AddRes(index, typeof(PowerCrystal), "Power Crystal", 25);
          
          

             #region Training Books
            index = AddCraft( typeof( PetNecroBook ), "Pet Training", "Necromancy Training", 80.0, 120.0, typeof( BlueBook ), "A Blue Book", 1 );
            AddRes( index, typeof( BlankScroll ), "Blank Scroll", 50 );
            AddRes( index, typeof( NoxCrystal ), "Nox Crystal", 100 );
            AddRes( index, typeof( PowerCrystal ), "Power Crystal", 15 );
          
            index = AddCraft( typeof( PetSSBook ), "Pet Training", "Spirit Speak Training", 80.0, 120.0, typeof( BlueBook ), "A Blue Book", 1 );
            AddRes( index, typeof( BlankScroll ), "Blank Scroll", 50 );
            AddRes( index, typeof( GraveDust ), "Grave Dust", 100 );
            AddRes( index, typeof( PowerCrystal ), "Power Crystal", 15 );
            #endregion
 

Attachments

Milva

Admin
Moderator
Mar 3, 2013
4,535
595
113
Donate
Donate money to this user
Could you post the whole script in code tags please(TamingBulkOrderBook) :) Also check the top of the TamingBulkOrderBook and compare with the Animal Taming BODs/Core/DefTamingCraft.cs: Both these scripts are with the FS Taming Bulk Order system?
 
Last edited:

ObiOne

Rookie
Oct 6, 2014
59
0
6
46
Shard Name
Slayden's Realm
Yes sorry


Code:
Using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Gumps;
using Server.Multis;
using Server.Prompts;
using Server.Mobiles;
using Server.ContextMenus;

namespace Server.Engines.BulkOrders
{
    public class TamingBulkOrderBook : Item, ISecurable
    {
        private ArrayList m_Entries;
        private TamingBOBFilter m_Filter;
        private string m_BookName;
        private SecureLevel m_Level;

        [CommandProperty( AccessLevel.GameMaster )]
        public string BookName
        {
            get{ return m_BookName; }
            set{ m_BookName = value; InvalidateProperties(); }
        }

        [CommandProperty( AccessLevel.GameMaster )]
        public SecureLevel Level
        {
            get{ return m_Level; }
            set{ m_Level = value; }
        }

        public ArrayList Entries
        {
            get{ return m_Entries; }
        }

        public TamingBOBFilter Filter
        {
            get{ return m_Filter; }
        }

        [Constructable]
        public TamingBulkOrderBook() : base( 0x2259 )
        {
            Name = "taming bulk order book";
            Weight = 1.0;
            LootType = LootType.Blessed;

            m_Entries = new ArrayList();
            m_Filter = new TamingBOBFilter();

            m_Level = SecureLevel.CoOwners;
        }

        public override void OnDoubleClick( Mobile from )
        {
            if ( !from.InRange( GetWorldLocation(), 2 ) )
                from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
            else if ( m_Entries.Count == 0 )
                from.SendLocalizedMessage( 1062381 ); // The book is empty.
            else if ( from is PlayerMobile )
                from.SendGump( new TamingBOBGump( (PlayerMobile)from, this ) );
        }

        public override bool OnDragDrop( Mobile from, Item dropped )
        {
            if ( dropped is LargeMobileBOD )
            {
                if ( !IsChildOf( from.Backpack ) )
                {
                    from.SendLocalizedMessage( 1062385 ); // You must have the book in your backpack to add deeds to it.
                    return false;
                }
                else if ( m_Entries.Count < 500 )
                {
                    m_Entries.Add( new TamingBOBLargeEntry( (LargeMobileBOD)dropped ) );
                    InvalidateProperties();

                    from.SendLocalizedMessage( 1062386 ); // Deed added to book.

                    if ( from is PlayerMobile )
                        from.SendGump( new TamingBOBGump( (PlayerMobile)from, this ) );

                    dropped.Delete();
                    return true;
                }
                else
                {
                    from.SendLocalizedMessage( 1062387 ); // The book is full of deeds.
                    return false;
                }
            }
            else if ( dropped is SmallMobileBOD )
            {
                if ( !IsChildOf( from.Backpack ) )
                {
                    from.SendLocalizedMessage( 1062385 ); // You must have the book in your backpack to add deeds to it.
                    return false;
                }
                else if ( m_Entries.Count < 500 )
                {
                    m_Entries.Add( new TamingBOBSmallEntry( (SmallMobileBOD)dropped ) );
                    InvalidateProperties();

                    from.SendLocalizedMessage( 1062386 ); // Deed added to book.

                    if ( from is PlayerMobile )
                        from.SendGump( new TamingBOBGump( (PlayerMobile)from, this ) );

                    dropped.Delete();
                    return true;
                }
                else
                {
                    from.SendLocalizedMessage( 1062387 ); // The book is full of deeds.
                    return false;
                }
            }

            from.SendLocalizedMessage( 1062388 ); // That is not a bulk order deed.
            return false;
        }

        public TamingBulkOrderBook( Serial serial ) : base( serial )
        {
        }

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( (int) 1 ); // version

            writer.Write( (int) m_Level );

            writer.Write( m_BookName );

            m_Filter.Serialize( writer );

            writer.WriteEncodedInt( (int) m_Entries.Count );

            for ( int i = 0; i < m_Entries.Count; ++i )
            {
                object obj = m_Entries[i];

                if ( obj is TamingBOBLargeEntry )
                {
                    writer.WriteEncodedInt( 0 );
                    ((TamingBOBLargeEntry)obj).Serialize( writer );
                }
                else if ( obj is TamingBOBSmallEntry )
                {
                    writer.WriteEncodedInt( 1 );
                    ((TamingBOBSmallEntry)obj).Serialize( writer );
                }
                else
                {
                    writer.WriteEncodedInt( -1 );
                }
            }
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_Level = (SecureLevel)reader.ReadInt();
                    goto case 0;
                }
                case 0:
                {
                    m_BookName = reader.ReadString();

                    m_Filter = new TamingBOBFilter( reader );

                    int count = reader.ReadEncodedInt();

                    m_Entries = new ArrayList( count );

                    for ( int i = 0; i < count; ++i )
                    {
                        int v = reader.ReadEncodedInt();

                        switch ( v )
                        {
                            case 0: m_Entries.Add( new TamingBOBLargeEntry( reader ) ); break;
                            case 1: m_Entries.Add( new TamingBOBSmallEntry( reader ) ); break;
                        }
                    }

                    break;
                }
            }
        }

        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );

            list.Add( 1062344, m_Entries.Count.ToString() ); // Deeds in book: ~1_val~

            if ( m_BookName != null && m_BookName.Length > 0 )
                list.Add( 1062481, m_BookName ); // Book Name: ~1_val~
        }

        public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
        {
            base.GetContextMenuEntries( from, list );

            if ( from.CheckAlive() && IsChildOf( from.Backpack ) )
                list.Add( new NameBookEntry( from, this ) );

            SetSecureLevelEntry.AddTo( from, this, list );
        }

        private class NameBookEntry : ContextMenuEntry
        {
            private Mobile m_From;
            private TamingBulkOrderBook m_Book;

            public NameBookEntry( Mobile from, TamingBulkOrderBook book ) : base( 6216 )
            {
                m_From = from;
                m_Book = book;
            }

            public override void OnClick()
            {
                if ( m_From.CheckAlive() && m_Book.IsChildOf( m_From.Backpack ) )
                {
                    m_From.Prompt = new NameBookPrompt( m_Book );
                    m_From.SendLocalizedMessage( 1062479 ); // Type in the new name of the book:
                }
            }
        }

        private class NameBookPrompt : Prompt
        {
            private TamingBulkOrderBook m_Book;

            public NameBookPrompt( TamingBulkOrderBook book )
            {
                m_Book = book;
            }

            public override void OnResponse( Mobile from, string text )
            {
                if ( text.Length > 40 )
                    text = text.Substring( 0, 40 );

                if ( from.CheckAlive() && m_Book.IsChildOf( from.Backpack ) )
                {
                    m_Book.BookName = Utility.FixHtml( text.Trim() );

                    from.SendLocalizedMessage( 1062480 ); // The bulk order book's name has been changed.
                }
            }

            public override void OnCancel( Mobile from )
            {
            }
        }
    }
}
 

ObiOne

Rookie
Oct 6, 2014
59
0
6
46
Shard Name
Slayden's Realm
you were right i was missing .....using Server.Engines.BulkOrders; at the top of deftamingcraft. thank you milva! :)
 

Milva

Admin
Moderator
Mar 3, 2013
4,535
595
113
Donate
Donate money to this user
Nice glad it worked out for you :) usually if a script can't be found it could be that the name is not correct(spelled wrong) or the top of the script needs adjusting.
 

Exale

Squire
Mar 2, 2014
240
43
28
39
Wisconsin
Shard Name
Mystical Nights
For some reason when I try to click the "read more about this resource" link so I can read it and download it, I get this error...

ServUO - Error
You do not have permission to view this page or perform this action.

Only seems to be for this thread. Works fine anywhere else.
 

Limpy

Citizen
Nov 17, 2015
2
0
1
49
I may have missed something some place, it wont let players turn in the BoD's. Any ideas?
 

Tim

Squire
Feb 4, 2015
108
6
18
Hello everyone I was playing around with the storage keys and the bods . I have no errors on shard but when i go to add animal taming bod to the bod storage key it will not let me . It hold all the other ones but taming bods. I keep getting error in game saying the quantity can not fit in this. Does anyone have any ideas ? I have put in the edits in the keys correct but i have no idea?