Some simple examples I threw together for this system, but hoping to get back to bringing life to towns and npcs in the coming year. Merry Christmas UO fans!
You could try.. (FindItemByType instead of FindItemsByType)
if (from.Backpack.FindItemByType(typeof(PortableAnvil)) != null && from.Backpack.FindItemByType(typeof(PortableForge)) != null)
{
return 0; // if both are found
}
I was responding to your original gump question..which would have been, in public static void HandleSpeech(Mobile vendor, SpeechEventArgs e)
case 0x0002: // *bank*
{
e.Handled = true...
If you want all indirect damage to work in the same way, I think just, return true; at the original place I showed.
Line 571 of SpellHelper.cs
https://github.com/ServUO/ServUO/blob/6d5e5c69ff0f40322e559793ace9f6bcb9c40e9a/Scripts/Spells/Base/SpellHelper.cs#L571
It's part of public static bool ValidIndirectTarget(Mobile from, Mobile to), which is what you want with an explosion potion.
Look to Explode in BaseExplosionPotion.cs to see where its called. (Indirect Targets..)
Check out all my videos of UO features at https://www.youtube.com/channel/UCYXr7jC9TBB_B8tZfI-70rA
Share! Like! and Subscribe! If you'd like to.
A random subscriber will be selected to receive a feature at special milestones.