|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) | |
|
Join Date: Dec 2005
Posts: 53
|
This Is Another Custom Weapon I've Made This ones Pretty Good. Kinda Basic But Its Alllll Kool =D
![]() Hope Ya Enjoy It WolfFang.txt
__________________
:cool: [AKA-Ryan]:cool: Quote:
|
|
|
|
|
|
#5 (permalink) |
|
Join Date: Sep 2005
Location: Roxboro, NC, USA
Age: 32
Posts: 139
|
Ok its good you are learning to script. We all started somewhere. but making items like this which are really way to uber pwning powerful is old, and not many shards would benefit from having items like this. I know from experience I had weps and armors like these and it just wasnt fun after everyone had them. no challenge to the game anymore. but keep working on your scripting skills and we'll keep an eye out for ya...
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
|
yea... writing these kind of scripts while may be instructive for you, dont really accomplish anything.
now if you want something interesting here are some things: Code:
using System;
using Server;
using Server.Mobiles;
using Server.Targeting;
using Server.Misc;
namespace Server.Items
{
public class GlassSword : BaseSword
{
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
public override int AosMinDamage{ get{ return 20; } }
public override int AosMaxDamage{ get{ return 40; } }
public override int AosSpeed{ get{ return 25; } }
public override int ArtifactRarity{ get{ return 1; } }
public override int InitMinHits{ get{ return 1; } }
public override int InitMaxHits{ get{ return 1; } }
[Constructable]
public GlassSword() : base( 0x26CF )
{
Name = "a Glass Sword";
Hue = 1152;
WeaponAttributes.UseBestSkill = 1;
}
// begin the special effect
public override void OnHit( Mobile attacker, Mobile defender )
{
// typical null check
if ( defender == null )
{
return;
}
// make sure its not a player
else if ( defender is PlayerMobile )
{
attacker.SendMessage( "This weapon will not shed the blood of players!" );
return;
}
// make sure it doesnt have too many hps and remove sword
else if ( defender.HitsMax > 3000 )
{
attacker.SendMessage( "The weapon shatters on impact without effect!" );
this.Delete();
return;
}
// otherwise kill it and remove sword
else
{
defender.Hits = 0;
defender.Kill();
attacker.SendMessage( "The weapon shatters as thy enemy dies!" );
this.Delete();
return;
}
}
public GlassSword( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
Code:
using System;
using Server.Network;
using Server.Items;
using Server.Spells;
using Server.Mobiles;
namespace Server.Items
{
[FlipableAttribute( 0x13FD, 0x13FC )]
public class TrippleCrossbow : BaseMeleeWeapon
{
public virtual int EffectID{ get{ return 0x1BFE; } }
public virtual Type AmmoType{ get{ return typeof( Bolt ); } }
public virtual Item Ammo{ get{ return new Bolt(); } }
//public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.MovingShot; } }
//public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.Dismount; } }
public override int AosStrengthReq{ get{ return 100; } }
public override int AosDexterityReq{ get{ return 100; } }
public override int AosMinDamage{ get{ return 10; } }
public override int AosMaxDamage{ get{ return 15; } }
public override int AosSpeed{ get{ return 15; } }
public override int OldStrengthReq{ get{ return 60; } }
public override int OldDexterityReq{ get{ return 90; } }
public override int OldMinDamage{ get{ return 5; } }
public override int OldMaxDamage{ get{ return 20; } }
public override int OldSpeed{ get{ return 5; } }
public override int DefHitSound{ get{ return 0x234; } }
public override int DefMissSound{ get{ return 0x238; } }
public override SkillName DefSkill{ get{ return SkillName.Archery; } }
public override WeaponType DefType{ get{ return WeaponType.Ranged; } }
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootXBow; } }
public override SkillName AccuracySkill{ get{ return SkillName.Archery; } }
public override int DefMaxRange{ get{ return 6; } }
public override int InitMinHits{ get{ return 75; } }
public override int InitMaxHits{ get{ return 100; } }
[Constructable]
public TrippleCrossbow() : base( 0x13FD )
{
Weight = 15.0;
Layer = Layer.TwoHanded;
Name = "Iolo's Tripple Crossbow";
}
public override TimeSpan OnSwing( Mobile attacker, Mobile defender )
{
// Make sure we've been standing still for one second
if ( DateTime.Now > (attacker.LastMoveTime + TimeSpan.FromSeconds( Core.AOS ? 0.5 : 1.0 )) || (Core.AOS && WeaponAbility.GetCurrentAbility( attacker ) is MovingShot) )
{
bool canSwing = true;
if ( Core.AOS )
{
canSwing = ( !attacker.Paralyzed && !attacker.Frozen );
if ( canSwing )
{
Spell sp = attacker.Spell as Spell;
canSwing = ( sp == null || !sp.IsCasting || !sp.BlocksMovement );
}
}
if ( canSwing && attacker.HarmfulCheck( defender ) )
{
attacker.DisruptiveAction();
attacker.Send( new Swing( 0, attacker, defender ) );
if ( OnFired( attacker, defender ) )
{
if ( CheckHit( attacker, defender ) )
OnHit( attacker, defender );
else
OnMiss( attacker, defender );
if ( CheckHit( attacker, defender ) )
OnHit( attacker, defender );
else
OnMiss( attacker, defender );
if ( CheckHit( attacker, defender ) )
OnHit( attacker, defender );
else
OnMiss( attacker, defender );
}
}
return GetDelay( attacker );
}
else
{
return TimeSpan.FromSeconds( 0.25 );
}
}
public override void OnHit( Mobile attacker, Mobile defender )
{
if ( attacker.Player && !defender.Player && (defender.Body.IsAnimal || defender.Body.IsMonster) && 0.4 >= Utility.RandomDouble() )
defender.AddToBackpack( Ammo );
base.OnHit( attacker, defender );
}
public override void OnMiss( Mobile attacker, Mobile defender )
{
if ( attacker.Player && 0.4 >= Utility.RandomDouble() )
Ammo.MoveToWorld( new Point3D( defender.X + Utility.RandomMinMax( -1, 1 ), defender.Y + Utility.RandomMinMax( -1, 1 ), defender.Z ), defender.Map );
base.OnMiss( attacker, defender );
}
public virtual bool OnFired( Mobile attacker, Mobile defender )
{
Container pack = attacker.Backpack;
if ( attacker.Player && (pack == null || !pack.ConsumeTotal( AmmoType, 3 )) )
return false;
attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
return true;
}
public TrippleCrossbow( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|