OP
Xeno

Xeno

Member
ServUO Version
Publish 58
Ultima Expansion
Endless Journey
I am having issues with a rider. When you kill the rider, the mount disappears and I want the mounts to be able to be tamed or killed after the rider dies. I found the ChaosDragoonElite script and think I found the correct part but it isn't working with mine because it also calls for dragonbarding and mine are not swamp dragons.

C#:
SwampDragon mt = new SwampDragon
     {
       HasBarding = true,
       BardingResource = res
      };
mt.BardingHP = mt.BardingMaxHP;
mt.Rider = this;

I tried this
C#:
BarbarianBear mt = new BarbarianBear
mt.Rider = this;

but it just comes back as errors.

I also want to change the max slots on this to 5 and not sure how to do that. I found where it calls for how many slots at tame but nothing about max slots. Can I just add MaxSlot = 5 or something like that below ControlSlot = 2?

Thank you in advance for your help. I have been learning a lot!!

EDIT EDIT
I think I found where it calls for the mount to be alive after the rider dies but I think I will still have errors due to the dragon barding.

C#:
ublic override bool OnBeforeDeath()
        {
            IMount mount = Mount;

            if (mount != null)
            {
                if (mount is SwampDragon)
                    ((SwampDragon)mount).HasBarding = false;

                mount.Rider = null;
            }

            return base.OnBeforeDeath();
        }

If someone know of a rider that the mount stays after the rider dies and is not on a swamp dragon, list it please. I can probably figure it out from that as well.
 
Last edited:
I was just experimenting with that line in mine but it was giving me an error about arguments, guessing the 99.1 and the true. Mine was identical to that without the stuff in the parenthesis.

error bar.png

In my script, I am leaning towards this part
C#:
public override bool OnBeforeDeath()
        {
            IMount mount = Mount;

            if (mount != null)
                mount.Rider = null;

            if (mount is Mobile)
                ((Mobile)mount).Delete();

            return base.OnBeforeDeath();
        }

It looks like it is saying to delete the mount if the rider is no longer there. Not sure what to use in place of delete though.
In my script, I am leaning towards this part
C#:
public override bool OnBeforeDeath()
{
IMount mount = Mount;

if (mount != null)
mount.Rider = null;

if (mount is Mobile)
((Mobile)mount).Delete();

return base.OnBeforeDeath();
}
It looks like it is saying to delete the mount if the rider is no longer there. Not sure what to use in place of delete though.

I removed that and the bear stays after the rider died. :)

Now I just need to find out how to change the max control slots. When the bear spawns, it spawns with 2 of 2 slots where I want it 2 of 5.
 
Last edited:
I was just experimenting with that line in mine but it was giving me an error about arguments, guessing the 99.1 and the true. Mine was identical to that without the stuff in the parenthesis.

View attachment 19389

In my script, I am leaning towards this part
C#:
public override bool OnBeforeDeath()
        {
            IMount mount = Mount;

            if (mount != null)
                mount.Rider = null;

            if (mount is Mobile)
                ((Mobile)mount).Delete();

            return base.OnBeforeDeath();
        }

It looks like it is saying to delete the mount if the rider is no longer there. Not sure what to use in place of delete though.


I removed that and the bear stays after the rider died. :)

Now I just need to find out how to change the max control slots. When the bear spawns, it spawns with 2 of 2 slots where I want it 2 of 5.
1640459839287.png
 
I had the slots it would take but if it was listed as ControlSlots = 2, it would show as 2 => 2 on the lore.

bear1.png

When I would try MaxControlSlots = 5

I would get an error. I was checking basecreasture.cs to see if I could learn anything and I saw that I had it listed wrong. It needs to be ControlSlotsMax = 5 and it worked! I love working on these because it is like a puzzle, a frustrating puzzle, but fun and I am learning so much.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back