PigPen-divinity
Sorceror
I am driving myself crazy with this one (Lack of scripting ability is not helping me).
I am trying to use Bool to set true/false values in OnThink that can be checked later in OnThink to determine a new action.
My problem is this - When I try to set the value of a bool to true it is either not getting properly set or the script is changing it back to a value of false.
Here is the script:
If anyone has good experience with the use of Bool - I would appreciate your eyes on this for me.
Many Thanks
I am trying to use Bool to set true/false values in OnThink that can be checked later in OnThink to determine a new action.
My problem is this - When I try to set the value of a bool to true it is either not getting properly set or the script is changing it back to a value of false.
Here is the script:
Code:
using Server;
using System;
using System.Xml;
using Server.Items;
using Server.Misc;
using Server.Network;
using System.Collections;
using Server.ContextMenus;
using System.Collections.Generic;
using Server.Engines.XmlSpawner2;
namespace Server.Mobiles
{
public class SmedleyRoyalCrier : BaseCreature
{
private Item me_Spawner; // Shame
private Item ne_Spawner; // Destard
private Item pe_Spawner; // Despise
private Item qe_Spawner; // Skara Farm
private Item re_Spawner; // Yew Crypts
private Item se_Spawner; // Nujel'm Cemetery
private Item te_Spawner; // Vesper Cemetery
private Item ue_Spawner; // Cove Gates
private Item ve_Spawner; // Britain Brigand Camp
private Item we_Spawner; // Moonglow Lyceum
private bool m; // Shame
private bool n; // Destard
private bool p; // Despise
private bool q; // Skara Farm
private bool r; // Yew Crypts
private bool s; // Nujel'm Cemetery
private bool t; // Vesper Cemetery
private bool u; // Cove Gates
private bool v; // Britain Brigand Camp
private bool w; // Moonglow Lyceum
private DateTime firstonthink = DateTime.Now;
// Set Time Delays For Announcements and Actions
// 1) Delay 1 - 10 seconds after spawning ANNOUNCE The Event
private TimeSpan delayone = TimeSpan.FromSeconds( 10 );
private TimeSpan delayoneb = TimeSpan.FromSeconds( 15 );
// 2) Delay 2 (1 min) - First Reminder Of A Pending Event
private TimeSpan delaytwo = TimeSpan.FromSeconds( 60 );
private TimeSpan delaytwob = TimeSpan.FromSeconds( 65 );
// 3) Delay 3 (2 min) - Second Reminder Of A Pending Event
private TimeSpan delaythree = TimeSpan.FromSeconds( 120 );
private TimeSpan delaythreeb = TimeSpan.FromSeconds( 125 );
// 4) Delay 4 (3 min) - START Event Announce Where, Spawn Mobs/
private TimeSpan delayfour = TimeSpan.FromSeconds( 180 );
private TimeSpan delayfourb = TimeSpan.FromSeconds( 185 );
// 5) Delay 5 (4 min) - First Reminder Of Location
private TimeSpan delayfive = TimeSpan.FromSeconds( 300 );
private TimeSpan delayfiveb = TimeSpan.FromSeconds( 305 );
// 6) Delay 6 (10 min) - Second Reminder Of Location
private TimeSpan delaysix = TimeSpan.FromSeconds( 600 );
private TimeSpan delaysixb = TimeSpan.FromSeconds( 605 );
// 7) Delay 7 (15 min) - Third Reminder Of Location
private TimeSpan delayseven = TimeSpan.FromSeconds( 900 );
private TimeSpan delaysevenb = TimeSpan.FromSeconds( 905 );
// 8) Delay 8 (30 min) - END Event and Remove Mob Spawn
private TimeSpan delayeight = TimeSpan.FromSeconds( 1800 );
private TimeSpan delayeightb = TimeSpan.FromSeconds( 1805 );
// 9) Delay 9 (31 min) - Remind Participants About Event Rewards
private TimeSpan delaynine = TimeSpan.FromSeconds( 1860 );
private TimeSpan delaynineb = TimeSpan.FromSeconds( 1865 );
// 10) Delay 10 (35 min) - Remove Event Quest Giver
private TimeSpan delayten = TimeSpan.FromSeconds( 2100 );
private TimeSpan delaytenb = TimeSpan.FromSeconds( 2105 );
//***************************************
[Constructable]
public SmedleyRoyalCrier() : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4 )
{
Container pack = this.Backpack;
if ( pack != null )
pack.Delete();
InitStats( 100, 100, 25 );
Name = "Smedley";
Title = "- Royal Crier";
Body = 0x190;
Hue = Utility.RandomSkinHue();
Utility.AssignRandomHair( this );
Blessed = true;
AddItem( new FeatheredHat( Utility.RandomGreenHue() ) );
AddItem( new BodySash( Utility.RandomGreenHue() ) );
AddItem( new Cloak( Utility.RandomGreenHue() ) );
AddItem( new FancyShirt( Utility.RandomBlueHue() ) );
AddItem( new LongPants( Utility.RandomBlueHue() ) );
AddItem( new Boots() );
}
public SmedleyRoyalCrier( Serial serial ) : base( serial )
{
}
//***************************************
public override void OnThink()
{
//************************
// Delay 10 - Remove Quest Giver = delayten 2100 seconds
if ( (DateTime.Now > firstonthink + delayten) && (DateTime.Now < firstonthink + delaytenb) )
{
World.Broadcast( 31, true, "Lord Hart at the Britain King's Castle will exchange Medallions of Courage for rewards." );
delayten = delaytenb;
this.Delete();
return;
}
//************************
// Delay 9 - Remind about Rewards = delaynine 1860 seconds
if ( (DateTime.Now > firstonthink + delaynine) && (DateTime.Now < firstonthink + delaynineb) )
{
this.Say("Collect the reward!");
World.Broadcast( 31, true, "Remember! Take Medallions of Courage to Lord Hart at the King's Castle in Britain. He exchanges them for rewards." );
delaynine = delaynineb;
return;
}
//************************
// Delay 8 - End Event - Remove Mobs = delayeight 1800 seconds
if ( (DateTime.Now > firstonthink + delayeight) && (DateTime.Now < firstonthink + delayeightb) )
{
this.Say("Our people prevail!");
if ( m = true ) // Shame
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
me_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( n = true ) // Destard
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
ne_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( p = true ) // Despise
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
pe_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( q = true ) // Skara Farm
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
qe_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( r = true ) // Yew Crypts
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
re_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( s = true ) // Nujel'm Cemetery
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
se_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( t = true ) // Vesper Cemetery
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
te_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( u = true ) // Cove Gates
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
ue_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( v = true ) // Britain Brigand Camp
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
ve_Spawner.Delete();
delayeight = delayeightb;
return;
}
if ( w = true ) // Moonglow Lyceum
{
World.Broadcast( 31, true, "The Battle is won. The foe is vanquished. Take your spoils home and exchange your Medallions of Courage for reward." );
we_Spawner.Delete();
delayeight = delayeightb;
return;
}
}
//************************
// Delay 7 - Remind Of Event Location = delayseven 900 seconds
if ( (DateTime.Now > firstonthink + delayseven) && (DateTime.Now < firstonthink + delaysevenb) )
{
this.Say("Help us defeat evil!");
if ( m = true ) // Shame
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the first level of Shame Trammel. The battle is raging." );
delayseven = delaysevenb;
return;
}
if ( n = true ) // Destard
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the first level of Destard Trammel. We need help." );
delayseven = delaysevenb;
return;
}
if ( p = true ) // Despise
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the top most level of Despise Trammel. The enemy is at hand." );
delayseven = delaysevenb;
return;
}
if ( q = true ) // Skara Farm
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Skara Brae Trammel mainland Farm. The scoundrels are looting the crops." );
delayseven = delaysevenb;
return;
}
if ( r = true ) // Yew Crypts
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come into the Yew Crypts Trammel. Criminals are raiding the crypts." );
delayseven = delaysevenb;
return;
}
if ( s = true ) // Nujel'm Cemetery
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Nujel'm Cemetery Trammel. Criminals are robbing the graves." );
delayseven = delaysevenb;
return;
}
if ( t = true ) // Vesper Cemetery
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Vesper Cemetery Trammel. Help us stop the vandals." );
delayseven = delaysevenb;
return;
}
if ( u = true ) // Cove Gates
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Cove Gates Trammel now. The raiders are at hand." );
delayseven = delaysevenb;
return;
}
if ( v = true ) // Britain Brigand Camp
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Britain Brigand Camp south of Yew Trammel. We have them trapped." );
delayseven = delaysevenb;
return;
}
if ( w = true ) // Moonglow Lyceum
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Moonglow Lycaeum Trammel. The scoundrels must be stopped." );
delayseven = delaysevenb;
return;
}
}
//************************
// Delay 6 - Remind Of Event Location = delaysix 600 seconds
if ( (DateTime.Now > firstonthink + delaysix) && (DateTime.Now < firstonthink + delaysixb) )
{
this.Say("Help us defeat evil!");
if ( m = true ) // Shame
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the first level of Shame Trammel. The battle is raging." );
delaysix = delaysixb;
return;
}
if ( n = true ) // Destard
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the first level of Destard Trammel. We need help." );
delaysix = delaysixb;
return;
}
if ( p = true ) // Despise
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the top most level of Despise Trammel. The enemy is at hand." );
delaysix = delaysixb;
return;
}
if ( q = true ) // Skara Farm
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Skara Brae Trammel mainland Farm. The scoundrels are looting the crops." );
delaysix = delaysixb;
return;
}
if ( r = true ) // Yew Crypts
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come into the Yew Crypts Trammel. Criminals are raiding the crypts." );
delaysix = delaysixb;
return;
}
if ( s = true ) // Nujel'm Cemetery
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Nujel'm Cemetery Trammel. Criminals are robbing the graves." );
delaysix = delaysixb;
return;
}
if ( t = true ) // Vesper Cemetery
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Vesper Cemetery Trammel. Help us stop the vandals." );
delaysix = delaysixb;
return;
}
if ( u = true ) // Cove Gates
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Cove Gates Trammel now. The raiders are at hand." );
delaysix = delaysixb;
return;
}
if ( v = true ) // Britain Brigand Camp
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Britain Brigand Camp south of Yew Trammel. We have them trapped." );
delaysix = delaysixb;
return;
}
if ( w = true ) // Moonglow Lyceum
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Moonglow Lycaeum Trammel. The scoundrels must be stopped." );
delaysix = delaysixb;
return;
}
}
//************************
// Delay 5 - Remind Of Event Location = delayfive 300 second
if ( (DateTime.Now > firstonthink + delayfive) && (DateTime.Now < firstonthink + delayfiveb) )
{
this.Say("Help us defeat evil!");
if ( m = true ) // Shame
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the first level of Shame Trammel. The battle is raging." );
delayfive = delayfiveb;
return;
}
if ( n = true ) // Destard
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the first level of Destard Trammel. We need help." );
delayfive = delayfiveb;
return;
}
if ( p = true ) // Despise
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the top most level of Despise Trammel. The enemy is at hand." );
delayfive = delayfiveb;
return;
}
if ( q = true ) // Skara Farm
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Skara Brae Trammel mainland Farm. The scoundrels are looting the crops." );
delayfive = delayfiveb;
return;
}
if ( r = true ) // Yew Crypts
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come into the Yew Crypts Trammel. Criminals are raiding the crypts." );
delayfive = delayfiveb;
return;
}
if ( s = true ) // Nujel'm Cemetery
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Nujel'm Cemetery Trammel. Criminals are robbing the graves." );
delayfive = delayfiveb;
return;
}
if ( t = true ) // Vesper Cemetery
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Vesper Cemetery Trammel. Help us stop the vandals." );
delayfive = delayfiveb;
return;
}
if ( u = true ) // Cove Gates
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Cove Gates Trammel now. The raiders are at hand." );
delayfive = delayfiveb;
return;
}
if ( v = true ) // Britain Brigand Camp
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Britain Brigand Camp south of Yew Trammel. We have them trapped." );
delayfive = delayfiveb;
return;
}
if ( w = true ) // Moonglow Lyceum
{
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Moonglow Lycaeum Trammel. The scoundrels must be stopped." );
delayfive = delayfiveb;
return;
}
}
//************************
// Delay 4 - Announce Location - Spawn = delayfour 180 seconds
if ( (DateTime.Now > firstonthink + delayfour) && (DateTime.Now < firstonthink + delayfourb) )
{
this.Say("Help us defeat evil!");
switch ( Utility.Random(10) )
{
case 0:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to Shame Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item mitem = (Item)Activator.CreateInstance( typeof(ShameEventTeleporter) );
ShameEventTeleporter mmoon = (ShameEventTeleporter)mitem;
mmoon.Map = Map.Malas;
mmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner me_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
me_Spawner.Name = "InsurgencyEventSpawner";
me_Spawner.Map = Map.Trammel;
me_Spawner.Group = false;
me_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
me_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
me_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
me_Spawner.DoRespawn = true;
delayfour = delayfourb;
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
m = true; // Shame
return;
break;
case 1:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to Destard Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item nitem = (Item)Activator.CreateInstance( typeof(DestardEventTeleporter) );
DestardEventTeleporter nmoon = (DestardEventTeleporter)nitem;
nmoon.Map = Map.Malas;
nmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner ne_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
ne_Spawner.Name = "InsurgencyEventSpawner";
ne_Spawner.Map = Map.Trammel;
ne_Spawner.Group = false;
ne_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
ne_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
ne_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
ne_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
n = true; // Destard
return;
break;
case 2:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to Despise Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item pitem = (Item)Activator.CreateInstance( typeof(DespiseEventTeleporter) );
DespiseEventTeleporter pmoon = (DespiseEventTeleporter)pitem;
pmoon.Map = Map.Malas;
pmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner pe_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
pe_Spawner.Name = "InsurgencyEventSpawner";
pe_Spawner.Map = Map.Trammel;
pe_Spawner.Group = false;
pe_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
pe_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
pe_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
pe_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
p = true; // Despise
return;
break;
case 3:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Skara Brae Trammel mainland Farm now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item qitem = (Item)Activator.CreateInstance( typeof(SkaraEventTeleporter) );
SkaraEventTeleporter qmoon = (SkaraEventTeleporter)qitem;
qmoon.Map = Map.Malas;
qmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner qe_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
qe_Spawner.Name = "InsurgencyEventSpawner";
qe_Spawner.Map = Map.Trammel;
qe_Spawner.Group = false;
qe_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
qe_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
qe_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
qe_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
q = true; // Skara Farm
return;
break;
case 4:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come into the Yew Crypts Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item ritem = (Item)Activator.CreateInstance( typeof(YewEventTeleporter) );
YewEventTeleporter rmoon = (YewEventTeleporter)ritem;
rmoon.Map = Map.Malas;
rmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner re_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
re_Spawner.Name = "InsurgencyEventSpawner";
re_Spawner.Map = Map.Trammel;
re_Spawner.Group = false;
re_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
re_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
re_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
re_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
r = true; // Yew Crypts
return;
break;
case 5:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Nujel'm Cemetery Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item sitem = (Item)Activator.CreateInstance( typeof(NujelmEventTeleporter) );
NujelmEventTeleporter smoon = (NujelmEventTeleporter)sitem;
smoon.Map = Map.Malas;
smoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner se_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
se_Spawner.Name = "InsurgencyEventSpawner";
se_Spawner.Map = Map.Trammel;
se_Spawner.Group = false;
se_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
se_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
se_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
se_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
s = true; // Nujel'm Cemetery
return;
break;
case 6:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Vesper Cemetery Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item titem = (Item)Activator.CreateInstance( typeof(VesperEventTeleporter) );
VesperEventTeleporter tmoon = (VesperEventTeleporter)titem;
tmoon.Map = Map.Malas;
tmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner te_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
te_Spawner.Name = "InsurgencyEventSpawner";
te_Spawner.Map = Map.Trammel;
te_Spawner.Group = false;
te_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
te_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
te_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
te_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
t = true; // Vesper Cemetery
return;
break;
case 7:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Cove Gates Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item uitem = (Item)Activator.CreateInstance( typeof(CoveEventTeleporter) );
CoveEventTeleporter umoon = (CoveEventTeleporter)uitem;
umoon.Map = Map.Malas;
umoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner ue_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
ue_Spawner.Name = "InsurgencyEventSpawner";
ue_Spawner.Map = Map.Trammel;
ue_Spawner.Group = false;
ue_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
ue_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
ue_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
ue_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
v = false; // Britain Brigand Camp
w = false; // Moonglow Lyceum
u = true; // Cove Gates
return;
break;
case 8:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Britain Brigand Camp south of Yew Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item vitem = (Item)Activator.CreateInstance( typeof(BrigandEventTeleporter) );
BrigandEventTeleporter vmoon = (BrigandEventTeleporter)vitem;
vmoon.Map = Map.Malas;
vmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner ve_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
ve_Spawner.Name = "InsurgencyEventSpawner";
ve_Spawner.Map = Map.Trammel;
ve_Spawner.Group = false;
ve_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
ve_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
ve_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
ve_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
w = false; // Moonglow Lyceum
v = true; // Britain Brigand Camp
return;
break;
case 9:
World.Broadcast( 31, true, "Take the Green Event Gate inside the Luna Gate House to come to the Moonglow Lycaeum Trammel now. Help us kill the evil scoundrels. Look for Medallions of Courage on their corpses." );
// Spawn the Gate at Malas Luna Gate House
Item witem = (Item)Activator.CreateInstance( typeof(MoonglowEventTeleporter) );
MoonglowEventTeleporter wmoon = (MoonglowEventTeleporter)witem;
wmoon.Map = Map.Malas;
wmoon.MoveToWorld(new Point3D( 965, 607, -90 ));
// Place XMLSpawner and Force ReSpawn
XmlSpawner we_Spawner = new XmlSpawner(6, 1, 1, 0, 12, "Orc");
we_Spawner.Name = "InsurgencyEventSpawner";
we_Spawner.Map = Map.Trammel;
we_Spawner.Group = false;
we_Spawner.MaxDelay = TimeSpan.FromSeconds( 3 );
we_Spawner.MinDelay = TimeSpan.FromSeconds( 2 );
we_Spawner.MoveToWorld(new Point3D( 5635, 1263, 0 ));
we_Spawner.DoRespawn = true;
delayfour = delayfourb;
m = false; // Shame
n = false; // Destard
p = false; // Despise
q = false; // Skara Farm
r = false; // Yew Crypts
s = false; // Nujel'm Cemetery
t = false; // Vesper Cemetery
u = false; // Cove Gates
v = false; // Britain Brigand Camp
w = true; // Moonglow Lycaeum
return;
break;
}
}
//************************
// Delay 3 - Reminder Of Pending Event = delaythree 120 seconds
if ( (DateTime.Now > firstonthink + delaythree) && (DateTime.Now < firstonthink + delaythreeb) )
{
World.Broadcast( 31, true, "The battle is imminent. Be ready at the Event House by the South Luna Gate. Our scouts are returning." );
this.Say("Trouble is on the way.");
delaythree = delaythreeb;
return;
}
//************************
// Delay 2 - Reminder Of A Pending Event = delaytwo 60 seconds
if ( (DateTime.Now > firstonthink + delaytwo) && (DateTime.Now < firstonthink + delaytwob) )
{
World.Broadcast( 31, true, "Gather your friends and weapons at the Event House by the South Luna Gate. Our scouts will tell us more soon." );
this.Say("Trouble is on the way.");
delaytwo = delaytwob;
return;
}
//************************
// Delay 1 - Announce Event Will Be Held
if ( (DateTime.Now > firstonthink + delayone) && (DateTime.Now < firstonthink + delayoneb) )
{
World.Broadcast( 31, true, "Scoundrels are gathering. We need help to defeat them. Our scouts will have word soon." );
this.Say("Trouble is on the way.");
delayone = delayoneb;
return;
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
If anyone has good experience with the use of Bool - I would appreciate your eyes on this for me.
Many Thanks