npc_test_pcre.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. //===== rAthena Script =======================================
  2. //= Sample: PCRE
  3. //===== By: ==================================================
  4. //= rAthena Dev Team
  5. //===== Current Version: =====================================
  6. //= 20100108
  7. //===== Description: =========================================
  8. //= Demonstrates PCRE commands.
  9. //============================================================
  10. prontera,152,181,5 script MouseJstr 763,{
  11. // hello
  12. Lquote0:
  13. npctalk "How do you do. Please state your problem.";
  14. end;
  15. // computer
  16. Lquote1:
  17. switch(rand(4)) {
  18. case 0: npctalk "Do computers worry you?"; break;
  19. case 1: npctalk "What do you think about machines?"; break;
  20. case 2: npctalk "Why do you mention computers?"; break;
  21. case 3: npctalk "What do you think machines have to do with your problem?"; break;
  22. }
  23. end;
  24. // name
  25. Lquote2:
  26. npctalk "I am not interested in names";
  27. end;
  28. // sorry
  29. Lquote3:
  30. switch(rand(3)) {
  31. case 0: npctalk "Please don't apologize"; break;
  32. case 1: npctalk "Apologies are not necessary"; break;
  33. case 2: npctalk "What feelings do you have when you apologize"; break;
  34. }
  35. end;
  36. // I remember $@p2$
  37. Lquote4:
  38. switch(rand(6)) {
  39. case 0: npctalk "Do you often think of "+$@p2$+"?"; break;
  40. case 1: npctalk "Does thinking of "+$@p2$+" bring anything else to mind?"; break;
  41. case 2: npctalk "What else do you remember?"; break;
  42. case 3: npctalk "Why do you recall "+$@p2$+" right now?"; break;
  43. case 4: npctalk "What in the present situation reminds you of "+$@p2$+"?"; break;
  44. case 5: npctalk "What is the connection between me and "+$@p2$+"?"; break;
  45. }
  46. end;
  47. // do you remember
  48. Lquote5:
  49. switch (rand(4)) {
  50. case 0: npctalk "Did you think I would forget "+$@p2$+" ?"; break;
  51. case 1: npctalk "Why do you think I should recall "+$@p2$+" now"; break;
  52. case 2: npctalk "What about "+$@p2$+""; break;
  53. case 3: npctalk "You mentioned "+$@p2$+""; break;
  54. }
  55. end;
  56. // if
  57. Lquote6:
  58. switch(rand(4)) {
  59. case 0: npctalk "Do you really think its likely that "+$@p2$+""; break;
  60. case 1: npctalk "Do you wish that "+$@p2$+"?"; break;
  61. case 2: npctalk "What do you think about "+$@p2$+"?"; break;
  62. case 3: npctalk "Really-- if "+$@p2$+"?"; break;
  63. }
  64. end;
  65. // i dreamt
  66. Lquote7:
  67. switch(rand(3)) {
  68. case 0: npctalk "Really-- "+$@p2$+""; break;
  69. case 1: npctalk "Have you ever fantasized "+$@p2$+" while you were awake?"; break;
  70. case 2: npctalk "Have you dreamt "+$@p2$+" before?"; break;
  71. }
  72. end;
  73. // dream about
  74. Lquote8:
  75. npctalk "How do you feel about "+$@p2$+" in reality?";
  76. end;
  77. // dream
  78. Lquote9:
  79. switch(rand(4)) {
  80. case 0: npctalk "What does this dream suggest to you?"; break;
  81. case 1: npctalk "Do you dream often?"; break;
  82. case 2: npctalk "What persons appear in your dreams?"; break;
  83. case 3: npctalk "Don't you believe that dream has to do with your problem?"; break;
  84. }
  85. end;
  86. // my mother
  87. Lquote10:
  88. switch(rand(2)) {
  89. case 0: npctalk "Who else in your family "+$@p2$+""; break;
  90. case 1: npctalk "Tell me more about your family"; break;
  91. }
  92. end;
  93. // my father
  94. Lquote11:
  95. switch(rand(3)) {
  96. case 0: npctalk "Your father"; break;
  97. case 1: npctalk "Does he influence you strongly?"; break;
  98. case 2: npctalk "What else comes to mind when you think of your father?"; break;
  99. }
  100. end;
  101. // I want
  102. Lquote12:
  103. switch(rand(3)) {
  104. case 0: npctalk "What would it mean if you got "+$@p2$+""; break;
  105. case 1: npctalk "Why do you want "+$@p2$+""; break;
  106. case 2: npctalk "Suppose you got "+$@p2$+" soon"; break;
  107. }
  108. end;
  109. // I am glad
  110. Lquote13:
  111. switch(rand(3)) {
  112. case 0: npctalk "How have I helped you to be "+$@p2$+""; break;
  113. case 1: npctalk "What makes you happy just now"; break;
  114. case 2: npctalk "Can you explain why you are suddenly "+$@p2$+""; break;
  115. }
  116. end;
  117. // I am sad
  118. Lquote14:
  119. switch(rand(2)) {
  120. case 0: npctalk "I am sorry to hear you are depressed"; break;
  121. case 1: npctalk "I'm sure its not pleasant to be sad"; break;
  122. }
  123. end;
  124. // $@p2 are like "+$@p3$+"
  125. Lquote15:
  126. npctalk "What resemblance do you see between "+$@p2$+" and "+$@p3$+"";
  127. end;
  128. // "+$@p2$+" is like "+$@p3$+"
  129. Lquote16:
  130. switch(rand(4)) {
  131. case 0: npctalk "In what way is it that "+$@p2$+" is like "+$@p3$+""; break;
  132. case 1: npctalk "What resemblance do you see?"; break;
  133. case 2: npctalk "Could there really be some connection?"; break;
  134. case 3: npctalk "How?"; break;
  135. }
  136. end;
  137. // alike
  138. Lquote17:
  139. switch(rand(2)) {
  140. case 0: npctalk "In what way?"; break;
  141. case 1: npctalk "What similarities are there?"; break;
  142. }
  143. end;
  144. // same
  145. Lquote18:
  146. npctalk "What other connections do you see?";
  147. end;
  148. // I was "+$@p2$+"
  149. Lquote19:
  150. switch(rand(3)) {
  151. case 0: npctalk "Were you really?"; break;
  152. case 1: npctalk "Perhaps I already knew you were "+$@p2$+""; break;
  153. case 2: npctalk "Why do you tell me you were "+$@p2$+" now?"; break;
  154. }
  155. end;
  156. // was I
  157. Lquote20:
  158. switch(rand(3)) {
  159. case 0: npctalk "What if you were "+$@p2$+" ?"; break;
  160. case 1: npctalk "Do you thin you were "+$@p2$+""; break;
  161. case 2: npctalk "What would it mean if you were "+$@p2$+""; break;
  162. }
  163. end;
  164. // I am
  165. Lquote21:
  166. switch(rand(2)) {
  167. case 0: npctalk "In what way are you "+$@p2$+""; break;
  168. case 1: npctalk "Do you want to be "+$@p2$+" ?"; break;
  169. }
  170. end;
  171. // am I
  172. Lquote22:
  173. switch(rand(4)) {
  174. case 0: npctalk "Do you believe you are "+$@p2$+""; break;
  175. case 1: npctalk "Would you want to be "+$@p2$+""; break;
  176. case 2: npctalk "You wish I would tell you you are "+$@p2$+""; break;
  177. case 3: npctalk "What would it mean if you were "+$@p2$+""; break;
  178. }
  179. end;
  180. // am
  181. Lquote23:
  182. switch(rand(2)) {
  183. case 0: npctalk "Why do you say AM?"; break;
  184. case 1: npctalk "I don't understand that"; break;
  185. }
  186. end;
  187. // are you
  188. Lquote24:
  189. switch(rand(3)) {
  190. case 0: npctalk "Why are you interested in whether I am "+$@p2$+" or not?"; break;
  191. case 1: npctalk "Would you prefer if I weren't "+$@p2$+""; break;
  192. case 2: npctalk "Perhaps I am "+$@p2$+" in your fantasies"; break;
  193. }
  194. end;
  195. // you are
  196. Lquote25:
  197. npctalk "What makes you think I am "+$@p2$+" ?";
  198. end;
  199. // because
  200. Lquote26:
  201. switch(rand(3)) {
  202. case 0: npctalk "Is that the real reason?"; break;
  203. case 1: npctalk "What other reasons might there be?"; break;
  204. case 2: npctalk "Does that reason seem to explain anything else?"; break;
  205. }
  206. end;
  207. // were you
  208. Lquote27:
  209. switch(rand(3)) {
  210. case 0: npctalk "Perhaps I was "+$@p2$+""; break;
  211. case 1: npctalk "What do you think?"; break;
  212. case 2: npctalk "What if I had been "+$@p2$+""; break;
  213. }
  214. end;
  215. // I can't
  216. Lquote28:
  217. switch(rand(2)) {
  218. case 0: npctalk "Maybe you could "+$@p3$+" now"; break;
  219. case 1: npctalk "What if you could "+$@p3$+" ?"; break;
  220. }
  221. end;
  222. // I feel
  223. Lquote29:
  224. npctalk "Do you often feel "+$@p2$+" ?";
  225. end;
  226. // I felt
  227. Lquote30:
  228. npctalk "What other feelings do you have?";
  229. end;
  230. // $@p1$ I $@p2$ you $@p3$
  231. Lquote31:
  232. npctalk "Perhaps in your fantasy we "+$@p3$+" each other?";
  233. end;
  234. // why don't you
  235. Lquote32:
  236. switch(rand(3)) {
  237. case 0: npctalk "Should you "+$@p3$+" yourself?"; break;
  238. case 1: npctalk "Do you believe I don't "+$@p3$+""; break;
  239. case 2: npctalk "Perhaps I will "+$@p3$+" in good time"; break;
  240. }
  241. end;
  242. // yes
  243. Lquote33:
  244. switch(rand(3)) {
  245. case 0: npctalk "You seem quite positive"; break;
  246. case 1: npctalk "You are sure?"; break;
  247. case 2: npctalk "I understand"; break;
  248. }
  249. end;
  250. // no
  251. Lquote34:
  252. switch(rand(3)) {
  253. case 0: npctalk "Why not?"; break;
  254. case 1: npctalk "You are being a bit negative"; break;
  255. case 2: npctalk "Are you saying NO just to be negative?"; break;
  256. }
  257. end;
  258. // someone
  259. Lquote35:
  260. npctalk "Can you be more specific?";
  261. end;
  262. // everyone
  263. Lquote36:
  264. switch(rand(4)) {
  265. case 0: npctalk "surely not everyone"; break;
  266. case 1: npctalk "Can you think of anyone in particular?"; break;
  267. case 2: npctalk "Who for example?"; break;
  268. case 3: npctalk "You are thinking of a special person?"; break;
  269. }
  270. end;
  271. // always
  272. Lquote37:
  273. switch(rand(4)) {
  274. case 0: npctalk "Can you think of a specific example?"; break;
  275. case 1: npctalk "When?"; break;
  276. case 2: npctalk "What incident are you thinking of?"; break;
  277. case 3: npctalk "Really-- always?"; break;
  278. }
  279. end;
  280. // what
  281. Lquote38:
  282. switch(rand(5)) {
  283. case 0: npctalk "Why do you ask?"; break;
  284. case 1: npctalk "Does that question interest you?"; break;
  285. case 2: npctalk "What is it you really want to know?"; break;
  286. case 3: npctalk "What do you think?"; break;
  287. case 4: npctalk "What comes to your mind when you ask that?"; break;
  288. }
  289. end;
  290. // perhaps
  291. Lquote39:
  292. npctalk "You do not seem quite certain";
  293. end;
  294. // are
  295. Lquote40:
  296. switch(rand(2)) {
  297. case 0: npctalk "Did you think they might not be "+$@p2$+""; break;
  298. case 1: npctalk "Possibly they are "+$@p2$; break;
  299. }
  300. end;
  301. // default
  302. Lquote41:
  303. switch(rand(6)) {
  304. case 0: npctalk "Very interesting"; break;
  305. case 1: npctalk "I am not sure I understand you fully"; break;
  306. case 2: npctalk "What does that suggest to you?"; break;
  307. case 3: npctalk "Please continue"; break;
  308. case 4: npctalk "Go on"; break;
  309. case 5: npctalk "Do you feel strongly about discussing such things?"; break;
  310. }
  311. end;
  312. OnInit:
  313. defpattern 1, "([^:]+):.*\\shello.*", "Lquote0";
  314. defpattern 1, "([^:]+):.*\\scomputer.*", "Lquote1";
  315. defpattern 1, "([^:]+):.*\\sname.*", "Lquote2";
  316. defpattern 1, "([^:]+):.*\\ssorry.*", "Lquote3";
  317. defpattern 1, "([^:]+):.*\\si\\s+remember\\s+(.*)", "Lquote4";
  318. defpattern 1, "([^:]+):.*\\sdo\\s+you\\s+remember\\s+(.*)", "Lquote5";
  319. defpattern 1, "([^:]+):.*\\sif\\s+(.*)", "Lquote6";
  320. defpattern 1, "([^:]+):.*\\si\\s+dreamt\\s+(.*)", "Lquote7";
  321. defpattern 1, "([^:]+):.*\\sdream\\s+about\\s+(.*)", "Lquote8";
  322. defpattern 1, "([^:]+):.*\\sdream\\s+(.*)", "Lquote9";
  323. defpattern 1, "([^:]+):.*\\smy\\s+mother\\s+(.*)", "Lquote10";
  324. defpattern 1, "([^:]+):.*\\smy\\s+father\\s+(.*)", "Lquote11";
  325. defpattern 1, "([^:]+):.*\\si\\s+want\\s+(.*)", "Lquote12";
  326. defpattern 1, "([^:]+):.*\\si\\s+am\\s+glad\\s+(.*)", "Lquote13";
  327. defpattern 1, "([^:]+):\\s+(.*)\\s+i\\s+am\\s+sad\\s+(.*)", "Lquote14";
  328. defpattern 1, "([^:]+):\\s+(.*)\\s+are\\s+like\\s+(.*)", "Lquote15";
  329. defpattern 1, "([^:]+):\\s+(.*)\\s+is\\s+like\\s+(.*)", "Lquote16";
  330. defpattern 1, "([^:]+):.*\\salike\\s+(.*)", "Lquote17";
  331. defpattern 1, "([^:]+):.*\\ssame\\s+(.*)", "Lquote18";
  332. defpattern 1, "([^:]+):.*\\si\\s+was\\s+(.*)", "Lquote19";
  333. defpattern 1, "([^:]+):.*\\swas\\s+i\\s+(.*)", "Lquote20";
  334. defpattern 1, "([^:]+):.*\\si\\s+am\\s+(.*)", "Lquote21";
  335. defpattern 1, "([^:]+):.*\\sam\\s+i\\s+(.*)", "Lquote22";
  336. defpattern 1, "([^:]+):.*\\sam\\s+(.*)", "Lquote23";
  337. defpattern 1, "([^:]+):.*\\sare\\s+you\\s+(.*)", "Lquote24";
  338. defpattern 1, "([^:]+):.*\\syou\\s+are\\s+(.*)", "Lquote25";
  339. defpattern 1, "([^:]+):.*\\sbecause\\s+(.*)", "Lquote26";
  340. defpattern 1, "([^:]+):.*\\swere\\s+you\\s+(.*)", "Lquote27";
  341. defpattern 1, "([^:]+):.*\\si\\s+(cant|can't|cannot)\\s+(.*)", "Lquote28";
  342. defpattern 1, "([^:]+):.*\\si\\s+feel\\s+(.*)", "Lquote29";
  343. defpattern 1, "([^:]+):.*\\si\\s+felt\\s+(.*)", "Lquote30";
  344. defpattern 1, "([^:]+):.*\\si\\s+(.*)\\s+you\\s+(.*)", "Lquote31";
  345. defpattern 1, "([^:]+):.*\\swhy\\s+(don't|dont)\\s+you\\s+(.*)", "Lquote32";
  346. defpattern 1, "([^:]+):.*\\syes\\s+(.*)", "Lquote33";
  347. defpattern 1, "([^:]+):.*\\sno\\s+(.*)", "Lquote34";
  348. defpattern 1, "([^:]+):.*\\ssomeone\\s+(.*)", "Lquote35";
  349. defpattern 1, "([^:]+):.*\\severyone\\s+(.*)", "Lquote36";
  350. defpattern 1, "([^:]+):.*\\salways\\s+(.*)", "Lquote37";
  351. defpattern 1, "([^:]+):.*\\swhat\\s+(.*)", "Lquote38";
  352. defpattern 1, "([^:]+):.*\\sperhaps\\s+(.*)", "Lquote39";
  353. defpattern 1, "([^:]+):.*\\sare\\s+(.*)", "Lquote40";
  354. defpattern 1, "([^:]+):(.*)", "Lquote41";
  355. activatepset 1;
  356. end;
  357. }