ID:135044
 
Could hascall be improved to return 2 for verbs, 1 for procs, and 0 if nothing is found?

Existing entry:
Format:
hascall(Object,ProcName)
Args:
Object: source of proc or verb
ProcName: name of proc or verb ("MyProc")
Returns:
1 if object has such a proc or verb; 0 otherwise


~Polatrite~
Define "verb" versus "proc". =) Internally they're exactly the same thing.

I suppose it could check to see if the proc is in the verb list of the Object, which would be useful because AFAIK it's impossible to do so yourself. ("verbs" being a not-really-list and all.)
I looked at this recently too. I decided to check to see whether the player has it in his verbs list.
In response to PirateHead
Perhapse rather than simply returning TRUE, it could return the type path of the procedure. You could then check anyone's verbs lists for example.
In response to Yota
Okay, how about this one:

hascall() can stay as it is. It's a good procedure. What we need is hasverb() and hasproc(), specified versions of hascall(). It is possible to "soft" code these, but it's not very efficient! Thanks.