| 1 | if (live_call()) | 
    
    
        | 2 |     return global.live_result; | 
    
    
        | 3 | portrait = false; | 
    
    
        | 4 | yy = 30; | 
    
    
        | 5 | var xx = 70; | 
    
    
        | 6 | if (portrait == true) | 
    
    
        | 7 |     xx = 88; | 
    
    
        | 8 | var portrait_xx = 52; | 
    
    
        | 9 | var line_sep = 18; | 
    
    
        | 10 | draw_set_font(dialogue_font); | 
    
    
        | 11 | draw_set_color(c_white); | 
    
    
        | 12 | draw_set_halign(fa_left); | 
    
    
        | 13 | message_actual = string_copy(message[message_current], 0, cutoff); | 
    
    
        | 14 | if (portrait == true) | 
    
    
        | 15 | { | 
    
    
        | 16 |     var prt_animate; | 
    
    
        | 17 |     if (cutoff < string_length(message[message_current]) && portrait_can_animate == true) | 
    
    
        | 18 |         prt_animate = -1; | 
    
    
        | 19 |     else | 
    
    
        | 20 |         prt_animate = 0; | 
    
    
        | 21 |     var portrait_y_disjoint = yy + (sprite_get_height(prt[message_current]) / 3) + 28; | 
    
    
        | 22 |     draw_sprite_ext(prt[message_current], prt_animate, portrait_xx, portrait_y_disjoint, 0.5, 0.5, 0, c_white, 1); | 
    
    
        | 23 |     if (prt_animate == 0) | 
    
    
        | 24 |     { | 
    
    
        | 25 |         switch (prt[message_current]) | 
    
    
        | 26 |         { | 
    
    
        | 27 |             case 343: | 
    
    
        | 28 |                 if (portrait_idle_animated == 0 && irandom(40) == 1) | 
    
    
        | 29 |                 { | 
    
    
        | 30 |                     portrait_idle_animated = 346; | 
    
    
        | 31 |                     portrait_idle_frame = 0; | 
    
    
        | 32 |                 } | 
    
    
        | 33 |                 if (portrait_idle_animated != 0) | 
    
    
        | 34 |                 { | 
    
    
        | 35 |                     draw_sprite_ext(portrait_idle_animated, portrait_idle_frame, portrait_xx, portrait_y_disjoint, 0.5, 0.5, 0, c_white, 1); | 
    
    
        | 36 |                     portrait_idle_frame += 0.2; | 
    
    
        | 37 |                 } | 
    
    
        | 38 |                 if (portrait_idle_frame >= sprite_get_number(portrait_idle_animated)) | 
    
    
        | 39 |                 { | 
    
    
        | 40 |                     portrait_idle_animated = 0; | 
    
    
        | 41 |                     portrait_idle_frame = 0; | 
    
    
        | 42 |                 } | 
    
    
        | 43 |                 break; | 
    
    
        | 44 |         } | 
    
    
        | 45 |     } | 
    
    
        | 46 | } | 
    
    
        | 47 | draw_set_font(fnt_dotumche); | 
    
    
        | 48 | draw_text_ext(xx, yy + 10, string_hash_to_newline(message_actual), line_sep, -1); | 
    
    
        | 49 | if (color == true) | 
    
    
        | 50 | { | 
    
    
        | 51 |     if (color_set == false) | 
    
    
        | 52 |     { | 
    
    
        | 53 |         for (var i = 0; i < (array_length_1d(message) - 1); i++) | 
    
    
        | 54 |         { | 
    
    
        | 55 |             var len = array_length_2d(message_col, i); | 
    
    
        | 56 |             if (len == 0) | 
    
    
        | 57 |             { | 
    
    
        | 58 |                 message_col[i][0] = ""; | 
    
    
        | 59 |             } | 
    
    
        | 60 |             else if (len > 0) | 
    
    
        | 61 |             { | 
    
    
        | 62 |                 for (var j = 0; j < (array_length_1d(col_modif) - 1); j++) | 
    
    
        | 63 |                 { | 
    
    
        | 64 |                     if (j < array_length_2d(message_col, i) && message_col[i][j] == 0) | 
    
    
        | 65 |                         message_col[i][j] = ""; | 
    
    
        | 66 |                 } | 
    
    
        | 67 |             } | 
    
    
        | 68 |         } | 
    
    
        | 69 |         color_set = true; | 
    
    
        | 70 |     } | 
    
    
        | 71 |     for (var j = 0; j < array_length_2d(message_col, message_current); j++) | 
    
    
        | 72 |     { | 
    
    
        | 73 |         message_actual_col[j] = string_copy(message_col[message_current][j], 0, cutoff); | 
    
    
        | 74 |         draw_set_color(col_modif[j]); | 
    
    
        | 75 |         draw_text_ext(xx, yy + 10, string_hash_to_newline(message_actual_col[j]), line_sep, -1); | 
    
    
        | 76 |     } | 
    
    
        | 77 | } | 
    
    
        | 78 | draw_set_color(c_white); | 
    
    
        | 79 | if (dialogue_is_minishop == true) | 
    
    
        | 80 | { | 
    
    
        | 81 |     var minishop_box_xx = 204; | 
    
    
        | 82 |     var minishop_box_yy = 92; | 
    
    
        | 83 |     draw_set_color(c_white); | 
    
    
        | 84 |     draw_rectangle(minishop_box_xx, minishop_box_yy, minishop_box_xx + 100, minishop_box_yy + 53, false); | 
    
    
        | 85 |     draw_set_color(c_black); | 
    
    
        | 86 |     draw_rectangle(minishop_box_xx + 3, minishop_box_yy + 3, (minishop_box_xx + 100) - 3, (minishop_box_yy + 53) - 3, false); | 
    
    
        | 87 |     draw_set_font(fnt_battle); | 
    
    
        | 88 |     draw_set_color(c_white); | 
    
    
        | 89 |     var item_count; | 
    
    
        | 90 |     for (item_count = 1; item_count <= 8; item_count++) | 
    
    
        | 91 |     { | 
    
    
        | 92 |         if (global.item_slot[item_count] == "Nothing") | 
    
    
        | 93 |             break; | 
    
    
        | 94 |     } | 
    
    
        | 95 |     draw_text(217, 100, string_hash_to_newline("$ - " + string(global.player_gold) + "#SPACE - " + string(item_count - 1) + "/8")); | 
    
    
        | 96 | } | 
    
    
        | 97 | if (choice == false) | 
    
    
        | 98 |     exit; | 
    
    
        | 99 | xx = 100; | 
    
    
        | 100 | var spacing = 0.25; | 
    
    
        | 101 | if (ch[4] != "") | 
    
    
        | 102 |     spacing = 0.5; | 
    
    
        | 103 | if (portrait) | 
    
    
        | 104 |     spacing = 0.15; | 
    
    
        | 105 | var ypos1, ypos2; | 
    
    
        | 106 | if (position == 0) | 
    
    
        | 107 | { | 
    
    
        | 108 |     ypos1 = 190; | 
    
    
        | 109 |     if (ch[3] == "") | 
    
    
        | 110 |         ypos1 = 210; | 
    
    
        | 111 |     ypos2 = 210; | 
    
    
        | 112 | } | 
    
    
        | 113 | else | 
    
    
        | 114 | { | 
    
    
        | 115 |     ypos1 = 32; | 
    
    
        | 116 |     if (ch[3] == "") | 
    
    
        | 117 |         ypos1 = 56; | 
    
    
        | 118 |     ypos2 = 56; | 
    
    
        | 119 | } | 
    
    
        | 120 | if (ch[4] != "") | 
    
    
        | 121 |     xx -= 30; | 
    
    
        | 122 | var xpos1 = xx; | 
    
    
        | 123 | var xpos2 = xx + 122; | 
    
    
        | 124 | if (portrait == true) | 
    
    
        | 125 |     xpos1 += 20; | 
    
    
        | 126 | var xpos3 = xpos1; | 
    
    
        | 127 | var xpos4 = xpos2; | 
    
    
        | 128 | if (ch[2] == "") | 
    
    
        | 129 |     xpos1 = xpos1 + 56; | 
    
    
        | 130 | if (ch[4] == "") | 
    
    
        | 131 |     xpos3 = xpos1 + 56; | 
    
    
        | 132 | if (cutoff >= string_length(message[message_current])) | 
    
    
        | 133 | { | 
    
    
        | 134 |     draw_set_halign(fa_center); | 
    
    
        | 135 |     if (ch[4] != "") | 
    
    
        | 136 |         draw_set_halign(fa_left); | 
    
    
        | 137 |     draw_text(xpos1, ypos1, string_hash_to_newline(ch[1])); | 
    
    
        | 138 |     if (ch[2] != "") | 
    
    
        | 139 |         draw_text(xpos2, ypos1, string_hash_to_newline(ch[2])); | 
    
    
        | 140 |     if (ch[3] != "") | 
    
    
        | 141 |         draw_text(xpos3, ypos2, string_hash_to_newline(ch[3])); | 
    
    
        | 142 |     if (ch[4] != "") | 
    
    
        | 143 |         draw_text(xpos4, ypos2, string_hash_to_newline(ch[4])); | 
    
    
        | 144 |     draw_set_halign(fa_center); | 
    
    
        | 145 |     var soul_offset = string_width(string_hash_to_newline(ch[p])) * 0.5; | 
    
    
        | 146 |     if (ch[4] != "") | 
    
    
        | 147 |         soul_offset = 0; | 
    
    
        | 148 |     var soul_x, soul_y; | 
    
    
        | 149 |     switch (p) | 
    
    
        | 150 |     { | 
    
    
        | 151 |         case 1: | 
    
    
        | 152 |             soul_x = xpos1 - soul_offset - 8; | 
    
    
        | 153 |             soul_y = ypos1 + 8; | 
    
    
        | 154 |             break; | 
    
    
        | 155 |         case 2: | 
    
    
        | 156 |             soul_x = xpos2 - soul_offset - 8; | 
    
    
        | 157 |             soul_y = ypos1 + 8; | 
    
    
        | 158 |             break; | 
    
    
        | 159 |         case 3: | 
    
    
        | 160 |             soul_x = xpos3 - soul_offset - 8; | 
    
    
        | 161 |             soul_y = ypos2 + 8; | 
    
    
        | 162 |             break; | 
    
    
        | 163 |         case 4: | 
    
    
        | 164 |             soul_x = xpos4 - soul_offset - 8; | 
    
    
        | 165 |             soul_y = ypos2 + 8; | 
    
    
        | 166 |             break; | 
    
    
        | 167 |     } | 
    
    
        | 168 |     draw_sprite(spr_heart_yellow_overworld, 0, soul_x, soul_y); | 
    
    
        | 169 | } | 
    
    
        | 170 | draw_set_halign(fa_left); |