Dezzie

Member
I have the farming/ranching expansion but I want to have the Animal Trader buy not only purebreds but also mixed races.

Secondly, I want to increase the amount of gold she pays for purebreds.

I'm attaching the script because this is way beyond my skillset.

Can someone please help? Thank You
Post automatically merged:

PS I'd like to give about 25000 gold for a purebred animal. It's a lot of work having a farm.
 

Attachments

  • AnimalTrader.cs
    17.9 KB · Views: 2
Last edited:
I should mention that these scripts are actually in a package called the Cooking Expansion.
 
OK I figured out how to up the price on my own. After much trial and error. But now I have another question. In the script it says this:

else
{
if ( pet is FarmChicken )
{
FarmChicken ba = (FarmChicken) pet;
double sellbonus = 0;
if (ba.MotherBreed == ChickenBreed.Leghorn || ba.FatherBreed == ChickenBreed.Leghorn)
{
sellbonus += (ba.IsPurebred() ? 5.0 : 2.5 );
}
if (ba.MotherBreed == ChickenBreed.Barnevelder || ba.FatherBreed == ChickenBreed.Barnevelder)
{
sellbonus += (ba.IsPurebred() ? 4.0 : 2.0 );
}
if (ba.MotherBreed == ChickenBreed.Orpington || ba.FatherBreed == ChickenBreed.Orpington)
{
sellbonus += (ba.IsPurebred() ? 2.0 : 1.0 );
}
if (ba.MotherBreed == ChickenBreed.Poltava || ba.FatherBreed == ChickenBreed.Poltava)
{
sellbonus += (ba.IsPurebred() ? 2.0 : 1.0 );
}
if (ba.MotherBreed == ChickenBreed.Bresse || ba.FatherBreed == ChickenBreed.Bresse)
{
sellbonus += (ba.IsPurebred() ? 5.0 : 2.5 );
}
if (ba.MotherBreed == ChickenBreed.Braekel || ba.FatherBreed == ChickenBreed.Braekel)
{
sellbonus += (ba.IsPurebred() ? 3.0 : 1.5 );
}
if (ba.Age == AgeDescription.Baby)
{
sellbonus += 1.0;
}
else if (ba.Age == AgeDescription.Young)
{
sellbonus += 4.0;
}
else if (ba.Age == AgeDescription.Adult)
{
sellbonus += 6.0;
}
else if (ba.Age == AgeDescription.Senior)
{
sellbonus -= 10.0;
}
sellbonus += (ba.Female? 10:0);
SellPetForGold(from, pet, 1500 + (int)sellbonus);

The 1500 is the price, but what I don't know is how does it calculate the sell bonus as noted above for each breed? I sold a Leghorn and got 1516 gold, so the 1500 as I identified but how does sellbonus += (ba.IsPurebred() ? 5.0 : 2.5 ); = 16 gold? Anyone??

Thank You
 
it was a pure bred, female baby leghorn chicken, thats how you get 16

or one parent was a leghorn and the other was a bresse
 
it was a pure bred, female baby leghorn chicken, thats how you get 16

or one parent was a leghorn and the other was a bresse

yes it was a leghorn chick but what part of the script says 16 gold bonus? That’s what I don’t understand.
 
Well if it was a pure bread leghorn,
then thats 5

age = baby therefor +1
gender = female therefor +10
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back