This repository has been archived by the owner on Dec 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlambdaMooAssignmentPart2.txt
181 lines (163 loc) · 4.88 KB
/
lambdaMooAssignmentPart2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
I made the counter called counter14455
@show #14544
Object ID: #14544
Name: counter14455
Parent: Generic Traffic Counter (#3731)
Location: steven.glasford (#14397)
Owner: steven.glasford (#14397)
Flags: r
Verb definitions:
enterfunc
report
traffic
Property definitions:
vistorlist
visitorslist
Properties:
key: 0
aliases: {"counter14455"}
description: ""
object_size: {0, 0}
x: 0
y: 0
z: 0
gui: 0
detail_url: "defaultImage"
detail_prefix: "detail"
detail_index: 0
image_index: 0
image_url: "defaultImage"
image_prefix: "images"
sound_prefix: "sounds"
sound_url: "defaultSound"
sound_index: 0
scale_percent: 0
enter_directive: "#E"
mouth_x: 0
mouth_y: 0
object_prefix: "#OBJECT"
position: {0, 0, 0}
pict: ""
orig_owner: 0
drop_failed_msg: "You can't seem to drop %t here."
drop_succeeded_msg: "You drop %t."
odrop_failed_msg: "tries to drop %t but fails!"
odrop_succeeded_msg: "drops %t."
otake_succeeded_msg: "picks up %t."
otake_failed_msg: ""
take_succeeded_msg: "You take %t."
take_failed_msg: "You can't pick that up."
vistorlist: 0
visitorslist: {{#14397, 1, 1574644378}}
You can find the dollarg name by looking at the scripts, also I have properly described the counter
look at "counter14455"
a robot that keeps the list of people that enter the room
within counter I have three scripts
@show #14544:enterfunc
#14544:enterfunc
Owner: steven.glasford (#14397)
Permissions: rxd
Direct Object: this
Preposition: none
Indirect Object: this
the script in the counter14455
"";
" enterfunc: influences in the elections of a counter";
"";
pass(@args);
visitor = args[1];
$g.counter14455:traffic(visitor);
@show #14544:report
#14544:report
Owner: steven.glasford (#14397)
Permissions: rd
Direct Object: this
Preposition: none
Indirect Object: none
The script for report
"";
" report : produce a report";
"";
counter = this;
for line in (counter.visitorslist)
player:tell($string_utils:nn(line[1]), line[2], $time_utils:mmddyy(line[3]));
endfor
@show #14544:traffic
#14544:traffic
Owner: steven.glasford (#14397)
Permissions: rxd
Direct Object: this
Preposition: none
Indirect Object: this
"";
" traffic: track people enter and leaving the visitorlist";
"";
counter = this;
newthing = args[1];
player:tell("Welcome");
firstcol = $list_utils:slice(counter.visitorslist);
newindex = newthing in firstcol;
if (newindex > 0)
player:tell("Hi there ", newthing.name, " we are please to meet again. ");
counter.visitorslist[newindex][2] = counter.visitorslist[newindex][2] + 1;
else
player:tell("Bonjour ", newthing.name, " fancy meeting you. ");
counter.visitorslist = {@counter.visitorslist, {newthing, 1, time()}};
endif
For the property vistorslist I have this
@show #14544.visitorslist
#14544.visitorslist
Owner: steven.glasford (#14397)
Permissions: rc
Value: {{#14397, 1, 1574644378}, {#14564, 2, 1574645386}}
Also in my room that I created I have another enterfunc value
@show #14455:enterfunc
#14455:enterfunc
Owner: steven.glasford (#14397)
Permissions: rxd
Direct Object: this
Preposition: none
Indirect Object: this
"";
" enterfunc: influence the traffic controller ";
"";
pass(@args);
visitor = args[1];
$g.counter14455:traffic(visitor);
The report function works
report counter14455
steven.glasford (#14397)111/24/19
dylan.reid.smith (#14564)211/24/19
Also the report function works here is the script
@show #14544:report
#14544:report
Owner: steven.glasford (#14397)
Permissions: rd
Direct Object: this
Preposition: none
Indirect Object: none
"";
" report : produce a report";
"";
counter = this;
for line in (counter.visitorslist)
player:tell($string_utils:nn(line[1]), line[2], " ", $time_utils:mmddyy(line[3]), " ", $time_utils:ampm(line[3]));
endfor
the report function now works and includes the when function and the lastest person to enter the room, this function works by showing the last person to enter last
report counter14455
steven.glasford (#14397)1 11/24/19 7:12 p.m.
dylan.reid.smith (#14564)2 11/24/19 7:29 p.m.
@audit me
Objects owned by steven.glasford (from #0 to #14616):
#14397 steven.glasford [Rainbowland]
#14444 psychonaut
#14448 psycho
#14455 Rainbowland
#14456 rainbow *Fall 2019 Ante Roo->Rainbowland
#14457 anteroom Rainbowland->*Fall 2019 Ante Roo
#14463 closet,backroom "Backroom"
#14464 Backroom
#14465 closet Rainbowland->Backroom
#14466 back Backroom->Rainbowland
#14544 counter14455 [steven.glasford]
-- 11 objects.----------------------------------------------------------------