Another bug Which could cause some confusing among players. Put two kill trackers in your bag and bind both to you. Set points on one to say 9000 and do not touch the other one. Purchase a 9,000 item it will remove from the main one but will also remove -9,000 from the other. Since it is now -9,000 it will just act like no points but will be 9,000 in the hole. Also a player can purchase a ton of these and every kill will add one point to all.
Found a bug using a fresh install When you double click it and click on the button to bind it it unbinds it and when you click to unbind it, it binds it
When you have it set to only use thousandths then say pick a prize for 1k it will open a new gump plus keep old open. Can be done over and over and over and over again Just pointing out! Very neat system though!
I broke it again! This time it will crash the shard hehe. Bought a kill point tracker, got points, used stone to "redeem" points. Took kill tracker, placed on ground, double clicked point stone = CRASH
Report:
RunUO Version 2.2, Build 4753.1368
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 2.0.50727.5420
Time: 2/3/2013 4:58:57 PM
Mobiles: 19687
Items: 147454
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Items.BuyKillTracker..ctor(Mobile owner)
at Server.Items.KillPointStone.OnDoubleClick(Mobile from)
at Server.Mobile.Use(Item item)
at Server.Engines.XmlSpawner2.XmlAttach.UseReq(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
New bug found. If you have a tracker linked to you, but then lose it / throw it away / [delete it when you double click on the stone it says "this must be blah blah blah" and will not allow a player to get another one.
I broke it again! This time it will crash the shard hehe. Bought a kill point tracker, got points, used stone to "redeem" points. Took kill tracker, placed on ground, double clicked point stone = CRASH
Report:
RunUO Version 2.2, Build 4753.1368
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 2.0.50727.5420
Time: 2/3/2013 4:58:57 PM
Mobiles: 19687
Items: 147454
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Items.BuyKillTracker..ctor(Mobile owner)
at Server.Items.KillPointStone.OnDoubleClick(Mobile from)
at Server.Mobile.Use(Item item)
at Server.Engines.XmlSpawner2.XmlAttach.UseReq(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
****FIXED****New bug found. If you have a tracker linked to you, but then lose it / throw it away / [delete it when you double click on the stone it says "this must be blah blah blah" and will not allow a player to get another one.
public override void OnDamage( int amount, Mobile from, bool willKill )
{
public override void OnDamage( int amount, Mobile from, bool willKill )
{
if ( BardPacified && (HitsMax - Hits) * 0.001 > Utility.RandomDouble() )
Unpacify();
int disruptThreshold;
//NPCs can use bandages too!
if( !Core.AOS )
disruptThreshold = 0;
else if( from != null && from.Player )
disruptThreshold = 18;
else
disruptThreshold = 25;
if( amount > disruptThreshold )
{
BandageContext c = BandageContext.GetContext( this );
if( c != null )
c.Slip();
}
if( Confidence.IsRegenerating( this ) )
Confidence.StopRegenerating( this );
WeightOverloading.FatigueOnDamage( this, amount );
InhumanSpeech speechType = this.SpeechType;
if ( speechType != null && !willKill )
speechType.OnDamage( this, amount );
if ( m_ReceivedHonorContext != null )
m_ReceivedHonorContext.OnTargetDamaged( from, amount );
if ( willKill && from is PlayerMobile )
Timer.DelayCall( TimeSpan.FromSeconds( 10 ), new TimerCallback( ((PlayerMobile) from).RecoverAmmo ) );
#region Tad's Kill Points
if (willKill && from is PlayerMobile || willKill && from is BaseCreature)
{
if (from is BaseCreature)
{
BaseCreature pet = from as BaseCreature;
if (pet.Controlled)
{
Mobile master1 = pet.ControlMaster as Mobile;
Item item = master1.Backpack.FindItemByType(typeof(KillPointTracker));
KillPointTracker kpt = item as KillPointTracker;
if ( kpt != null )
if ( master1.Backpack == null || master1.Backpack.GetAmount( typeof( KillPointTracker ) ) > 1 )
{
master1.SendMessage( 62, "You can only have one kill point tracker in your pack to recieve points" );
}
else
{
if(KillPointTracker.BoundTo == master1.Serial)
{
if (kpt.RedeemedPoints >= 10000000)
master1.SendMessage(32, "You need to get another Kill Point Tracker as this one has reached the redeemed points cap!");
else
if (kpt.Points >= kpt.PointsCap)
master1.SendMessage( 32, "You need to redeem points or get another Kill Point Tracker as this one has reached the cap!");
else
if (this is AncientWyrm || this is WhiteWyrm)
{
kpt.Points+= 20;
kpt.TotalPt++;
}
else if (this is BaseChampion || IsParagon )
{
kpt.Points+=100;
kpt.TotalPt++;
}
else
{
kpt.Points++;
kpt.TotalPt++;
}
}
else
{
if ( KillPointTracker.BoundTo != master1.Serial )
master1.SendMessage( 62,"This kill point tracker does not belong or is not bound to you! Therefore you recieve no points.");
}
}
}
}
else
{
Item item = from.Backpack.FindItemByType(typeof(KillPointTracker));
KillPointTracker kpt = item as KillPointTracker;
if ( kpt != null )
if ( from.Backpack == null || from.Backpack.GetAmount( typeof( KillPointTracker ) ) > 1 )
{
from.SendMessage( 62, "You can only have one kill point tracker in your pack to recieve points" );
}
else
{
if(KillPointTracker.BoundTo == from.Serial)
{
if (kpt.RedeemedPoints >= 10000000)
from.SendMessage(32, "You need to get another Kill Point Tracker as this one has reached the redeemed points cap!");
else
if (kpt.Points >= kpt.PointsCap)
from.SendMessage( 32,"You need to redeemed points or get another Kill Point Tracker as this one has reached the cap!");
else
if (this is AncientWyrm || this is WhiteWyrm)
{
kpt.Points+= 20;
kpt.TotalPt++;
}
else if (this is BaseChampion || IsParagon )
{
kpt.Points+=100;
kpt.TotalPt++;
}
else
{
kpt.Points++;
kpt.TotalPt++;
}
}
else
{
if ( KillPointTracker.BoundTo != from.Serial )
from.SendMessage( 62,"This kill point tracker does not belong or is not bound to you! Therefore you recieve no points.");
}
}
}
#endregion
base.OnDamage( amount, from, willKill );
}
}