-
Notifications
You must be signed in to change notification settings - Fork 0
/
look.cmd
71 lines (58 loc) · 1.59 KB
/
look.cmd
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
include libmaster.cmd
###############################
### IDLE ACTION TRIGGERS
###############################
action var look.openDoor 1 when ^($friends)'s face appears in the
action var look.teach 1; var look.topic $2 ; var look.target $1 when ^($friends) whispers, \"teach (\S+)\"$
###############################
### VARIABLES
###############################
if (!($lastLookGametime >0)) then put #var lastLookGametime 0
if !(matchre("$scriptlist", "reconnect")) then {
put .reconnect
}
###############################
### MAIN
###############################
look.loop:
if ($standing = 0) then gosub stand
if (%look.openDoor = 1) then gosub look.door
pause 2
gosub look.look
goto look.loop
###############################
### METHODS
###############################
look.door:
if (%look.openDoor = 0) then goto look.loop
gosub unlock door
gosub open door
var look.openDoor 0
goto look.loop
look.houseMove:
put .house
waitforre ^HOUSE DONE
goto look.loop
look.look:
evalmath nextLookAt $lastLookGametime + 240
if (%nextLookAt < $gametime) then {
gosub tdp
put #var lastLookGametime $gametime
}
return
look.teach:
if ($lib.class = 1) then {
gosub assess teach
if contains("$lib.classTopic", "%look.topic") then {
put whisper %look.target I am already teaching you $class.
var look.teach 0
return
}
gosub stop teach
}
if ($lib.student = 1) then {
gosub stop listen
}
gosub teach %look.topic to %look.target
var look.teach 0
return