ServUO Version
Publish 58
Ultima Expansion
Endless Journey
I know you can teleport the player and boat with the serpent pillars, but it only teleports them on the same map.
I want to teleport player and boat to another map. I have the code compiling but when tested in game it does not teleport to the other map. The attached file is what I have right now. Not sure what needs to be done to get it to work.
 

Attachments

  • TokunoSerpentPillar.cs
    4.1 KB · Views: 15
Its been awhile since played ar9ound with those but From what I remember you set the different map when the item is already placed in game not in the actual script. So try that first place your pillar then set map using your [props command set the different map see if it works.
 
Its been awhile since played ar9ound with those but From what I remember you set the different map when the item is already placed in game not in the actual script. So try that first place your pillar then set map using your [props command set the different map see if it works.
Well I had thought that myself so I did try that. But, there is no setting for destination map in the normal Serpent Pillar coding. As you can see in the pic, there is a setting in the teleporter for MapDest and in the Serpent Pillar there is no setting for MapDest.

I believe the issue really isn't the fact that the serpent pillar script I have isn't working. I think that the issue goes back to the BaseBoat.cs because that is where boat teleporting is handled and there is no allowance in there for a destination map. I have not been able to do any edits to the baseboat code to add it in since I have been busy with other things.

Pillar.png
 
Teleport in Baseboat.cs doesn't have an input for a map so you would need to add one that does.
Havn't tested this but... If I were to do this first in BaseBoat.cs I would find:
C#:
        public void Teleport(int xOffset, int yOffset, int zOffset)
        {
            foreach (var ent in GetEntitiesOnBoard().Where(e => !IsComponentItem(e) && !CanMoveOver(e) && e != TillerMan))
            {
                ent.Location = new Point3D(ent.X + xOffset, ent.Y + yOffset, ent.Z + zOffset);
            }

            Location = new Point3D(X + xOffset, Y + yOffset, Z + zOffset);
        }

Just below it I would add:
C#:
        public void TeleportMap(int xOffset, int yOffset, int zOffset, Map map)
        {
            foreach (var ent in GetEntitiesOnBoard().Where(e => !IsComponentItem(e) && !CanMoveOver(e) && e != TillerMan))
            {
                ent.Location = new Point3D(ent.X + xOffset, ent.Y + yOffset, ent.Z + zOffset);
                ent.Map = map;
            }

            Location = new Point3D(X + xOffset, Y + yOffset, Z + zOffset);
            Map = map;
        }

Then in the file you uploaded (TokunoSerpentPillar.cs) I would change:
C#:
boat.Teleport(xOffset, yOffset, zOffset);

To:
C#:
boat.TeleportMap(xOffset, yOffset, zOffset, map);
 
Back