本文整理汇总了C#中Server.Items.Gold类的典型用法代码示例。如果您正苦于以下问题:C# Gold类的具体用法?C# Gold怎么用?C# Gold使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Gold类属于Server.Items命名空间,在下文中一共展示了Gold类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if( m_Placer == null || m_Placer.Deleted )
m_Placer = from;
if( from.InRange( this.GetWorldLocation(), 10 ) )
{
if( m_Placer == null || from == m_Placer || from.AccessLevel >= AccessLevel.GameMaster )
{
Container c = m_Placer.Backpack;
Gold t = new Gold( m_Value );
if( c.TryDropItem( m_Placer, t, true ) )
{
this.Delete();
m_Placer.SendMessage( "The item disolves and gives you a refund" );
}
else
{
t.Delete();
m_Placer.SendMessage("For some reason, the refund didn't work! Please page a GM");
}
}
else
{
from.SendMessage( "Stay out of my yard!" );
}
}
else
{
from.SendMessage( "The item is too far away" );
}
}
示例2: 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++;
}
示例3: OnTick
protected override void OnTick()
{
if(m_PilesDone >= m_PilesMax)
{
Stop();
return;
}
Point3D p = FindGoldLocation(m_Map, m_Location, m_PilesMax / 8);
Gold g = new Gold(m_MinAmount, m_MaxAmount);
g.DropToWorld(p, this.m_Map);
switch (Utility.Random(3))
{
case 0: // Fire column
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
Effects.PlaySound(g, g.Map, 0x208);
break;
case 1: // Explosion
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36BD, 20, 10, 5044);
Effects.PlaySound(g, g.Map, 0x307);
break;
case 2: // Ball of fire
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36FE, 10, 10, 5052);
break;
}
++m_PilesDone;
}
示例4: Target
public void Target(Gold weapon)
{
if (!Caster.CanSee(weapon))
{
Caster.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (CheckSequence())
{
if (Caster.BeginAction(typeof(AncientFalseCoinSpell)))
{
if (this.Scroll != null)
Scroll.Consume();
FakeGold fake = new FakeGold();
fake.m_Amount = weapon.Amount * 5;
fake.Name = "" + (weapon.Amount * 5) + " Gold Coins";
m_Fake = fake;
Caster.AddToBackpack(fake);
Caster.PlaySound(0x2E6);
IEntity from = new Entity(Serial.Zero, new Point3D(Caster.X, Caster.Y, Caster.Z + 50), Caster.Map);
IEntity to = new Entity(Serial.Zero, new Point3D(Caster.X, Caster.Y, Caster.Z), Caster.Map);
Effects.SendMovingParticles(from, to, 0x1EC6, 1, 0, false, false, 33, 3, 9501, 1, 0, EffectLayer.Head, 0x100);
StopTimer(Caster);
Timer t = new InternalTimer(Caster, m_Fake);
m_Timers[Caster] = t;
t.Start();
}
}
FinishSequence();
}
示例5: 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;
}
}
示例6: 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." );
}
}
示例7: 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;
}
示例8: 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;
}
示例9: Deposit
public static bool Deposit(Mobile from, int amount)
{
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount))
{
return true;
}
var box = from.FindBankNoCreate();
if (box == null)
{
return false;
}
var items = new List<Item>();
while (amount > 0)
{
Item item;
if (amount < 5000)
{
item = new Gold(amount);
amount = 0;
}
else if (amount <= 1000000)
{
item = new BankCheck(amount);
amount = 0;
}
else
{
item = new BankCheck(1000000);
amount -= 1000000;
}
if (box.TryDropItem(from, item, false))
{
items.Add(item);
}
else
{
item.Delete();
foreach (var curItem in items)
{
curItem.Delete();
}
return false;
}
}
return true;
}
示例10: 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;
}
示例11: OnClick
public override void OnClick()
{
Container c = m_From.Backpack;
Gold t = new Gold( value );
if( c.TryDropItem( m_From, t, true ) )
{
m_Stair.Delete();
m_From.SendMessage( "The item disolves and gives you a refund" );
}
else
{
t.Delete();
m_From.SendMessage("For some reason, the refund didn't work! Please page a GM");
}
}
示例12: OnBeforeDeath
public override bool OnBeforeDeath()
{
Gold gold = new Gold(150, 250);
gold.Map = this.Map;
gold.Location = this.Location;
Scimitar weapon = new Scimitar();
weapon.DamageLevel = (WeaponDamageLevel)Utility.Random( 1, 5 );
weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random( 0, 5 );
weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.Random( 0, 5 );
weapon.Map = this.Map;
weapon.Location = this.Location;
this.Delete();
return false;
}
示例13: OnGoldGiven
public override bool OnGoldGiven( Mobile from, Gold dropped )
{
if ( from is PlayerMobile && dropped.Amount == 700 )
{
PlayerMobile pm = (PlayerMobile)from;
if ( pm.NpcGuild == NpcGuild.ThievesGuild )
{
from.AddToBackpack( new DisguiseKit() );
dropped.Delete();
return true;
}
}
return base.OnGoldGiven( from, dropped );
}
示例14: Deposit
public static bool Deposit( Mobile from, int amount )
{
BankBox box = from.FindBankNoCreate();
if ( box == null )
return false;
List<Item> items = new List<Item>();
while ( amount > 0 )
{
Item item;
if ( amount < 5000 )
{
item = new Gold( amount );
amount = 0;
}
else if ( amount <= 1000000 )
{
item = new BankCheck( amount );
amount = 0;
}
else
{
item = new BankCheck( 1000000 );
amount -= 1000000;
}
if ( box.TryDropItem( from, item, false ) )
{
items.Add( item );
}
else
{
item.Delete();
foreach ( Item curItem in items )
{
curItem.Delete();
}
return false;
}
}
return true;
}
示例15: 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;
}