Player Last_huh Verbs #11
Aliases: Player Last_huh Verbs
4 verbs · 4 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
@* | this none this | rxd | #11 | 43 |
give hand | this none this | rxd | #11 | 24 |
get take | this none this | rxd | #11 | 20 |
drop throw | this none this | rxd | #11 | 20 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
key | #1 | c | #2 | <clear> |
aliases | #1 | rc | #2 | {"Player Last_huh Verbs"} |
description | #1 | rc | #2 | "A repository of last-resort player verbs to be called by $player:last_huh" |
object_size | #1 | r | #36 | {4598, 1539462952} |
Ancestry
Ancestors (nearest first): #1 Root Class
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(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
give hand
Referenced by
none
Source
1"{last_huh} give any to any"; 2"a give \"verb\" that works for non-$things."; 3set_task_perms(caller_perms()); 4if (((verb == "give") && (dobjstr == "up")) && (!prepstr)) 5player:tell("Try this instead: @quit"); 6elseif (dobj == $nothing) 7player:tell("What do you want to give?"); 8elseif (iobj == $nothing) 9player:tell("To whom/what do you want to give it?"); 10elseif ($command_utils:object_match_failed(dobj, dobjstr) || $command_utils:object_match_failed(iobj, iobjstr)) 11"...lose..."; 12elseif (dobj.location != player) 13player:tell("You don't have that!"); 14elseif (iobj.location != player.location) 15player:tell("I don't see ", iobj.name, " here."); 16else 17dobj:moveto(iobj); 18if (dobj.location == iobj) 19player:tell("You give ", dobj:title(), " to ", iobj.name, "."); 20iobj:tell(player.name, " gives you ", dobj:title(), "."); 21else 22player:tell("Either that doesn't want to be given away or ", iobj.name, " doesn't want it."); 23endif 24endif
get take
Referenced by
none
Source
1"{last_huh} get/take any"; 2"a take \"verb\" that works for non-$things."; 3set_task_perms(caller_perms()); 4if (dobj == $nothing) 5player:tell(verb, " what?"); 6elseif ($command_utils:object_match_failed(dobj, dobjstr)) 7"...lose..."; 8elseif (dobj.location == player) 9player:tell("You already have that!"); 10elseif (dobj.location != player.location) 11player:tell("I don't see that here."); 12else 13dobj:moveto(player); 14if (dobj.location == player) 15player:tell("Taken."); 16player.location:announce(player.name, " takes ", dobj.name, "."); 17else 18player:tell("You can't pick that up."); 19endif 20endif
drop throw
Referenced by
none
Source
1"{last_huh} drop/throw any"; 2"a drop \"verb\" that works for non-$things."; 3set_task_perms(caller_perms()); 4if (dobj == $nothing) 5player:tell(verb, " what?"); 6elseif ($command_utils:object_match_failed(dobj, dobjstr)) 7"...lose..."; 8elseif (dobj.location != player) 9player:tell("You don't have that."); 10elseif (!player.location:acceptable(dobj)) 11player:tell("You can't drop that here."); 12else 13dobj:moveto(player.location); 14if (dobj.location == player.location) 15player:tell_lines((verb[1] == "d") ? "Dropped." | "Thrown."); 16player.location:announce(player.name, (verb[1] == "d") ? " dropped " | " threw away ", dobj.name, "."); 17else 18player:tell_lines("You can't seem to drop that here."); 19endif 20endif