|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#26 (permalink) |
|
Join Date: Oct 2004
Age: 18
Posts: 69
|
errr , i dont want to cast it from a scroll , i want to cast the spell on each hit with the firemace , if u think the same with ur post , please tell me where should i put the
Code:
public FlameStrikeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info ) |
|
|
|
|
|
#27 (permalink) |
|
Forum Expert
|
Well I went and did the following and it works completely like you want it to TOO MY KNOWLEDGE lol. Test it out for yourself:
You might need to place the following at the top of the code not sure: Code:
using Server.Spells; using Server.Spells.Seventh; Code:
public override void OnHit( Mobile attacker, Mobile defender )
{
FlameStrikeSpell fss = new FlameStrikeSpell( attacker, null );
if ( !attacker.CanSee( defender ) )
{
attacker.SendLocalizedMessage( 500237 ); // Target can not be seen.
} else {
SpellHelper.Turn( attacker, defender );
SpellHelper.CheckReflect( (int)fss.Circle, attacker, ref defender );
double damage;
if ( Core.AOS )
{
damage = fss.GetNewAosDamage( 48, 1, 5, attacker.Player && defender.Player );
}
else
{
damage = Utility.Random( 27, 22 );
if ( fss.CheckResisted( defender ) )
{
damage *= 0.6;
defender.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
}
damage *= fss.GetDamageScalar( defender );
}
defender.FixedParticles( 0x3709, 10, 30, 5052, EffectLayer.LeftFoot );
defender.PlaySound( 0x208 );
SpellHelper.Damage( fss, defender, damage, 0, 100, 0, 0, 0 );
}
}
|
|
|
|
|
|
#28 (permalink) |
|
Forum Expert
|
One more note before I go to bed. Flamestrike will hit the enemy every time you hit them in this case. If you want to change that, then you would add something like:
Code:
switch( Utility.Random( 5 ) )
{
case 0:
defender.FixedParticles( 0x3709, 10, 30, 5052, EffectLayer.LeftFoot );
defender.PlaySound( 0x208 );
SpellHelper.Damage( fss, defender, damage, 0, 100, 0, 0, 0 );
}
There may be a more efficient manner, I'm sure some of the vets know of one maybe. Good luck. |
|
|
|
|
|
#30 (permalink) |
|
Forum Expert
|
you gotta remember the problematic RNG. never put it on a case 0 if its more than say 2-3 cases.
you what you want is to have it at the bottom or top 25-33% range of your cases for accurate results. for a case 5, put it on case 2. otherwise your results will not be accurate if you test it. |
|
|
|
|
|
#31 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
You have the same chance to be at a specific millisecond at ANY time you look at your watch. You don't have more or less chances to be at the 20-30 milisecond (which is how it calclate random values btw)
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
|
|
#32 (permalink) | ||
|
Forum Expert
|
Quote:
Quote:
Code:
}
else
{
|
||
|
|
|
|
|
#33 (permalink) |
|
Join Date: Oct 2004
Age: 18
Posts: 69
|
Code:
using System;
using Server;
using Server.Spells;
using Server.Spells.Seventh;
namespace Server.Items
{
public class FireMace : WarMace
{
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
public override int AosStrengthReq{ get{ return 100; } }
public override int AosMinDamage{ get{ return 30; } }
public override int AosMaxDamage{ get{ return 40; } }
public override int AosSpeed{ get{ return 60; } }
public override int DefHitSound{ get{ return 520; } }
public override SkillName DefSkill{ get{ return SkillName.Macing; } }
public override WeaponType DefType{ get{ return WeaponType.Bashing; } }
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.Bash1H; } }
[Constructable]
public FireMace()
{
Weight = 3.0;
Name = "a Fire Elemental Mace";
Hue = 1914;
WeaponAttributes.HitFireArea = 20;
Attributes.SpellChanneling = 1;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
{
phys = cold = pois = nrgy = 0;
fire = 100;
}
public override void OnHit ( Mobile attacker, Mobile defender )
{
FlameStrikeSpell fss = new FlameStrikeSpell( attacker, null );
if ( !attacker.CanSee( defender ) )
{
attacker.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else
{
SpellHelper.Turn( attacker, defender );
SpellHelper.CheckReflect( (int)fss.Circle, attacker, ref defender );
double damage;
if ( Core.AOS )
{
damage = fss.GetNewAosDamage( 48, 1, 5, attacker.Player && defender.Player );
}
else
{
damage = Utility.Random( 27, 22 );
if ( fss.CheckResisted( defender ) )
{
damage *= 0.6;
defender.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
}
damage *= fss.GetDamageScalar( defender );
}
defender.FixedParticles( 0x3709, 10, 30, 5052, EffectLayer.LeftFoot );
defender.PlaySound( 0x208 );
SpellHelper.Damage( fss, defender, damage, 0, 100, 0, 0, 0 );
}
}
public FireMace( 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();
}
}
}
|
|
|
|
|
|
#35 (permalink) | ||
|
RunUO Forum Moderator
|
Quote:
Quote:
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
||
|
|
|
|
|
#37 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
beta bla bla.... RunUO RC0 RunUO 1.0.0 (no rc1 crap)...
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
|
|
#40 (permalink) | ||
|
RunUO Forum Moderator
|
Quote:
It isn't called beta because the version before it was beta 36. Quote:
If you want help fixing problems you have to upgrade to RunUO 1.0.0, sorry
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
||
|
|
|
|
|
#42 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
![]()
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|