Advertisement
botsothoth

Bot-Sothoth: Call of Cthulhu aliases for Avrae

Feb 22nd, 2022 (edited)
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.00 KB | None | 0 0
  1. ==========================================================================================
  2. Bot-Sothoth: Call of Cthulhu aliases for Avrae
  3. v3 - 13 AUG 2022
  4. ==========================================================================================
  5.  
  6. Here is a non-workshop method for implementing the CoC aliases for Avrae.
  7.  
  8. Instructions:
  9. 1. Invite the Avrae bot to your Discord server: http://invite.avrae.io/
  10. If Avrae already exists on your server, ignore this step.
  11. 2. Please ensure that you have either Administrator status, or the role "Server Aliaser",
  12. in the Discord server. Otherwise it won't work.
  13. 3. Copy & paste each block of code between the dashed linebreaks (--------------),
  14. making sure to include the "!servalias _____ embed" parts
  15.  
  16. * Deleting aliases:
  17. Type "!servalias remove _____" (replacing the blank with the alias name)
  18. eg: "!servalias remove skill" will delete the !skill command
  19. NOTE: aliases can only be removed one by one, due to the nature of using "servalias"
  20.  
  21. ------
  22.  
  23. Coding and implementation carried forward by bothsothoth with original creator's blessing.
  24. Which was originally based off scripts by reddit user qballds. Feel free to modify, but
  25. please credit somewhere. Thanks!
  26.  
  27.  
  28.  
  29. ------------------------------------------------------------------------------------------
  30. !skill
  31. ------------------------------------------------------------------------------------------
  32.  
  33. !servalias skill embed
  34.  
  35. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  36. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  37. {{d=vroll("1d100")}}
  38. {{(txt := (" ".join(&ARGS&[1:])))}}
  39. {{(t := txt) if "&2&".isalpha() else (t := "Skill")}}
  40.  
  41. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"You achieve a critical success!" if (d.total<2) else f"You achieve an extreme success!" if (d.total<floor(1+(s//5))) else f"You achieve a hard success!" if (d.total<floor(1+(s//2))) else f"You succeed your attempt!" if (d.total<(1+s)) else f"Pray, now." if (d.total>99) else f"You fumble your attempt (critical failure)!" if ((d.total>95) and (s<50)) else f"You fail your attempt!"}}
  42.  
  43. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} makes a {t.title()} ({s}%) check"}}"
  44.  
  45. -desc "{{f"Please specify a number (optional skill name), eg: `!skill 50` or `!skill 50 driving`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Full:** {s} / **Hard:** {s//2} / **Extreme:** {s//5} \n \n **Roll:** {d} \n \n **Result:** {r}"}}"
  46.  
  47. -color <color>
  48.  
  49.  
  50.  
  51. ------------------------------------------------------------------------------------------
  52. !skill+
  53. ------------------------------------------------------------------------------------------
  54.  
  55. !servalias skill+ embed
  56.  
  57. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  58. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  59. {{d=vroll("((2d10kl1-1)*10)+1d10")}}
  60. {{(txt := (" ".join(&ARGS&[1:])))}}
  61. {{(t := txt) if "&2&".isalpha() else (t := "Skill")}}
  62.  
  63. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"You achieve a critical success!" if (d.total<2) else f"You achieve an extreme success!" if (d.total<floor(1+(s//5))) else f"You achieve a hard success!" if (d.total<floor(1+(s//2))) else f"You succeed your attempt!" if (d.total<(1+s)) else f"Pray, now." if (d.total>99) else f"You fumble your attempt (critical failure)!" if ((d.total>95) and (s<50)) else f"You fail your attempt!"}}
  64.  
  65. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} makes a {t.title()} ({s}%) check with 1 bonus die"}}"
  66.  
  67. -desc "{{f"Please specify a number (optional skill name), eg: `!skill+ 50` or `!skill+ 50 driving`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Full:** {s} / **Hard:** {s//2} / **Extreme:** {s//5} \n \n **Roll:** {d} \n \n **Result:** {r}"}}"
  68.  
  69. -color <color>
  70.  
  71.  
  72.  
  73. ------------------------------------------------------------------------------------------
  74. !skill++
  75. ------------------------------------------------------------------------------------------
  76.  
  77. !servalias skill++ embed
  78.  
  79. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  80. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  81. {{d=vroll("((3d10kl1-1)*10)+1d10")}}
  82. {{(txt := (" ".join(&ARGS&[1:])))}}
  83. {{(t := txt) if "&2&".isalpha() else (t := "Skill")}}
  84.  
  85. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"You achieve a critical success!" if (d.total<2) else f"You achieve an extreme success!" if (d.total<floor(1+(s//5))) else f"You achieve a hard success!" if (d.total<floor(1+(s//2))) else f"You succeed your attempt!" if (d.total<(1+s)) else f"Pray, now." if (d.total>99) else f"You fumble your attempt (critical failure)!" if ((d.total>95) and (s<50)) else f"You fail your attempt!"}}
  86.  
  87. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} makes a {t.title()} ({s}%) check with 2 bonus dice"}}"
  88.  
  89. -desc "{{f"Please specify a number (optional skill name), eg: `!skill++ 50` or `!skill++ 50 driving`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Full:** {s} / **Hard:** {s//2} / **Extreme:** {s//5} \n \n **Roll:** {d} \n \n **Result:** {r}"}}"
  90.  
  91. -color <color>
  92.  
  93.  
  94.  
  95. ------------------------------------------------------------------------------------------
  96. !skill-
  97. ------------------------------------------------------------------------------------------
  98.  
  99. !servalias skill- embed
  100.  
  101. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  102. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  103. {{d=vroll("((2d10kh1-1)*10)+1d10")}}
  104. {{(txt := (" ".join(&ARGS&[1:])))}}
  105. {{(t := txt) if "&2&".isalpha() else (t := "Skill")}}
  106.  
  107. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"You achieve a critical success!" if (d.total<2) else f"You achieve an extreme success!" if (d.total<floor(1+(s//5))) else f"You achieve a hard success!" if (d.total<floor(1+(s//2))) else f"You succeed your attempt!" if (d.total<(1+s)) else f"Pray, now." if (d.total>99) else f"You fumble your attempt (critical failure)!" if ((d.total>95) and (s<50)) else f"You fail your attempt!"}}
  108.  
  109. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} makes a {t.title()} ({s}%) check with 1 penalty die"}}"
  110.  
  111. -desc "{{f"Please specify a number (optional skill name), eg: `!skill- 50` or `!skill- 50 driving`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Full:** {s} / **Hard:** {s//2} / **Extreme:** {s//5} \n \n **Roll:** {d} \n \n **Result:** {r}"}}"
  112.  
  113. -color <color>
  114.  
  115.  
  116.  
  117. ------------------------------------------------------------------------------------------
  118. !skill--
  119. ------------------------------------------------------------------------------------------
  120.  
  121. !servalias skill-- embed
  122.  
  123. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  124. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  125. {{d=vroll("((3d10kh1-1)*10)+1d10")}}
  126. {{(txt := (" ".join(&ARGS&[1:])))}}
  127. {{(t := txt) if "&2&".isalpha() else (t := "Skill")}}
  128.  
  129. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"You achieve a critical success!" if (d.total<2) else f"You achieve an extreme success!" if (d.total<floor(1+(s//5))) else f"You achieve a hard success!" if (d.total<floor(1+(s//2))) else f"You succeed your attempt!" if (d.total<(1+s)) else f"Pray, now." if (d.total>99) else f"You fumble your attempt (critical failure)!" if ((d.total>95) and (s<50)) else f"You fail your attempt!"}}
  130.  
  131. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} makes a {t.title()} ({s}%) check with 2 penalty dice"}}"
  132.  
  133. -desc "{{f"Please specify a number (optional skill name), eg: `!skill-- 50` or `!skill-- 50 driving`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Full:** {s} / **Hard:** {s//2} / **Extreme:** {s//5} \n \n **Roll:** {d} \n \n **Result:** {r}"}}"
  134.  
  135. -color <color>
  136.  
  137.  
  138.  
  139. ------------------------------------------------------------------------------------------
  140. !sanity
  141. ------------------------------------------------------------------------------------------
  142.  
  143. !servalias sanity embed
  144.  
  145. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  146. {{d=vroll("1d100")}}
  147. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  148. {{(txt := (" ".join(&ARGS&[1:])))}}
  149.  
  150. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"You pass!" if (d.total<(s+1)) else f"You fail!"}}
  151.  
  152. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} makes a Sanity check"}}"
  153.  
  154. -desc "{{f"Please specify a number, eg: `!sanity 50`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Current SAN:** {s} \n \n **Roll:** {d} \n \n **Result:** {r}"}}"
  155.  
  156. -color <color>
  157.  
  158.  
  159.  
  160. ------------------------------------------------------------------------------------------
  161. !skillup
  162. ------------------------------------------------------------------------------------------
  163.  
  164. !servalias skillup embed
  165.  
  166. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  167. {{(s := int("&1&")) if "&1&".isdigit() else (s := "1")}}
  168. {{d=vroll("1d100")}}
  169. {{(txt := (" ".join(&ARGS&[1:])))}}
  170. {{(t := txt) if "&2&".isalpha() else (t := "Skill")}}
  171. {{(damt := int(d.total))}}
  172. {{id=vroll("1d10")}}
  173. {{(idamt := int(id.total))}}
  174. {{(ia := int(idamt+s))}}
  175. {{sd=vroll("2d6")}}
  176. {{ir=f"\n \n Also... **Mastery achieved!** Increase SAN by: \n {sd}" if ((damt>int(s)) and (ia>89) and (int(s)<90)) else f""}}
  177.  
  178. {{r=f"" if ("&*&"=="") or not ("&1&".isdigit()) else f"Success! Improve {t.title()} by: \n {id}" if (damt>s) else f"Extreme success! Improve {t.title()} by: \n {id}" if (damt>95) else f"No improvement this time."}}
  179.  
  180. -title "{{f"Error" if ("&*&"=="") or not ("&1&".isdigit()) else f"{CHARNAME} attempts to improve {t.title()} ({s}%)"}}"
  181.  
  182. -desc "{{f"Please specify a number (optional skill name), eg: `!skillup 50` or `!skillup 50 driving`" if ("&*&"=="") or not ("&1&".isdigit()) else f"**Roll:** {d} \n \n **Result:** {r}{ir}"}}"
  183.  
  184. -color <color>
  185.  
  186.  
  187.  
  188. ------------------------------------------------------------------------------------------
  189. !setname
  190. ------------------------------------------------------------------------------------------
  191.  
  192. !servalias setname embed
  193.  
  194. {{set_uvar_nx("CHARNAME", ctx.author.display_name)}}
  195. {{(old := CHARNAME)}}
  196. {{(new := "&*&")}}
  197. {{(set_uvar("CHARNAME", ctx.author.display_name)) if "&*&"=="" else (set_uvar("CHARNAME", new.title()))}}
  198.  
  199. -title "{{f"Name reset" if "&*&"=="" else f"Name set!"}}"
  200.  
  201. -desc "{{f"Character's name is now your username. \n Changed from `{old}` > `{CHARNAME}` \n \n Type `!setname [name]` if you want to set a custom name" if "&*&"=="" else f"Character's name changed from `{old}` > `{CHARNAME}`"}}"
  202.  
  203. -color <color>
  204.  
  205.  
  206.  
  207. ------------------------------------------------------------------------------------------
  208. !setcolor
  209. ------------------------------------------------------------------------------------------
  210.  
  211. !servalias setcolor embed
  212.  
  213. {{(set_uvar("color", "rainbow")) if "&*&"=="" else (set_uvar("color", "&*&"))}}
  214.  
  215. -title "{{f"Error" if "&*&"=="" else f"Color changed!"}}"
  216.  
  217. -desc "{{f"Please enter a valid 6-digit hex number, eg: `!setcolor 0000ff`" if "&*&"=="" else f"<-- Check bar to the left to confirm your choice"}}"
  218.  
  219. -color <color>
  220.  
  221.  
  222.  
  223. ------------------------------------------------------------------------------------------
  224. !cochelp
  225. ------------------------------------------------------------------------------------------
  226.  
  227. !servalias cochelp embed
  228. -title "Call of Cthulhu commands"
  229. -desc "
  230. ***Skill checks:***
  231.  
  232. *General:*
  233. `!skill [value] [skill name]`
  234. eg: `!skill 20 driving` to check your success/failure for 'Driving (20%)'
  235.  
  236. *With Bonus:*
  237. `!skill+ [value] [skill name]`
  238. `!skill++ [value] [skill name]`
  239. eg: `!skill+ 20 driving` to check with 1 bonus die
  240.  
  241. *With Penalty:*
  242. `!skill- [value] [skill name]`
  243. `!skill-- [value] [skill name]`
  244. eg: `!skill- 20 driving` to check with 1 penalty die
  245.  
  246. ---------------
  247.  
  248. ***Sanity:***
  249.  
  250. `!sanity [value]`
  251. eg: `!sanity 20` to check your SAN success/failure
  252.  
  253. ---------------
  254.  
  255. ***Skill improvement:***
  256.  
  257. `!skillup [value] [skill name]`
  258. eg: `!skillup 20 driving` to see if you improve your Driving skill
  259.  
  260. ---------------
  261.  
  262. ***Set your name:***
  263. `!setname` then follow instructions
  264.  
  265. ***Set color:***
  266. `!setcolor` then follow instructions"
  267.  
  268.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement