APPROVED: Blank recall runes on caster keys
Posted: Thu Sep 25, 2008 9:07 am
Can we get a blank recall rune slot added to the spell caster keys?
I'm able to combine my sturdies don't know why you can'tHarabakc wrote: can you make sturdy axes/pickaxes be accepted into tool houses into the regular pickaxe(shovel)/axe slots. I used to have a ton of those stupid things laying around, I could make 60000 use axes/pickaxes(shovels) but I couldn't combine those stupid sturdies.
Code: Select all
namespace Server.Items
{
public class SpellCastersKey : Item
{
Code: Select all
private int m_RecallRune;
Code: Select all
private int m_Sand;
Code: Select all
[CommandProperty(AccessLevel.GameMaster)]
public int RecallRune { get { return m_RecallRune; } set { m_RecallRune = value; InvalidateProperties(); } }
Code: Select all
[CommandProperty(AccessLevel.GameMaster)]
public int Sand { get { return m_Sand; } set { m_Sand = value; InvalidateProperties(); } }
Code: Select all
[Constructable]
public SpellCastersKey(int storageLimit, int withdrawIncrement) : base( 0x176B )
{
Code: Select all
if (curItem is RecallRune)
{
if (RecallRune + curItem.Amount > StorageLimit)
from.SendMessage("You can not add any more runes.");
else
{
curItem.Delete();
RecallRune = (RecallRune + 1);
from.SendGump(new SpellCastersKeyGump((PlayerMobile)from, this));
BeginCombine(from);
}
}
Code: Select all
if (curItem is Sand)
{
if (Sand + curItem.Amount > StorageLimit)
from.SendMessage("That resource type cannot hold the amount you're trying to store, in addition to what it currently has.");
else
{
curItem.Delete();
Sand = (Sand + 1);
from.SendGump(new SpellCastersKeyGump((PlayerMobile)from, this));
BeginCombine(from);
}
}
Code: Select all
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
Code: Select all
writer.Write((int)m_RecallRune);
Code: Select all
writer.Write((int)m_Sand);
Code: Select all
public override void Deserialize(GenericReader reader)
{
Code: Select all
m_RecallRune = reader.ReadInt();
Code: Select all
m_Sand = reader.ReadInt();
Code: Select all
public class SpellCastersKeyGump : Gump
{
Code: Select all
AddLabel(325, 450, 0x486, "RecallRune");
AddLabel(425, 450, 0x480, key.RecallRune.ToString());
AddButton(275, 450, 4005, 4007, 23, GumpButtonType.Reply, 0);
Code: Select all
AddLabel(325, 300, 0x486, "Destroying Angel");
AddButton(275, 300, 4005, 4007, 16, GumpButtonType.Reply, 0);
if (m_Key.Regs.ContainsKey(typeof(DestroyingAngel)))
AddLabel(425, 300, 0x480, m_Key.Regs[typeof(DestroyingAngel)].ToString());
Code: Select all
public override void OnResponse(NetState sender, RelayInfo info)
{
Code: Select all
else if (info.ButtonID == 17)
m_Key.WithdrawRegs( typeof(RecallRune), m_From );
Code: Select all
else if (info.ButtonID == 16)
m_Key.WithdrawRegs( typeof(DestroyingAngel), m_From );
Code: Select all
else if (info.ButtonID == 17)
Code: Select all
else if (info.ButtonID == 18)
Code: Select all
else if (info.ButtonID == 25)
{
if (m_Key.RecallRune > 0)
{
m_From.AddToBackpack(new RecallRune());
m_Key.RecallRune = (m_Key.RecallRune - 1);
m_From.SendGump(new SpellCastersKeyGump(m_From, m_Key));
}
else
{
m_From.SendMessage("You do not have any of that resource!");
m_From.SendGump(new SpellCastersKeyGump(m_From, m_Key));
m_Key.BeginCombine(m_From);
}
Code: Select all
else if (info.ButtonID == 24)
{
if (m_Key.KeyRing > 0)
{
m_From.AddToBackpack(new KeyRing());
m_Key.KeyRing = (m_Key.KeyRing - 1);
m_From.SendGump(new SpellCastersKeyGump(m_From, m_Key));
}
else
{
m_From.SendMessage("You do not have any of that resource!");
m_From.SendGump(new SpellCastersKeyGump(m_From, m_Key));
m_Key.BeginCombine(m_From);
}
}
Code: Select all
else if (info.ButtonID == 25)
Code: Select all
else if (info.ButtonID == 26)