Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Global $HealthCheck_Battle_10_trigger[15][2] = [[$xHealthCheck_Battle_P1_10_trigger_1, $yHealthCheck_Battle_P1_10_trigger_1], [$xHealthCheck_Battle_P1_10_trigger_2, $yHealthCheck_Battle_P1_10_trigger_2], [$xHealthCheck_Battle_P1_10_trigger_3, $yHealthCheck_Battle_P1_10_trigger_3], [$xHealthCheck_Battle_P1_10_trigger_4, $yHealthCheck_Battle_P1_10_trigger_4], [$xHealthCheck_Battle_P1_10_trigger_5, $yHealthCheck_Battle_P1_10_trigger_5], [$xHealthCheck_Battle_P2_10_trigger_1, $yHealthCheck_Battle_P2_10_trigger_1], [$xHealthCheck_Battle_P2_10_trigger_2, $yHealthCheck_Battle_P2_10_trigger_2], [$xHealthCheck_Battle_P2_10_trigger_3, $yHealthCheck_Battle_P2_10_trigger_3], [$xHealthCheck_Battle_P2_10_trigger_4, $yHealthCheck_Battle_P2_10_trigger_4], [$xHealthCheck_Battle_P2_10_trigger_5,$yHealthCheck_Battle_P2_10_trigger_5], [$xHealthCheck_Battle_P3_10_trigger_1, $yHealthCheck_Battle_P3_10_trigger_1], [$xHealthCheck_Battle_P3_10_trigger_2, $yHealthCheck_Battle_P3_10_trigger_2], [$xHealthCheck_Battle_P3_10_trigger_3, $yHealthCheck_Battle_P3_10_trigger_3], [$xHealthCheck_Battle_P3_10_trigger_4, $yHealthCheck_Battle_P3_10_trigger_4], [$xHealthCheck_Battle_P3_10_trigger_5, $yHealthCheck_Battle_P3_10_trigger_5]] ; 10 Health array while in battle
- OR
- Global $HealthCheck_Battle_P1_10_trigger[5][2] = [[$xHealthCheck_Battle_P1_10_trigger_1,$yHealthCheck_Battle_P1_10_trigger_1], [$xHealthCheck_Battle_P1_10_trigger_2,$yHealthCheck_Battle_P1_10_trigger_2], [$xHealthCheck_Battle_P1_10_trigger_3,$yHealthCheck_Battle_P1_10_trigger_3], [$xHealthCheck_Battle_P1_10_trigger_4,$yHealthCheck_Battle_P1_10_trigger_4], [$xHealthCheck_Battle_P1_10_trigger_5,$yHealthCheck_Battle_P1_10_trigger_5]] ; P1 Health array while in battle
- Global $HealthCheck_Battle_P2_10_trigger[5][2] = [[$xHealthCheck_Battle_P2_10_trigger_1,$yHealthCheck_Battle_P2_10_trigger_1], [$xHealthCheck_Battle_P2_10_trigger_2,$yHealthCheck_Battle_P2_10_trigger_2], [$xHealthCheck_Battle_P2_10_trigger_3,$yHealthCheck_Battle_P2_10_trigger_3], [$xHealthCheck_Battle_P2_10_trigger_4,$yHealthCheck_Battle_P2_10_trigger_4], [$xHealthCheck_Battle_P2_10_trigger_5,$yHealthCheck_Battle_P2_10_trigger_5]] ; P2 Health array while in battle
- Global $HealthCheck_Battle_P3_10_trigger[5][2] = [[$xHealthCheck_Battle_P3_10_trigger_1,$yHealthCheck_Battle_P3_10_trigger_1], [$xHealthCheck_Battle_P3_10_trigger_2,$yHealthCheck_Battle_P3_10_trigger_2], [$xHealthCheck_Battle_P3_10_trigger_3,$yHealthCheck_Battle_P3_10_trigger_3], [$xHealthCheck_Battle_P3_10_trigger_4,$yHealthCheck_Battle_P3_10_trigger_4], [$xHealthCheck_Battle_P3_10_trigger_5,$yHealthCheck_Battle_P3_10_trigger_5]] ; P3 Health array while in battle
- $PartySpot = 2
- Select ; we have to set where the party members are located on the screen for healing to work correctly
- Case $PartySpot = 1
- $PartySpot_P2 = 2
- $PartySpot_P3 = 3
- Case $PartySpot = 2
- $PartySpot_P2 = 1
- $PartySpot_P3 = 3
- Case $PartySpot = 3
- $PartySpot_P2 = 1
- $PartySpot_P3 = 2
- EndSelect
- Func Battle()
- CheckBattleHealth($PartySpot) ; checking if self is low on health
- If $IsGroupHealer = "yes" Then
- CheckBattleHealth($PartySpot_P2) ; checking if 2nd player is low on health
- CheckBattleHealth($PartySpot_P3) ; checking if 3rd player is low on health
- EndIf
- EndFunc
- Func CheckBattleHealth($PartySpot)
- Select
- Case $PartySpot = 1
- If Hex(PixelGetColor($xHealthCheck_Battle_P1_10_trigger_1,$yHealthCheck_Battle_P1_10_trigger_1),6) = $HealthCheck_Battle_P1_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_Battle_P1_10_trigger_2,$yHealthCheck_Battle_P1_10_trigger_2),6) = $HealthCheck_Battle_P1_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_Battle_P1_10_trigger_3,$yHealthCheck_Battle_P1_10_trigger_3),6) = $HealthCheck_Battle_P1_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_Battle_P1_10_trigger_4,$yHealthCheck_Battle_P1_10_trigger_4),6) = $HealthCheck_Battle_P1_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_Battle_P1_10_trigger_5,$yHealthCheck_Battle_P1_10_trigger_5),6) = $HealthCheck_Battle_P1_10_trigger_color_5 Then
- ; HEAL STUFF
- EndIf
- Case $PartySpot = 2
- If Hex(PixelGetColor($xHealthCheck_Battle_P2_10_trigger_1,$yHealthCheck_Battle_P2_10_trigger_1),6) = $HealthCheck_Battle_P2_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_Battle_P2_10_trigger_2,$yHealthCheck_Battle_P2_10_trigger_2),6) = $HealthCheck_Battle_P2_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_Battle_P2_10_trigger_3,$yHealthCheck_Battle_P2_10_trigger_3),6) = $HealthCheck_Battle_P2_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_Battle_P2_10_trigger_4,$yHealthCheck_Battle_P2_10_trigger_4),6) = $HealthCheck_Battle_P2_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_Battle_P2_10_trigger_5,$yHealthCheck_Battle_P2_10_trigger_5),6) = $HealthCheck_Battle_P2_10_trigger_color_5 Then
- ; HEAL STUFF
- EndIf
- Case $PartySpot = 3
- If Hex(PixelGetColor($xHealthCheck_Battle_P3_10_trigger_1,$yHealthCheck_Battle_P3_10_trigger_1),6) = $HealthCheck_Battle_P3_10_trigger_color_1 and Hex(PixelGetColor($xHealthCheck_Battle_P3_10_trigger_2,$yHealthCheck_Battle_P3_10_trigger_2),6) = $HealthCheck_Battle_P3_10_trigger_color_2 and Hex(PixelGetColor($xHealthCheck_Battle_P3_10_trigger_3,$yHealthCheck_Battle_P3_10_trigger_3),6) = $HealthCheck_Battle_P3_10_trigger_color_3 and Hex(PixelGetColor($xHealthCheck_Battle_P3_10_trigger_4,$yHealthCheck_Battle_P3_10_trigger_4),6) = $HealthCheck_Battle_P3_10_trigger_color_4 and Hex(PixelGetColor($xHealthCheck_Battle_P3_10_trigger_5,$yHealthCheck_Battle_P3_10_trigger_5),6) = $HealthCheck_Battle_P3_10_trigger_color_5 Then
- ; HEAL STUFF
- EndIf
- EndSelect
- EndFunc
- USING THE FIRST ARRAY ON LINE 1:
- THIS WOULDNT WORK, BECAUSE $PartySpot will add too much and array will be out of its bounds:
- If Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot-1][0],$HealthCheck_Battle_10_trigger[$PartySpot-1][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+0][0],$HealthCheck_Battle_10_trigger[$PartySpot+0][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+1][0],$HealthCheck_Battle_10_trigger[$PartySpot+1][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+2][0],$HealthCheck_Battle_10_trigger[$PartySpot+2][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+3][0],$HealthCheck_Battle_10_trigger[$PartySpot+3][1])) = $HealthCheck_trigger_color Then
- If Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+4][0],$HealthCheck_Battle_10_trigger[$PartySpot+4][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+5][0],$HealthCheck_Battle_10_trigger[$PartySpot+5][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+6][0],$HealthCheck_Battle_10_trigger[$PartySpot+6][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+7][0],$HealthCheck_Battle_10_trigger[$PartySpot+7][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+8][0],$HealthCheck_Battle_10_trigger[$PartySpot+8][1])) = $HealthCheck_trigger_color Then
- If Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+9][0],$HealthCheck_Battle_10_trigger[$PartySpot+9][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+10][0],$HealthCheck_Battle_10_trigger[$PartySpot+10][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+11][0],$HealthCheck_Battle_10_trigger[$PartySpot+11][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+12][0],$HealthCheck_Battle_10_trigger[$PartySpot+12][1])) = $HealthCheck_trigger_color and Hex(PixelGetColor($HealthCheck_Battle_10_trigger[$PartySpot+13][0],$HealthCheck_Battle_10_trigger[$PartySpot+13][1])) = $HealthCheck_trigger_color Then
- LOGIC:
- if $PartySpot = 1 then should use $HealthCheck_Battle_10_trigger [0] thru [4] and P2 uses [5] thru [9] and P3 uses [10] thru [14]
- if $PartySpot = 2 then should use $HealthCheck_Battle_10_trigger [5] thru [9] and P2 uses [0] thru [4] and P3 uses [10] thru [14]
- if $PartySpot = 3 then should use $HealthCheck_Battle_10_trigger [10] thru [14] and P2 uses [0] thru [4] and P3 uses [5] thru [9]
- USING THE ARRAYS ON LINES 3-5:
- LOGIC:
- if $PartySpot = 1 then should use $HealthCheck_Battle_P1_10_trigger [0] thru [4] and P2 uses $HealthCheck_Battle_P2_10_trigger [0] thru [4] and P3 uses $HealthCheck_Battle_P3_10_trigger [0] thru [4]
- if $PartySpot = 2 then should use $HealthCheck_Battle_P2_10_trigger [0] thru [4] and P2 uses $HealthCheck_Battle_P1_10_trigger [0] thru [4] and P3 uses $HealthCheck_Battle_P3_10_trigger [0] thru [4]
- if $PartySpot = 3 then should use $HealthCheck_Battle_P3_10_trigger [0] thru [4] and P2 uses $HealthCheck_Battle_P1_10_trigger [0] thru [4] and P3 uses $HealthCheck_Battle_P2_10_trigger [0] thru [4]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement