-
Notifications
You must be signed in to change notification settings - Fork 8
/
answers.lic
70 lines (64 loc) · 2.63 KB
/
answers.lic
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
=begin
This script answers all your questions.
author: Tillmen ([email protected])
game: Gemstone
tags: jail, hooligan
=end
game_months = [ 'Lormesta', 'Fashanos', 'Charlatos', 'Olaesta', 'Ivastaen', 'Lumnea', 'Koaratos', 'Phoenatos', 'Imaerasta', 'Jastatos', 'Eoantos', 'Eorgaen' ]
game_days = [ 'Restday', 'Volnes', 'Tilamaires', 'Leyan', 'Niiman', 'Day of the Huntress', 'Feastday' ]
town_list = {
'[Dragonspine and Imflass]' => 'teras',
'[Town Square, West]' => 'landing',
}
unless town = town_list[checkroom]
unless town = script.vars[1]
room = Room.current
if room.location =~ /Wehnimer's/
town = 'landing'
elsif room.location =~ /Icemule/
town = 'icemule'
elsif room.location =~ /Solhaven/
town = 'solhaven'
else
echo "unable to figure out what town you're in... start the script with ;answers <town name>"
exit
end
end
end
game_time = proc {
offset = -18000
if Time.now.dst?
offset += 3600
end
Time.at(Time.now.to_f + XMLData.server_time_offset.to_f).getlocal(offset)
}
while line = get
if line =~ /^(?:The city official says, "|The muffled voice of a guard echoes from beyond the cell door, "Roll call! Time to make sure you're still alive and causing me grief! )#{checkname}, ANSWER me these questions in order, one at a time, and within two minutes. What is (.*?), (.*?), and (.*?)\?\"$/
for question in [ $1, $2, $3 ]
sleep 3 + rand(5)
if question == "your name"
fput "answer #{Char.name.downcase}"
elsif question == "your gender"
fput "answer #{Char.gender.downcase}"
elsif question == "your race"
fput "answer #{Char.race.downcase}"
elsif question == "your profession"
fput "answer #{Char.prof.downcase}"
elsif question == "the name of the city you were charged in for your crimes"
fput "answer #{town}"
elsif question == "the number of the hour of the day in elven time"
fput "answer #{game_time.call.hour}"
elsif question == "today's day of the week"
fput "answer #{game_days[game_time.call.wday]}"
elsif question == "today's month"
fput "answer #{game_months[game_time.call.month-1]}"
elsif question == "the year"
fput "answer #{game_time.call.year+3100}"
end
end
elsif line =~ /^With that, the official walks over to you and sets you free\.|^You do remember the judge telling you that you need to pick up your belongings as soon as possible, lest they be sold to the poor\.|^You ponder what you should do now for a moment, and realize that since you've served your punishments,/
break
elseif line == "YOU HAVE BEEN IDLE TOO LONG. PLEASE RESPOND."
put 'exp'
end
end