ID:2343124
 
Code:
obj/MagicForce
verb/MagicForce(Num as null|num)
set category="Skills"
set src in usr
if(Num)
Num=round(Num)
if(Num<1) Num=1
if(Num>4) Num=4


Problem description:
I want to have the verb run from the player entering MagicForce 2 in the command line, or when they call it directly as MagicForce without the number, it will ask for it. Later in the code I have a prompt if Num is not set. The issue is that whenever I use the verb without the Number attached, I get a prompt asking for input as num, cancel or none.
The only way to avoid the prompt with an "as" argument is to pass a value to it, either in command line or macro form. The prompt appearing is tied to the argument itself, which the verb gathers before any of its actual code executes.