I have this one which has been around a long time- tested it still works :)
 

Attachments

  • Gabes2to1.cs
    1.6 KB · Views: 16
Not sure what you mean- the deed is deleted with use. I only posted this since one was not found on the forum
 
Not sure what you mean- the deed is deleted with use. I only posted this since one was not found on the forum
I'm mean next:
public class GabesToOT : Target
{
private GabesToO m_GToO;

public GabesToOT(GabesToO GToO) : base(1, false, TargetFlags.None)
{
m_GToO = GToO;
}

protected override void OnTarget(Mobile from, object target)
{
// this variables not needed, becouse we make reference to the deed in constructor: m_GToO = GToO;
Item selx = from.Backpack.FindItemByType(typeof(GabesToO)); // make crash if deed not in pack
Item GNS = from.Backpack.FindItemByType(typeof(GabesToO));
// target not checked backpack, we can drop deed and dupe targets and use deed anywhere
// target not checked if this deed deleted, similarly, we can dupe targets any number

if (target is BaseWeapon)
{
// Item needNS = (Item)target; similarly not needed if we have next line with BaseWeapon
BaseWeapon weapon = target as BaseWeapon;
if (needNS.RootParent == from)
{
weapon.Layer = Layer.OneHanded;
selx.Delete();
from.SendMessage(38, "the weapon is now one handed");
}
else
from.SendMessage(38, "It should be in your backpack");
}
else
from.SendMessage(38, "Can only enhance Weapons");
}
}[/code]
 
Back