1 | static BigInteger points = bigint(0); |
2 | |
3 | static void loadPointBot() { |
4 | load("points"); |
5 | } |
6 | |
7 | static S answerPointBot(S s) { |
8 | if (match("plus one", s) || match("good", s) || match("nice", s) |
9 | || match("nice one", s) |
10 | || match_dropping("gut", "sehr", s) || match("jawohl", s) |
11 | || match("ganz recht", s)) { |
12 | plusPoint(); |
13 | ret "OK"; |
14 | } |
15 | |
16 | if (match_dropping("how many points", "did you get got again and", s) |
17 | || match_dropping("wie viele punkte", "hast du", s) |
18 | || match_dropping("wieviele punkte", "hast du", s)) |
19 | ret str(points); |
20 | |
21 | null; |
22 | } |
23 | |
24 | static void plusPoint() { |
25 | points = points.add(bigint(1)); |
26 | log("PointBot", "+1"); |
27 | save("points"); |
28 | } |
Began life as a copy of #1002952
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002953 |
Snippet name: | Simple Point Bot (include) |
Eternal ID of this version: | #1002953/1 |
Text MD5: | c98277da77baccc9fe9164a341bc2cdd |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-04-11 00:36:38 |
Source code size: | 701 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 689 / 904 |
Referenced in: | [show references] |