本文整理汇总了C#中Server.Items.Gold类的典型用法代码示例。如果您正苦于以下问题:C# Gold类的具体用法?C# Gold怎么用?C# Gold使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Gold类属于Server.Items命名空间,在下文中一共展示了Gold类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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" );
}
}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:33,代码来源:YardItem.cs
示例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++;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:34,代码来源:WheelofCorptune.cs
示例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;
}
开发者ID:Crome696,项目名称:ServUO,代码行数:28,代码来源:GoldShower.cs
示例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();
}
开发者ID:evildude807,项目名称:kaltar,代码行数:35,代码来源:FalseCoinSpell.cs
示例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;
}
}
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:25,代码来源:PlaguedSkull.cs
示例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." );
}
}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:28,代码来源:UnholyBone.cs
示例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;
}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:8,代码来源:MorgBergen.cs
示例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;
}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:11,代码来源:SpectralArmour.cs
示例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;
}
开发者ID:runuo,项目名称:runuo,代码行数:54,代码来源:Banker.cs
示例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;
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:14,代码来源:TavaraSewel.cs
示例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");
}
}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:15,代码来源:StairRefundEntry.cs
示例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;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:SpectralArmour.cs
示例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 );
}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:17,代码来源:ThiefGuildmaster.cs
示例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;
}
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:45,代码来源:Banker.cs
示例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;
}
开发者ID:rokann,项目名称:JustUO,代码行数:20,代码来源:MaddeningHorror.cs
示例16: 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." );
}
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:23,代码来源:RecluseSpiderEggSac.cs
示例17: 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.");
}
}
开发者ID:greeduomacro,项目名称:annox,代码行数:24,代码来源:BonBonEgg.cs
示例18: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
BankBox box = from.FindBankNoCreate();
if (box != null && this.IsChildOf(box))
{
this.Delete();
int deposited = 0;
int toAdd = this.m_Worth;
Gold gold;
while (toAdd > 60000)
{
gold = new Gold(60000);
if (box.TryDropItem(from, gold, false))
{
toAdd -= 60000;
deposited += 60000;
}
else
{
gold.Delete();
from.AddToBackpack(new BankCheck(toAdd));
toAdd = 0;
break;
}
}
if (toAdd > 0)
{
gold = new Gold(toAdd);
if (box.TryDropItem(from, gold, false))
{
deposited += toAdd;
}
else
{
gold.Delete();
from.AddToBackpack(new BankCheck(toAdd));
}
}
// Gold was deposited in your account:
from.SendLocalizedMessage(1042672, true, " " + deposited.ToString());
PlayerMobile pm = from as PlayerMobile;
if (pm != null)
{
QuestSystem qs = pm.Quest;
if (qs is Necro.DarkTidesQuest)
{
QuestObjective obj = qs.FindObjective(typeof(Necro.CashBankCheckObjective));
if (obj != null && !obj.Completed)
obj.Complete();
}
if (qs is Haven.UzeraanTurmoilQuest)
{
QuestObjective obj = qs.FindObjective(typeof(Haven.CashBankCheckObjective));
if (obj != null && !obj.Completed)
obj.Complete();
}
}
}
else
{
from.SendLocalizedMessage(1047026); // That must be in your bank box to use it.
}
}
开发者ID:FreeReign,项目名称:forkuo,代码行数:81,代码来源:BankCheck.cs
示例19: OnGoldGiven
public override bool OnGoldGiven( Mobile from, Gold dropped )
{
if ( from is PlayerMobile && dropped.Amount == JoinCost )
{
PlayerMobile pm = (PlayerMobile)from;
if ( pm.NpcGuild == this.NpcGuild )
{
SayTo( from, 501047 ); // Thou art already a member of our guild.
}
else if ( pm.NpcGuild != NpcGuild.None )
{
SayTo( from, 501046 ); // Thou must resign from thy other guild first.
}
else if ( pm.GameTime < JoinGameAge || (pm.CreationTime + JoinAge) > DateTime.UtcNow )
{
SayTo( from, 501048 ); // You are too young to join my guild...
}
else if ( CheckCustomReqs( pm ) )
{
SayWelcomeTo( from );
pm.NpcGuild = this.NpcGuild;
pm.NpcGuildJoinTime = DateTime.UtcNow;
pm.NpcGuildGameTime = pm.GameTime;
dropped.Delete();
return true;
}
return false;
}
return base.OnGoldGiven( from, dropped );
}
开发者ID:nathanvy,项目名称:runuo,代码行数:35,代码来源:BaseGuildmaster.cs
示例20: OnBeforeDeath
public override bool OnBeforeDeath()
{
Gold gold = new Gold( Utility.RandomMinMax( 190, 230 ) );
gold.MoveToWorld( Location, Map );
Container pack = this.Backpack;
if ( pack != null )
{
pack.Movable = true;
pack.MoveToWorld( Location, Map );
}
Effects.SendLocationEffect( Location, Map, 0x376A, 10, 1 );
return true;
}
开发者ID:Godkong,项目名称:RunUO,代码行数:15,代码来源:GrimmochDrummel.cs
注:本文中的Server.Items.Gold类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论