I looked over the script Escortables.cs in Scripts\Quests\New Haven\Escortables.cs many times but can't seem to figure out why when you spawn them in-game they seem to want to take you too the same place. They all wanna take you to the New Haven Alchemist. All the quests say this on the title...An escort to the New Haven Alchemist in The bottled Imp. I tried base escort in spawner and it says no contructable or something like that. Just asking is there a fix to this or if not i just don't know how to get them to spawn right....lol this is for servuo pub 54
And by the way great job on the server ...:) Here is the fixed script in case anyone needs it for servuo publish 54.
 

Attachments

  • Escortables.cs
    37.3 KB · Views: 8
Last edited:
Have you tried using an xmlspawner and listing the different escortables from the script on the spawner? You can go thru the script and get all the names. NewHavenAlchemistEscortQuest, NewHavenBardEscortQuest, etc...


...but it does look like it is supposed to spawn them randomly...
 
Thank you for the quick response i will try to use an xml spawner and see if that works.What i did was layed down a regular spawner typed [add new haven and it brought up the names then i typed the names into the spawner and started it.
 
m_Quest is not being properly set in each of the various escortables. You need to set it in the constructable so it knows what quest to offer. So, by default the value is 0, which means it will use the first one in the list, which is the Alchemist.

So, in NewHavenEscortable, change the constructor to something like this:

Code:
  public NewHavenEscortable()
  : this(Utility.RandomMinMax(0, 11)
  {
  }
     
  public NewHavenEscortable(int quest)
  : base()
  {
       m_Quest = quest;
  }
 
* EDIT * Ignore this post, sorry about that....

Note: this will only work if you are adding a NewHavenEscortable(). If you try to add one of the others explicitly, it will actually randomize their quest, so what you should probably do is change the constructor for each type so that it calls the correct base constructor. For example, the NewHavenAlchemistEscortable or whatever, would be
Code:
 public NewHavenAlchemistEscortable() : base( 0 ) {}
 
Last edited:
Sorry for the late response i have to work...lol Do you mean like this?
public NewHavenAlchemistEscortQuest()
: base (0) {}
or is that the wrong line. the errors i get in visual studio are.....
Error 11 Expected class, delegate, enum, interface, or struct

but thats even if i try to add it to any of the lines really...lol
 
Last edited:
* EDIT * Sorry, ignore this one too.

I mean just add the zero to the Alchemist constructor, 1 to the next one, 2 to the next one, etc. based on the list in NewHavenEscortable.
 
Last edited:
Thank You again Lokai for your help.

This is what i did after a long day at work surprisingly i had enough energy left to even do this....lol

public class NewHavenEscortable : BaseEscort
{
public override bool InitialInnocent { get { return true; } }
public override bool IsInvulnerable { get { return false; } }
public override Type[] Quests { get { return new Type[] { m_Quest }; } }

private Type m_Quest;

[Constructable]
public NewHavenEscortable()
: base()
{
switch (Utility.Random(12))
{
case 0: m_Quest = typeof(NewHavenAlchemistEscortQuest); break;
case 1: m_Quest = typeof(NewHavenBardEscortQuest); break;
case 2: m_Quest = typeof(NewHavenWarriorEscortQuest); break;
case 3: m_Quest = typeof(NewHavenTailorEscortQuest); break;
case 4: m_Quest = typeof(NewHavenCarpenterEscortQuest); break;
case 5: m_Quest = typeof(NewHavenMapmakerEscortQuest); break;
case 6: m_Quest = typeof(NewHavenMageEscortQuest); break;
case 7: m_Quest = typeof(NewHavenInnEscortQuest); break;
case 8: m_Quest = typeof(NewHavenFarmEscortQuest); break;
case 9: m_Quest = typeof(NewHavenDocksEscortQuest); break;
case 10: m_Quest = typeof(NewHavenBowyerEscortQuest); break;
case 11: m_Quest = typeof(NewHavenBankEscortQuest); break;
}

}
 
OK. Sorry I never fully read the script until now. I am so sorry. I think I have been running you around in circles. I was under the impression that the individually named Escortables needed to be joined with one specific Quest each, but now that I read it, I understand that they are supposed to be random after all. Just make sure you do not try to spawn a NewHavenEscortable() specifically, but if you are using XmlSpawners, for example, you would put NewHavenMerchant, NewHavenMage, NewHavenMessenger, etc. on the spawner, and let it choose which one to spawn.
 
Yea thats what i did...lol but no need for apology you tried to help me and that what matters and thank you so much ......but what they were doing was like you could lay a spawner dow add all the new haven escorts and they would go only to the alchemist but its fixed now once again thank you
 
Last edited:
Back