1
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
if(isObject($menu::YesNo))
$menu::YesNo.delete();
$menu::YesNo = $class::menuSystem.newMenuObject("YesNo","Menu YesNo");
$menu::YesNo.addMenuItem("Yes","%a=1");
$menu::YesNo.addMenuItem("No","%a=1");
if(isObject($menu::Crafting))
$menu::Crafting.delete();
$menu::Crafting = $class::menuSystem.newMenuObject("Crafting","What would you like to do to the Wood?");
$menu::Crafting.setname("CraftingMenu");
$menu::Crafting.class = "CraftingMenu";
$menu::Crafting.addMenuItem("Craft Bow Handle","$menu::crafting.setTempBody(\"Enter an Amount or type ALL\");$menu::crafting.showInputMenu(#CLIENT);");//"$menu::Crafting.showInputMenu(#CLIENT);");
$menu::Crafting.addMenuItem("Craft Handle (for weapons/tools)","$menu::crafting.setTempBody(\"Enter an Amount or type ALL\");$menu::crafting.showInputMenu(#CLIENT);");//"$class::Crafting.ageSelected(#CLIENT.ndSelection);");
$menu::Crafting.addMenuItem("Craft Arrow Shafts","");//"$class::Crafting.useColors(#CLIENT.ndSelection);");
package class_menu_crafting_wood
{
function menuObject::onInputValueRecieved(%this,%client,%value)
{
if(%this.name $= "crafting")
{
%selected = %this.selected[%client];
if(%selected $= "craft arrow Shafts")
{
%type = "Arrow Shafts";
}
else
if(%selected $= "craft handle (for weapons/tools)")
{
%type = "Handle";
}
else
if(%selected $= "Craft Bow handle")
{
%type = "Bow Handle";
}
%inventoryItemSelected = getWord(%client.lastInventoryItemSelected,0);
%recipe = $class::crafting.getRecipe(%inventoryItemSelected @ " " @ %type);
if(!isObject(%recipe))
{
talk("The wood classes are: Pine, Oak, Willow, Maple");
return parent::onInputValueRecieved(%this,%client,%value);
}
%client.craftingStart(%recipe,%value);
}
return parent::onInputValueRecieved(%this,%client,%value);
}
};
activatePackage(class_menu_crafting_wood);
-snip-
this may sound a bit naive, but doesn't this already exist