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.