Advertisement
MichaelMaxwell

Script

Jun 9th, 2017
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1.  
  2. *create showrand true
  3. *create critfail false
  4. *create luckmod 0
  5. *create nat20 false
  6. *create ultrafail false
  7. *create nocritfail false
  8. *create DeactivateRand false
  9. *create NonRandDC 0
  10. *create rollfail false
  11. *create rollresult 0
  12. *create rollsuccess false
  13. *create activatedice false
  14. *create activaterand10 true
  15. *create activaterand2 true
  16. *create activaterand20 true
  17. *create activaterand3 true
  18. *create activaterand4 true
  19. *create activaterand6 true
  20. *create activaterand8 true
  21. *create DCrange 0
  22. *create d10 0
  23. *create d2 0
  24. *create d20 0
  25. *create d3 0
  26. *create d4 0
  27. *create d6 0
  28. *create d8 0
  29. *create percentiledice 0
  30.  
  31. The template to use the agility check script \/-\/
  32. *set DCrange (insert desired DC)
  33. *gosub_scene MISC agilitycheck
  34. *if critfail
  35. (result if critically fail)
  36. *if nat20
  37. (result if critically succeeded)
  38. *if rollfail
  39. (result if failed)
  40. *if rollsuccess
  41. (result if succeeded)
  42.  
  43.  
  44. The script for both randomized and non-randomized agility check \/-\/
  45. *label agilitycheck
  46. *gosub_scene MISC skillconversion
  47. *if DeactivateRand
  48. *gosub_scene MISC skillconversion100
  49. *gosub rollreset
  50. *if showrand
  51. (agility([b]${agilitymod}[/b])
  52. *if luckmod != 0
  53. + Luck([b]${luckmod}[/b])
  54. | DC = ${DCrange} or above)
  55.  
  56. *set rollresult (agilitymod + luckmod)
  57. *if rollresult < DCrange
  58. *set critfail false
  59. *set nat20 false
  60. *set rollfail true
  61. *set rollsuccess false
  62. *goto return
  63. *if rollresult >= DCrange
  64. *set critfail false
  65. *set nat20 false
  66. *set rollfail false
  67. *set rollsuccess true
  68. *goto return
  69. *if activaterand20
  70. *if nocritfail = true
  71. *rand d20 2 20
  72. *if nocritfail = false
  73. *rand d20 1 20
  74. *if showrand
  75. (rolling D20 ([b]${d20}[/b]) + agility([b]${agilitymod}[/b])
  76. *if luckmod != 0
  77. + Luck([b]${luckmod}[/b])
  78. | DC = ${DCrange} or above)
  79.  
  80. *set rollresult ((d20 + agilitymod) + luckmod)
  81. *gosub rollreset
  82. *if d20 = 1
  83. *set critfail true
  84. *set nat20 false
  85. *set rollsuccess false
  86. *set rollfail false
  87. *goto return
  88. *if d20 = 20
  89. *set critfail false
  90. *set nat20 true
  91. *set rollsuccess false
  92. *set rollfail false
  93. *goto return
  94. *if rollresult < DCrange
  95. *set critfail false
  96. *set nat20 false
  97. *set rollfail true
  98. *set rollsuccess false
  99. *goto return
  100. *if rollresult >= DCrange
  101. *set critfail false
  102. *set nat20 false
  103. *set rollfail false
  104. *set rollsuccess true
  105. *goto return
  106. *goto errordroppedfromline
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement