Full Version : Dismount
xmlspawner >>XMLSpawner Mods and Tips >>Dismount
<< Prev | Next >>
Gembone- 08-31-2006
ok ran into an issue with the stable feature with this. it dismounts and stables everything great. a little too great acually. the PM mod you gave me to put in had a range set but it isn't working properly. I acually set it to range of 2 tiles and it will still stable a pet that is across town. I think it just stables all followers and not just the ones within the range of the spawner.
ArteGordon- 08-31-2006
post the actual mod that you made.
What I posted will stable followers that are in range of the player, not the spawner.

QUOTE
public bool DismountAndStableFollowers { get { return false; } set {
if (value == true)
{
if (Mount != null)
{
// dismount
Mount.Rider = null;
}
ArrayList stablelist = new ArrayList();
// check for followers within 10 tiles
foreach (Mobile m in this.GetMobilesInRange(10))
{
BaseCreature bc = m as BaseCreature;
if (bc != null && bc.ControlMaster == this && bc.Controlled)
stablelist.Add(bc);
}
foreach (BaseCreature bc in stablelist)
{
// stable it
bc.ControlTarget = null;
bc.ControlOrder = OrderType.Stay;
bc.Internalize();
bc.SetControlMaster(null);
bc.SummonMaster = null;
Stabled.Add(bc);
}
if(stablelist.Count > 0)
Say("Your followers have been stabled.");
}
}
}

Gembone- 08-31-2006
this is the exact code I have in my playermobile.cs
only thing I changed was the range from 10 to 2. yet if the player goes into the range of the spawner and they have a follower not in stable but not within the range specified it will still stable the follower.

CODE
public bool DismountAndStableFollowers { get { return false; } set {
if (value == true)
{
if (Mount != null)
{
// dismount
Mount.Rider = null;
}
ArrayList stablelist = new ArrayList();
// check for followers within 2 tiles
foreach (Mobile m in this.GetMobilesInRange(2))
{
BaseCreature bc = m as BaseCreature;
if (bc != null && bc.ControlMaster == this && bc.Controled)
stablelist.Add(bc);
}
foreach (BaseCreature bc in stablelist)
{
if (Stabled.Count >= AnimalTrainer.GetMaxStabled(this))
break;
// stable it
bc.ControlTarget = null;
bc.ControlOrder = OrderType.Stay;
bc.Internalize();
bc.SetControlMaster(null);
bc.SummonMaster = null;
Stabled.Add(bc);
}
if(stablelist.Count > 0)
Say("Your followers have been stabled.");
}
}
}

ArteGordon- 08-31-2006
have you actually verified this? because I dont see how that is possible with this code.
Gembone- 08-31-2006
yes it happened with a staff members Char and I reproduced it with mine
ArteGordon- 08-31-2006

QUOTE (Gembone @ August 31, 2006 10:21 pm)
yes it happened with a staff members Char and I reproduced it with mine

what exactly did you do to reproduce this?
Gembone- 08-31-2006
well I have this system on 2 servers and one it works fine one. I am going to look into it a little more to see if I screwed something up with the spawner code entry or something else.
ArteGordon- 08-31-2006
that would be my guess, because there is nothing in the code that you posted that could do that.
Gembone- 08-31-2006
ok logged in with one of my player accounts and characters. bought a horse. went to closest shop with the dismounter spawner. got off the horse outside the building and well outside of the 2 tile range of where my char would enter the spawners range. went into the building. it triggers the spawner saying no pets allowed but leaves the horse where I left it. does not stable it but spams the player with no mounts allowed. only does this on one of the servers not both. so I am rather confused. I dont see any difference between the PM edit or the spawner set up other than the proximity ranges. any clue where I should look?
only difference I know of is in the server with the problem I have the FA-ATS system. this is the only difference I can think of.
ArteGordon- 08-31-2006
I suppose that it is possible that the FSATS system is doing something funny with stabling.
You can test out the stabling thing by just manually doing
[xmlset dismountandstablefollowers true
at different distances from your pets. That doesnt involve any triggering or spawners and will just test out the autostabling code.
Gembone- 08-31-2006
well its not acually stabling them if they are out of range it is just spamming the players with the "no mounts allowed" proximity msg.
and I tested with the [xmlset... command and the range is set perfectly and works perfectly
ArteGordon- 09-01-2006
yes, the spawner ProximityRange setting will determine the "spamming" range.
Gembone- 09-01-2006

QUOTE (ArteGordon @ September 01, 2006 04:43 am)
yes, the spawner ProximityRange setting will determine the "spamming" range.

so are you saying I should use spawn range instead for it to no spam the players?
and if so why does it not do this on my other server?
ArteGordon- 09-01-2006

QUOTE (Gembone @ September 01, 2006 08:55 am)

QUOTE (ArteGordon @ September 01, 2006 04:43 am)
yes, the spawner ProximityRange setting will determine the "spamming" range.

so are you saying I should use spawn range instead for it to no spam the players?
and if so why does it not do this on my other server?
spawnrange does not have any effect on triggering. Whatever you set ProximityRange to is what will determine the distance at which a player will trigger the spawner.
If you are getting a difference between your servers in the triggering range, then it is because you have the ProximityRange set differently.
You may also have a difference in the RefractMin/Max settings that determine the minimum time between triggers. If it is small, then the triggering will be more frequent.
Gembone- 09-01-2006
the ranges are specific to the buildings they are in. in order to cover the entire inside of each building. but I can't figure out why it spams on one shard and not the other.
here is a picture of the 2 servers side by side with mount outside and me inside.
one server spams the "no mounts allowed and the other does not.
http://home.comcast.net/~gembone/Spamming.jpg