Guest User

Untitled

a guest
Jan 7th, 2018
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. log = "######NEW DRAGON REPORT SCRIPT RUN######"
  2.  
  3. set_variable = { which = global_dragon_num value = 0 }
  4.  
  5. log = "Info: Searching for dragons..."
  6. if = {
  7. limit = {
  8. any_character = {
  9. trait = dragon
  10. is_alive = yes
  11. NOR = { trait = employmarshall }
  12. always = yes
  13. }
  14. }
  15. log = "Info: The living dragons are: "
  16. set_global_flag = flag_dragon_found
  17. while = {
  18. limit = { has_global_flag = flag_dragon_found }
  19. clr_global_flag = flag_dragon_found
  20. any_character = {
  21. limit = {
  22. trait = dragon
  23. is_alive = yes
  24. NOT = { trait = employmarshall}
  25. }
  26. set_global_flag = flag_dragon_found
  27. change_variable = { which = global_dragon_num value = 1 }
  28. if = {
  29. limit = {
  30. any_friend = {
  31. is_alive = yes
  32. trait = dragon_rider
  33. }
  34. }
  35. any_friend = {
  36. is_alive = yes
  37. trait = dragon_rider
  38. log = "Info: [Prev.GetFullName]([Prev.GetID]) is a [Prev.GetAgeYears] year old dragon ridden by [This.GetFullName] ([This.GetID])."
  39. }
  40. }
  41. else_if = {
  42. limit = {
  43. any_friend = {
  44. is_alive = yes
  45. NOT = { trait = dragon_rider }
  46. }
  47. }
  48. if = {
  49. limit = { NOT = { age = 1 } }
  50. any_friend = {
  51. is_alive = yes
  52. NOT = { trait = dragon_rider }
  53. log = "Info: [Prev.GetFullName]([Prev.GetID]) is an untamed hatchling owned by [This.GetFullName] ([This.GetID])."
  54. }
  55. }
  56. else = {
  57. any_friend = {
  58. is_alive = yes
  59. NOT = { trait = dragon_rider }
  60. log = "Info: [Prev.GetFullName]([Prev.GetID]) is a [Prev.GetAgeYears] year old untamed dragon owned by [This.GetFullName] ([This.GetID])."
  61. }
  62. }
  63.  
  64. }
  65. else = {
  66. if = {
  67. limit = { NOT = { age = 1 } }
  68. log = "Info: [This.GetFullName]([This.GetID]) is a wild dragon that is still a hatchling."
  69. }
  70. else = {
  71. log = "Info: [This.GetFullName]([This.GetID]) is a [This.GetAgeYears] year old wild dragon."
  72. }
  73. }
  74. add_trait = employmarshall
  75. }
  76. }
  77. if = {
  78. limit = { check_variable = { which = global_dragon_num value > 1 } }
  79. log = "Info: There are a total of [global_dragon_num.GetValue] living dragons."
  80. }
  81. else_if = {
  82. limit = { check_variable = { which = global_dragon_num value == 1 } }
  83. log = "Info: There is only 1 living dragon."
  84. }
  85. }
  86. else = {
  87. log = "Info: There are no living dragons."
  88. }
  89. while = {
  90. limit = { dragon = { trait = employmarshall } }
  91. dragon = { remove_trait = employmarshall }
  92. }
  93. any_character = {
  94. limit = {trait = employmarshall}
  95. log = "WARN: [This.GetFullName] ([This.GetID]) still has employmarshall set."
  96. }
  97.  
  98. set_variable = { which = global_total_dragons which = global_dragon_num }
  99. set_variable = { which = global_dragon_num value = 0 }
  100.  
  101. if = {
  102. dragon = {
  103. is_alive = no
  104. NOT = { trait = employmarshall}
  105. NAND = { #Eliminate fake dragon parents
  106. age = 30
  107. martial = 0
  108. # death_reason = DEATH_BY_NATURE
  109. }
  110. # year_of_birth = 8200
  111. }
  112. log = "Info: The dead dragons are:"
  113. set_global_flag = flag_dragon_found
  114. while = {
  115. limit = { has_global_flag = flag_dragon_found }
  116. clr_global_flag = flag_dragon_found
  117. dragon = {
  118. limit = {
  119. trait = dragon
  120. is_alive = no
  121. NOT = { trait = employmarshall}
  122. NAND = { #Eliminate fake dragon parents
  123. age = 30
  124. martial = 0
  125. # death_reason = DEATH_BY_NATURE
  126. }
  127. # year_of_birth = 8200
  128. }
  129. set_global_flag = flag_dragon_found
  130. change_variable = { which = global_dragon_num value = 1 }
  131. if = {
  132. limit = { age > 1 }
  133. log = "Info: [This.GetFullName]([This.GetID]) was a dragon that lived for [This.GetAgeYears] years. It [This.GetDeathReason] on [This.GetDeathDate]."
  134. }
  135. else_if = {
  136. limit = { age == 1 }
  137. log = "Info: [This.GetFullName]([This.GetID]) was a dragon that lived for [This.GetAgeYears] year. It [This.GetDeathReason] on [This.GetDeathDate]."
  138. }
  139. else_if = {
  140. limit = { death_reason = death_sickly_dragon }
  141. log = "Info: [This.GetFullName]([This.GetID]) was a dragon that died while less than a year old. It [This.GetDeathReason] on [This.GetDeathDate]."
  142. }
  143. else = {
  144. log = "Info: [This.GetFullName]([This.GetID]) was a dragon that [This.GetDeathReason] on [This.GetDeathDate], not even living a full year."
  145. }
  146. add_trait = employmarshall
  147. }
  148. }
  149. if = {
  150. limit = { check_variable = { which = global_dragon_num value > 1 } }
  151. log = "Info: There are a total of [global_dragon_num.GetValue] dead dragons."
  152. }
  153. else_if = {
  154. limit = { check_variable = { which = global_dragon_num value == 1 } }
  155. log = "Info: There is only 1 dead dragon."
  156. }
  157. }
  158. else = {
  159. log = "Info: There are no dead dragons."
  160. }
  161. while = {
  162. limit = { dragon = { trait = employmarshall } }
  163. dragon = { remove_trait = employmarshall }
  164. }
  165. any_character = {
  166. limit = {trait = employmarshall}
  167. log = "WARN: [This.GetFullName] ([This.GetID]) still has employmarshall set."
  168. }
  169.  
  170. change_variable = {which = global_total_dragons which = global_dragon_num }
  171. if = {
  172. limit = { check_variable = { which = global_total_dragons value > 1 } }
  173. log = "Info: There were a total of [global_total_dragons.GetValue] dragons during the history of this game."
  174. }
  175. else_if = {
  176. limit = { check_variable = { which = global_total_dragons value == 1 } }
  177. log = "Info: There has only been 1 dragon during the entire history of this game."
  178. }
  179. else = {
  180. log = "Info: There were no dragons during the history of this game."
  181. }
  182.  
  183. set_variable = { which = global_total_dragons = value 0 }
  184. set_variable = { which = global_dragon_num = value 0 }
  185. clr_global_flag = flag_dragon_found
Advertisement
Add Comment
Please, Sign In to add comment