Page 1 of 1

Mount abilities and New tags for DFN

Posted: Sat Aug 07, 2021 7:02 pm
by dragon slayer
like to see tag for AllowFemaleRider and AllowFemaleTamer


AllowFemaleTamer if 0 the npc can not be tamed by a female if 1 female can tame it.
AllowMaleTamer same as female just blocks male chars
AllowRaceTamer same as the other two but checks the race
AllowFemaleRider if 0 female can not ride it. if 1 a female can ride it.
AllowMaleRider same as female just blocks male char
AllowRaceRider

also here is the msg for the mount
public override TimeSpan MountAbilityDelay { get { return TimeSpan.FromHours( 1.0 ); } }
        public override void OnDisallowedRider( Mobile m )
        {
            m.SendLocalizedMessage( 1042319 ); // The Ki-Rin refuses your attempts to mount it.
        }


Mount abilities runuo has
public override bool DoMountAbility( int damage, Mobile attacker )
        {
            if( Rider == null || attacker == null ) //sanity
                return false;

            if( (Rider.Hits - damage) < 30 && Rider.Map == attacker.Map && Rider.InRange( attacker, 18 ) )  //Range and map checked here instead of other base fuction because of abiliites that don't need to check this
            {
                attacker.BoltEffect( 0 );
                // 35~100 damage, unresistable, by the Ki-rin.
                attacker.Damage( Utility.RandomMinMax( 35, 100 ), this, false );    //Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player.  If changed to player, without the extra bool it'd be an infinite loop

                Rider.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042534 );  // Your mount calls down the forces of nature on your opponent.
                Rider.FixedParticles( 0, 0, 0, 0x13A7, EffectLayer.Waist );
                Rider.PlaySound( 0xA9 );    // Ki-rin's whinny.
                return true;
            }

            return false;
        }

Here some links to the ki-rin
https://uo.stratics.com/database/view.p ... ers&id=221
https://www.uo-cah.com/bestiary/Ki-Rin <---------------------------- More accurate Guide
https://www.uoguide.com/Ki-Rin

This abilities should be added maybe to js so we can make custom mounts with abilities

function onMountAbilitie(damage , user)

Re: Mount abilities and New tags for DFN

Posted: Fri Aug 13, 2021 12:05 pm
by Xuri
For the mounting "rules", I think those could potentially easily be handled via JS at this point, especially considering we can have multiple scripts attached to each character. So it should be pretty straight-forward to do a script with an onCharDoubleClick( pUser, targChar ) event where you check the gender of the character clicking the mount, and then allow it/disallow it depending on the ID of the mount. Attach script to all relevant mounts. For ethereal mounts, a similar thing can be done in a script with an onUseChecked/onUseUnChecked event. So for this, I don't think it's necessary to add additional DFN tags.

For the mount abilities - how does a player trigger those in regular UO (or RunUO)?