1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

picky

Discussion in 'Script Support' started by stacey, Feb 15, 2014.

  1. stacey
    Offline

    stacey Member

    Joined:
    Mar 20, 2013
    Messages:
    95
    Likes Received:
    2
    Publish Number:
    54
    hi i have a error with pickybeetle can anyone
    Code (C#):
    1.  
    2. Scripts\Custom Systems\thepickbeetle\ThePickyBeetle.cs(100,22): error CS0029:
    3.   Cannot implicitly convert type 'System.DateTime' to 'long'[code] scripts is [code]
    4. using
    5. System;
    6. using
    7. System.Collections;
    8. using
    9. System.Collections.Generic;
    10. using
    11. Server;
    12. using
    13. Server.Items;
    14. using
    15. Server.Mobiles;
    16. using
    17. Server.Gumps;
    18. using
    19. Server.Network;
    20. using
    21. Server.ContextMenus;
    22. namespace
    23. Server.Mobiles
    24. {
    25. [CorpseName(
    26. "a giant beetle corpse" )]
    27. publicclassThePickyBeetle : BaseMount
    28. {
    29. [Constructable]
    30. public ThePickyBeetle() : this( "a picky beetle" )
    31. {
    32. }
    33. publicoverridebool SubdueBeforeTame{ get{ returntrue; } } // Must be beaten into submission
    34. [Constructable]
    35. public ThePickyBeetle( string name ) : base( name, 0x317, 0x3EBC, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
    36. {
    37. SetStr( 000 );
    38. SetDex( 110 );
    39. SetInt( 500 );
    40. SetHits( 200 );
    41. SetStam( 110 );
    42. SetMana( 100 );
    43. SetDamage( 7, 20 );
    44. SetDamageType( ResistanceType.Physical, 100 );
    45. SetResistance( ResistanceType.Physical, 50, 60 );
    46. SetResistance( ResistanceType.Fire, 50, 55 );
    47. SetResistance( ResistanceType.Poison, 25, 30 );
    48. SetResistance( ResistanceType.Energy, 25, 30 );
    49. SetSkill( SkillName.Wrestling, 70.1, 75.0 );
    50. SetSkill( SkillName.Tactics, 50.0 );
    51. Tamable =
    52. true;
    53. ControlSlots = 2;
    54. MinTameSkill = 80.0;
    55. Container pack = Backpack;
    56. if ( pack != null )
    57. pack.Delete();
    58. pack =
    59. new StrongBackpack();
    60. pack.Movable =
    61. false;
    62. AddItem( pack );
    63. }
    64. privateDateTime m_NextPickup;
    65. publicoverridevoid OnThink()
    66. {
    67. base.OnThink();
    68. if ( DateTime.Now < m_NextPickup )
    69. return;
    70. m_NextPickup =
    71. DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 0, 0 ) );
    72. Container pack =
    73. this.Backpack;
    74. if ( pack == null )
    75. return;
    76. ArrayList list = newArrayList();
    77. foreach ( Item item inthis.GetItemsInRange( 3 ) )
    78. {
    79. if ( item.Movable && item.Stackable )
    80. list.Add( item );
    81. }
    82. int pickedUp = 0;
    83. for ( int i = 0; i < list.Count; ++i )
    84. {
    85. Item item = (Item)list[i];
    86. if ( !pack.CheckHold( this, item, false, true ) )
    87. return;
    88. bool rejected;
    89. LRReason reject;
    90. NextActionTime =
    91. DateTime.Now;
    92. Lift( item, item.Amount,
    93. out rejected, out reject );
    94. if ( rejected )
    95. continue;
    96. Drop(
    97. this, Point3D.Zero );
    98. if ( ++pickedUp == 3 )
    99. break;
    100. }
    101. }
    102. #region
    103. Pack Animal Methods
    104. publicoverridebool OnBeforeDeath()
    105. {
    106. if ( !base.OnBeforeDeath() )
    107. returnfalse;
    108. PackAnimal.CombineBackpacks(
    109. this );
    110. returntrue;
    111. }
    112. publicoverridebool IsSnoop( Mobile from )
    113. {
    114. if ( PackAnimal.CheckAccess( this, from ) )
    115. returnfalse;
    116. returnbase.IsSnoop( from );
    117. }
    118. publicoverridebool OnDragDrop( Mobile from, Item item )
    119. {
    120. if ( CheckFeed( from, item ) )
    121. returntrue;
    122. if ( PackAnimal.CheckAccess( this, from ) )
    123. {
    124. AddToBackpack( item );
    125. returntrue;
    126. }
    127. returnbase.OnDragDrop( from, item );
    128. }
    129. publicoverridebool CheckNonlocalDrop( Mobile from, Item item, Item target )
    130. {
    131. return PackAnimal.CheckAccess( this, from );
    132. }
    133. publicoverridebool CheckNonlocalLift( Mobile from, Item item )
    134. {
    135. return PackAnimal.CheckAccess( this, from );
    136. }
    137. publicoverridevoid OnDoubleClick( Mobile from )
    138. {
    139. PackAnimal.TryPackOpen(
    140. this, from );
    141. }
    142. publicoverridevoid GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
    143. {
    144. base.GetContextMenuEntries( from, list );
    145. PackAnimal.GetContextMenuEntries(
    146. this, from, list );
    147. }
    148. #endregion
    149. public ThePickyBeetle( Serial serial ) : base( serial )
    150. {
    151. }
    152. publicoverridevoid Serialize( GenericWriter writer )
    153. {
    154. base.Serialize( writer );
    155. writer.Write( (
    156. int) 0 );
    157. }
    158. publicoverridevoid Deserialize( GenericReader reader )
    159. {
    160. base.Deserialize( reader );
    161. int version = reader.ReadInt();
    162. }
    163. }
    164. }[code]
     
  2. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    1,009
    Likes Received:
    192
    Timing has changed a while back. Change
    Code (C#):
    1. NextActionTime = DateTime.Now;
    to
    Code (C#):
    1. NextActionTime = Core.TickCount;
     
    • Like Like x 1
  3. stacey
    Offline

    stacey Member

    Joined:
    Mar 20, 2013
    Messages:
    95
    Likes Received:
    2
    thank it has worked
     
Similar Threads: picky
Forum Title Date
Custom Releases PickyBeetle Fast Looting Pack Beetle Dec 5, 2015