Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_recreate_heart_battle_menu_text_cactony_slither_duo

(view raw script w/o annotations or w/e)
1
function scr_recreate_heart_battle_menu_text_cactony_slither_duo
scr_recreate_heart_battle_menu_text_cactony_slither_duo

function scr_recreate_heart_battle_menu_text_cactony_slither_duo() //gml_Script_scr_recreate_heart_battle_menu_text_cactony_slither_duo { var last_text_move_select = global.last_text_move_select var action_3_selected_count_2 = global.action_3_selected_count_2 var heart_position = script_execute(gml_Script_scr_return_heart_battle_menu_position) if (text_deadlock_1 == true) instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), text_deadlock_contents_1) else if (last_text_move_select == 0) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_intro) text_deadlock_contents_1 = 3004 text_deadlock_1 = true } else if (global.battle_menu_number == 1 && global.enemy_dead == true && global.fight_number == 1) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_dead_2) text_deadlock_contents_1 = 3052 text_deadlock_1 = true } else if (global.battle_menu_number == 1 && global.enemy_dead_2 == true && global.fight_number == 2) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_dead) text_deadlock_contents_1 = 3033 text_deadlock_1 = true } else if (global.enemy_low_hp == true && global.enemy_dead == false && global.enemy_spared == false) { var random_number = irandom_range(1, 2) if (random_number == 1) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1) text_deadlock_contents_1 = 3016 } else if (random_number == 2) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1_v2) text_deadlock_contents_1 = 3018 } text_deadlock_1 = true } else if (global.enemy_low_hp_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false) { random_number = irandom_range(1, 2) if (random_number == 1) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_2) text_deadlock_contents_1 = 3036 } else if (random_number == 2) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_2_v2) text_deadlock_contents_1 = 3037 } text_deadlock_1 = true } else if (global.enemy_sparing == true && global.enemy_dead == false && global.enemy_spared == false) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_sparing) text_deadlock_contents_1 = 3030 text_deadlock_1 = true } else if (global.enemy_sparing_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_sparing_2) text_deadlock_contents_1 = 3050 text_deadlock_1 = true } else { random_number = irandom_range(1, 2) if (global.enemy_dead == true || global.enemy_spared == true) random_number = 2 else if (global.enemy_dead_2 == true || global.enemy_spared_2 == true) random_number = 1 if (random_number == 1) { if ((global.enemy_dead_2 + global.enemy_spared_2) < 1) var random_text_move_select = irandom_range(1, 7) else random_text_move_select = irandom_range(1, 4) } else if (random_number == 2) { if ((global.enemy_dead + global.enemy_spared) < 1) random_text_move_select = irandom_range(1, 6) else random_text_move_select = irandom_range(1, 5) } if (random_number == 1) { if (random_text_move_select == 1) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_1) text_deadlock_contents_1 = 3020 text_deadlock_1 = true } else if (random_text_move_select == 2) { instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_2) text_deadlock_contents_1 = 3021 text_deadlock_1 = true ...
() //gml_Script_scr_recreate_heart_battle_menu_text_cactony_slither_duo
2
{
3
    var last_text_move_select = global.last_text_move_select
4
    var action_3_selected_count_2 = global.action_3_selected_count_2
5
    var heart_position = script_execute(gml_Script_scr_return_heart_battle_menu_position)
6
    if (text_deadlock_1 == true)
7
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), text_deadlock_contents_1)
8
    else if (last_text_move_select == 0)
9
    {
10
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_intro)
11
        text_deadlock_contents_1 = 3004
12
        text_deadlock_1 = true
13
    }
14
    else if (global.battle_menu_number == 1 && global.enemy_dead == true && global.fight_number == 1)
15
    {
16
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_dead_2)
17
        text_deadlock_contents_1 = 3052
18
        text_deadlock_1 = true
19
    }
20
    else if (global.battle_menu_number == 1 && global.enemy_dead_2 == true && global.fight_number == 2)
21
    {
22
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_dead)
23
        text_deadlock_contents_1 = 3033
24
        text_deadlock_1 = true
25
    }
26
    else if (global.enemy_low_hp == true && global.enemy_dead == false && global.enemy_spared == false)
27
    {
28
        var random_number = irandom_range(1, 2)
29
        if (random_number == 1)
30
        {
31
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1)
32
            text_deadlock_contents_1 = 3016
33
        }
34
        else if (random_number == 2)
35
        {
36
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_1_v2)
37
            text_deadlock_contents_1 = 3018
38
        }
39
        text_deadlock_1 = true
40
    }
41
    else if (global.enemy_low_hp_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false)
42
    {
43
        random_number = irandom_range(1, 2)
44
        if (random_number == 1)
45
        {
46
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_2)
47
            text_deadlock_contents_1 = 3036
48
        }
49
        else if (random_number == 2)
50
        {
51
            instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_low_hp_2_v2)
52
            text_deadlock_contents_1 = 3037
53
        }
54
        text_deadlock_1 = true
55
    }
56
    else if (global.enemy_sparing == true && global.enemy_dead == false && global.enemy_spared == false)
57
    {
58
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_sparing)
59
        text_deadlock_contents_1 = 3030
60
        text_deadlock_1 = true
61
    }
62
    else if (global.enemy_sparing_2 == true && global.enemy_dead_2 == false && global.enemy_spared_2 == false)
63
    {
64
        instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_sparing_2)
65
        text_deadlock_contents_1 = 3050
66
        text_deadlock_1 = true
67
    }
68
    else
69
    {
70
        random_number = irandom_range(1, 2)
71
        if (global.enemy_dead == true || global.enemy_spared == true)
72
            random_number = 2
73
        else if (global.enemy_dead_2 == true || global.enemy_spared_2 == true)
74
            random_number = 1
75
        if (random_number == 1)
76
        {
77
            if ((global.enemy_dead_2 + global.enemy_spared_2) < 1)
78
                var random_text_move_select = irandom_range(1, 7)
79
            else
80
                random_text_move_select = irandom_range(1, 4)
81
        }
82
        else if (random_number == 2)
83
        {
84
            if ((global.enemy_dead + global.enemy_spared) < 1)
85
                random_text_move_select = irandom_range(1, 6)
86
            else
87
                random_text_move_select = irandom_range(1, 5)
88
        }
89
        if (random_number == 1)
90
        {
91
            if (random_text_move_select == 1)
92
            {
93
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_1)
94
                text_deadlock_contents_1 = 3020
95
                text_deadlock_1 = true
96
            }
97
            else if (random_text_move_select == 2)
98
            {
99
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_2)
100
                text_deadlock_contents_1 = 3021
101
                text_deadlock_1 = true
102
            }
103
            else if (random_text_move_select == 3)
104
            {
105
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_3)
106
                text_deadlock_contents_1 = 3022
107
                text_deadlock_1 = true
108
            }
109
            else if (random_text_move_select == 4)
110
            {
111
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_4)
112
                text_deadlock_contents_1 = 3023
113
                text_deadlock_1 = true
114
            }
115
            else if (random_text_move_select == 5)
116
            {
117
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_5)
118
                text_deadlock_contents_1 = 3024
119
                text_deadlock_1 = true
120
            }
121
            else if (random_text_move_select == 6)
122
            {
123
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_6)
124
                text_deadlock_contents_1 = 3025
125
                text_deadlock_1 = true
126
            }
127
            else if (random_text_move_select == 7)
128
            {
129
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_7)
130
                text_deadlock_contents_1 = 3026
131
                text_deadlock_1 = true
132
            }
133
            else if (random_text_move_select == 8)
134
            {
135
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_8)
136
                text_deadlock_contents_1 = 3028
137
                text_deadlock_1 = true
138
            }
139
        }
140
        else if (random_number == 2)
141
        {
142
            if (random_text_move_select == 1)
143
            {
144
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_1_v2)
145
                text_deadlock_contents_1 = 3039
146
                text_deadlock_1 = true
147
            }
148
            else if (random_text_move_select == 2)
149
            {
150
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_2_v2)
151
                text_deadlock_contents_1 = 3040
152
                text_deadlock_1 = true
153
            }
154
            else if (random_text_move_select == 3)
155
            {
156
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_3_v2)
157
                text_deadlock_contents_1 = 3041
158
                text_deadlock_1 = true
159
            }
160
            else if (random_text_move_select == 4)
161
            {
162
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_4_v2)
163
                text_deadlock_contents_1 = 3046
164
                text_deadlock_1 = true
165
            }
166
            else if (random_text_move_select == 5)
167
            {
168
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_5_v2)
169
                text_deadlock_contents_1 = 3047
170
                text_deadlock_1 = true
171
            }
172
            else if (random_text_move_select == 6)
173
            {
174
                instance_create((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), obj_dialogue_battle_move_select_6_v2)
175
                text_deadlock_contents_1 = 3048
176
                text_deadlock_1 = true
177
            }
178
        }
179
    }
180
}