# +---------------------------------- # | List of fight flags # +---------------------------------- # Target (The player you are attacking) # Server_Fight_Number (the fight number) # fight_CD (fight cooldown) # Leader_Warning (a warning flag for trying to fight a leader - they get a chance to back off) # Fight (fight ID for the players) # Fight_Turn (Whoever has this flag has the turn in the fight) # Fight_Unhealthy_Start (starting with less than full health) # Fighters_ (number of fighters and their names in a list) # Fight_Turn_Counter_ (Simple counter) # Attack # Fight_Attack # Fight_Dodged # Fight_Blocked # (returns the size of the list) # #.include[three|four] #]> < 5 #- adjust health:1 #- queue delay:5t Fight_Script: type: world events: # +---------------------------------- # | Fight Start # +---------------------------------- on fight command: - determine passively fulfilled # +- Conditions for a fight to begin # +---------------------------------- # Checking that they have exactly 1 argument (hopefully a playername.) - if ! { - narrate "You need to specify the playername you wish to fight!" } else { # Checking that they aren't on a fight Cooldown - if { - run Fight_Cant_Fight } else { # Checking that the player they are trying to fight is online # +- - if !p@.is_online { - if p@.is_online { - narrate "The player you are trying to fight isn't online" } else { # Checking that they are close enough to the other player. # +- - if ]> > 10 { - if ]> < 1 { - narrate "You're too far away to initiate a fight" } else { # Checking if player is already in a fight - if { - narrate "You're already in a fight! You have to finish it before you can start a new fight" } else { - if { - narrate "RUN LEADER THINGY" } # Checking if they are attempting to start a fight with a leader - if .in_group[Leader]> { - narrate "Leaders are always accompanied by 4 royal guards. If you are sure you want to start this fight. type the command one more time." - flag player Leader_Warning } else { # +---------------------------------- # Flagging server with Fight_Number (counts how many fights have been started.) - flag server Server_Fight_Number:++ - narrate "Fight number<&co> has started" # Assigning the players a target - flag player Target: - flag p@ Target: # assigning Unique fight name to the players - flag player Fight: - flag p@ Fight: # Defining %Fight% for use inside tags - define Fight # Making a list of all the players in the fight - flag global Fighters_%Fight%:|:| # Giving the players a health flag - flag player health: - if < 20 { - flag player Fight_Unhealthy_Start } - flag p@ health: - if .flag[health]> < 20 { - flag p@ Fight_Unhealthy_Start } # Announcing the fight - narrate "+-----------------------------------------------------+" - narrate "| Starting fight with<&co> " - narrate "+-----------------------------------------------------+" - narrate "+-----------------------------------------------------+" targets:p@ - narrate "| Starting fight with<&co> " targets:p@ - narrate "+-----------------------------------------------------+" targets:p@ - random { - run Fight_First_Turn_Attacker - run Fight_First_Turn_Attacker - run Fight_First_Turn_Defender } } } } } } } # +---------------------------------- # | Target # +---------------------------------- on Target command: - determine passively fulfilled # Checking if they chose a target - if ! { - narrate "You need to specify the playername you wish to target!" } else { # Checking if the target has the Fight flag - if !.has_flag[Fight]> { - narrate "The player you are trying to target, isn't in a fight" } else { # Checking if they are in the same fight - if .flag[Fight]> != { - narrate "The player you are trying to target is in a diferent fight." } else { # Setting new target - flag player Target: - narrate "You've targeted<&co> ." } } } # +---------------------------------- # | Attack # +---------------------------------- on attack command: - determine passively fulfilled # Defining %Fight% for use inside tags - define Fight # If the player was attacked and he did nothing to try and avoid it. It deals the damage - if { - if { - if == 1 { - flag player health:-:1 - if =< 0 { - narrate "YOU LOST" - run Fight_Dead - queue clear } - adjust health: - narrate "1 damage" targets: } - if == 2 { - flag player health:-:2 - if =< 0 { - narrate "YOU LOST" - run Fight_Dead - queue clear } - adjust health: - narrate "2 damage" targets: } - if == 3 { - flag player health:-:3 - if =< 0 { - narrate "YOU LOST" - run Fight_Dead - queue clear } - adjust health: - narrate "3 damage" targets: } - if == 4 { - flag player health:-:4 - if =< 0 { - narrate "YOU LOST" - run Fight_Dead - queue clear } - adjust health: - narrate "4 damage" targets: } - if == 5 { - flag player health:-:5 - if =< 0 { - narrate "YOU LOST" - run Fight_Dead - queue clear } - adjust health: - narrate "5 damage" targets: } - flag player Fight_Attack:! } - wait 2 - flag player Attack:! } else { # checks if they have a target - if == null { - narrate "You don't have a target to attack." - narrate "Please use /target to define a new target" } else { # checks if it's their turn - if == null { - run Fight_Not_Your_Turn } else { # Removing the players turn - flag player Fight_Turn:! # checks what weapon they have on them. - if == i@wood_sword { - run Fight_Attack_Wood_Sword } else { - if == i@stone_sword { - run Fight_Attack_Stone_Sword } else { - if == i@iron_sword { - run Fight_Attack_Iron_Sword } else { - if == i@gold_sword || i@diamond_sword { - run Fight_Attack_Gold_Sword } else { - if == i@wood_axe { - run Fight_Attack_Wood_Axe } else { - if == i@stone_axe { - run Fight_Attack_Stone_Axe } else { - if == i@iron_axe { - run Fight_Attack_Iron_Axe } else { - if == i@gold_axe || i@diamond_axe { - run Fight_Attack_Gold_Axe } else { # If they don't have a weapon, normal attack is used. - run Fight_Attack } } } } } } } } # [Temporary] Confirmation that it worked. - narrate "YOU ATTACK" # Adding one to the turn counter - flag server Fight_Turn_Counter_%Fight%:++ # Running the task script that determines who's turn it is. - run Fight_Turn_Chooser } } } # +---------------------------------- # | Shoot # +---------------------------------- on Shoot command: - determine passively fulfilled - if { - if { #Check for Bow #Check for CrossBow } else { - run Fight_Not_Your_Turn } } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | Throw # +---------------------------------- on Throw command: - determine passively fulfilled - if { - if { #Check for Daggers } else { - run Fight_Not_Your_Turn } } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | Dodge # +---------------------------------- on Dodge command: - determine passively fulfilled - if { - if { - run Fight_Dodge } else { - run Fight_Not_Your_Turn } } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | Block # +---------------------------------- on Block command: - determine passively fulfilled - if { - if { } else { - run Fight_Not_Your_Turn } } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | Taunt # +---------------------------------- on Taunt command: - determine passively fulfilled - if { - if { } else { - run Fight_Not_Your_Turn } } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | Escape # +---------------------------------- on escape command: - determine passively fulfilled - if { - if { } else { - run Fight_Not_Your_Turn } } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | forfeit # +---------------------------------- on forfeit command: - determine passively fulfilled - if { } else { - narrate "You need to be in a fight to use these commands" } # +---------------------------------- # | Roll # +---------------------------------- on roll command: - determine passively fulfilled - narrate " Rolled<&co> " targets: # +---------------------------------- # | Winner Commands # +---------------------------------- on kill command: - determine passively fulfilled - if { - if { - execute as_server "kill " } else { - narrate "You don't have an accepted VA to kill" } } on capture command: - determine passively fulfilled on mame command: - determine passively fulfilled on knock out command: - determine passively fulfilled on leave command: - determine passively fulfilled # +---------------------------------- # | Fight Debug # +---------------------------------- on Fight_Debug command: # Helps with debugging - determine passively fulfilled # Defining %Fight% for use inside tags - define Fight - define Fight_Turn_Counter - narrate "Fight Debug" - narrate "Your Fight flag ID is<&co> %Fight%" - narrate "Turn counter is<&co> " # - narrate "It's<&co> ]>" - narrate "It's<&co> 's turn" - narrate "Number of players in fight<&co> " - narrate "1<&co> " - narrate "2<&co> " - narrate "Your target is<&co> " - narrate "" - if { - narrate " It's your turn!" } else { - narrate " It's NOT your turn!" } # +---------------------------------- # | Fight Next_Turn # +---------------------------------- on Fight_Next_Turn command: # Forces the next turn - determine passively fulfilled # Defining %Fight% for use inside tags # [Temporary] Confirmation that it worked. - narrate "Forcing a new turn" - flag player Fight_Turn:! # Adding one to the turn counter - flag server Fight_Turn_Counter_%Fight%:++ # Running the task script that determines who's turn it is. - run Fight_Turn_Chooser # +---------------------------------- # | Fight Reset # +---------------------------------- on Fight_Reset command: # Reset everything - determine passively fulfilled # Defining %Fight% for use inside tags - define Fight # general flags # - flag server Server_Fight_Number:! - flag global Fighters_%Fight%:! - flag server Fight_Turn_Counter_%Fight%:! - flag player Fight:! - flag player Fight_Turn:! - flag player Leader_Warning:! - flag player Target:! # Attack Flags - flag player Attack:! - flag player Fight_Attack:! - flag player Fight_Dodged:! - flag player Fight_Blocked:! - narrate "All Fight information Deleted" # +---------------------------------- # | Attack Damage # +---------------------------------- Fight_Attack: type: task Script: # Check if the player attempted to Dodge - if { # Lower chances of a good hit by 20 - define random - 20 - flag player Fight_Dodged:! # Check if the player attempted to Block } else if { # Lower chances of a good hit by 20 - define random - 20 - flag player Fight_Blocked:! } else { # Check if the player didn't attempt to dodge or block, roll with full range - define random } # Checking the random number, to determine the amount of damage it will hit for. - if %random% =< 20 { - narrate "rolled %random%" - run Fight_Attack_0 } else if %random% > 20 && =< 40 { - narrate "rolled %random%" - run Fight_Attack_1 } else if %random% > 40 && =< 60 { - narrate "rolled %random%" - run Fight_Attack_2 } else if %random% > 60 && =< 80 { - narrate "rolled %random%" - run Fight_Attack_3 } else if %random% > 80 && =< 100 { - narrate "rolled %random%" - run Fight_Attack_4 } # - random { # - run Fight_Attack_0 # - run Fight_Attack_0 # - run Fight_Attack_1 # - run Fight_Attack_1 # - run Fight_Attack_1 # - run Fight_Attack_1 # - run Fight_Attack_2 # - run Fight_Attack_2 # - run Fight_Attack_2 # - run Fight_Attack_2 # - run Fight_Attack_3 # - run Fight_Attack_3 # } Fight_Attack_Wood_sword: type: task Script: - narrate "Wood_Sword" - random { - run Fight_Attack_Wood_Sword_0 - run Fight_Attack_Wood_Sword_0 - run Fight_Attack_Wood_Sword_1 - run Fight_Attack_Wood_Sword_1 - run Fight_Attack_Wood_Sword_1 - run Fight_Attack_Wood_Sword_1 - run Fight_Attack_Wood_Sword_2 - run Fight_Attack_Wood_Sword_2 - run Fight_Attack_Wood_Sword_2 - run Fight_Attack_Wood_Sword_2 - run Fight_Attack_Wood_Sword_3 - run Fight_Attack_Wood_Sword_3 } Fight_Attack_Stone_sword: type: task Script: - narrate "Stone_Sword" - random { - run Fight_Attack_Stone_Sword_0 - run Fight_Attack_Stone_Sword_1 - run Fight_Attack_Stone_Sword_1 - run Fight_Attack_Stone_Sword_1 - run Fight_Attack_Stone_Sword_1 - run Fight_Attack_Stone_Sword_2 - run Fight_Attack_Stone_Sword_2 - run Fight_Attack_Stone_Sword_2 - run Fight_Attack_Stone_Sword_2 - run Fight_Attack_Stone_Sword_3 - run Fight_Attack_Stone_Sword_3 - run Fight_Attack_Stone_Sword_4 } Fight_Attack_Iron_sword: type: task Script: - narrate "Iron_Sword" - random { - run Fight_Attack_Iron_Sword_0 - run Fight_Attack_Iron_Sword_1 - run Fight_Attack_Iron_Sword_1 - run Fight_Attack_Iron_Sword_1 - run Fight_Attack_Iron_Sword_2 - run Fight_Attack_Iron_Sword_2 - run Fight_Attack_Iron_Sword_2 - run Fight_Attack_Iron_Sword_3 - run Fight_Attack_Iron_Sword_3 - run Fight_Attack_Iron_Sword_4 - run Fight_Attack_Iron_Sword_4 - run Fight_Attack_Iron_Sword_5 } Fight_Attack_Gold_sword: type: task Script: - narrate "Gold_Sword" - random { - run Fight_Attack_Gold_Sword_0 - run Fight_Attack_Gold_Sword_1 - run Fight_Attack_Gold_Sword_1 - run Fight_Attack_Gold_Sword_2 - run Fight_Attack_Gold_Sword_2 - run Fight_Attack_Gold_Sword_2 - run Fight_Attack_Gold_Sword_3 - run Fight_Attack_Gold_Sword_3 - run Fight_Attack_Gold_Sword_4 - run Fight_Attack_Gold_Sword_4 - run Fight_Attack_Gold_Sword_5 - run Fight_Attack_Gold_Sword_5 } Fight_Attack_Diamond_sword: type: task Script: - narrate "Diamond_Sword" - random { - run Fight_Attack_Diamond_Sword_0 - run Fight_Attack_Diamond_Sword_1 - run Fight_Attack_Diamond_Sword_1 - run Fight_Attack_Diamond_Sword_2 - run Fight_Attack_Diamond_Sword_2 - run Fight_Attack_Diamond_Sword_2 - run Fight_Attack_Diamond_Sword_3 - run Fight_Attack_Diamond_Sword_3 - run Fight_Attack_Diamond_Sword_4 - run Fight_Attack_Diamond_Sword_4 - run Fight_Attack_Diamond_Sword_5 - run Fight_Attack_Diamond_Sword_5 } # +---------------------------------- # | Attack Messages (no Weapon) # +---------------------------------- Fight_Attack_0: type: task Script: - random { - narrate "NW miss0" targets: - narrate "NW miss1" targets: - narrate "NW miss2" targets: - narrate "NW miss3" targets: - narrate "NW miss4" targets: } Fight_Attack_1: type: task Script: - flag p@ Attack: - flag p@ Fight_attack:1 - random { - narrate "NW 1" targets: - narrate "NW 1" targets: - narrate "NW 1" targets: - narrate "NW 1" targets: - narrate "NW 1" targets: } Fight_Attack_2: type: task Script: - flag p@ Attack: - flag p@ Fight_attack:2 - random { - narrate "NW 2" targets: - narrate "NW 2" targets: - narrate "NW 2" targets: - narrate "NW 2" targets: - narrate "NW 2" targets: } Fight_Attack_3: type: task Script: - flag p@ Attack: - flag p@ Fight_attack:3 - random { - narrate "NW 3" targets: - narrate "NW 3" targets: - narrate "NW 3" targets: - narrate "NW 3" targets: - narrate "NW 3" targets: } Fight_Attack_4: type: task Script: - flag p@ Attack: - flag p@ Fight_attack:4 - random { - narrate "NW 4" targets: - narrate "NW 4" targets: - narrate "NW 4" targets: - narrate "NW 4" targets: - narrate "NW 4" targets: } Fight_Attack_5: type: task Script: - flag p@ Attack: - flag p@ Fight_attack:5 - random { - narrate "NW 5" targets: - narrate "NW 5" targets: - narrate "NW 5" targets: - narrate "NW 5" targets: - narrate "NW 5" targets: } # +---------------------------------- # | Attack Messages (Wood_Sword) # +---------------------------------- Fight_Attack_Wood_Sword_0: type: task Script: - random { - narrate "Wood_Sword miss0" targets: - narrate "Wood_Sword miss1" targets: - narrate "Wood_Sword miss2" targets: - narrate "Wood_Sword miss3" targets: - narrate "Wood_Sword miss4" targets: } Fight_Attack_Wood_Sword_1: type: task Script: - random { - narrate "Wood_Sword 1" targets: - narrate "Wood_Sword 1" targets: - narrate "Wood_Sword 1" targets: - narrate "Wood_Sword 1" targets: - narrate "Wood_Sword 1" targets: } Fight_Attack_Wood_Sword_2: type: task Script: - random { - narrate "Wood_Sword 2" targets: - narrate "Wood_Sword 2" targets: - narrate "Wood_Sword 2" targets: - narrate "Wood_Sword 2" targets: - narrate "Wood_Sword 2" targets: } Fight_Attack_Wood_Sword_3: type: task Script: - random { - narrate "Wood_Sword 3" targets: - narrate "Wood_Sword 3" targets: - narrate "Wood_Sword 3" targets: - narrate "Wood_Sword 3" targets: - narrate "Wood_Sword 3" targets: } Fight_Attack_Wood_Sword_4: type: task Script: - random { - narrate "Wood_Sword 4" targets: - narrate "Wood_Sword 4" targets: - narrate "Wood_Sword 4" targets: - narrate "Wood_Sword 4" targets: - narrate "Wood_Sword 4" targets: } Fight_Attack_Wood_Sword_5: type: task Script: - random { - narrate "Wood_Sword 5" targets: - narrate "Wood_Sword 5" targets: - narrate "Wood_Sword 5" targets: - narrate "Wood_Sword 5" targets: - narrate "Wood_Sword 5" targets: } # +---------------------------------- # | Attack Messages (Stone_Sword) # +---------------------------------- Fight_Attack_Stone_Sword_0: type: task Script: - random { - narrate "Stone_Sword miss0" targets: - narrate "Stone_Sword miss1" targets: - narrate "Stone_Sword miss2" targets: - narrate "Stone_Sword miss3" targets: - narrate "Stone_Sword miss4" targets: } Fight_Attack_Stone_Sword_1: type: task Script: - random { - narrate "Stone_Sword 1" targets: - narrate "Stone_Sword 1" targets: - narrate "Stone_Sword 1" targets: - narrate "Stone_Sword 1" targets: - narrate "Stone_Sword 1" targets: } Fight_Attack_Stone_Sword_2: type: task Script: - random { - narrate "Stone_Sword 2" targets: - narrate "Stone_Sword 2" targets: - narrate "Stone_Sword 2" targets: - narrate "Stone_Sword 2" targets: - narrate "Stone_Sword 2" targets: } Fight_Attack_Stone_Sword_3: type: task Script: - random { - narrate "Stone_Sword 3" targets: - narrate "Stone_Sword 3" targets: - narrate "Stone_Sword 3" targets: - narrate "Stone_Sword 3" targets: - narrate "Stone_Sword 3" targets: } Fight_Attack_Stone_Sword_4: type: task Script: - random { - narrate "Stone_Sword 4" targets: - narrate "Stone_Sword 4" targets: - narrate "Stone_Sword 4" targets: - narrate "Stone_Sword 4" targets: - narrate "Stone_Sword 4" targets: } Fight_Attack_Stone_Sword_5: type: task Script: - random { - narrate "Stone_Sword 5" targets: - narrate "Stone_Sword 5" targets: - narrate "Stone_Sword 5" targets: - narrate "Stone_Sword 5" targets: - narrate "Stone_Sword 5" targets: } # +---------------------------------- # | Attack Messages (Iron_Sword) # +---------------------------------- Fight_Attack_Iron_Sword_0: type: task Script: - random { - narrate "Iron_Sword miss0" targets: - narrate "Iron_Sword miss1" targets: - narrate "Iron_Sword miss2" targets: - narrate "Iron_Sword miss3" targets: - narrate "Iron_Sword miss4" targets: } Fight_Attack_Iron_Sword_1: type: task Script: - random { - narrate "Iron_Sword 1" targets: - narrate "Iron_Sword 1" targets: - narrate "Iron_Sword 1" targets: - narrate "Iron_Sword 1" targets: - narrate "Iron_Sword 1" targets: } Fight_Attack_Iron_Sword_2: type: task Script: - random { - narrate "Iron_Sword 2" targets: - narrate "Iron_Sword 2" targets: - narrate "Iron_Sword 2" targets: - narrate "Iron_Sword 2" targets: - narrate "Iron_Sword 2" targets: } Fight_Attack_Iron_Sword_3: type: task Script: - random { - narrate "Iron_Sword 3" targets: - narrate "Iron_Sword 3" targets: - narrate "Iron_Sword 3" targets: - narrate "Iron_Sword 3" targets: - narrate "Iron_Sword 3" targets: } Fight_Attack_Iron_Sword_4: type: task Script: - random { - narrate "Iron_Sword 4" targets: - narrate "Iron_Sword 4" targets: - narrate "Iron_Sword 4" targets: - narrate "Iron_Sword 4" targets: - narrate "Iron_Sword 4" targets: } Fight_Attack_Iron_Sword_5: type: task Script: - random { - narrate "Iron_Sword 5" targets: - narrate "Iron_Sword 5" targets: - narrate "Iron_Sword 5" targets: - narrate "Iron_Sword 5" targets: - narrate "Iron_Sword 5" targets: } # +---------------------------------- # | Attack Messages (Gold_Sword) # +---------------------------------- Fight_Attack_Gold_Sword_0: type: task Script: - random { - narrate "Gold_Sword miss0" targets: - narrate "Gold_Sword miss1" targets: - narrate "Gold_Sword miss2" targets: - narrate "Gold_Sword miss3" targets: - narrate "Gold_Sword miss4" targets: } Fight_Attack_Gold_Sword_1: type: task Script: - random { - narrate "Gold_Sword 1" targets: - narrate "Gold_Sword 1" targets: - narrate "Gold_Sword 1" targets: - narrate "Gold_Sword 1" targets: - narrate "Gold_Sword 1" targets: } Fight_Attack_Gold_Sword_2: type: task Script: - random { - narrate "Gold_Sword 2" targets: - narrate "Gold_Sword 2" targets: - narrate "Gold_Sword 2" targets: - narrate "Gold_Sword 2" targets: - narrate "Gold_Sword 2" targets: } Fight_Attack_Gold_Sword_3: type: task Script: - random { - narrate "Gold_Sword 3" targets: - narrate "Gold_Sword 3" targets: - narrate "Gold_Sword 3" targets: - narrate "Gold_Sword 3" targets: - narrate "Gold_Sword 3" targets: } Fight_Attack_Gold_Sword_4: type: task Script: - random { - narrate "Gold_Sword Gold_Sword 4" targets: - narrate "Gold_Sword 4" targets: - narrate "Gold_Sword 4" targets: - narrate "Gold_Sword 4" targets: - narrate "Gold_Sword 4" targets: } Fight_Attack_Gold_Sword_5: type: task Script: - random { - narrate "Gold_Sword 5" targets: - narrate "Gold_Sword 5" targets: - narrate "Gold_Sword 5" targets: - narrate "Gold_Sword 5" targets: - narrate "Gold_Sword 5" targets: } # +---------------------------------- # | Attack Messages (Diamond_Sword) # +---------------------------------- Fight_Attack_Diamond_Sword_0: type: task Script: - random { - narrate "Diamond_Sword miss0" targets: - narrate "Diamond_Sword miss1" targets: - narrate "Diamond_Sword miss2" targets: - narrate "Diamond_Sword miss3" targets: - narrate "Diamond_Sword miss4" targets: } Fight_Attack_Diamond_Sword_1: type: task Script: - random { - narrate "Diamond_Sword 1" targets: - narrate "Diamond_Sword 1" targets: - narrate "Diamond_Sword 1" targets: - narrate "Diamond_Sword 1" targets: - narrate "Diamond_Sword 1" targets: } Fight_Attack_Diamond_Sword_2: type: task Script: - random { - narrate "Diamond_Sword 2" targets: - narrate "Diamond_Sword 2" targets: - narrate "Diamond_Sword 2" targets: - narrate "Diamond_Sword 2" targets: - narrate "Diamond_Sword 2" targets: } Fight_Attack_Diamond_Sword_3: type: task Script: - random { - narrate "Diamond_Sword 3" targets: - narrate "Diamond_Sword 3" targets: - narrate "Diamond_Sword 3" targets: - narrate "Diamond_Sword 3" targets: - narrate "Diamond_Sword 3" targets: } Fight_Attack_Diamond_Sword_4: type: task Script: - random { - narrate "Diamond_Sword 4" targets: - narrate "Diamond_Sword 4" targets: - narrate "Diamond_Sword 4" targets: - narrate "Diamond_Sword 4" targets: - narrate "Diamond_Sword 4" targets: } Fight_Attack_Diamond_Sword_5: type: task Script: - random { - narrate "Diamond_Sword 5" targets: - narrate "Diamond_Sword 5" targets: - narrate "Diamond_Sword 5" targets: - narrate "Diamond_Sword 5" targets: - narrate "Diamond_Sword 5" targets: } # +---------------------------------- # | Other Task Scripts # +---------------------------------- Fight_First_Turn_Attacker: type: task Script: - flag player Fight_Turn - flag server Fight_Turn_Counter_%Fight%:2 - random { - narrate " gets the first turn" targets: } Fight_First_Turn_Defender: type: task Script: - flag p@ Fight_Turn - flag server Fight_Turn_Counter_%Fight%:2 - random { - narrate " gets the first turn" targets: } Fight_Not_Your_Turn: type: task Script: - random { - narrate "It's not your turn to fight, please wait." - narrate "Please be patient and wait for your turn." } Fight_Cant_Fight: type: task Script: - random { - narrate "You're too wounded to fight. Please wait " } Fight_Turn_Chooser: type: task Script: # Defining %Fight% and %Fight_Turn_Counter% for use inside tags - define Fight - define Fight_Turn_Counter # Checking if the Fight_Turn_Counter number is bigger than the amount of players in the fight - if > { # If it's bigger than the amount of players, resetting it to "1" - flag server Fight_Turn_Counter_%Fight%:1 # [Temporary] Confirmation that it worked. - narrate "Resetting Fight_Turn_Counter_%Fight% to 1" # Flagging the first player with their turn - flag p@ Fight_Turn # [Temporary] Confirmation that it worked. - narrate "Giving the turn to first player<&co> " # If there's more players in the fight than the current turn counter number. Find the next player } else { # Flagging the next player with their Turn - flag p@ Fight_Turn # [Temporary] Confirmation that it worked. - narrate "Giving the turn to<&co> " }