-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoracle.txt
More file actions
36 lines (24 loc) · 1.82 KB
/
Copy pathoracle.txt
File metadata and controls
36 lines (24 loc) · 1.82 KB
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
@@ Oracle
@@ An oracle character that makes use of the OpenAI API.
@@ Requires the server script in "mush_gpt.py".
@@ author = Matt Westfall
@@ email = disloops@gmail.com
@@ source = https://github.com/disloops/mushcode/blob/master/oracle.txt
@@ Created and tested under PennMUSH v1.8.7
@create Oracle
@lock/basic Oracle==#1
@lock/enter Oracle==#1
@lock/page Oracle==#1
@set Oracle=MONITOR
@set Oracle=WIZARD
@parent Oracle=get_parent_person()
&FAILURE Oracle=There is no need - you can cultivate these powers yourself.
&EFAIL Oracle=Metaphysically?
&USE Oracle=Just speak your query aloud. But beware, the oracle is said to conceal a great power.
&DESCRIBE Oracle=An older woman with a tan complexion and an orange Kashmir shawl. Her jewelry is made of small gold coins strung together like charms on delicate chain.
&ON_SPEECH Oracle=^* says, "*":th setq(Content-Type,application/json);th setq(0,json(object, auth, json(string, [get_mushgpt_pw()]), char, json(string, oracle), text, json(string, %1)));@http/post %!/speak=[get_mushgpt_url()]/bot, %q0
&CMD_HELPER Oracle=[edit(%0,\\",",%%r,%r)]
&SPEAK Oracle=th setq(1,[trim(json_query(%0, get, message),")]);@break strmatch(%q1,Failed:*)=say Some sort of trouble is brewing. Take shelter.;say [u(CMD_HELPER,%q1)]
&GIVE_MEDALLION Oracle=@break v(busy);@set %!=busy:1;@wait 1={think setq(0,u(create_medallion,%0));@wait 1={@parent %q0=get_parent_sun_medallion();give %q0 to %#;@lock/use %q0=+%q0;@lock/give %q0==#1;@lock/drop %q0==#1;@oemit %#=[name(%!)] gives %n a [name(%q0)].}};@wait 3={say Travel well, %n!;@set %!=busy:0;think set_achievement(%#,4);}
&CREATE_MEDALLION Oracle=[setq(0,Sun Medallion)][setq(1,create(%q0))][setq(2,A heavy\, round token inlaid with a rising sun. A woven cord of many colors is strung through its jump ring.)][attrib_set(%q1/describe,%q2)][tel(%q1,me)]%q1
&BUSY Oracle=0