Player Last_huh Verbs #11

Parent #1Owner #2Flags readSource QuestCore.db

Aliases: Player Last_huh Verbs

4 verbs · 4 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
@*this none thisrxd#1143
give handthis none thisrxd#1124
get takethis none thisrxd#1120
drop throwthis none thisrxd#1120

Properties

PropertyDefinerFlagsOwnerValue
key#1c#2<clear>
aliases#1rc#2{"Player Last_huh Verbs"}
description#1rc#2"A repository of last-resort player verbs to be called by $player:last_huh"
object_size#1r#36{4598, 1539462952}

Ancestry

Ancestors (nearest first): #1 Root Class

Children: none

Call graph

calls n11_0 #11:@* n6_10 #6:notify n11_0->n6_10 n20_5 #20:from_list n11_0->n20_5 n6_7 #6:my_match_object n11_0->n6_7 n56_0 #56:object_match_failed n11_0->n56_0 n11_1 #11:give n11_1->n56_0 n6_18 #6:tell n11_1->n6_18 n11_2 #11:get n11_2->n56_0 n11_2->n6_18 n11_3 #11:drop n11_3->n56_0 n11_3->n6_18 n6_79 #6:tell_lines n11_3->n6_79

Source

@*

Spec this none thisFlags rxdOwner #2Definer #11

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

Spec this none thisFlags rxdOwner #2Definer #11

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

Spec this none thisFlags rxdOwner #2Definer #11

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

Spec this none thisFlags rxdOwner #2Definer #11

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