-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoracle.txt
35 lines (24 loc) · 1.95 KB
/
oracle.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
@@ Oracle
@@ An oracle character that makes use of the ChatGPT 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, u(func_secure,%1))));@http/post %!/speak=[get_mushgpt_url()], %q0
&SPEAK Oracle=th setq(1,[u(func_secure,trim(json_query(edit(%0,\\u2013,-,\\u2014,-,\\u2018,',\\u2019,',\\u201c,',\\u201d,'), get, message),"))]);@break strmatch(%q1,Failed:*)=say Some sort of trouble is brewing. Take shelter.;say %q1
&FUNC_SECURE Oracle=[edit(regeditall(%0,\\$,),\%,,\[,,\],,#,,&,,\",",\\n\\n,%r,\\n,%r,\\,,)]
&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