{ switch(atoi(arg)) // change this and you are set, just make sure you put this in an alternate menu function
// and have some sort of case statement elsewhere to determaine the state
{
case '1':
create_item();
break;
case '2':
edit_item();
break;
case '3':
destroy_item();
break;
default:
send_to_char("Leaving the crafting menu.\n\r",ch);
ch->desc->altmenu = ALTMENU_NONE; // do this to return to standard input mode ;)
return;
}
}
return;
}
I have created some code for crafting items, and would like to change how it works, instead of using a series of arguments, to be more menu driven.
for example: blacksmith epic helmet "if all required items are in inventory, it creates the helmet"
instead, I would like to have players type craft, which enters a menu system, somewhat like an olc editor.
the code:
The code compiles, but, when the craft command is issued, it prints all the send_to_chars, and returns, it does not wait for an input character.
Do I need to add an ED_CRAFT, to change the player's state?
Or, should I mimic the OLC editors?
Aleister