本文整理汇总了C#中Server.Items.Gold.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Gold.MoveToWorld方法的具体用法?C# Gold.MoveToWorld怎么用?C# Gold.MoveToWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Gold
的用法示例。
在下文中一共展示了Gold.MoveToWorld方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Carve
public void Carve( Mobile from, Item item )
{
Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );
if ( breakChance > Utility.RandomDouble() )
{
from.SendMessage( "You destroy the skull." );
if( Utility.RandomDouble() < 0.1 )
{
Gold gold = new Gold( 750, 1000 );
gold.MoveToWorld( GetWorldLocation(), Map );
}
Delete();
m_Timer.Stop();
}
else
{
from.SendMessage( "You damage the skull." );
breakChance += Utility.RandomDouble() * 0.15 + 0.15;
}
}
示例2: Carve
public void Carve( Mobile from, Item item )
{
Effects.PlaySound( GetWorldLocation(), Map, 0x48F );
Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );
if ( 0.3 > Utility.RandomDouble() )
{
if ( ItemID == 0xF7E )
from.SendMessage( "You destroy the bone." );
else
from.SendMessage( "You destroy the bone pile." );
Gold gold = new Gold( 25, 100 );
gold.MoveToWorld( GetWorldLocation(), Map );
Delete();
m_Timer.Stop();
}
else
{
if ( ItemID == 0xF7E )
from.SendMessage( "You damage the bone." );
else
from.SendMessage( "You damage the bone pile." );
}
}
示例3: OnBeforeDeath
public override bool OnBeforeDeath()
{
Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
gold.MoveToWorld( Location, Map );
Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
return true;
}
示例4: OnBeforeDeath
public override bool OnBeforeDeath()
{
if ( !base.OnBeforeDeath() )
return false;
Gold gold = new Gold( Utility.RandomMinMax( 240, 375 ) );
gold.MoveToWorld( Location, Map );
Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
return true;
}
示例5: OnBeforeDeath
public override bool OnBeforeDeath()
{
Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
gold.MoveToWorld( Location, Map );
if ( Utility.Random( 3 ) == 0 )
{
BaseBook journal = Loot.RandomTavarasJournal();
journal.MoveToWorld( Location, Map );
}
Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
return true;
}
示例6: OnBeforeDeath
public override bool OnBeforeDeath()
{
if (Utility.RandomDouble() < 0.05)
{
if (!base.OnBeforeDeath())
return false;
//VileTentacles VT = new VileTentacles();
//VT.MoveToWorld(Location, Map);
}
if (!base.OnBeforeDeath())
return false;
var gold = new Gold(Utility.RandomMinMax(1767, 1800));
gold.MoveToWorld(Location, Map);
Effects.SendLocationEffect(Location, Map, 0x376A, 10, 1);
return true;
}
示例7: OnDoubleClick
public void OnDoubleClick( Mobile from, Item item )
{
Effects.PlaySound( GetWorldLocation(), Map, 0x25B );
Effects.SendLocationEffect( GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0 );
if ( 0.3 > Utility.RandomDouble() )
{
from.SendMessage( "You destroy the egg sac." );
Gold gold = new Gold( 25, 100 );
gold.MoveToWorld( GetWorldLocation(), Map );
Delete();
m_Timer.Stop();
}
else
{
from.SendMessage( "You damage the egg sac." );
}
}
示例8: Carve
public void Carve(Mobile from, Item item)
{
Effects.PlaySound(GetWorldLocation(), Map, 0x48F);
Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);
//Change to 50/50 chance you can disarm the egg.
if (0.5 > Utility.RandomDouble())
{
from.SendMessage("You destroy the BonBon egg.");
Gold gold = new Gold(25, 100);
gold.MoveToWorld(GetWorldLocation(), Map);
Delete();
m_Timer.Stop();
}
else
{
from.SendMessage("You fail to break the BonBon egg.");
}
}
示例9: CheckAtDestination
public virtual bool CheckAtDestination()
{
Mobile escorter = GetEscorter();
if ( escorter == null )
return false;
if ( IsAtDest() )
{
Say( 1042809, escorter.Name ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.
// not going anywhere
m_Destination = null;
m_DestinationString = null;
Container cont = escorter.Backpack;
if ( cont == null )
cont = escorter.BankBox;
Gold gold = new Gold( GetGoldAmount() );
if ( cont == null || !cont.TryDropItem( escorter, gold, false ) )
gold.MoveToWorld( escorter.Location, escorter.Map );
StopFollow();
SetControlMaster( null );
BeginDelete();
Misc.Titles.AlterNotoriety( escorter, 1, NotoCap.Honorable );
return true;
}
return false;
}
示例10: OnTick
protected override void OnTick()
{
if (cycles == 15)
{
new MovingEffectInfo(new Point3D(corpse.X, corpse.Y, 100), corpse, corpse.Map, 3823, 0, 10,
EffectRender.Lighten)
.MovingImpact(
e =>
{
int amount = Utility.RandomMinMax(200, 400);
if (amount <= 0)
{
return;
}
var g = new Gold(amount);
g.MoveToWorld(e.Target.Location, e.Map);
new EffectInfo(e.Target, e.Map, 14202, 51, 10, 40, EffectRender.Lighten).Send();
Effects.PlaySound(e.Target, e.Map, g.GetDropSound());
});
Stop();
return;
}
if (count == 9)
{
count = 1;
cycles++;
}
corpse.Hue = Utility.RandomBrightHue();
corpse.Direction = (Direction) count;
count++;
}
示例11: OnDoubleClick
//public void OnAttack(Mobile from)
public override void OnDoubleClick(Mobile from)
//public override void OnDoubleClick(Mobile from) I'd rather had this work, oh well.
{
if (!from.InRange(GetWorldLocation(), 2))
{
from.SendLocalizedMessage(500446); // That is too far away.
}
else
{
Effects.SendLocationEffect(Location, Map, 0x3728, 20, 10); //smoke or dust
Effects.PlaySound(Location, Map, 0x11C);
switch (Utility.Random(10)) //picks one of the following
{
case 0:
Effects.SendLocationEffect(from, from.Map, 0x113A, 20, 10); //Posion Player
from.PlaySound(0x231);
from.ApplyPoison(from, Poison.Regular);
break;
case 1:
Effects.SendLocationEffect(from, from.Map, 0x3709, 30);//Burn Player
from.PlaySound(0x54);
AOS.Damage(from, from, Utility.RandomMinMax(10, 40), 0, 100, 0, 0, 0);
break;
case 2:
new BarrelLid().MoveToWorld(Location, Map);
break;
case 3:
new BarrelHoops().MoveToWorld(Location, Map);
break;
case 4:
new BarrelStaves().MoveToWorld(Location, Map);
break;
case 5:
Gold g = new Gold(Utility.Random(500)); //Random amount of gold 0 - 500
g.MoveToWorld(Location, Map);
break;
case 6:
new CurePotion().MoveToWorld(Location, Map);
break;
case 7:
new GreaterCurePotion().MoveToWorld(Location, Map);
break;
case 8:
new HealPotion().MoveToWorld(Location, Map);
break;
case 9:
new GreaterHealPotion().MoveToWorld(Location, Map);
break;
}
Destroy();
}
}
示例12: CheckAtDestination
public virtual bool CheckAtDestination()
{
EDI dest = GetDestination();
if ( dest == null )
return false;
Mobile escorter = GetEscorter();
if ( escorter == null )
return false;
if ( dest.Contains( Location ) )
{
Say( 1042809, escorter.Name ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.
// not going anywhere
m_Destination = null;
m_DestinationString = null;
Container cont = escorter.Backpack;
if ( cont == null )
cont = escorter.BankBox;
Gold gold = new Gold( 500, 1000 );
if ( cont == null || !cont.TryDropItem( escorter, gold, false ) )
gold.MoveToWorld( escorter.Location, escorter.Map );
StopFollow();
SetControlMaster( null );
m_EscortTable.Remove( escorter );
BeginDelete();
Misc.Titles.AwardFame( escorter, 10, true );
bool gainedPath = false;
PlayerMobile pm = escorter as PlayerMobile;
if ( pm != null )
{
if ( pm.CompassionGains > 0 && DateTime.Now > pm.NextCompassionDay )
{
pm.NextCompassionDay = DateTime.MinValue;
pm.CompassionGains = 0;
}
if ( pm.CompassionGains >= 5 ) // have already gained 5 points in one day, can gain no more
{
pm.SendLocalizedMessage( 1053004 ); // You must wait about a day before you can gain in compassion again.
}
else if ( VirtueHelper.Award( pm, VirtueName.Compassion, 1, ref gainedPath ) )
{
if ( gainedPath )
pm.SendLocalizedMessage( 1053005 ); // You have achieved a path in compassion!
else
pm.SendLocalizedMessage( 1053002 ); // You have gained in compassion.
pm.NextCompassionDay = DateTime.Now + TimeSpan.FromDays( 1.0 ); // in one day CompassionGains gets reset to 0
++pm.CompassionGains;
}
else
{
pm.SendLocalizedMessage( 1053003 ); // You have achieved the highest path of compassion and can no longer gain any further.
}
}
return true;
}
return false;
}
示例13: OnBeforeDeath
public override bool OnBeforeDeath()
{
Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
Gold g = new Gold( 900, 1000 );
g.MoveToWorld( new Point3D( X, Y, Z ), Map );
return true;
}
示例14: OnDeath
public override void OnDeath( Container c )
{
base.OnDeath( c );
if( m_Parent != null && !m_Parent.Deleted ) {
m_Parent.Destroy( );
}
Item Gold = new Gold( 100, 200 );
Gold.MoveToWorld( new Point3D( c.X + Utility.RandomMinMax( -1, 1 ), c.Y + Utility.RandomMinMax( -1, 1 ), c.Z ), c.Map );
if( this.Corpse != null && !this.Corpse.Deleted ) {
((Corpse)this.Corpse).Delete();
}
}
示例15: CheckAtDestination
public virtual bool CheckAtDestination()
{
EDI dest = GetDestination();
if ( dest == null )
return false;
Mobile escorter = GetEscorter();
if ( escorter == null )
return false;
if ( dest.Contains( Location ) )
{
Say( true, String.Format("We have arrived! I thank thee, {0} I have no further need of thy services. Here is thy pay.", escorter.Name ) ); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.
// not going anywhere
m_Destination = null;
m_DestinationString = null;
Container cont = escorter.Backpack;
if ( cont == null )
cont = escorter.BankBox;
Gold gold = new Gold( 500, 750 );
if ( !cont.TryDropItem( escorter, gold, false ) )
gold.MoveToWorld( escorter.Location, escorter.Map );
StopFollow();
SetControlMaster( null );
m_EscortTable.Remove( escorter );
BeginDelete();
Misc.Titles.AwardKarma( escorter, 10, true );
return true;
}
return false;
}