RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[2.2] Kill Tracker Ball

MrNice

Squire
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!
 

MrNice

Squire
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. :)
 

Mortis

Knight
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. :)

***Fixed***
Redownload files as i have updated them with this fix.

You can no longer redeem points or recieve killpoints/kills with more than one KillPointTracker in your pack.
 

Mortis

Knight
Another update.

Updated files attached below

Changed how the system checks for if the KillPointTracker is in our back pack.
Found it to be more efficient than looping through all items in your pack as it no longer needs the delay timer when adding to back pack to avoid server crash.
Therefore the timers are removed in this version.

Read the Readme.txt as The BaseCreature.cs mod has also changed. You will have to overwrite the old versions mod.

Other fix's
You can only have one kill point tracker in your pack when binding or unbinding.
Added checks to see if item is or is not bound when binding or unbinding from it.
Only binds if not already bound and only unbinds if bound.

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 :)

This issue is now ***Fixed***

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 have not been able to reproduce this. Is any one else experiencing this?

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*** 2/3/13 11:34 pm EST

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.

****Fixed****
2/5/13
 

Attachments

  • KillPointTracker.rar
    16.7 KB · Views: 14

MrNice

Squire
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)
 

Mortis

Knight
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***
Re-download above. File's have been updated.
 

MrNice

Squire
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.
 

Mortis

Knight
Keep them coming MrNice.
Until it works perfectly.

Thank you for bug testing things I have not had the chance to.

Btw, This must be blah blah blah does not help.

Please insert the real message.

Thank you,

Mortis
 

MrNice

Squire
Hm? hehe its a great idea just trying dif things to break it :) I have yet to even add in the changes to my basecreature.cs file. Where in your basecreature did you add it? Could I see a fraction of that code. Mine is heavily modded.
 

Mortis

Knight
Without this I would expect even more crashes as you had.

Right after line 1300 default in.
Code:
        public override void OnDamage( int amount, Mobile from, bool willKill )
        {

As in a whole.
Code:
        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 );
        }
    }
 

MrNice

Squire
hehe will test it out now, it works fine without that code just obviously points have to be set by staff which was fine :) I run a small shard on a 100mbit connect so I only add in a good system once I test it out myself for a while :) thank you sir!
 

MrNice

Squire
Question about this download...It has a killtracker with gumps as well as the gumps sep. What is the intended one to use?
 

MrNice

Squire
Ok players who purchased the kill point tracker from the stone do not get points when they kill stuff. it says blah blah no points but when I just create one that seems to work any ideas?
 

MrNice

Squire
When a player dies it will say "not bound / does not belong to you" and will no longer keep track of kills.
 

MrNice

Squire
When you pick an item (right now i have them in the first slot on the 100's and 200's) it will create it but will subtract points even into the - and still give the item each time.
 
Top