LdNS88;851751 said:Hello. Sorry for my bad English
This script leads to a freeze on my server. If I start to use drugs quickly (purchased from drug dealer), the server freezes for a few seconds. There is no visible load on the processor, everything works as usual. Suppose, if I use the bong fast 4-5 times, the server freezes for a few seconds. Tried on two computers(*), it's definitely a problem on the server side. In this case, if we use the bong, etc. 1 every 15 seconds, then everything works without freezing. I do not understand what could be the problem.
Use RunUO Version 2.0, Build 3567.2838
( (*) first 1Ghz & 2GB ram DDR2 and second 3GhzX2 & 3.5GB ram DDR2 )
Thanks
case 2:
{
m_Drunk.Say("What If You Were Like A Polar Bear?! Then You Like Start Dancin Like A Pixie!...");
m_Drunk.Say("*Breaks down laughing*");
m_Drunk.PlaySound(m_Drunk.Female ? 794 : 1066);
//Thread.Sleep(3000); <--Nuggsy #1
m_Drunk.PlaySound(m_Drunk.Female ? 794 : 1066);
//Thread.Sleep(3000); <--Nuggsy #2
m_Drunk.PlaySound(m_Drunk.Female ? 794 : 1066);
break;
}
public override void OnDoubleClick(Mobile from)
{
#region Nuggsy #1
if (from.Stam > from.StamMax / 2)
{
#endregion
Container pack = from.Backpack;
if (pack != null && pack.ConsumeTotal(typeof(Marijuana_Leaves), 1))
{
if (from.Body.IsHuman && !from.Mounted)
{
from.Animate(34, 5, 1, true, false, 0);
}
from.PlaySound(Utility.Random(0x20, 2));
from.SendMessage("You Pack A Bowl And Spark It Up!");
from.Meditating = true;
from.SendMessage("You Begin To Feel The Darkness Throughout Your Body!");
from.PlaySound(from.Female ? 798 : 1070);
from.Say("*hiccup!*");
Highness = 120;
new DrugSystem_StonedTimer(from, Highness).Start();
}
else
{
from.SendMessage("Your Out Of Marijuana Leaves Bro!");
return;
}
#region Nuggsy #2
}
else
{
}
#endregion
}
public override void OnDoubleClick(Mobile from)
{
#region Nuggsy #1
if (from.Stam > from.StamMax / 2)
{
#endregion
Container pack = from.Backpack;
if (pack != null && pack.ConsumeTotal(typeof(Marijuana_Joint), 1))
{
if (from.Body.IsHuman && !from.Mounted)
{
from.Animate(34, 5, 1, true, false, 0);
}
from.SendMessage("You Ignite A Spark On A Nearby Rock And Light Up A Doobie.");
from.PlaySound(0x226);
Highness = 25;
if (Core.AOS)
from.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist);
else
from.FixedEffect(0x3735, 6, 30);
new DrugSystem_StonedTimer(from, Highness).Start();
}
else
{
from.SendMessage("Your Must Have The Doobie In Your Pack To Toke It!");
return;
}
#region Nuggsy #2
}
else
{
}
#endregion
}