Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- log = "######NEW DRAGON REPORT SCRIPT RUN######"
- set_variable = { which = global_dragon_num value = 0 }
- log = "Info: Searching for dragons..."
- if = {
- limit = {
- any_character = {
- trait = dragon
- is_alive = yes
- NOR = { trait = employmarshall }
- always = yes
- }
- }
- log = "Info: The living dragons are: "
- set_global_flag = flag_dragon_found
- while = {
- limit = { has_global_flag = flag_dragon_found }
- clr_global_flag = flag_dragon_found
- any_character = {
- limit = {
- trait = dragon
- is_alive = yes
- NOT = { trait = employmarshall}
- }
- set_global_flag = flag_dragon_found
- change_variable = { which = global_dragon_num value = 1 }
- if = {
- limit = {
- any_friend = {
- is_alive = yes
- trait = dragon_rider
- }
- }
- any_friend = {
- is_alive = yes
- trait = dragon_rider
- log = "Info: [Prev.GetFullName]([Prev.GetID]) is a [Prev.GetAgeYears] year old dragon ridden by [This.GetFullName] ([This.GetID])."
- }
- }
- else_if = {
- limit = {
- any_friend = {
- is_alive = yes
- NOT = { trait = dragon_rider }
- }
- }
- if = {
- limit = { NOT = { age = 1 } }
- any_friend = {
- is_alive = yes
- NOT = { trait = dragon_rider }
- log = "Info: [Prev.GetFullName]([Prev.GetID]) is an untamed hatchling owned by [This.GetFullName] ([This.GetID])."
- }
- }
- else = {
- any_friend = {
- is_alive = yes
- NOT = { trait = dragon_rider }
- log = "Info: [Prev.GetFullName]([Prev.GetID]) is a [Prev.GetAgeYears] year old untamed dragon owned by [This.GetFullName] ([This.GetID])."
- }
- }
- }
- else = {
- if = {
- limit = { NOT = { age = 1 } }
- log = "Info: [This.GetFullName]([This.GetID]) is a wild dragon that is still a hatchling."
- }
- else = {
- log = "Info: [This.GetFullName]([This.GetID]) is a [This.GetAgeYears] year old wild dragon."
- }
- }
- add_trait = employmarshall
- }
- }
- if = {
- limit = { check_variable = { which = global_dragon_num value > 1 } }
- log = "Info: There are a total of [global_dragon_num.GetValue] living dragons."
- }
- else_if = {
- limit = { check_variable = { which = global_dragon_num value == 1 } }
- log = "Info: There is only 1 living dragon."
- }
- }
- else = {
- log = "Info: There are no living dragons."
- }
- while = {
- limit = { dragon = { trait = employmarshall } }
- dragon = { remove_trait = employmarshall }
- }
- any_character = {
- limit = {trait = employmarshall}
- log = "WARN: [This.GetFullName] ([This.GetID]) still has employmarshall set."
- }
- set_variable = { which = global_total_dragons which = global_dragon_num }
- set_variable = { which = global_dragon_num value = 0 }
- if = {
- dragon = {
- is_alive = no
- NOT = { trait = employmarshall}
- NAND = { #Eliminate fake dragon parents
- age = 30
- martial = 0
- # death_reason = DEATH_BY_NATURE
- }
- # year_of_birth = 8200
- }
- log = "Info: The dead dragons are:"
- set_global_flag = flag_dragon_found
- while = {
- limit = { has_global_flag = flag_dragon_found }
- clr_global_flag = flag_dragon_found
- dragon = {
- limit = {
- trait = dragon
- is_alive = no
- NOT = { trait = employmarshall}
- NAND = { #Eliminate fake dragon parents
- age = 30
- martial = 0
- # death_reason = DEATH_BY_NATURE
- }
- # year_of_birth = 8200
- }
- set_global_flag = flag_dragon_found
- change_variable = { which = global_dragon_num value = 1 }
- if = {
- limit = { age > 1 }
- log = "Info: [This.GetFullName]([This.GetID]) was a dragon that lived for [This.GetAgeYears] years. It [This.GetDeathReason] on [This.GetDeathDate]."
- }
- else_if = {
- limit = { age == 1 }
- log = "Info: [This.GetFullName]([This.GetID]) was a dragon that lived for [This.GetAgeYears] year. It [This.GetDeathReason] on [This.GetDeathDate]."
- }
- else_if = {
- limit = { death_reason = death_sickly_dragon }
- log = "Info: [This.GetFullName]([This.GetID]) was a dragon that died while less than a year old. It [This.GetDeathReason] on [This.GetDeathDate]."
- }
- else = {
- log = "Info: [This.GetFullName]([This.GetID]) was a dragon that [This.GetDeathReason] on [This.GetDeathDate], not even living a full year."
- }
- add_trait = employmarshall
- }
- }
- if = {
- limit = { check_variable = { which = global_dragon_num value > 1 } }
- log = "Info: There are a total of [global_dragon_num.GetValue] dead dragons."
- }
- else_if = {
- limit = { check_variable = { which = global_dragon_num value == 1 } }
- log = "Info: There is only 1 dead dragon."
- }
- }
- else = {
- log = "Info: There are no dead dragons."
- }
- while = {
- limit = { dragon = { trait = employmarshall } }
- dragon = { remove_trait = employmarshall }
- }
- any_character = {
- limit = {trait = employmarshall}
- log = "WARN: [This.GetFullName] ([This.GetID]) still has employmarshall set."
- }
- change_variable = {which = global_total_dragons which = global_dragon_num }
- if = {
- limit = { check_variable = { which = global_total_dragons value > 1 } }
- log = "Info: There were a total of [global_total_dragons.GetValue] dragons during the history of this game."
- }
- else_if = {
- limit = { check_variable = { which = global_total_dragons value == 1 } }
- log = "Info: There has only been 1 dragon during the entire history of this game."
- }
- else = {
- log = "Info: There were no dragons during the history of this game."
- }
- set_variable = { which = global_total_dragons = value 0 }
- set_variable = { which = global_dragon_num = value 0 }
- clr_global_flag = flag_dragon_found
Advertisement
Add Comment
Please, Sign In to add comment