Ein Sprechblasenscript gibts hier:
Code:
#==============================================================================
# â–� Window_Message
#------------------------------------------------------------------------------
#  文� 表示�使� メッセージウィンドウ��。
#==============================================================================
class Window_Message < Window_Selectable
� #--------------------------------------------------------------------------
� # � オブジェクト�期化
� #--------------------------------------------------------------------------
� def initialize
� � super(80, 304, 480, 160)
� � self.contents = Bitmap.new(width - 32, height - 32)
� � self.contents.font.name = $defaultfonttype � # "Message" window font
� � self.contents.font.size = $defaultfontsize
� � self.visible = false
� � self.z = 9998
� � @fade_in = false
� � @fade_out = false
� � @contents_showing = false
� � @cursor_width = 0
� � self.active = false
� � self.index = -1
� end
� #--------------------------------------------------------------------------
� # � 解放
� #--------------------------------------------------------------------------
� def dispose
� � terminate_message
� � $game_temp.message_window_showing = false
� � if @input_number_window != nil
� � � @input_number_window.dispose
� � end
� � super
� end
� #--------------------------------------------------------------------------
� # � メッセージ終� 処�
� #--------------------------------------------------------------------------
� def terminate_message
� � self.active = false
� � self.pause = false
� � self.index = -1
� � self.contents.clear
� � # 表示丕フラグをクリア
� � @contents_showing = false
� � # メッセージ コール�ックを呼�
� � if $game_temp.message_proc != nil
� � � $game_temp.message_proc.call
� � end
Â� Â� # æ–‡ç«� ã€?é?¸æ� žè‚¢ã€?数値入å� ›ã?«é–¢ã?™ã‚‹å¤‰æ•°ã‚’クリア
� � $game_temp.message_text = nil
� � $game_temp.message_proc = nil
� � $game_temp.choice_start = 99
� � $game_temp.choice_max = 0
� � $game_temp.choice_cancel_type = 0
� � $game_temp.choice_proc = nil
� � $game_temp.num_input_start = 99
� � $game_temp.num_input_variable_id = 0
� � $game_temp.num_input_digits_max = 0
Â� Â� # ゴールドウィンドウを開æ�
�¾
� � if @gold_window != nil
� � � @gold_window.dispose
� � � @gold_window = nil
� � end
� end
� #--------------------------------------------------------------------------
� # � リフレッシュ
� #--------------------------------------------------------------------------
� def refresh
� � self.contents.clear
� � self.contents.font.color = normal_color
� � x = y = 0
� � @cursor_width = 0
Â� Â� # é?¸æ� žè‚¢ã?ªã‚‰å•—下ã?’を行ã?�
� � if $game_temp.choice_start == 0
� � � x = 8
� � end
Â� Â� # 表示待ã?¡ã?®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã?Œã?‚ã‚‹å� ´å?ˆ
� � if $game_temp.message_text != nil
� � � text = $game_temp.message_text
� � � # 制御文啗処�
� � � begin
� � � � last_text = text.clone
� � � � text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
� � � end until text == last_text
� � � text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
� � � � $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
� � � end
� � � # 便宜� �"\\\\" を "\000" �変�
� � � text.gsub!(/\\\\/) { "\000" }
� � � # "\\C" を "\001" ��"\\G" を "\002" �変�
� � � text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
� � � text.gsub!(/\\[Gg]/) { "\002" }
� � �
� � � #####
� text.gsub!(/\\[Tt]a\[([0123456789]+)\]/) { "\200[#{$1}]" }
#@now_text.gsub!(/\\[Öö]\[([0-9]+)\]/) do
�
� #p $1
� if $1!=nil
if 640-self.width<($game_map.events[$1.to_i].real_x-$game_map.display_x) / 4-self.width/2-16
� $x=640-self.width
� $windowleft=true
else
� $x=($game_map.events[$1.to_i].real_x-$game_map.display_x) / 4-self.width/2-16
� $windowleft=false
end
if 0>$x
� $x=0
� $windowright=true
else
$windowright=false
end
$y=($game_map.events[$1.to_i].real_y-$game_map.display_y) / 4-self.height-48#{"\999[#{$1}]"}
if $y<0
$y=($game_map.events[$1.to_i].real_y-$game_map.display_y) / 4+56
$windowunder=true
else
� $windowunder=false
end
else
� $x=self.x
� $y=self.y
� end
#####
Â� Â� Â� # c ã?« 1 文啗をå?–å¾— (文啗ã?Œå?–å¾—ã?§ã??ã?ªã??ã?ªã‚‹ã?¾ã?§ãƒ«ãƒ¼ãƒ—)
� � � while ((c = text.slice!(/./m)) != nil)
Â� Â� Â� Â� # \\ ã?®å� ´å?ˆ
� � � � if c == "\000"
� � � � � # 本��文啗�戻�
� � � � � c = "\\"
� � � � end
Â� Â� Â� Â� # \C[n] ã?®å� ´å?ˆ
� � � � if c == "\001"
� � � � � # 文啗色を変更
� � � � � text.sub!(/\[([0-9]+)\]/, "")
� � � � � color = $1.to_i
� � � � � if color >= 0 and color <= 7
� � � � � � self.contents.font.color = text_color(color)
� � � � � end
� � � � � # 次�文啗�
� � � � � next
� � � � end
Â� Â� Â� Â� # \G ã?®å� ´å?ˆ
� � � � if c == "\002"
� � � � � # ゴールドウィンドウを作�
� � � � � if @gold_window == nil
� � � � � � @gold_window = Window_Gold.new
� � � � � � @gold_window.x = 560 - @gold_window.width
� � � � � � if $game_temp.in_battle
� � � � � � � @gold_window.y = 192
� � � � � � else
� � � � � � � @gold_window.y = self.y >= 128 ? 32 : 384
� � � � � � end
� � � � � � @gold_window.opacity = self.opacity
� � � � � � @gold_window.back_opacity = self.back_opacity
� � � � � end
� � � � � # 次�文啗�
� � � � � next
� � � � end
� � � � if c == "\200"
� � � � � text.sub!(/\[([0-9]+)\]/, "")
� � � � � self.x=$x#$x
� � � � � self.y=$y#$y
� � � � � self.windowskin = RPG::Cache.windowskin("001-Blue01")
� � � � � $arr = Sprite.new
� � � � � $arr.x=($game_map.events[$1.to_i].real_x-$game_map.display_x) / 4
� � � � � $arr.y=($game_map.events[$1.to_i].real_y-$game_map.display_y) / 4-49
� � � � � $arr.y=($game_map.events[$1.to_i].real_y-$game_map.display_y) / 4+9 if $arr.y-self.height<0
� � � � � $arr.z=9999
� � � � � if $windowright==true
� � � � � � if $windowunder==true
� � � � � � � $arr.bitmap=RPG::Cache.picture("arrowleftup")
� � � � � $arr.x+=16
� � � � � � � else
� � � � � � $arr.bitmap=RPG::Cache.picture("arrowleft")
� � � � � $arr.x+=16
� � � � � end
� � � � elsif $windowunder==true
� � � � � $arr.bitmap=RPG::Cache.picture("arrowup")
� � � � � $arr.x-=16
� � � � else
� � � � � $arr.bitmap=RPG::Cache.picture("arrow")
� � � � � $arr.x-=16
� � � � � end�
� � � � � c=""
� � � � else
� � � � � self.windowskin = RPG::Cache.windowskin("001-Blue01")
� � � � � $x=self.x#$x
� � � � � $y=self.y#$y
� � � � � end
Â� Â� Â� Â� # 改行文啗ã?®å� ´å?ˆ
� � � � if c == "\n"
Â� Â� Â� Â� Â� # é?¸æ� žè‚¢ã?ªã‚‰ã‚«ãƒ¼ã‚½ãƒ«ã?®å¹…ã‚’æ›´æ–°
� � � � � if y >= $game_temp.choice_start
� � � � � � @cursor_width = [@cursor_width, x].max
� � � � � end
Â� Â� Â� Â� Â� # y ã?« 1 ã‚’å� � ç®—
� � � � � y += 1
� � � � � x = 0
Â� Â� Â� Â� Â� # é?¸æ� žè‚¢ã?ªã‚‰å•—下ã?’を行ã?�
� � � � � if y >= $game_temp.choice_start
� � � � � � x = 8
� � � � � end
� � � � � # 次�文啗�
� � � � � next
� � � � end
Â� Â� Â� Â� # 文啗をæ??ç”»
� � � � self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
Â� Â� Â� Â� # x ã?«æ??ç”»ã?—ã?Ÿæ–‡å•—ã?®å¹…ã‚’å� � ç®—
� � � � x += self.contents.text_size(c).width
� � � end
� � end
Â� Â� # é?¸æ� žè‚¢ã?®å� ´å?ˆ
� � if $game_temp.choice_max > 0
� � � @item_max = $game_temp.choice_max
� � � self.active = true
� � � self.index = 0
� � end
Â� Â� # 数値入å� ›ã?®å� ´å?ˆ
� � if $game_temp.num_input_variable_id > 0
� � � digits_max = $game_temp.num_input_digits_max
� � � number = $game_variables[$game_temp.num_input_variable_id]
� � � @input_number_window = Window_InputNumber.new(digits_max)
� � � @input_number_window.number = number
� � � @input_number_window.x = self.x + 8
� � � @input_number_window.y = self.y + $game_temp.num_input_start * 32
� � end
� end
� #--------------------------------------------------------------------------
� # � ウィンドウ��置���明度�訕定
� #--------------------------------------------------------------------------
� def reset_window
� � if $game_temp.in_battle
� � � self.y = 16
� � else
� � � case $game_system.message_position
� � � when 0 � # �
� � � � self.y = 16
� � � when 1 � # 丕
� � � � self.y = 160
� � � when 2 � # 下
� � � � self.y = 304
� � � end
� � end
� � if $game_system.message_frame == 0
� � � self.opacity = 255
� � else
� � � self.opacity = 0
� � end
� � self.back_opacity = 160
� end
� #--------------------------------------------------------------------------
� # � フレー� 更新
� #--------------------------------------------------------------------------
� def update
� � super
Â� Â� # フェードインã?®å� ´å?ˆ
� � if @fade_in
� � � self.contents_opacity += 24
� � � if @input_number_window != nil
� � � � @input_number_window.contents_opacity += 24
� � � end
� � � if self.contents_opacity == 255
� � � � @fade_in = false
� � � end
� � � return
� � end
Â� Â� # 数値入å� ›ä¸•ã?®å� ´å?ˆ
� � if @input_number_window != nil
� � � @input_number_window.update
� � � # 決定
� � � if Input.trigger?(Input::C)
� � � � $game_system.se_play($data_system.decision_se)
� � � � $game_variables[$game_temp.num_input_variable_id] =
� � � � � @input_number_window.number
� � � � $game_map.need_refresh = true
Â� Â� Â� Â� # 数値入å� ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’解放
� � � � @input_number_window.dispose
� � � � @input_number_window = nil
� � � � if $arr !=nil
� $arr.dispose
� $arr=nil
� end
� � � � terminate_message
� � � end
� � � return
� � end
Â� Â� # メッセージ表示丕ã?®å� ´å?ˆ
� � if @contents_showing
Â� Â� Â� # é?¸æ� žè‚¢ã?®è¡¨ç¤ºä¸•ã?§ã?ªã?‘れã?°ãƒ?ーズサインを表示
� � � if $game_temp.choice_max == 0
� � � � self.pause = true
� � � end
� � � # ゕャンセル
� � � if Input.trigger?(Input::B)
� � � � if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
� � � � � $game_system.se_play($data_system.cancel_se)
� � � � � $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
� � � � � if $arr !=nil
� $arr.dispose
� $arr=nil
� end
� � � � � terminate_message
� � � � end
� � � end
� � � # 決定
� � � if Input.trigger?(Input::C)
� � � � if $game_temp.choice_max > 0
� � � � � $game_system.se_play($data_system.decision_se)
� � � � � $game_temp.choice_proc.call(self.index)
� � � � end
� � � � if $arr !=nil
� $arr.dispose
� $arr=nil
� end
� � � � terminate_message
� � � end
� � � return
� � end
Â� Â� # フェードアウト丕以外ã?§è¡¨ç¤ºå¾…ã?¡ã?®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã?‹é?¸æ� žè‚¢ã?Œã?‚ã‚‹å� ´å?ˆ
� � if @fade_out == false and $game_temp.message_text != nil
� � � @contents_showing = true
� � � $game_temp.message_window_showing = true
� � � reset_window
� � � refresh
� � � Graphics.frame_reset
� � � self.visible = true
� � � self.contents_opacity = 0
� � � if @input_number_window != nil
� � � � @input_number_window.contents_opacity = 0
� � � end
� � � @fade_in = true
� � � return
� � end
Â� Â� # 表示ã?™ã?¹ã??メッセージã?Œã?ªã?„ã?Œã€?ウィンドウã?Œå?¯è¦–ç� ¶æ…‹ã?®å� ´å?ˆ
� � if self.visible
� � � @fade_out = true
� � � self.opacity -= 48
� � � if self.opacity == 0
� � � � self.visible = false
� � � � @fade_out = false
� � � � $game_temp.message_window_showing = false
� � � end
� � � return
� � end
� end
� #--------------------------------------------------------------------------
� # � カーソル�矩形更新
� #--------------------------------------------------------------------------
� def update_cursor_rect
� � if @index >= 0
� � � n = $game_temp.choice_start + @index
� � � self.cursor_rect.set(8, n * 32, @cursor_width, 32)
� � else
� � � self.cursor_rect.empty
� � end
� end
end
Credits an jimme reashu
Du musst dein Window_Message Script im Editor durch disen Code ersetzen.
Ich habs nicht ausprobiert,aber du kannst es ja mal versuchen.
Allerdings ist es wohl nicht kompatibel mit dem AMS.
Zu deinem Problem:
Was genau geht beim Scripteinfügen nicht?
Vielleicht hast du beim reinkopieren einen Zeilenumbruch verursacht oder dir ist ein Comment Zeichen(#) abhanden gekommen.
Das verursacht manchmal Fehler beim Einfügen.