|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Sep 2006
Location: Ukraine
Posts: 921
|
Hi, im still have trouble with fishing...
I don't understanf how it work. I've added Code:
new MutateEntry( 80.0, 80.0, 600.0, true, typeof( SpecialFishingNet ) ),
new MutateEntry( 80.0, 80.0, 600.0, true, typeof( BigFish ) ),
new MutateEntry( 90.0, 80.0, 600.0, true, typeof( TreasureMap ) ),
new MutateEntry( 100.0, 80.0, 600.0, true, typeof( MessageInABottle ), typeof(WhitePearl) ),
new MutateEntry( 0.0, 125.0, -550.0, false, typeof( PrizedFish ), typeof( WondrousFish ), typeof( TrulyRareFish ), typeof( PeculiarFish ) ),
new MutateEntry( 0.0, 105.0, -240.0, false, typeof( Boots ), typeof( Shoes ), typeof( Sandals ), typeof( ThighBoots ) ),
new MutateEntry( 0.0, 200.0, -200.0, false, new Type[1]{ null } )
Thanks |
|
|
|
|
|
#2 (permalink) |
|
Newbie
|
You're gonna wanna look at the chance to mutate what harvesting returns. Though you could just increase the chance for a mutated entry that would likely severely reduce the chance of getting fish since you'd constantly be getting everything else. You'll may have to create a seperate chance to return a white pearl whenever the get a fish.
Code:
public override Type MutateType( Type type, Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc, HarvestResource resource )
{
bool deepWater = SpecialFishingNet.FullValidation( map, loc.X, loc.Y );
double skillBase = from.Skills[SkillName.Fishing].Base;
double skillValue = from.Skills[SkillName.Fishing].Value;
for ( int i = 0; i < m_MutateTable.Length; ++i )
{
MutateEntry entry = m_MutateTable[i];
if ( !deepWater && entry.m_DeepWater )
continue;
if ( skillBase >= entry.m_ReqSkill )
{
double chance = (skillValue - entry.m_MinSkill) / (entry.m_MaxSkill - entry.m_MinSkill);
if ( chance > Utility.RandomDouble() )
return entry.m_Types[Utility.Random( entry.m_Types.Length )];
}
}
return type;
}
__________________
Rock 'n Roll Ain't Noise Pollution Last edited by a2c; 12-16-2007 at 08:32 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|