RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Resource icon

[2.x] Standalone Animal Taming BOD System (SVN) v1.0.3

No permission to download

bazspeed

Sorceror
bazspeed submitted a new resource:

Standalone Animal Taming BOD System (SVN) (version SVN) - Very Crude BOD System

I have used the Monster Contract System for this one. There is no credit apart from author gargouille. And which can be found at
http://www.runuo.com/community/threads/monster-contract-dealer.99232/#post-3848450

I have looked around the boards and asked several times and even got into trouble for asking on the wrong boards for a standalone Taming BOD system. But because I have never got a decent response, I decided to do my own.

The system works in much the same way, using a...

Read more about this resource...
 

kiasta6984

Traveler
Are there any dependencies? I am getting some errors when trying to compile:

Warning 7 The result of the expression is always 'false' since a value of type 'int' is never equal to 'null' of type 'int?' C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodGump.cs 87 67 RunUOServer

Error 3 The type or namespace name 'HighPlainsBoura' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 51 30 RunUOServer

Error 2 The type or namespace name 'LowlandBoura' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 39 30 RunUOServer

Error 8 The type or namespace name 'Raptor' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 94 30 RunUOServer

Error 1 The type or namespace name 'RuddyBoura' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 28 30 RunUOServer

Error 6 The type or namespace name 'Skree' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 85 30 RunUOServer

Error 5 The type or namespace name 'Slith' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 75 30 RunUOServer

Error 4 The type or namespace name 'StoneSlith' could not be found (are you missing a using directive or an assembly reference?) C:\Users\m3rli_000\Documents\Visual Studio 2012\Projects\RunUOServer\RunUOServer\Scripts\Custom\Taming Bod System\Monster Contract\TamingBodType.cs 62 30 RunUOServer

Also, here:
Code:
MCparent.Monster == null
in TamingBodGump did you mean
Code:
MCparent.Monster == 0
by chance since the type is of int and cannot be null?

And with the other errors, I just commented out the creatures here:

Code:
public static TamingBodType[] Get = new TamingBodType[]
		{
			new TamingBodType (typeof(Dog), 				"Dog", 				10),
			new TamingBodType (typeof(Gorilla), 				"Gorilla", 					10),
			new TamingBodType (typeof(Rabbit), 			"Rabbit",		10),
			new TamingBodType (typeof(SkitteringHopper), 				"Skittering Hopper",					10),
			new TamingBodType (typeof(Bird), 			"Bird",			10),
			new TamingBodType (typeof(Cat), 			"Cat",		10),
			new TamingBodType (typeof(Chicken), 		"Chicken",		10),
			new TamingBodType (typeof(MountainGoat), 		"Mountain Goat",		10),
			new TamingBodType (typeof(Rat), 		"Rat",		10),
			new TamingBodType (typeof(Sewerrat), 		"Sewer Rat",	10),
			new TamingBodType (typeof(Mongbat), 		"Mongbat",	10),
			new TamingBodType (typeof(Cow), 					"Cow",						20),
			new TamingBodType (typeof(Goat), 				"Goat",					20),
			new TamingBodType (typeof(Pig), 				"Pig",				20),
			new TamingBodType (typeof(Sheep), 				"Sheep",						20),
			new TamingBodType (typeof(Eagle), 				"Eagle",				20),
			//new TamingBodType (typeof(RuddyBoura), 				"RuddyBoura",			20),
			new TamingBodType (typeof(Slime), 		"Slime",	20),
			new TamingBodType (typeof(BullFrog), 					"Bull Frog",					30),
			new TamingBodType (typeof(Hind), 			"Hind",		30),
			new TamingBodType (typeof(TimberWolf), 			"Timber Wolf",			30),
			new TamingBodType (typeof(Boar), 		"Boar",	30),
			new TamingBodType (typeof(DesertOstard), 				"Desert Ostard",			30),
			new TamingBodType (typeof(Ferret), 			"Ferret",			30),
			new TamingBodType (typeof(ForestOstard), 				"Forest Ostard",					30),
			new TamingBodType (typeof(GiantRat), 				"Giant Rat",					30),
			new TamingBodType (typeof(Horse), 				"Horse",					30),
			//new TamingBodType (typeof(LowlandBoura), 				"Lowland Boura",					30),
			new TamingBodType (typeof(PackHorse), 				"Pack Horse",					30),
			new TamingBodType (typeof(PackLlama), 				"Pack Llama",					30),
			new TamingBodType (typeof(RidableLlama), 				"Ridable Llama",					30),
			new TamingBodType (typeof(BlackBear), 				"Black Bear",					40),
			new TamingBodType (typeof(Llama), 				"Llama",					40),
			new TamingBodType (typeof(PolarBear), 				"Polar Bear",					40),
			new TamingBodType (typeof(Walrus), 				"Walrus",					40),
			new TamingBodType (typeof(BrownBear), 				"Brown Bear",					40),
			new TamingBodType (typeof(Cougar), 				"Cougar",					40),
			new TamingBodType (typeof(Alligator), 				"Alligator",					40),
			new TamingBodType (typeof(DeathwatchBeetle), 		"Death Watch Beetle",	40),
			//new TamingBodType (typeof(HighPlainsBoura), 		"High Plains Boura",	40),
			new TamingBodType (typeof(Scorpion), 		"Scorpion",	40),
			new TamingBodType (typeof(GreyWolf), 				"Grey Wolf",					50),
			new TamingBodType (typeof(Panther), 				"Panther",					50),
			new TamingBodType (typeof(SnowLeopard), 				"Snow Leopard",					50),
			new TamingBodType (typeof(GreatHart), 				"Great Hart",					50),
			new TamingBodType (typeof(GrizzlyBear), 				"Grizzly Bear",					50),
			new TamingBodType (typeof(Snake), 				"Snake",					50),
			new TamingBodType (typeof(GiantSpider), 		"Giant Spider",	50),
			new TamingBodType (typeof(WhiteWolf), 				"White Wolf",					60),
			new TamingBodType (typeof(Gaman), 				"Gaman",					60),
			//new TamingBodType (typeof(StoneSlith), 		"Stone Slith",	60),
			new TamingBodType (typeof(Bull), 				"Bull",					70),
			new TamingBodType (typeof(GiantIceWorm), 				"Giant Ice Worm",					70),
			new TamingBodType (typeof(FrenziedOstard), 				"Frenzied Ostard",					70),
			new TamingBodType (typeof(GiantToad), 				"Giant Toad",					70),
			new TamingBodType (typeof(GreaterMongbat), 		"Greater Mongbat",	70),
			new TamingBodType (typeof(HellCat), 		"Hell Cat",	70),
			new TamingBodType (typeof(FrostSpider), 		"Frost Spider",	70),
			new TamingBodType (typeof(DireWolf), 				"Dire Wolf",					80),
			new TamingBodType (typeof(Ridgeback), 				"Ridgeback",					80),
			new TamingBodType (typeof(SavageRidgeback), 				"Savage Ridgeback",					80),
			new TamingBodType (typeof(BakeKitsune), 		"Bake Kitsune",	80),
			new TamingBodType (typeof(LavaLizard), 		"Lava Lizard",	80),
			//new TamingBodType (typeof(Slith), 		"Slith",	80),
			new TamingBodType (typeof(Imp), 		"Imp",	80),
			new TamingBodType (typeof(Drake), 		"Drake",	80),
			new TamingBodType (typeof(HellHound), 		"Hell Hound",	80),
			new TamingBodType (typeof(Dragon), 		"Dragon",	90),
			new TamingBodType (typeof(FireBeetle), 		"Fire Beetle",	90),
			new TamingBodType (typeof(RuneBeetle), 		"Rune Beetle",	90),
			new TamingBodType (typeof(SwampDragon), 		"Swamp Dragon",	90),
			new TamingBodType (typeof(Kirin), 		"Ki-rin",	90),
			new TamingBodType (typeof(Nightmare), 		"Nightmare",	90),
			//new TamingBodType (typeof(Skree), 		"Skree",	90),
			new TamingBodType (typeof(Unicorn), 		"Unicorn",	90),
			new TamingBodType (typeof(WhiteWyrm), 		"White Wyrm",	90),
			new TamingBodType (typeof(Hiryu), 		"Hiryu",	90),
			new TamingBodType (typeof(LesserHiryu), 		"Lesser Hiryu",	90),
			new TamingBodType (typeof(CuSidhe), 		"Cu Sidhe",	100),
			new TamingBodType (typeof(Reptalon), 		"Reptalon",	100),
			new TamingBodType (typeof(GreaterDragon), 		"Greater Dragon",	100),
			new TamingBodType (typeof(FireSteed), 		"Fire Steed",	100),
			//new TamingBodType (typeof(Raptor), 		"Raptor",	100)
			
					};
and it should be fine, I'm using a fresh, compiled version of RunUO2.3r987.
 

kiasta6984

Traveler
Also, to fix the bit where the bod is given before hitting OK, follow these instructions.

Open up TamingBodDealerGump.cs file and add this:
Code:
Mobile m_From;
exactly underneath the TamingBodDealerGump Class, like so:
Code:
public class TamingBodDealerGump : Gump
    {
        Mobile m_From;
In the constructor add this directly underneath:
Code:
m_From = owner;
like so:
Code:
public TamingBodDealerGump(Mobile owner) : base(50, 50)
        {
            m_From = owner;
Then add this code:
Code:
m_From.AddToBackpack(new TamingBod());
to the OnResponse() method, like so:
Code:
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
        {
            Mobile from = state.Mobile;
 
            switch (info.ButtonID)
            {
                case 0: //Case uses the ActionIDs defenied above. Case 0 defenies the actions for the button with the action id 0
                    {
                        //Cancel
                        m_From.AddToBackpack(new TamingBod());
                        from.SendMessage("The contract was placed in your bag. Thank you my friend for all your kindness!");
                        break;
                    }
 
            }
        }
Now open up the TamingBodDealer.cs file and delete this:
Code:
mobile.AddToBackpack(new TamingBod());
in the OnClick() method, like so:
Code:
public override void OnClick()
        {
            if( !( m_Mobile is PlayerMobile ) )
                return;
 
            PlayerMobile mobile = (PlayerMobile) m_Mobile;
 
            if(CanGetContract(mobile))
            {
                if ( ! mobile.HasGump( typeof( TamingBodDealerGump ) ) )
                {
                    mobile.SendGump( new TamingBodDealerGump( mobile ));
                }
            }
        }
I tested it and it works. I'll have to look at the button to collect the animals tomorrow. Maybe you could be a little more specific on what you want it to do, because you might have a completely different idea of what you want to happen, than I :)

*Edit* I just went ahead and fixed it for you, I got bored, couldn't sleep and was weirdly motivated. Hopefully you don't mind the changes, they're not huge, just small grammatical fixes :)
 

Attachments

  • Taming Bod System.zip
    16 KB · Views: 9

bazspeed

Sorceror
Thanks.

I'll have to look at the button to collect the animals tomorrow. Maybe you could be a little more specific on what you want it to do, because you might have a completely different idea of what you want to happen, than I :)

I take it you mean the blue gem in the BOD book. When you click it, its supposed to give a target to capture the creature.
 

MrNice

Squire
Just a question - does this take into account any animal taming on the player? To say get a bod?
 

kiasta6984

Traveler
Thanks.



I take it you mean the blue gem in the BOD book. When you click it, its supposed to give a target to capture the creature.

Yeah, that's what I meant the blue button. I figured that's what you meant but when it comes to programming you can never be sure.
 

bazspeed

Sorceror
I really appreciate the help, I know its actually my script but a conversion of someone elses. But I am happy someone was able to help out so fast. It actually goes live on my shard tonight, I am in the middle of adding all the pet taming rewards onto the vendor right now.
 

Chevelle

Sorceror
I love this idea because some of the tediousness of building taming skill is lifted and I really don't care to have an evolution system cluttering the server. I know the title says SVN but will this work with RunUo 2.3?
 

kiasta6984

Traveler
I really appreciate the help, I know its actually my script but a conversion of someone elses. But I am happy someone was able to help out so fast. It actually goes live on my shard tonight, I am in the middle of adding all the pet taming rewards onto the vendor right now.

Awesome, glad to help.
 

bazspeed

Sorceror
Kiasta6984, I have found a problem.

When using the BoD book to drop a BoD back into your bag, it comes out as a standard scroll.

Its not coming out as a bod. Can you look at that please?
 

kiasta6984

Traveler
Kiasta6984, I have found a problem.

When using the BoD book to drop a BoD back into your bag, it comes out as a standard scroll.

Its not coming out as a bod. Can you look at that please?

Sure it's a simple fix, you just needed to change the itemIDs in the constructors and change the Hue member to 13, I also changed the variable names to something more appropriate because they were a bit confusing and misleading.

The fix is in the attachment.
 

Attachments

  • TamingBod.cs
    4.6 KB · Views: 6

MrNice

Squire
I have updated the system so the NPC now checks to make sure the player has atleast a little taming before offering a bod, thus stopping people from flooding the server or making new accounts just to claim a bod. Under the current version no skill is needed to get a bod. I edited the TamingBodDealer so he now checks to make sure a player has atleast 65.0 in taming. Changing is easy just search down to the OnClick method and change

if ( m_Mobile == null || m_Mobile.Skills[SkillName.AnimalTaming].Base < 65.0 )

the 65.0 to whatever you like.

If a player does not have atleast 65 taming the NPC will tell them this.

All credit goes to orig owner I will only offer support on parts I edit.

v - 1.0.3x
 

Attachments

  • Taming Bod System.rar
    15.4 KB · Views: 13

bazspeed

Sorceror
Thank you Mr Nice. I will be placing that line into the v1.0.4 but I wont set it for 65.

I think thats probably a bit too high. I have set minimum taming to 15, will place a comment to say change this to required minimum skill.

If anyone can help out on the following, I would be very appreciated.
  1. Altering timing of bods to give one then have to wait for longer periods such as the normal tailoring and smith bods.
  2. Set the say command to say how long to wait for the next bod.
Thank you everyone that has helped so far.
 

MrNice

Squire
Ok! Just check what I added to the OnClick method its a little more than just that one line but not much more :) If you see what I uploaded its just an exact copy of your v1.0.3 with my addition. Nothing else was touched or changed.
 
Top