- ServUO Version
- Publish Unknown
- Ultima Expansion
- None
Ok I need alittle help with this using runuo 2.6 yes i know its not servuo but similar lol I have a mobile that has a custom flag AdvancedTraining = 0x00010000 and this is for a levelable monster like a pet dragon so its tructured like the pet dragon out there just in the OnGaveMeleeAttack area Im calling out AdvancedTraining needing to be true to get to next level problem is it sets it to true while gaining killpoints which is odd.
I have tried many different ways the posted way is just the latest way I tried and failed lol just need a little clue to get me in right direction not real code savy but if hinted like look at this script as example helps alot or posting an example helps also.
kill point area:
else if ( this.TrainingLevel == 4)
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
if ( defender is BaseTameable )
{
BaseTameable bt = (BaseTameable)defender;
if ( bt.Genus == Genus.Draco )
{
epgainmin = 20 + ( bc.HitsMax ) / 10;
epgainmax = 20 + ( bc.HitsMax ) / 5;
this.ExperiencePoints += Utility.RandomList( epgainmin, epgainmax );
}
}
else
{
epgainmin = 5 + ( bc.HitsMax ) / 10;
epgainmax = 5 + ( bc.HitsMax ) / 5;
this.ExperiencePoints += Utility.RandomList( epgainmin, epgainmax );
}
}
}
if ( this.ExperiencePoints == 10000 )
{
this.Warmode = false;
this.Say( "*"+ this.Name +" You can now train your pet*");
this.TrainingPoints += 10;
this.TrainingLevel = 5;
}
}
if ( this.AdvancedTraining != true )
{
//this.Say( "*"+ this.Name +" Can not gain anymore Experience*");
}
else
{
if ( this.AdvancedTraining == true )
{
if ( defender is BaseCreature )
{
BaseCreature bc = (BaseCreature)defender;
if ( bc.Controlled != true )
{
if ( defender is BaseTameable )
{
BaseTameable bt = (BaseTameable)defender;
if ( bt.Genus == Genus.Draco )
{
epgainmin = 20 + ( bc.HitsMax ) / 10;
epgainmax = 20 + ( bc.HitsMax ) / 5;
this.ExperiencePoints += Utility.RandomList( epgainmin, epgainmax );
}
}
else
{
epgainmin = 5 + ( bc.HitsMax ) / 10;
epgainmax = 5 + ( bc.HitsMax ) / 5;
this.ExperiencePoints += Utility.RandomList( epgainmin, epgainmax );
}
}
}
if ( this.ExperiencePoints >= 14000 )
{
this.Warmode = false;
this.Say( "*"+ this.Name +" You can now train your pet*");
this.TrainingPoints += 20;
this.TrainingLevel = 6;
}
}
else if ( this.TrainingLevel == 6 )