Kamras

Member
I created a Robe that turns a Gargoyle into a Human using BodyMod, this enabled the user to ride human pets (without the graphic glitch). However I just noticed a problem..

So when the user equips the robe, they turn into the human bodymod with no issue, they can mount, no graphic glitches. However if they remove the robe, they body becomes invisible (like the graphic glitch). Now for other players, they see this glitch and it stays like that until the user logs off and back on again. As far as GM's are concerned, GMS see the glitch and can make the user visible only to the GM by toggling between player and staff...

Clearly something isn't switching back to default bodymod correctly. Anyone have any suggestions on how to make this work right? driving me mad. I posted the script below.

Code:
using System;
using Server.Network;
using Server.Mobiles;

namespace Server.Items
{
    [Flipable(0x4002, 0x4003)]
    public class ShroudOfTheEternalSteed : BaseOuterTorso
    {
        public override bool IsArtifact { get { return true; } }
        [Constructable]
        public ShroudOfTheEternalSteed()
            : base(0x4002)
        {
            Name = "Shroud of the Eternal Steed";
            Hue = 1967;
            Weight = 0;
//           LootType = LootType.Blessed;
        }

        public ShroudOfTheEternalSteed(Serial serial)
            : base(serial)
        {
        }
       
        public override bool NotWornByHumans
        {
            get
            {
                return true;
            }
        }

        public override bool OnEquip( Mobile from )
        {
            Effects.SendTargetEffect(from, 0x3709, 32);
            Effects.SendTargetEffect(from, 0x376A, 32);
            from.LocalOverheadMessage(MessageType.Regular, 0x59, true, "You feel like you could ride anything..");
            from.PlaySound(0x208);
            from.RevealingAction();
            this.ItemID = 0x2684;
           
            if ( from.Body == 0x29A )
            {
                from.BodyMod = 400;    //male
            }
            else if ( from.Body == 0x29B )
            {
                from.BodyMod = 401;    //Female
            }

            return base.OnEquip( from );
        }
               
        public override void OnRemoved(object parent)
        {
            if (parent is Mobile)
            {
                Mobile m = (Mobile)parent;
                Effects.SendTargetEffect(m, 0x3709, 32);
                m.LocalOverheadMessage(MessageType.Regular, 0x59, true, "You spread your wings..");
                m.PlaySound(0x208);
                this.ItemID = 0x4002;
               
                IMount mount = m.Mount;

                if ( mount != null )
                    mount.Rider = null;
           
               
                if (m.BodyMod == 0x190 || m.BodyMod == 0x191)
                {
                    m.BodyMod = 0;
                    m.RevealingAction();
                }
                else
                {
                    base.OnRemoved(parent);
                }
            }
        }
       
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.WriteEncodedInt(0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();
        }
    }
}
 
To note, this glitch happens when they remove the robe either while riding or not riding a pet. So being mounted vs not mounted doesn't seem to matter...
 
Try this as a base for your robe and let me know if it works out or not
 

Attachments

  • BalronCostume.cs
    2.3 KB · Views: 5
I adjusted your script to use a human form, which works, i just wonder why mine kept failing.. lol
[doublepost=1479327889][/doublepost]Nevermind, issue still exist. To further explain .

So when equipping the robe (the one posted above or the one I made), it works just fine it seems with not mounted, but if a gargoyle is wearing the robe and mounts a pet, then takes off the robe while mounted they get forced to dismount like they should but, despite being forced to dismount and return back to the - bodymod, the toon is still not visible.
 
what about setting it to change the Body instead of a BodyMod?
I was able to manually set Body to that of a Garg and back to human without any issues.
 
hmm, changing body might work, I will try that next :) I did try seperating the bodymods in the removal section, but had the same problem, figured would not hurt to try.

Code:
                if (m.BodyMod == 0x190)
                {
                    m.BodyMod = 666;
                    m.RevealingAction();
                }
               
                if (m.BodyMod == 0x191)
                {
                    m.BodyMod = 667;
                    m.RevealingAction();
                }
[doublepost=1479331690][/doublepost]So here is the new Code, still failing with directly changing the body. Starting to feel this is more of a screen refresh issue of some sort that doesn't like the way i'm executing this. lol...

Code:
using System;
using Server.Network;
using Server.Mobiles;

namespace Server.Items
{
    [Flipable(0x4002, 0x4003)]
    public class ShroudOfTheEternalSteed : BaseOuterTorso
    {
        public override bool IsArtifact { get { return true; } }
        [Constructable]
        public ShroudOfTheEternalSteed()
            : base(0x4002)
        {
            Name = "Shroud of the Eternal Steed";
            Hue = 1967;
            Weight = 0;
//           LootType = LootType.Blessed;
        }

        public ShroudOfTheEternalSteed(Serial serial)
            : base(serial)
        {
        }
       
        public override bool NotWornByHumans
        {
            get
            {
                return true;
            }
        }

        public override bool OnEquip( Mobile from )
        {
            Effects.SendTargetEffect(from, 0x3709, 32);
            Effects.SendTargetEffect(from, 0x376A, 32);
            from.LocalOverheadMessage(MessageType.Regular, 0x59, true, "You feel like you could ride anything..");
            from.PlaySound(0x208);
            from.RevealingAction();
            this.ItemID = 0x2684;
           
            if ( from.Body == 0x29A ) // 666
            {
                from.Body = 0x190;    //male 400 - 0x190
            }
            else if ( from.Body == 0x29B ) // 667
            {
                from.Body = 0x191;    //Female 401 - 0x191
            }

            return base.OnEquip( from );
        }
               
        public override void OnRemoved(object parent)
        {
            if (parent is Mobile)
            {
                Mobile m = (Mobile)parent;
                Effects.SendTargetEffect(m, 0x3709, 32);
                m.LocalOverheadMessage(MessageType.Regular, 0x59, true, "You spread your wings..");
                m.PlaySound(0x208);
                this.ItemID = 0x4002;
               
                IMount mount = m.Mount;

                if ( mount != null )
                    mount.Rider = null;
           
               
                if (m.Body == 0x190)
                {
                    m.Body = 0x29A;
                    m.RevealingAction();
                }
               
                if (m.Body == 0x191)
                {
                    m.Body = 0x29B;
                    m.RevealingAction();
                }
               
                else
                {
                    base.OnRemoved(parent);
                }
            }
        }
       
        public override void AddNameProperty(ObjectPropertyList list)
        {
            base.AddNameProperty( list );

            list.Add( "<BASEFONT COLOR=#7FCAE7>" + "Fairy Clothing" + "<BASEFONT COLOR=#FFFFFF>"/*Back to White*/ );

        }
       
        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );
          
            list.Add( "<BASEFONT COLOR=#7FCAE7>Ability: Ride Mounts" + "<BASEFONT COLOR=#FFFFFF>" );
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.WriteEncodedInt(0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();
        }
    }
}
 
Going out on a limb here.. Maybe its executing the body change before the dismount. Since there is no animation/artwork for a gargoyle riding anything, you're getting the non body. What about having it to where the player has to dismount to be able to remove the robe? Kind of like you cant mine while riding...
 
So even if I dismount manually, then take the robe off, it still leaves the toon invisible. so if i take the robe off and force the dismount vs manually dismounting and then taking the robe off, it glitches up. and to re note, the issue does not exist if i never have the toon mount anything in the first place. (confusing right? lol)
 
Are you using razor? Try to resynch the client when you appear to be invisible to determine if this is a client refresh issue please.
 
so just for kicks n giggles, i did re order the code and put the mount after the body change, didn't help the issue. I actually do not use Razor or any third party program, I used a program to remove the encryption, so it's directly logged in with no additional software.
 
Invisible as well. So what I did is launch 3 separate clients at one time, 2 of the clients were normal accounts, one client was a GM/admin account, I confirmed that everyone can see the toon as invisible once they dismount. If you want I can get you into the server to show you directly. :) lol
 
Just a note: this does not happen on my shard. This could be a change in ServUO, which I'm not running at the moment.
 
That is likely where it's at then, because my core is over 5 years old now. I haven't finished the merge to ServUO yet.
 
can you post your mobile server core so I can compare?
[doublepost=1479337549][/doublepost]Meh on the flip side I might as well look into idea's and code for maybe just changing the mount options, and if gargoyle body is detected, change body onmount and on dismount return to normal. thats another way to go about it... lol
 
I'm using uosteam to connect and an older copy of the repo. If the issue isn't resolved I can try testing your script on there to see if I have the same issues.
 
the OnEquip method wasn't doing anything on my ver. of the repo
changed it to OnAdded and that seems to work.

tested equip and remove multiple times as well as being able to ride a mount and dismount on removal

Code:
// public override bool OnEquip( Mobile from )
        public override void OnAdded(object parent)
        {
            if (parent is Mobile)
            {
                Mobile from = (Mobile)parent;
               
                Effects.SendTargetEffect(from, 0x3709, 32);
                Effects.SendTargetEffect(from, 0x376A, 32);
                from.LocalOverheadMessage(MessageType.Regular, 0x59, true, "You feel like you could ride anything..");
                from.PlaySound(0x208);
                from.RevealingAction();
                this.ItemID = 0x2684;
              
                if ( from.Body == 0x29A )
                {
                    from.BodyMod = 400;    //male
                }
                else if ( from.Body == 0x29B )
                {
                    from.BodyMod = 401;    //Female
                }
    
                //return base.OnEquip( from );
                 base.OnAdded(parent);
            }
        }
 
So i've been further review, this problem did return. I've isolated it to Ultima Live. 0.97. If Ultima Live is not on the client, then the client will process the robe change correctly and not hide the toon. If Ultima Live is present on the client, it causes the problem. Well , knowing the source of the problem is half the battle... lol
 
Based on it's functionality it should not have any affect, the only thing I can think of is some sort of refresh rate that is changed. To make sure my older client (which isn't that old) wasn''t causes the problem, I downloaded and patched a new client. And used UOSteam and connected, problem did not happen. Then I Exited the newer UO, dropped in the patched lrping file, loaded back into UOSteam and the problem returned.
 
It may be happening because even though you're changing the body, the mobile will still have garg items equipped - and they don't have a mounted animation.

so i'd try removing all garg equipment and see if it still happens
also, can't remember if there's an option for it or not, but if you can polymorph or incognito to a human, then do that and see if it happens ( i think there may be code to check if you are and blocks you from mounting though )
 
That is a good idea. So I gave it a try, and i just made the toon naked, no weapons/clothing/armor. The issue still existed.
1) Made Toon Naked
2) Equipped the Robe (BodyMod) to gargoyle
3) Mounted a hrose (other toons at this point can still see me just fine)
4) Dismounted Horse (other toons can still see me)
5) Remove the robe and BodyMod back to Gargoyle (no other toons can see me),

I tried force mounting as a gorgoyle to a horse and using the dismount command, didn't bring me back to visibility.
The only thing that brings me back to visible is logging out and back in again it seems.
[doublepost=1486858758][/doublepost]@Praxiiz - Do you have any idea's? :) I did make sure i properly merged the .98 files in.
[doublepost=1486858823][/doublepost]To also note again, this only happens when using ultima live, remove the lrp file and its good again. So I'm also searching through that code to see if i can find the problem.
 
Too lazy ATM to read old posts to see if you've already clarified or not -

Can you see yourself when others can't ?
 
LoL no problem, why I restated a few things. So when that glitch happens I can still see myself. The player is unaware of the glitch unless someone else says something. I didn't even notice it at first until someone on my server told me.
 
If other clients see you disappear, are they also running UltimaLive? Try it with one client using UltimaLive and the observing clients not using it.
 
I launched multiple instances of of my client, (which has the latest ultima live lrp file in it), instance one, I logged into a player account that has the robe. The second instance also doing the same, logged into the player account. Standing side by side, I replicated the bug and watched my toon disappear after removing the robe. If the client doesn't contain the lrp file, the bug doesn't replicate. So ideally that wouldn't be good in my case, as I want to run Ultima Live fully and use the streaming feature to the clients. So if the client has the lrp file to stream, the error happens, if the client doesn't have the lrp file, the glitch doesn't happen. So my guess is there is something in the lrp code that is contributing to this.
 
Does it happen when your character moves or does it happen when you are standing in one place?

There could be several things happening. UltimaLive just calls two client functions to update statics and map tiles when they change. It does so when you move to a new 8x8 block on the map or it receives an updated block from the server. If it's an artifact of calling those functions then there's probably nothing that can be done.

I can try to replicate it, but I'll need a working script and I'll need to know the client version you are running.
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back