Player Last_huh Verbs #336
Aliases: Player Last_huh Verbs
1 verbs · 10 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
@* | this none this | rxd | #336 | 43 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
aliases | #1 | rc | #361 | {"Player Last_huh Verbs"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {0, 0} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #1 root
Children: none
Call graph
Source
@*
Referenced by
none
Source
1"{last_huh} @<msg_name> <object> is [<text>]"; 2"If <text> is given calls <object>:set_message(<msg_name>,<text>),"; 3"otherwise prints the value of the specified message property"; 4set_task_perms(caller_perms()); 5nargs = length(args); 6pos = "is" in args; 7if (pos == 1) 8player:notify(tostr("Usage: ", verb, " <object> is <message>")); 9return; 10endif 11dobjstr = $string_utils:from_list(args[1..pos - 1], " "); 12message = $string_utils:from_list(args[pos + 1..nargs], " "); 13msg_name = verb[2..$]; 14dobj = player:my_match_object(dobjstr); 15if ($command_utils:object_match_failed(dobj, dobjstr)) 16"... oh well ..."; 17elseif (pos == nargs) 18if (E_PROPNF == (get = `dobj.(msg_name + "_msg") ! ANY')) 19player:notify(tostr(dobj.name, " (", dobj, ") has no \"", msg_name, "\" message.")); 20elseif (typeof(get) == ERR) 21player:notify(tostr(get)); 22elseif (!get) 23player:notify("Message is not set."); 24else 25player:notify(tostr("The \"", msg_name, "\" message of ", dobj.name, " (", dobj, "):")); 26player:notify($su:escape(tostr(get))); 27endif 28else 29set = dobj:set_message(msg_name, message); 30if (set) 31if (typeof(set) == STR) 32player:notify(set); 33else 34player:notify(tostr("You set the \"", msg_name, "\" message of ", dobj.name, " (", dobj, ").")); 35endif 36elseif (set == E_PROPNF) 37player:notify(tostr(dobj.name, " (", dobj, ") has no \"", msg_name, "\" message to set.")); 38elseif (typeof(set) == ERR) 39player:notify(tostr(set)); 40else 41player:notify(tostr("You clear the \"", msg_name, "\" message of ", dobj.name, " (", dobj, ").")); 42endif 43endif