sahisahi

Member
Code:
using System;
using Server.Items;
using Server.Gumps;
using Server.Network;
using System.Collections;
using Server.Misc;
using Server.Mobiles;
using Server;
using Bittiez.KillPT.Settings;

namespace Server.Items
{

    public class BoundToKillTracker : Gump
    {
        public String not_enough_points = KPTSettings.not_enough_points;
        double Points = .102;
        string percent;
        public int BoundTo;
        KillPointTracker kpt;
        public BoundToKillTracker(Mobile owner, int Bt, KillPointTracker kp)
            : base(0, 50)
        {
            kpt = kp;
            BoundTo = Bt;
            Closable = false;
            Disposable = true;
            Dragable = true;
            Resizable = false;
            //KillPointTracker kpt = i as KillPointTracker;
            AddPage(0);
            AddBackground(10, 0, 542, 312, 9200);
            AddAlphaRegion(25, 17, 509, 274);
            AddLabel(215, 20, 62, @"Sistema PVM");
            AddItem(182, 20, 9649);
            AddItem(298, 17, 9649);
            AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
            AddLabel(444, 24, 62, @"Cerrar");

            //AddLabel(70, 90, 62, (percent.ToString("P0").Trim(' ', '%') ) );
            AddLabel(70, 90, 62, @"Quieres gastarte 20,000 monedas de oro en DESUNIRLO de tu personaje ?");
            AddButton(30, 85, 2152, 2153, 1, GumpButtonType.Reply, 1);
            AddLabel(70, 130, 62, @"Quieres unirlo a tu personaje?");
            AddButton(30, 125, 2152, 2153, 2, GumpButtonType.Reply, 2);



        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
                case 0: // next
                    {
                        from.CloseGump(typeof(BoundToKillTracker));

                        break;

                    }
                case 1: // next
                    {
                        if (kpt.BoundTo == from.Serial)
                        {
                            Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(delegate
                            {
                                Container bank = from.FindBankNoCreate();

                                if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 20000)) || (bank != null && bank.ConsumeTotal(typeof(Gold), 20000)))
                                {
                                    kpt.BoundTo = 0;
                                    from.SendMessage(62, "Tu sistema de Puntos PVM Ya no esta unido a ti.");
                                    kpt.Name = new KillPointTracker().Name;
                                    kpt.InvalidateProperties();
                                }
                                else
                                {
                                    from.SendMessage(32, "But thou hast not the funds in thy bank account or thy back pack!"); // But thou hast not the funds in thy bank account!
                                }
                            }));
                        }
                        else
                        {
                            if (kpt.BoundTo != from.Serial)
                                from.SendMessage(32, "No te pertenece!");
                        }
                        break;
                    }


                case 2: // next
                    {
                        // set owner if not already set -- this is only done the first time.
                        if (kpt.BoundTo == 0)
                        {
                            kpt.BoundTo = from.Serial; //Bind to a serial on first time equipped.
                            from.Emote("* " + from.Name + " Sientes una energia que recorre tu cuerpo *");
                            //Ps effect after double clicked.
                            Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);
                            Effects.PlaySound(from.Location, from.Map, 0x243);
                            Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);
                            from.SendGump(new BoundToKillTracker(from, kpt.BoundTo, kpt));
                            from.SendMessage(62, "El sistema de PVM se ha unido a tu personaje");
                            kpt.Name = "Sistema de PVM " + "pertenece a " + from.Name.ToString() + " [Bonded]";
                            kpt.InvalidateProperties();
                        }
                        else
                        {
                            if (kpt.BoundTo != from.Serial)
                                from.SendMessage(32, "No te pertenece!");
                        }
                    }
                    break;
            }
            kpt.InvalidateProperties();
        }

    }
    public class BuyKillTracker : Gump
    {


        public BuyKillTracker(Mobile owner)
            : base(0, 50)
        {
            Item item = owner.Backpack.FindItemByType(typeof(KillPointTracker));
            KillPointTracker kpt = item as KillPointTracker;

            Closable = false;
            Disposable = true;
            Dragable = true;
            Resizable = false;

            AddPage(0);
            AddBackground(10, 0, 542, 312, 9200);
            AddAlphaRegion(25, 17, 509, 274);
            AddLabel(215, 20, 62, @"Puntos de PVM");
            AddItem(182, 20, 9649);
            AddItem(298, 17, 9649);
            AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
            AddLabel(444, 24, 62, @"Cerrar");
            if (owner.Alive)
            {
                AddLabel(70, 90, 62, @"¿Quieres comprar un sistema de puntos PVM por 20,000 gold ?");
                AddButton(30, 85, 2152, 2153, 1, GumpButtonType.Reply, 1);
                AddLabel(110, 180, 62, @"Tendras que darle 2 click");
                AddLabel(110, 195, 62, @"  para que se una a tu ");
                AddLabel(110, 210, 62, @"    Personaje y asi");
                AddLabel(110, 225, 62, @"         poder obtener puntos de PVM.");
                if (kpt != null && kpt.Points >= 100)
                    AddLabel(70, 130, 62, @"Click aqui ver la lista de recompensas PVM");
                if (kpt != null && kpt.Points >= 100)
                    AddButton(30, 125, 2152, 2153, 2, GumpButtonType.Reply, 2);
            }
            else
            {
                if (!owner.Alive && KillPointStone.ResOnOff == true)
                    AddLabel(70, 90, 62, @"Resurrect for 1000 points ?");
                if (!owner.Alive && KillPointStone.ResOnOff == true)
                    AddButton(30, 85, 2152, 2153, 3, GumpButtonType.Reply, 3);

            }
        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
                case 0: // next
                    {
                        from.CloseGump(typeof(BuyKillTracker));

                        break;

                    }
                case 1: // next
                    {

                        Container bank = from.FindBankNoCreate();

                        if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 20000)) || (bank != null && bank.ConsumeTotal(typeof(Gold), 20000)))
                        {

                            from.AddToBackpack(new KillPointTracker());
                            from.SendMessage(62, "Tu sistema de puntos PVM esta en tu mochila");

                        }
                        else
                        {
                            from.SendMessage(32, "But thou hast not the funds in thy bank account or thy back pack!"); // But thou hast not the funds in thy bank account!
                        }
                        break;
                    }
                case 2: // next
                    {

                        from.SendGump(new KillTracker(from));
                        from.SendMessage(62, "Has elegido cambiar puntos por recompensas PVM");

                        break;

                    }
                case 3: // next
                    {
                        Item item = from.Backpack.FindItemByType(typeof(KillPointTracker));
                        KillPointTracker kpt = item as KillPointTracker;

                        if (kpt != null && kpt.Points >= 1000)
                        {
                            kpt.Points -= 1000;
                            kpt.RedeemedPoints += 1000;

                            from.PlaySound(0x214);
                            from.FixedEffect(0x376A, 10, 16);

                            from.Resurrect();
                            from.SendMessage(62, "You have been resurrected");
                        }
                        else
                        {
                            from.SendMessage(32, "You do not have enough points to reserrect");
                        }
                    }
                    break;
            }
        }
    }
    public class KillTracker : Gump
    {
        private bool Hundred = KPTSettings.Hundred;
        private bool Thousand = KPTSettings.Thousand;
        private bool Both = KPTSettings.Both;
        public bool BankOverPack = KPTSettings.BankOverPack;

        public KillTracker(Mobile owner)
            : base(0, 50)
        {
            Item item = owner.Backpack.FindItemByType(typeof(KillPointTracker));
            KillPointTracker kpt = item as KillPointTracker;

            Closable = false;
            Disposable = true;
            Dragable = true;
            Resizable = false;


            if (kpt != null)
            {
                AddPage(1);
                if (kpt.Points >= 6000)
                    AddBackground(10, 0, 692, 312, 9200);
                AddAlphaRegion(25, 17, 659, 274);
                if (kpt.Points <= 5999)
                    AddBackground(10, 0, 542, 312, 9200);
                AddAlphaRegion(25, 17, 509, 274);
                AddLabel(215, 20, 62, @"Puntos PVM");
                AddItem(182, 20, 9649);
                AddItem(298, 17, 9649);
                AddLabel(90, 58, 62, @"Tus Puntos:");
                AddLabel(190, 58, 32, kpt.Points.ToString());
                AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                AddLabel(444, 24, 62, @"Cerrar");
                if (Both) { Thousand = true; Hundred = true; }
                if (Thousand != true || Hundred == true)
                {
                    if (kpt.Points >= 100)
                        AddLabel(70, 90, 62, @"100 Puntos");
                    if (kpt.Points >= 100)
                        AddButton(30, 85, 2152, 2153, 2, GumpButtonType.Page, 2);
                    if (kpt.Points >= 200)
                        AddLabel(70, 130, 62, @"200 Puntos");
                    if (kpt.Points >= 200)
                        AddButton(30, 125, 2152, 2153, 3, GumpButtonType.Page, 3);
                    if (kpt.Points >= 300)
                        AddLabel(70, 170, 62, @"300 Puntos");
                    if (kpt.Points >= 300)
                        AddButton(30, 165, 2152, 2153, 4, GumpButtonType.Page, 4);
                    if (kpt.Points >= 400)
                        AddLabel(70, 210, 62, @"400 Puntos");
                    if (kpt.Points >= 400)
                        AddButton(30, 205, 2152, 2153, 5, GumpButtonType.Page, 5);
                    if (kpt.Points >= 500)
                        AddLabel(70, 250, 62, @"500 Puntos");
                    if (kpt.Points >= 500)
                        AddButton(30, 245, 2152, 2153, 6, GumpButtonType.Page, 6);
                    if (kpt.Points >= 600)
                        AddLabel(230, 90, 62, @"600 Puntos");
                    if (kpt.Points >= 600)
                        AddButton(190, 85, 2152, 2153, 7, GumpButtonType.Page, 7);
                    if (kpt.Points >= 700)
                        AddLabel(230, 130, 62, @"700 Puntos");
                    if (kpt.Points >= 700)
                        AddButton(190, 125, 2152, 2153, 8, GumpButtonType.Page, 8);
                    if (kpt.Points >= 800)
                        AddLabel(230, 170, 62, @"800 Puntos");
                    if (kpt.Points >= 800)
                        AddButton(190, 165, 2152, 2153, 9, GumpButtonType.Page, 9);
                    if (kpt.Points >= 900)
                        AddLabel(230, 210, 62, @"900 Puntos");
                    if (kpt.Points >= 900)
                        AddButton(190, 205, 2152, 2153, 10, GumpButtonType.Page, 10);
                }
                if (Hundred != true || Thousand == true)
                {

                    if (kpt.Points >= 1000)
                        AddLabel(230, 250, 62, @"1000 Puntos");
                    if (kpt.Points >= 1000)
                        AddButton(190, 245, 2152, 2153, 11, GumpButtonType.Page, 11);
                    if (kpt.Points >= 2000)
                        AddLabel(390, 90, 62, @"2000 Puntos");
                    if (kpt.Points >= 2000)
                        AddButton(350, 85, 2152, 2153, 12, GumpButtonType.Page, 12);
                    if (kpt.Points >= 3000)
                        AddLabel(390, 130, 62, @"3000 Puntos");
                    if (kpt.Points >= 3000)
                        AddButton(350, 125, 2152, 2153, 13, GumpButtonType.Page, 13);
                    if (kpt.Points >= 4000)
                        AddLabel(390, 170, 62, @"4000 Puntos");
                    if (kpt.Points >= 4000)
                        AddButton(350, 165, 2152, 2153, 14, GumpButtonType.Page, 14);
                    if (kpt.Points >= 5000)
                        AddLabel(390, 210, 62, @"5000 Puntos");
                    if (kpt.Points >= 5000)
                        AddButton(350, 205, 2152, 2153, 15, GumpButtonType.Page, 15);
                    if (kpt.Points >= 6000)
                        AddLabel(390, 250, 62, @"6000 Puntos");
                    if (kpt.Points >= 6000)
                        AddButton(350, 245, 2152, 2153, 16, GumpButtonType.Page, 16);
                    if (kpt.Points >= 7000)
                        AddLabel(550, 90, 62, @"7000 Puntos");
                    if (kpt.Points >= 7000)
                        AddButton(510, 85, 2152, 2153, 17, GumpButtonType.Page, 17);
                    if (kpt.Points >= 8000)
                        AddLabel(550, 130, 62, @"8000 Puntos");
                    if (kpt.Points >= 8000)
                        AddButton(510, 125, 2152, 2153, 18, GumpButtonType.Page, 18);
                    if (kpt.Points >= 9000)
                        AddLabel(550, 170, 62, @"9000 Puntos");
                    if (kpt.Points >= 9000)
                        AddButton(510, 165, 2152, 2153, 19, GumpButtonType.Page, 19);
                    if (kpt.Points >= 10000)
                        AddLabel(550, 210, 62, @"10000 Puntos");
                    if (kpt.Points >= 10000)
                        AddButton(510, 205, 2152, 2153, 20, GumpButtonType.Page, 20);
                }

                //Begins with case 1. Populate only if you want to use Both = true being rewards from.
                //100 points thru 10000 points.

                ArrayList item_list = new ArrayList();
                int ps = 1;
                int ps1 = 0;
                int cc = 0;

                //100$ items
                item_list.Add(@"Bone Couch Deed");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$200
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$300
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$400
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$500
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$600
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$700
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$800
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$900
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$1000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$2000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$2000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$3000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$4000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$5000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$6000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$7000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$8000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

                //$9000
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");


                if (Hundred == true || Thousand == false)
                {

                    AddPage(2);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }
                    AddLabel(605, 257, 62, @"Back");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);//Ends case 10



                    AddPage(3);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(4);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");


                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(5);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(6);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(7);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(8);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(9);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(10);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);
                }

                if (Thousand == true || Hundred == false)
                {


                    AddPage(11);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(12);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(13);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(14);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(15);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(16);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(17);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(18);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10; while (ps < ps1)
                    {
                        AddLabel(70, 90, 62, (string)item_list[ps - 1]);
                        AddButton(30, 85, 2152, 2153, 181, GumpButtonType.Reply, ps);
                        cc++; ps++;
                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(19);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(20);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);
                    //Ends at Case 190
                }
            }

        }

        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;
            String item_place_in = "Tu {itemname} se ha puesto en tu {bankbackpack}";
            String not_enough_points = "No tienes suficientes puntos para eso.";
            ArrayList items = new ArrayList();
            ArrayList price = new ArrayList();
            ArrayList name = new ArrayList();

            int ii = 0;
            while (ii < 200)
            {
                items.Add(null);
                price.Add(0);
                name.Add("");
                ii++;
            }


            items[1] = new BoneCouchDeed();
            price[1] = 100;
            name[1] = "bone couch";




            int i = 0;
            while (i < 190)
            {
                if (info.ButtonID == 0)
                {
                    from.CloseGump(typeof(KillTracker));
                    break;
                }

                if (info.ButtonID == i)
                {
                    if (items.Count > i)
                    {
                        Item item = from.Backpack.FindItemByType(typeof(KillPointTracker));
                        KillPointTracker kpt = item as KillPointTracker;
                        if ((Item)items[i] == null) { break; }
                        if (!spend(kpt, (int)price[i])) { from.SendMessage(62, not_enough_points); break; }
                        if (BankOverPack)
                        {
                            BankBox bank = from.BankBox;
                            bank.DropItem((Item)items[i]);
                            from.SendMessage(62, item_place_in.Replace("{itemname}", (String)name[i]).Replace("{bankbackpack}", "bank"));
                        }
                        else
                        {
                            from.AddToBackpack((Item)items[i]);
                            from.SendMessage(62, item_place_in.Replace("{itemname}", (String)name[i]).Replace("{bankbackpack}", "backpack"));

                        }

                    }
                }
                i++;
            }

        }

        private Boolean spend(KillPointTracker kpt, int amt)
        {
            if (kpt != null && kpt.Points > (amt - 1))
            {
                kpt.Points -= amt;
                kpt.RedeemedPoints += amt;
                return true;
            }
            return false;
        }


    }
}

I tried to add items here:

Code:
item_list.Add(@"Bone Couch Deed");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");
                item_list.Add(@"Your item here");

But it looks like this is like a name list? not real items


This is the method where items get hooked if im not wrong, how can i keep adding items there? after the bone couch deed.
Code:
public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;
            String item_place_in = "Tu {itemname} se ha puesto en tu {bankbackpack}";
            String not_enough_points = "No tienes suficientes puntos para eso.";
            ArrayList items = new ArrayList();
            ArrayList price = new ArrayList();
            ArrayList name = new ArrayList();

            int ii = 0;
            while (ii < 200)
            {
                items.Add(null);
                price.Add(0);
                name.Add("");
                ii++;
            }


            items[1] = new BoneCouchDeed();
            price[1] = 100;
            name[1] = "bone couch";




            int i = 0;
            while (i < 190)
            {
                if (info.ButtonID == 0)
                {
                    from.CloseGump(typeof(KillTracker));
                    break;
                }

                if (info.ButtonID == i)
                {
                    if (items.Count > i)
                    {
                        Item item = from.Backpack.FindItemByType(typeof(KillPointTracker));
                        KillPointTracker kpt = item as KillPointTracker;
                        if ((Item)items[i] == null) { break; }
                        if (!spend(kpt, (int)price[i])) { from.SendMessage(62, not_enough_points); break; }
                        if (BankOverPack)
                        {
                            BankBox bank = from.BankBox;
                            bank.DropItem((Item)items[i]);
                            from.SendMessage(62, item_place_in.Replace("{itemname}", (String)name[i]).Replace("{bankbackpack}", "bank"));
                        }
                        else
                        {
                            from.AddToBackpack((Item)items[i]);
                            from.SendMessage(62, item_place_in.Replace("{itemname}", (String)name[i]).Replace("{bankbackpack}", "backpack"));

                        }

                    }
                }
                i++;
            }

        }

Sorry and thanks.
 
I don't really have enough time to check the rest of the script, but you can simply do:
Code:
items.Add(new BoneCouchDeed());
price.Add(100);
name.Add("bone couch");

Though, the list concept itself could be greatly improved.
Where did you get this script from?
 
I don't really have enough time to check the rest of the script, but you can simply do:
Code:
items.Add(new BoneCouchDeed());
price.Add(100);
name.Add("bone couch");

Though, the list concept itself could be greatly improved.
Where did you get this script from?


And i got it at runuo forums (RIP) was made by bittiez


Code:
            items[1] = new BoneCouchDeed();
            price[1] = 100;
            name[1] = "bone couch";
            items.Add(new Baglvlshadow());
            price.Add(100);
            name.Add("Shadow armor bag");

Added that, It doesnt give the shadow bag :/
 
Last edited:
After a check, adding the item after the player responded the gump, it won't add it.
You need to add it where it says:
item_list.Add(@"Your item here");
to
item_list.Add(new BoneCouchDeed());

Honestly, the whole script could be improved, it should be a bit more based on the shop buy entries of the vendors, having a custom entry class with the item, price and name as parameter and having a list of those instead.
 
It crash :p


Exception:
System.InvalidCastException: Unable to cast object of type 'Server.Items.BoneCouchDeed' to type 'System.String'.
at Server.Items.KillTracker..ctor(Mobile owner)
at Server.Items.BuyKillTracker.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
 
I'm not sure how items are handled, so try each of them:

@"BoneCouchDeed"
typeof(BoneCouchDeed)

Either it creates the item out of the string name of the class, or it takes a list of types.
Using a "new Stuff()" is not wanted, as you want to create the instance of the object once the person chosed it.

Also i'm not sure why there's a @ infront of every strings but lol.
That's not necessary as far as i know :p
 
I'm not sure how items are handled, so try each of them:

@"BoneCouchDeed"
typeof(BoneCouchDeed)

Either it creates the item out of the string name of the class, or it takes a list of types.
Using a "new Stuff()" is not wanted, as you want to create the instance of the object once the person chosed it.

Also i'm not sure why there's a @ infront of every strings but lol.
That's not necessary as far as i know :p

Does the name display as 'Bone Couch Deed' with spaces? If so, it might be using the item itself and getting its name. (So if you changed the name of the item it would automatically change in the list). Or maybe that's a quick-search thing, which should be removed when you add a real entry? I don't know, otherwise.
 
The problem with getting it's name is that you need to create an instance of the said item in order to get it, but creating it will leave an unaccessible item in the world. Also, stuffs have three names: the Name, the DefaultName and the name it has in the client files, so this can be a bit more complex than supplying the name directly.

Personally, i would reorganise the whole thing to do it correctly, but i don't have enough time at my disposal for that.
I'm pretty sure typeof(BoneCouchDeed) will work as intended.
 
I agree, that gump is a bit of a mess and should be redone.
At first I was playing around with the Kill Point Tracker, using just the item to track points and created a separate system for redemption.
But later switched to a completely custom system that didn't require having an item in the player's backpack and set it up to earn points from not only killing but also crafting, harvesting, etc.
 
Yeah was a bit of a pain to do but I got it to recognize the different resource types for ore and logs and to give different points depending on difficulty

I put a lot of time into stuff like that, and no shard to show for it :D
But I'm planning on getting one going "soon"
 
I'm not sure how items are handled, so try each of them:

@"BoneCouchDeed"
typeof(BoneCouchDeed)

Either it creates the item out of the string name of the class, or it takes a list of types.
Using a "new Stuff()" is not wanted, as you want to create the instance of the object once the person chosed it.

Also i'm not sure why there's a @ infront of every strings but lol.
That's not necessary as far as i know :p


I tried that, and bamm! another crash :p



System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Server.Items.KillTracker..ctor(Mobile owner)
at Server.Items.BuyKillTracker.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

Well i think i will just give up, sadly, i really liked the system
 
Tested this and got it to work

You have to add an item in two places:
- if an item costs 100 points, add it to the section under //100$ items, or //200$ items for 200 points and so on
- add the name of the item here so it's displayed on the gump
item_list.Add(@"Your item here");

then go to the section in the OnResponse method where you see this part
items[1] = new Dagger(); // item
price[1] = 100; // cost
name[1] = "Dagger"; // name string...again

so if you wanted to add a second item it would look like this
items[1] = new BoneCouchDeed();
price[1] = 100;
name[1] = "bone couch";

items[2] = new Baglvlshadow();
price[2] = 100;
name[2] = "Shadow armor bag";

Keep in mind that even if you have 1 item in the 100 cost section, and set the Shadow armor bag to the first item in 200, the number for the Shadow bag would then be 11, not 2
300 would start at 21 and so on

Also, I'd suggest if nothing else to replace all the "your item here" with an empty string: item_list.Add(@"");
 
Im doing it the way you told me, and it crash :O

Exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Server.Items.KillTracker..ctor(Mobile owner)
at Server.Items.BuyKillTracker.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)



Code:
using System;
using Server.Items;
using Server.Gumps;
using Server.Network;
using System.Collections;
using Server.Misc;
using Server.Mobiles;
using Server;
using Bittiez.KillPT.Settings;

namespace Server.Items
{

    public class BoundToKillTracker : Gump
    {
        public String not_enough_points = KPTSettings.not_enough_points;
        double Points = .102;
        string percent;
        public int BoundTo;
        KillPointTracker kpt;
        public BoundToKillTracker(Mobile owner, int Bt, KillPointTracker kp)
            : base(0, 50)
        {
            kpt = kp;
            BoundTo = Bt;
            Closable = false;
            Disposable = true;
            Dragable = true;
            Resizable = false;
            //KillPointTracker kpt = i as KillPointTracker;
            AddPage(0);
            AddBackground(10, 0, 542, 312, 9200);
            AddAlphaRegion(25, 17, 509, 274);
            AddLabel(215, 20, 62, @"Sistema PVM");
            AddItem(182, 20, 9649);
            AddItem(298, 17, 9649);
            AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
            AddLabel(444, 24, 62, @"Cerrar");

            //AddLabel(70, 90, 62, (percent.ToString("P0").Trim(' ', '%') ) );
            AddLabel(70, 90, 62, @"Quieres gastarte 20,000 monedas de oro en DESUNIRLO de tu personaje ?");
            AddButton(30, 85, 2152, 2153, 1, GumpButtonType.Reply, 1);
            AddLabel(70, 130, 62, @"Quieres unirlo a tu personaje?");
            AddButton(30, 125, 2152, 2153, 2, GumpButtonType.Reply, 2);



        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
                case 0: // next
                    {
                        from.CloseGump(typeof(BoundToKillTracker));

                        break;

                    }
                case 1: // next
                    {
                        if (kpt.BoundTo == from.Serial)
                        {
                            Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(delegate
                            {
                                Container bank = from.FindBankNoCreate();

                                if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 20000)) || (bank != null && bank.ConsumeTotal(typeof(Gold), 20000)))
                                {
                                    kpt.BoundTo = 0;
                                    from.SendMessage(62, "Tu sistema de Puntos PVM Ya no esta unido a ti.");
                                    kpt.Name = new KillPointTracker().Name;
                                    kpt.InvalidateProperties();
                                }
                                else
                                {
                                    from.SendMessage(32, "But thou hast not the funds in thy bank account or thy back pack!"); // But thou hast not the funds in thy bank account!
                                }
                            }));
                        }
                        else
                        {
                            if (kpt.BoundTo != from.Serial)
                                from.SendMessage(32, "No te pertenece!");
                        }
                        break;
                    }


                case 2: // next
                    {
                        // set owner if not already set -- this is only done the first time.
                        if (kpt.BoundTo == 0)
                        {
                            kpt.BoundTo = from.Serial; //Bind to a serial on first time equipped.
                            from.Emote("* " + from.Name + " Sientes una energia que recorre tu cuerpo *");
                            //Ps effect after double clicked.
                            Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0, 0, 0, 0, 0, 5060, 0);
                            Effects.PlaySound(from.Location, from.Map, 0x243);
                            Effects.SendTargetParticles(from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100);
                            from.SendGump(new BoundToKillTracker(from, kpt.BoundTo, kpt));
                            from.SendMessage(62, "El sistema de PVM se ha unido a tu personaje");
                            kpt.Name = "Sistema de PVM " + "pertenece a " + from.Name.ToString() + " [Bonded]";
                            kpt.InvalidateProperties();
                        }
                        else
                        {
                            if (kpt.BoundTo != from.Serial)
                                from.SendMessage(32, "No te pertenece!");
                        }
                    }
                    break;
            }
            kpt.InvalidateProperties();
        }

    }
    public class BuyKillTracker : Gump
    {


        public BuyKillTracker(Mobile owner)
            : base(0, 50)
        {
            Item item = owner.Backpack.FindItemByType(typeof(KillPointTracker));
            KillPointTracker kpt = item as KillPointTracker;

            Closable = false;
            Disposable = true;
            Dragable = true;
            Resizable = false;

            AddPage(0);
            AddBackground(10, 0, 542, 312, 9200);
            AddAlphaRegion(25, 17, 509, 274);
            AddLabel(215, 20, 62, @"Puntos de PVM");
            AddItem(182, 20, 9649);
            AddItem(298, 17, 9649);
            AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
            AddLabel(444, 24, 62, @"Cerrar");
            if (owner.Alive)
            {
                AddLabel(70, 90, 62, @"¿Quieres comprar un sistema de puntos PVM por 20,000 gold ?");
                AddButton(30, 85, 2152, 2153, 1, GumpButtonType.Reply, 1);
                AddLabel(110, 180, 62, @"Tendras que darle 2 click");
                AddLabel(110, 195, 62, @"  para que se una a tu ");
                AddLabel(110, 210, 62, @"    Personaje y asi");
                AddLabel(110, 225, 62, @"         poder obtener puntos de PVM.");
                if (kpt != null && kpt.Points >= 100)
                    AddLabel(70, 130, 62, @"Click aqui ver la lista de recompensas PVM");
                if (kpt != null && kpt.Points >= 100)
                    AddButton(30, 125, 2152, 2153, 2, GumpButtonType.Reply, 2);
            }
            else
            {
                if (!owner.Alive && KillPointStone.ResOnOff == true)
                    AddLabel(70, 90, 62, @"Resurrect for 1000 points ?");
                if (!owner.Alive && KillPointStone.ResOnOff == true)
                    AddButton(30, 85, 2152, 2153, 3, GumpButtonType.Reply, 3);

            }
        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
                case 0: // next
                    {
                        from.CloseGump(typeof(BuyKillTracker));

                        break;

                    }
                case 1: // next
                    {

                        Container bank = from.FindBankNoCreate();

                        if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 20000)) || (bank != null && bank.ConsumeTotal(typeof(Gold), 20000)))
                        {

                            from.AddToBackpack(new KillPointTracker());
                            from.SendMessage(62, "Tu sistema de puntos PVM esta en tu mochila");

                        }
                        else
                        {
                            from.SendMessage(32, "No tienes suficiente dinero!"); // But thou hast not the funds in thy bank account!
                        }
                        break;
                    }
                case 2: // next
                    {

                        from.SendGump(new KillTracker(from));
                        from.SendMessage(62, "Has elegido cambiar puntos por recompensas PVM");

                        break;

                    }
                case 3: // next
                    {
                        Item item = from.Backpack.FindItemByType(typeof(KillPointTracker));
                        KillPointTracker kpt = item as KillPointTracker;

                        if (kpt != null && kpt.Points >= 1000)
                        {
                            kpt.Points -= 1000;
                            kpt.RedeemedPoints += 1000;

                            from.PlaySound(0x214);
                            from.FixedEffect(0x376A, 10, 16);

                            from.Resurrect();
                            from.SendMessage(62, "You have been resurrected");
                        }
                        else
                        {
                            from.SendMessage(32, "You do not have enough points to reserrect");
                        }
                    }
                    break;
            }
        }
    }
    public class KillTracker : Gump
    {
        private bool Hundred = KPTSettings.Hundred;
        private bool Thousand = KPTSettings.Thousand;
        private bool Both = KPTSettings.Both;
        public bool BankOverPack = KPTSettings.BankOverPack;

        public KillTracker(Mobile owner)
            : base(0, 50)
        {
            Item item = owner.Backpack.FindItemByType(typeof(KillPointTracker));
            KillPointTracker kpt = item as KillPointTracker;

            Closable = false;
            Disposable = true;
            Dragable = true;
            Resizable = false;


            if (kpt != null)
            {
                AddPage(1);
                if (kpt.Points >= 6000)
                    AddBackground(10, 0, 692, 312, 9200);
                AddAlphaRegion(25, 17, 659, 274);
                if (kpt.Points <= 5999)
                    AddBackground(10, 0, 542, 312, 9200);
                AddAlphaRegion(25, 17, 509, 274);
                AddLabel(215, 20, 62, @"Puntos PVM");
                AddItem(182, 20, 9649);
                AddItem(298, 17, 9649);
                AddLabel(90, 58, 62, @"Tus Puntos:");
                AddLabel(190, 58, 32, kpt.Points.ToString());
                AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                AddLabel(444, 24, 62, @"Cerrar");
                if (Both) { Thousand = true; Hundred = true; }
                if (Thousand != true || Hundred == true)
                {
                    if (kpt.Points >= 100)
                        AddLabel(70, 90, 62, @"100 Puntos");
                    if (kpt.Points >= 100)
                        AddButton(30, 85, 2152, 2153, 2, GumpButtonType.Page, 2);
                    if (kpt.Points >= 200)
                        AddLabel(70, 130, 62, @"200 Puntos");
                    if (kpt.Points >= 200)
                        AddButton(30, 125, 2152, 2153, 3, GumpButtonType.Page, 3);
                    if (kpt.Points >= 300)
                        AddLabel(70, 170, 62, @"300 Puntos");
                    if (kpt.Points >= 300)
                        AddButton(30, 165, 2152, 2153, 4, GumpButtonType.Page, 4);
                    if (kpt.Points >= 400)
                        AddLabel(70, 210, 62, @"400 Puntos");
                    if (kpt.Points >= 400)
                        AddButton(30, 205, 2152, 2153, 5, GumpButtonType.Page, 5);
                    if (kpt.Points >= 500)
                        AddLabel(70, 250, 62, @"500 Puntos");
                    if (kpt.Points >= 500)
                        AddButton(30, 245, 2152, 2153, 6, GumpButtonType.Page, 6);
                    if (kpt.Points >= 600)
                        AddLabel(230, 90, 62, @"600 Puntos");
                    if (kpt.Points >= 600)
                        AddButton(190, 85, 2152, 2153, 7, GumpButtonType.Page, 7);
                    if (kpt.Points >= 700)
                        AddLabel(230, 130, 62, @"700 Puntos");
                    if (kpt.Points >= 700)
                        AddButton(190, 125, 2152, 2153, 8, GumpButtonType.Page, 8);
                    if (kpt.Points >= 800)
                        AddLabel(230, 170, 62, @"800 Puntos");
                    if (kpt.Points >= 800)
                        AddButton(190, 165, 2152, 2153, 9, GumpButtonType.Page, 9);
                    if (kpt.Points >= 900)
                        AddLabel(230, 210, 62, @"900 Puntos");
                    if (kpt.Points >= 900)
                        AddButton(190, 205, 2152, 2153, 10, GumpButtonType.Page, 10);
                }
                if (Hundred != true || Thousand == true)
                {

                    if (kpt.Points >= 1000)
                        AddLabel(230, 250, 62, @"1000 Puntos");
                    if (kpt.Points >= 1000)
                        AddButton(190, 245, 2152, 2153, 11, GumpButtonType.Page, 11);
                    if (kpt.Points >= 2000)
                        AddLabel(390, 90, 62, @"2000 Puntos");
                    if (kpt.Points >= 2000)
                        AddButton(350, 85, 2152, 2153, 12, GumpButtonType.Page, 12);
                    if (kpt.Points >= 3000)
                        AddLabel(390, 130, 62, @"3000 Puntos");
                    if (kpt.Points >= 3000)
                        AddButton(350, 125, 2152, 2153, 13, GumpButtonType.Page, 13);
                    if (kpt.Points >= 4000)
                        AddLabel(390, 170, 62, @"4000 Puntos");
                    if (kpt.Points >= 4000)
                        AddButton(350, 165, 2152, 2153, 14, GumpButtonType.Page, 14);
                    if (kpt.Points >= 5000)
                        AddLabel(390, 210, 62, @"5000 Puntos");
                    if (kpt.Points >= 5000)
                        AddButton(350, 205, 2152, 2153, 15, GumpButtonType.Page, 15);
                    if (kpt.Points >= 6000)
                        AddLabel(390, 250, 62, @"6000 Puntos");
                    if (kpt.Points >= 6000)
                        AddButton(350, 245, 2152, 2153, 16, GumpButtonType.Page, 16);
                    if (kpt.Points >= 7000)
                        AddLabel(550, 90, 62, @"7000 Puntos");
                    if (kpt.Points >= 7000)
                        AddButton(510, 85, 2152, 2153, 17, GumpButtonType.Page, 17);
                    if (kpt.Points >= 8000)
                        AddLabel(550, 130, 62, @"8000 Puntos");
                    if (kpt.Points >= 8000)
                        AddButton(510, 125, 2152, 2153, 18, GumpButtonType.Page, 18);
                    if (kpt.Points >= 9000)
                        AddLabel(550, 170, 62, @"9000 Puntos");
                    if (kpt.Points >= 9000)
                        AddButton(510, 165, 2152, 2153, 19, GumpButtonType.Page, 19);
                    if (kpt.Points >= 10000)
                        AddLabel(550, 210, 62, @"10000 Puntos");
                    if (kpt.Points >= 10000)
                        AddButton(510, 205, 2152, 2153, 20, GumpButtonType.Page, 20);
                }

                //Begins with case 1. Populate only if you want to use Both = true being rewards from.
                //100 points thru 10000 points.

                ArrayList item_list = new ArrayList();
                int ps = 1;
                int ps1 = 0;
                int cc = 0;

                //100$ items
                item_list.Add(@"Deed Bone Couch");
                item_list.Add(@"Shadow Armor Bag");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$200
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");


                //$300
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$400
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$500
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$600
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$700
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$800
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$900
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$1000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                //$2000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$2000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$3000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$4000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$5000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$6000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$7000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$8000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");

                //$9000
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");
                item_list.Add(@"");


                if (Hundred == true || Thousand == false)
                {

                    AddPage(2);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }
                    AddLabel(605, 257, 62, @"Back");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);//Ends case 10



                    AddPage(3);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(4);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");


                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(5);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(6);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(7);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(8);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(9);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(10);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);
                }

                if (Thousand == true || Hundred == false)
                {


                    AddPage(11);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(12);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(13);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(14);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(15);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(16);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(17);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(18);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10; while (ps < ps1)
                    {
                        AddLabel(70, 90, 62, (string)item_list[ps - 1]);
                        AddButton(30, 85, 2152, 2153, 181, GumpButtonType.Reply, ps);
                        cc++; ps++;
                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(19);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Cerrar");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);

                    AddPage(20);
                    AddBackground(10, 0, 692, 312, 9200);
                    AddAlphaRegion(25, 17, 659, 274);
                    AddLabel(215, 20, 62, @"Puntos de PVM");
                    AddItem(182, 20, 9649);
                    AddItem(298, 17, 9649);
                    AddLabel(90, 58, 62, @"Tus puntos de PVM:");
                    AddLabel(190, 58, 32, kpt.Points.ToString());
                    AddLabel(280, 58, 62, @"Total de puntos canjeados:");
                    AddLabel(440, 58, 32, kpt.RedeemedPoints.ToString());
                    AddButton(489, 21, 2152, 2153, 0, GumpButtonType.Reply, 0);
                    AddLabel(444, 24, 62, @"Close");

                    ps1 = ps + 10;
                    cc = 0;
                    while (ps < ps1)
                    {


                        if (cc < 5)
                        {
                            AddLabel(70, 90 + (cc * 40), 62, (string)item_list[ps - 1]);
                            AddButton(30, 85 + (cc * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);
                        }
                        if (cc > 4)
                        {
                            AddLabel(390, 90 + ((cc - 5) * 40), 62, (string)item_list[ps - 1]);
                            AddButton(350, 85 + ((cc - 5) * 40), 2152, 2153, ps, GumpButtonType.Reply, ps);

                        }
                        cc++; ps++;

                    }

                    AddLabel(605, 257, 62, @"Atras");
                    AddButton(640, 260, 2224, 2224, 1, GumpButtonType.Page, 1);
                    //Ends at Case 190
                }
            }

        }

        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;
            String item_place_in = "Tu {itemname} se ha puesto en tu {bankbackpack}";
            String not_enough_points = "No tienes suficientes puntos para eso.";
            ArrayList items = new ArrayList();
            ArrayList price = new ArrayList();
            ArrayList name = new ArrayList();

            int ii = 0;
            while (ii < 200)
            {
                items.Add(null);
                price.Add(0);
                name.Add("");
                ii++;
            }


            items[1] = new BoneCouchDeed();
            price[1] = 100;
            name[1] = "bone couch";
            items[2] = new Baglvlshadow();
            price[2] = 100;
            name[2] = "Shadow armor bag";
           
           




            int i = 0;
            while (i < 190)
            {
                if (info.ButtonID == 0)
                {
                    from.CloseGump(typeof(KillTracker));
                    break;
                }

                if (info.ButtonID == i)
                {
                    if (items.Count > i)
                    {
                        Item item = from.Backpack.FindItemByType(typeof(KillPointTracker));
                        KillPointTracker kpt = item as KillPointTracker;
                        if ((Item)items[i] == null) { break; }
                        if (!spend(kpt, (int)price[i])) { from.SendMessage(62, not_enough_points); break; }
                        if (BankOverPack)
                        {
                            BankBox bank = from.BankBox;
                            bank.DropItem((Item)items[i]);
                            from.SendMessage(62, item_place_in.Replace("{itemname}", (String)name[i]).Replace("{bankbackpack}", "bank"));
                        }
                        else
                        {
                            from.AddToBackpack((Item)items[i]);
                            from.SendMessage(62, item_place_in.Replace("{itemname}", (String)name[i]).Replace("{bankbackpack}", "backpack"));

                        }

                    }
                }
                i++;
            }

        }

        private Boolean spend(KillPointTracker kpt, int amt)
        {
            if (kpt != null && kpt.Points > (amt - 1))
            {
                kpt.Points -= amt;
                kpt.RedeemedPoints += amt;
                return true;
            }
            return false;
        }


    }
}
 
Seems like you didn't have 10 entries for each section under the item_list.Add part

try this attached file

if that doesn't work, you'll need to run the shard in debug mode to find what line exactly is causing the issue
 

Attachments

  • gump for sahisahi.cs
    55.8 KB · Views: 2
Seems like you didn't have 10 entries for each section under the item_list.Add part

try this

if that doesn't work, you'll need to run the shard in debug mode to find what line exactly is causing the issue
Thank you! nice file name, i will try it now


Edit: IT didnt crashed this time, thank you again, it seems to work as intended
 
Last edited:
Thank you! nice file name, i will try it now


Edit: IT didnt crashed this time, thank you again, it seems to work as intended
file name just helps me to remember why I saved it - easy housekeeping

glad to hear it's working now. :)
that gump code could really use a redo as it shouldn't be necessary to enter an item in two places on a script for it to work as intended.
Not saying anything negative about bittiez, he/she has some pretty nice scripts out there.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back