- ServUO Version
- Publish Unknown
- Ultima Expansion
- The Second Age
Hello! I have a strange problem with the Quest Scrolls I am using from the Random Quest Generator script. I have them set up so that when the scroll is generated instead of using object properties to display the quest information I have story, mostertype and person displayed as the name of the scroll. I did this because it is a T2A style shard and there aren't Context Menus and OPL isn't used. This works fine until the server saves and you log back in. At which point the name is only the first line. Is there a way to fix this? I will link an example below.
Before Save
After Save
Here is where I have been working:
Before Save
After Save
Here is where I have been working:
C#:
[Constructable]
public QuestScroll( int level ) : base( 5360 )
{
LootType = LootType.Blessed;
Hue = ( Utility.RandomMinMax( 2, 400 ) );
NType = Utility.RandomMinMax( 1, 2 ); // TYPE OF QUEST
//NType = ( 2 ); // TYPE OF QUEST
if ( level > 0 )
{
NLevel = level; // QUEST LEVEL
int tName = Utility.RandomMinMax( 1, 100 );
if ( tName > 90 )
{
NItemName = m_Items5[Utility.Random(m_Items5.Length)] + "'s Scroll of " + m_Items6[Utility.Random(m_Items6.Length)] + " " + m_Items7[Utility.Random(m_Items7.Length)];
}
else if ( tName > 45 )
{
NItemName = "the " + m_Items3[Utility.Random(m_Items3.Length)] + " " + m_Items1[Utility.Random(m_Items1.Length)] + " of " + m_Items4[Utility.Random(m_Items4.Length)];
}
else
{
NItemName = "the " + m_Items1[Utility.Random(m_Items1.Length)] + " of " + m_Items2[Utility.Random(m_Items2.Length)];
}
}
if ( level == 1 )
{
NLocation = m_Places1[Utility.Random(m_Places1.Length)];
NMonsterType = m_Monster1[Utility.Random(m_Monster1.Length)];
NChance = Utility.RandomMinMax( 5, 30 );
NNeed = Utility.RandomMinMax( 1, 10 );
}
else if ( level == 2 )
{
NLocation = m_Places2[Utility.Random(m_Places2.Length)];
NMonsterType = m_Monster2[Utility.Random(m_Monster2.Length)];
NChance = Utility.RandomMinMax( 10, 35 );
NNeed = Utility.RandomMinMax( 1, 10 );
}
else if ( level == 3 )
{
NLocation = m_Places3[Utility.Random(m_Places3.Length)];
NMonsterType = m_Monster3[Utility.Random(m_Monster3.Length)];
NChance = Utility.RandomMinMax( 15, 40 );
NNeed = Utility.RandomMinMax( 1, 10 );
}
else if ( level == 4 )
{
NLocation = m_Places4[Utility.Random(m_Places4.Length)];
NMonsterType = m_Monster4[Utility.Random(m_Monster4.Length)];
NChance = Utility.RandomMinMax( 20, 45 );
NNeed = Utility.RandomMinMax( 1, 10 );
}
else if ( level == 5 )
{
NLocation = m_Places5[Utility.Random(m_Places5.Length)];
NMonsterType = m_Monster5[Utility.Random(m_Monster5.Length)];
NChance = Utility.RandomMinMax( 25, 55 );
NNeed = Utility.RandomMinMax( 1, 5 );
}
else if ( level == 6 )
{
NLocation = m_Places6[Utility.Random(m_Places6.Length)];
NMonsterType = m_Monster6[Utility.Random(m_Monster6.Length)];
NChance = Utility.RandomMinMax( 30, 60 );
NNeed = 1;
}
if ( NType == 1 )
{
string sPerson = "";
if ( Utility.RandomMinMax( 1, 2 ) == 1 )
{
sPerson = NameList.RandomName( "female" );
}
else
{
sPerson = NameList.RandomName( "male" );
}
if ( Utility.RandomMinMax( 1, 3 ) > 1 )
{
NStory = sPerson + " " + m_Story2[Utility.Random(m_Story2.Length)];
}
else
{
NStory = m_Story3[Utility.Random(m_Story3.Length)] + " " + sPerson;
}
Name = "Slay a " + NMonsterType + " (" + NGot.ToString() + " of " + NNeed.ToString() + ")" + " : (Lvl " + NLevel + " Quest)" + " " + NStory +".";
}
else
{
NNeed = 1;
NStory = m_Story1[Utility.Random(m_Story1.Length)] + " " + NLocation;
Name = "Seek " + NItemName + ". " + NStory + " : (Lvl " + NLevel + " Quest)";
}
}
public QuestScroll( Serial serial ) : base( serial )
{
}