设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1575|回复: 5
打印 上一主题 下一主题

[已经解决] 即时消息脚本,换行就出现“口”字样,请高手帮忙解决

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
跳转到指定楼层
1
发表于 2014-2-28 11:17:06 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x



空格什么的都试过了,没事。就是换行了就会出现“口”,脚本框就那么宽而已,没办法不换行,所以请高手帮忙看看是怎么回事。
  1. #------------------制作by bluefool,转载请保留------------------
  2. module Blue
  3.   #这个是控制显示最近的多少条信息的,当超出一屏能显示的值的话可通过先按一下shift
  4.   #然后用上下翻看内容。再按一次shift则解除激活
  5.   Blue_max = 8
  6.   #这个填写进如游戏时生成的系统语言,
  7.   INTRO = ""
  8.   #战斗画面时即时消息窗口的x坐标
  9.   BATAM_X = 0
  10.   #战斗画面时即时消息窗口的y坐标
  11.   BATAM_Y = 100
  12.   #用于清空hash表,可以不管它,但不要让Blue_max大于它,当然,它的值也可以改变
  13.   NAM_MAX = 50
  14.   #主要传递信息参数为函数$am,参见脚本内容
  15. end
  16. #-------------------------------------------
  17. class Scene_Load < Scene_File
  18.   #--------------------------------------------------------------------------
  19.   # ● 确定时的处理
  20.   #--------------------------------------------------------------------------
  21.   def on_decision(filename)
  22.     # 文件不存在的情况下
  23.     unless FileTest.exist?(filename)
  24.       # 演奏冻结 SE
  25.       $game_system.se_play($data_system.buzzer_se)
  26.       return
  27.     end
  28.     # 演奏读档 SE
  29.     $game_system.se_play($data_system.load_se)
  30.     # 写入存档数据
  31.     file = File.open(filename, "rb")
  32.     read_save_data(file)
  33.     file.close
  34.     # 还原 BGM、BGS
  35.     $game_system.bgm_play($game_system.playing_bgm)
  36.     $game_system.bgs_play($game_system.playing_bgs)
  37.     # 刷新地图 (执行并行事件)
  38.     $a = {}
  39.     $game_map.update
  40.     # 切换到地图画面
  41.     $scene = Scene_Map.new
  42.   end
  43. end   
  44. #==============================================================================
  45. # ■ Scene_Title
  46. #------------------------------------------------------------------------------
  47. #  处理标题画面的类。
  48. #==============================================================================

  49. class Scene_Title
  50.   #--------------------------------------------------------------------------
  51.   # ● 命令 : 新游戏
  52.   #--------------------------------------------------------------------------
  53.   def command_new_game
  54.     # 演奏确定 SE
  55.     #$game_system.se_play($data_system.decision_se)
  56.     # 停止 BGM
  57.     Audio.bgm_stop
  58.     # 重置测量游戏时间用的画面计数器
  59.     Graphics.frame_count = 0
  60.     # 生成各种游戏对像
  61.     $game_temp          = Game_Temp.new
  62.     $game_system        = Game_System.new
  63.     $game_switches      = Game_Switches.new
  64.     $game_variables     = Game_Variables.new
  65.     $game_self_switches = Game_SelfSwitches.new
  66.     $game_screen        = Game_Screen.new
  67.     $game_actors        = Game_Actors.new
  68.     $game_party         = Game_Party.new
  69.     $game_troop         = Game_Troop.new
  70.     $game_map           = Game_Map.new
  71.     $game_player        = Game_Player.new
  72.     # 设置初期同伴位置
  73.     $game_party.setup_starting_members
  74.     # 设置初期位置的地图
  75.     $game_map.setup($data_system.start_map_id)
  76.     # 主角向初期位置移动
  77.     $game_player.moveto($data_system.start_x, $data_system.start_y)
  78.     # 刷新主角
  79.     $game_player.refresh
  80.     # 执行地图设置的 BGM 与 BGS 的自动切换
  81.     $game_map.autoplay
  82.     # 刷新地图 (执行并行事件)
  83.     $game_map.update
  84.     $a = {}
  85.     $am = Blue::INTRO
  86.     $ccc = 0
  87.     # 切换地图画面
  88.     $scene = Scene_Map.new
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # ● 命令 : 继续
  92.   #--------------------------------------------------------------------------
  93.   def command_continue
  94.     # 继续无效的情况下
  95.     unless @continue_enabled
  96.       # 演奏无效 SE
  97.       $game_system.se_play($data_system.buzzer_se)
  98.       return
  99.     end
  100.     # 演奏确定 SE
  101.     $game_system.se_play($data_system.decision_se)
  102.     # 切换到读档画面
  103.     $scene = Scene_Load.new
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 命令 : 退出
  107.   #--------------------------------------------------------------------------
  108.   def command_shutdown
  109.     # 演奏确定 SE
  110.     $game_system.se_play($data_system.decision_se)
  111.     # BGM、BGS、ME 的淡入淡出
  112.     Audio.bgm_fade(800)
  113.     Audio.bgs_fade(800)
  114.     Audio.me_fade(800)
  115.     # 退出
  116.     $scene = nil
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 战斗测试
  120.   #--------------------------------------------------------------------------
  121.   def battle_test
  122.     # 载入数据库 (战斗测试用)
  123.     $data_actors        = load_data("Data/BT_Actors.rxdata")
  124.     $data_classes       = load_data("Data/BT_Classes.rxdata")
  125.     $data_skills        = load_data("Data/BT_Skills.rxdata")
  126.     $data_items         = load_data("Data/BT_Items.rxdata")
  127.     $data_weapons       = load_data("Data/BT_Weapons.rxdata")
  128.     $data_armors        = load_data("Data/BT_Armors.rxdata")
  129.     $data_enemies       = load_data("Data/BT_Enemies.rxdata")
  130.     $data_troops        = load_data("Data/BT_Troops.rxdata")
  131.     $data_states        = load_data("Data/BT_States.rxdata")
  132.     $data_animations    = load_data("Data/BT_Animations.rxdata")
  133.     $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
  134.     $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
  135.     $data_system        = load_data("Data/BT_System.rxdata")
  136.     # 重置测量游戏时间用的画面计数器
  137.     Graphics.frame_count = 0
  138.     # 生成各种游戏对像
  139.     $game_temp          = Game_Temp.new
  140.     $game_system        = Game_System.new
  141.     $game_switches      = Game_Switches.new
  142.     $game_variables     = Game_Variables.new
  143.     $game_self_switches = Game_SelfSwitches.new
  144.     $game_screen        = Game_Screen.new
  145.     $game_actors        = Game_Actors.new
  146.     $game_party         = Game_Party.new
  147.     $game_troop         = Game_Troop.new
  148.     $game_map           = Game_Map.new
  149.     $game_player        = Game_Player.new
  150.     $a = {0=>"进入战斗测试."}
  151.     # 设置战斗测试用同伴
  152.     $game_party.setup_battle_test_members
  153.     # 设置队伍 ID、可以逃走标志、战斗背景
  154.     $game_temp.battle_troop_id = $data_system.test_troop_id
  155.     $game_temp.battle_can_escape = true
  156.     $game_map.battleback_name = $data_system.battleback_name
  157.     # 演奏战斗开始 BGM
  158.     $game_system.se_play($data_system.battle_start_se)
  159.     # 演奏战斗 BGM
  160.     $game_system.bgm_play($game_system.battle_bgm)
  161.     # 切换到战斗画面
  162.     $scene = Scene_Battle.new
  163.   end
  164. end
  165. #-------------------------------------------------------
  166. class Scene_Map
  167.   #--------------------------------------------------------------------------
  168.   # ● 主处理
  169.   #--------------------------------------------------------------------------
  170.   def main
  171.     @spriteset = Spriteset_Map.new
  172.     @message_window = Window_Message.new
  173.     @down_window = Window_Down.new
  174.     Graphics.transition
  175.     # 主循环
  176.     loop do
  177.       Graphics.update
  178.       Input.update
  179.       update
  180.       if $scene != self
  181.         break
  182.       end
  183.     end
  184.     Graphics.freeze
  185.     @spriteset.dispose
  186.     @message_window.dispose
  187.     @down_window.dispose
  188.     if $scene.is_a?(Scene_Title)
  189.       Graphics.transition
  190.       Graphics.freeze
  191.     end
  192.     @am_size = $a.size
  193.   end
  194.   #---------------------
  195.   def bluefool_sort
  196.     if $am != nil
  197.        if $a.size > Blue::NAM_MAX
  198.           a_temp = {}
  199.           j = 0
  200.           for i in ($a.size - Blue::Blue_max)...$a.size
  201.             a_temp[j] = $a[i]
  202.             j += 1
  203.           end  
  204.          $a = a_temp
  205.        end  
  206.        if $am.length < 54
  207.           $a[$a.size] = $am
  208.         else
  209.           while $am.length > 53
  210.             i = 53
  211.             while (/\W/ =~ $am[i-3,3]) != nil
  212.               i -= 1
  213.             end
  214.             $a[$a.size] = $am[0,i]
  215.             $am = $am[i ,$am.length - i]
  216.           end
  217.           $a[$a.size] = $am
  218.        end
  219.        $am = nil
  220.     end
  221.   end  
  222.   #--------------------------------------------------------------------------
  223.   # ● 刷新画面
  224.   #--------------------------------------------------------------------------
  225.   def update
  226.     # 循环
  227.     loop do
  228.       # 按照地图、实例、主角的顺序刷新
  229.       # (本更新顺序不会在的满足事件的执行条件下成为给予角色瞬间移动
  230.       #  的机会的重要因素)
  231.       $game_map.update
  232.       $game_system.map_interpreter.update
  233.       $game_player.update
  234.       # 系统 (计时器)、画面刷新
  235.       $game_system.update
  236.       $game_screen.update
  237.       # 如果主角在场所移动中就中断循环
  238.       unless $game_temp.player_transferring
  239.         break
  240.       end
  241.       # 执行场所移动
  242.       transfer_player
  243.       # 处理过渡中的情况下、中断循环
  244.       if $game_temp.transition_processing
  245.         break
  246.       end
  247.     end
  248.     # 刷新活动块
  249.     @spriteset.update
  250.     # 刷新信息窗口
  251.     @message_window.update
  252.     # 游戏结束的情况下
  253.     if $game_temp.gameover
  254.       # 切换的游戏结束画面
  255.       $scene = Scene_Gameover.new
  256.       return
  257.     end
  258.     # 返回标题画面的情况下
  259.     if $game_temp.to_title
  260.       # 切换到标题画面
  261.       $scene = Scene_Title.new
  262.       return
  263.     end
  264.     # 处理过渡中的情况下
  265.     if $game_temp.transition_processing
  266.       # 清除过渡处理中标志
  267.       $game_temp.transition_processing = false
  268.       # 执行过渡
  269.       if $game_temp.transition_name == ""
  270.         Graphics.transition(20)
  271.       else
  272.         Graphics.transition(40, "Graphics/Transitions/" +
  273.           $game_temp.transition_name)
  274.       end
  275.     end
  276.     # 显示信息窗口中的情况下
  277.     if $game_temp.message_window_showing
  278.       return
  279.     end
  280.     # 遇敌计数为 0 且、且遇敌列表不为空的情况下
  281.     if $game_player.encounter_count == 0 and $game_map.encounter_list != []
  282.       # 不是在事件执行中或者禁止遇敌中
  283.       unless $game_system.map_interpreter.running? or
  284.              $game_system.encounter_disabled
  285.         # 确定队伍
  286.         n = rand($game_map.encounter_list.size)
  287.         troop_id = $game_map.encounter_list[n]
  288.         # 队伍有效的话
  289.         if $data_troops[troop_id] != nil
  290.           # 设置调用战斗标志
  291.           $game_temp.battle_calling = true
  292.           $game_temp.battle_troop_id = troop_id
  293.           $game_temp.battle_can_escape = true
  294.           $game_temp.battle_can_lose = false
  295.           $game_temp.battle_proc = nil
  296.         end
  297.       end
  298.     end
  299.     #---------------------------------------------
  300.     bluefool_sort
  301.     if @am_size != $a.size
  302.        @down_window.refresh
  303.        if $a != nil and $a.size < Blue::Blue_max + 1
  304.         @down_window.index = $a.size/2 - 1
  305.         elsif $a != nil and $a.size > Blue::Blue_max
  306.         @down_window.index = Blue::Blue_max/2 - 1
  307.        end  
  308.        @am_size = $a.size
  309.     end  
  310.     if Input.trigger?(Input::A)
  311.       if @down_window.active == false
  312.         @down_window.active = true
  313.         $ccc = 1
  314.       else
  315.         @down_window.active = false
  316.         $ccc = 0
  317.       end  
  318.     end
  319.     if Input.trigger?(Input::DOWN)#输入DOWN键的情况
  320.       if @down_window.active == true and @down_window.index < (@down_window.item_max-1)/2
  321.         @down_window.index += 1
  322.       end  
  323.     end  
  324.     if Input.trigger?(Input::UP)#输入UP键的情况
  325.       if @down_window.active == true and @down_window.index > 0
  326.         @down_window.index -= 1
  327.       end  
  328.     end  
  329.     #----------------------------------------------
  330.     # 按下 B 键的情况下
  331.     if Input.trigger?(Input::B)
  332.       # 不是在事件执行中或菜单禁止中
  333.       unless $game_system.map_interpreter.running? or
  334.              $game_system.menu_disabled
  335.         # 设置菜单调用标志以及 SE 演奏
  336.         $game_temp.menu_calling = true
  337.         $game_temp.menu_beep = true
  338.       end
  339.     end
  340.     # 调试模式为 ON 并且按下 F9 键的情况下
  341.     if $DEBUG and Input.press?(Input::F9)
  342.       # 设置调用调试标志
  343.       $game_temp.debug_calling = true
  344.     end
  345.     # 不在主角移动中的情况下
  346.     unless $game_player.moving?
  347.       # 执行各种画面的调用
  348.       if $game_temp.battle_calling
  349.         call_battle
  350.       elsif $game_temp.shop_calling
  351.         call_shop
  352.       elsif $game_temp.name_calling
  353.         call_name
  354.       elsif $game_temp.menu_calling
  355.         call_menu
  356.       elsif $game_temp.save_calling
  357.         call_save
  358.       elsif $game_temp.debug_calling
  359.         call_debug
  360.       end
  361.     end
  362.   end
  363. end
  364. class Game_Battler
  365.   def bluefool_sort
  366.       if $am != nil
  367.         if $am.length < 54
  368.            $a[$a.size] = $am
  369.         else
  370.            while $am.length > 53
  371.              i = 53
  372.              while (/\W/ =~ $am[i-3,3]) != nil
  373.               i -= 1
  374.              end
  375.              $a[$a.size] = $am[0,i]
  376.              $am = $am[i ,$am.length - i]
  377.            end
  378.            $a[$a.size] = $am
  379.         end
  380.        $am = nil
  381.       end
  382.   end
  383.   #--------------------------------------------------------------------------
  384.   # ● 应用连续伤害效果
  385.   #--------------------------------------------------------------------------
  386.   def slip_damage_effect
  387.     # 设置伤害
  388.     self.damage = self.maxhp / 98
  389.     # 分散
  390.     if self.damage.abs > 0
  391.       amp = [self.damage.abs * 15 / 100, 1].max
  392.       self.damage += rand(amp+1) + rand(amp+1) - amp
  393.     end
  394.     # HP 的伤害减法运算
  395.     self.hp -= self.damage
  396.     if self.damage > 0
  397.       $am = "状态使#{self.name}受到了#{self.damage}点伤害!"
  398.     elsif self.damage < 0
  399.       $am = "状态使#{self.name}恢复了#{self.damage.abs}点#{$data_system.words.hp}"
  400.     end
  401.     bluefool_sort
  402.     # 过程结束
  403.     return true
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # ● 应用通常攻击效果
  407.   #     attacker : 攻击者 (battler)
  408.   #--------------------------------------------------------------------------
  409.   def attack_effect(attacker)
  410.     # 清除会心一击标志
  411.     self.critical = false
  412.     # 第一命中判定
  413.     hit_result = (rand(100) < attacker.hit)
  414.     # 命中的情况下
  415.     if hit_result == true
  416.       # 计算基本伤害
  417.       atk = [attacker.atk - self.pdef / 2, 0].max
  418.       self.damage = atk * (20 + attacker.str) / 20
  419.       # 属性修正
  420.       self.damage *= elements_correct(attacker.element_set)
  421.       self.damage /= 100
  422.       # 伤害符号正确的情况下
  423.       if self.damage > 0
  424.         # 会心一击修正
  425.         if rand(100) < 4 * attacker.dex / self.agi
  426.           self.damage *= 2
  427.           self.critical = true
  428.         end
  429.         # 防御修正
  430.         if self.guarding?
  431.           self.damage /= 2
  432.         end
  433.       end
  434.       # 分散
  435.       if self.damage.abs > 0
  436.         amp = [self.damage.abs * 15 / 100, 1].max
  437.         self.damage += rand(amp+1) + rand(amp+1) - amp
  438.       end
  439.       # 第二命中判定
  440.       eva = 8 * self.agi / attacker.dex + self.eva
  441.       hit = self.damage < 0 ? 100 : 100 - eva
  442.       hit = self.cant_evade? ? 100 : hit
  443.       hit_result = (rand(100) < hit)
  444.     end
  445.     # 命中的情况下
  446.     if hit_result == true
  447.       # 状态冲击解除
  448.       remove_states_shock
  449.       # HP 的伤害计算
  450.       self.hp -= self.damage
  451.       $am = "#{attacker.name}对#{self.name}造成了#{self.damage}伤害!"
  452.       bluefool_sort
  453.       # 状态变化
  454.       @state_changed = false
  455.       states_plus(attacker.plus_state_set)
  456.       states_minus(attacker.minus_state_set)
  457.     # Miss 的情况下
  458.     else
  459.       # 伤害设置为 "Miss"
  460.       self.damage = "Miss"
  461.       $am = "#{attacker.name}没有命中!"
  462.       bluefool_sort
  463.       # 清除会心一击标志
  464.       self.critical = false
  465.     end
  466.     # 过程结束
  467.     return true
  468.   end
  469.   #--------------------------------------------------------------------------
  470.   # ● 应用特技效果
  471.   #     user  : 特技的使用者 (battler)
  472.   #     skill : 特技
  473.   #--------------------------------------------------------------------------
  474.   def skill_effect(user, skill)
  475.     # 清除会心一击标志
  476.     self.critical = false
  477.     # 特技的效果范围是 HP 1 以上的己方、自己的 HP 为 0、
  478.     # 或者特技的效果范围是 HP 0 的己方、自己的 HP 为 1 以上的情况下
  479.     if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
  480.        ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
  481.       # 过程结束
  482.       return false
  483.     end
  484.     # 清除有效标志
  485.     effective = false
  486.     # 公共事件 ID 是有效的情况下,设置为有效标志
  487.     effective |= skill.common_event_id > 0
  488.     # 第一命中判定
  489.     hit = skill.hit
  490.     if skill.atk_f > 0
  491.       hit *= user.hit / 100
  492.     end
  493.     hit_result = (rand(100) < hit)
  494.     # 不确定的特技的情况下设置为有效标志
  495.     effective |= hit < 100
  496.     # 命中的情况下
  497.     if hit_result == true
  498.       # 计算威力
  499.       power = skill.power + user.atk * skill.atk_f / 100
  500.       if power > 0
  501.         power -= self.pdef * skill.pdef_f / 200
  502.         power -= self.mdef * skill.mdef_f / 200
  503.         power = [power, 0].max
  504.       end
  505.       # 计算倍率
  506.       rate = 20
  507.       rate += (user.str * skill.str_f / 100)
  508.       rate += (user.dex * skill.dex_f / 100)
  509.       rate += (user.agi * skill.agi_f / 100)
  510.       rate += (user.int * skill.int_f / 100)
  511.       # 计算基本伤害
  512.       self.damage = power * rate / 20
  513.       # 属性修正
  514.       self.damage *= elements_correct(skill.element_set)
  515.       self.damage /= 100
  516.       # 伤害符号正确的情况下
  517.       if self.damage > 0
  518. ###########################################
  519.        if rand(100) < 4 * user.dex / self.dex
  520.         self.damage *= 2
  521.         self.critical = true
  522.        end
  523. ###########################################
  524.         # 防御修正
  525.         if self.guarding?
  526.           self.damage /= 2
  527.         end
  528.       end
  529.       # 分散
  530.       if skill.variance > 0 and self.damage.abs > 0
  531.         amp = [self.damage.abs * skill.variance / 100, 1].max
  532.         self.damage += rand(amp+1) + rand(amp+1) - amp
  533.       end
  534.       # 第二命中判定
  535.       eva = 8 * self.agi / user.dex + self.eva
  536.       hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
  537.       hit = self.cant_evade? ? 100 : hit
  538.       hit_result = (rand(100) < hit)
  539.       # 不确定的特技的情况下设置为有效标志
  540.       effective |= hit < 100
  541.     end
  542.     # 命中的情况下
  543.     if hit_result == true
  544.       # 威力 0 以外的物理攻击的情况下
  545.       if skill.power != 0 and skill.atk_f > 0
  546.         # 状态冲击解除
  547.         remove_states_shock
  548.         # 设置有效标志
  549.         effective = true
  550.       end
  551.       # HP 的伤害减法运算
  552.       last_hp = self.hp
  553.       self.hp -= self.damage
  554.         if self.damage > 0
  555.          $am = "#{user.name}对#{self.name}造成了#{self.damage}伤害."
  556.          elsif self.damage < 0
  557.           if user == self
  558.            $am = "#{user.name}恢复了自己#{self.damage.abs}点#{$data_system.words.hp}."
  559.            else
  560.            $am = "#{user.name}恢复了#{self.name}#{self.damage.abs}点#{$data_system.words.hp}."
  561.           end
  562.         end
  563.       bluefool_sort
  564.       effective |= self.hp != last_hp
  565.       # 状态变化
  566.       @state_changed = false
  567.       effective |= states_plus(skill.plus_state_set)
  568.       effective |= states_minus(skill.minus_state_set)
  569.       # 威力为 0 的场合
  570.       if skill.power == 0
  571.         # 伤害设置为空的字串
  572.         self.damage = ""
  573.         # 状态没有变化的情况下
  574.         unless @state_changed
  575.           # 伤害设置为 "Miss"
  576.           self.damage = "Miss"
  577.           $am = "#{user.name}没有命中!"
  578.           bluefool_sort
  579.         end
  580.       end
  581.     # Miss 的情况下
  582.     else
  583.       # 伤害设置为 "Miss"
  584.       self.damage = "Miss"
  585.       $am = "#{user.name}没有命中!"
  586.       bluefool_sort
  587.     end
  588.     # 不在战斗中的情况下
  589.     unless $game_temp.in_battle
  590.       # 伤害设置为 nil
  591.       self.damage = nil
  592.     end
  593.     # 过程结束
  594.     return effective
  595.   end
  596. end
  597. class Scene_Battle
  598.   #--------------------------------------------------------------------------
  599.   # ● 刷新画面 (主回合步骤 1 : 准备行动)
  600.   #--------------------------------------------------------------------------
  601.   def update_phase4_step1
  602.     # 隐藏帮助窗口
  603.     @help_window.visible = false
  604.     # 判定胜败
  605.     if judge
  606.       # 胜利或者失败的情况下 : 过程结束
  607.       return
  608.     end
  609.     # 强制行动的战斗者不存在的情况下
  610.     if $game_temp.forcing_battler == nil
  611.       # 设置战斗事件
  612.       setup_battle_event
  613.       # 执行战斗事件中的情况下
  614.       if $game_system.battle_interpreter.running?
  615.         return
  616.       end
  617.     end
  618.     # 强制行动的战斗者存在的情况下
  619.     if $game_temp.forcing_battler != nil
  620.       # 在头部添加后移动
  621.       @action_battlers.delete($game_temp.forcing_battler)
  622.       @action_battlers.unshift($game_temp.forcing_battler)
  623.     end
  624.     # 未行动的战斗者不存在的情况下 (全员已经行动)
  625.     if @action_battlers.size == 0
  626.       # 开始同伴命令回合
  627.       start_phase2
  628.       return
  629.     end
  630.     # 初始化动画 ID 和公共事件 ID
  631.     @animation1_id = 0
  632.     @animation2_id = 0
  633.     @common_event_id = 0
  634.     # 未行动的战斗者移动到序列的头部
  635.     @active_battler = @action_battlers.shift
  636.     # 如果已经在战斗之外的情况下
  637.     if @active_battler.index == nil
  638.       return
  639.     end
  640.     # 连续伤害
  641.     if @active_battler.hp > 0 and @active_battler.slip_damage?
  642.       @active_battler.slip_damage_effect
  643.       @active_battler.damage_pop = true
  644.       @down_window.refresh
  645.     end
  646.     # 自然解除状态
  647.     @active_battler.remove_states_auto
  648.     # 刷新状态窗口
  649.     @status_window.refresh
  650.     # 移至步骤 2
  651.     @phase4_step = 2
  652.   end
  653.   #--------------------------------------------------------------------------
  654.   # ● 开始结束战斗回合
  655.   #--------------------------------------------------------------------------
  656.   def start_phase5
  657.     # 转移到回合 5
  658.     @phase = 5
  659.     # 演奏战斗结束 ME
  660.     $game_system.me_play($game_system.battle_end_me)
  661.     # 还原为战斗开始前的 BGM
  662.     $game_system.bgm_play($game_temp.map_bgm)
  663.     # 初始化 EXP、金钱、宝物
  664.     exp = 0
  665.     gold = 0
  666.     treasures = []
  667.     # 循环
  668.     for enemy in $game_troop.enemies
  669.       # 敌人不是隐藏状态的情况下
  670.       unless enemy.hidden
  671.         # 获得 EXP、增加金钱
  672.         exp += enemy.exp
  673.         gold += enemy.gold
  674.         # 出现宝物判定
  675.         if rand(100) < enemy.treasure_prob
  676.           if enemy.item_id > 0
  677.             treasures.push($data_items[enemy.item_id])
  678.           end
  679.           if enemy.weapon_id > 0
  680.             treasures.push($data_weapons[enemy.weapon_id])
  681.           end
  682.           if enemy.armor_id > 0
  683.             treasures.push($data_armors[enemy.armor_id])
  684.           end
  685.         end
  686.       end
  687.     end
  688.     # 限制宝物数为 6 个
  689.     treasures = treasures[0..8]
  690.     # 获得 EXP
  691.     for i in 0...$game_party.actors.size
  692.       actor = $game_party.actors[i]
  693.       if actor.cant_get_exp? == false
  694.         last_level = actor.level
  695.         actor.exp += exp
  696.         if actor.level > last_level
  697.           @status_window.level_up(i)
  698.         end
  699.       end
  700.     end
  701.     # 获得金钱
  702.     $game_party.gain_gold(gold)
  703.     $am = "获得#{exp}经验 #{gold}#{$data_system.words.gold}!"
  704.     bluefool_sort
  705.     @down_window.refresh
  706.     # 获得宝物
  707.     for item in treasures
  708.       case item
  709.       when RPG::Item
  710.         $game_party.gain_item(item.id, 1)
  711.         $am = "获得#{$data_items[item.id].name}"
  712.         bluefool_sort
  713.       when RPG::Weapon
  714.         $game_party.gain_weapon(item.id, 1)
  715.         $am = "获得#{$data_weapons[item.id].name}"
  716.         bluefool_sort
  717.       when RPG::Armor
  718.         $game_party.gain_armor(item.id, 1)
  719.         $am = "获得#{$data_armors[item.id].name}"
  720.         bluefool_sort
  721.       end
  722.       @down_window.refresh
  723.     end
  724.     # 生成战斗结果窗口
  725.     @result_window = Window_BattleResult.new(exp, gold, treasures)
  726.     # 设置等待计数
  727.     @phase5_wait_count = 100
  728.   end
  729.   #--------------------------------------------------------------------------
  730.   # ● 生成基本行动结果
  731.   #--------------------------------------------------------------------------
  732.   def make_basic_action_result
  733.     # 攻击的情况下
  734.     if @active_battler.current_action.basic == 0
  735.       # 设置攻击 ID
  736.       @animation1_id = @active_battler.animation1_id
  737.       @animation2_id = @active_battler.animation2_id
  738.       # 行动方的战斗者是敌人的情况下
  739.       if @active_battler.is_a?(Game_Enemy)
  740.         if @active_battler.restriction == 3
  741.           target = $game_troop.random_target_enemy
  742.         elsif @active_battler.restriction == 2
  743.           target = $game_party.random_target_actor
  744.         else
  745.           index = @active_battler.current_action.target_index
  746.           target = $game_party.smooth_target_actor(index)
  747.         end
  748.       end
  749.       # 行动方的战斗者是角色的情况下
  750.       if @active_battler.is_a?(Game_Actor)
  751.         if @active_battler.restriction == 3
  752.           target = $game_party.random_target_actor
  753.         elsif @active_battler.restriction == 2
  754.           target = $game_troop.random_target_enemy
  755.         else
  756.           index = @active_battler.current_action.target_index
  757.           target = $game_troop.smooth_target_enemy(index)
  758.         end
  759.       end
  760.       # 设置对像方的战斗者序列
  761.       @target_battlers = [target]
  762.       for target in @target_battlers
  763.         $am = "#{@active_battler.name}对#{target.name}发起攻击!"
  764.         bluefool_sort
  765.         target.attack_effect(@active_battler)
  766.       end
  767.       return
  768.     end
  769.     # 防御的情况下
  770.     if @active_battler.current_action.basic == 1
  771.       @help_window.set_text($data_system.words.guard, 1)
  772.       $am = "#{@active_battler.name}进行了防御."
  773.       bluefool_sort
  774.       return
  775.     end
  776.     # 逃跑的情况下
  777.     if @active_battler.is_a?(Game_Enemy) and
  778.        @active_battler.current_action.basic == 2
  779.       #  帮助窗口显示"逃跑"
  780.       @help_window.set_text("逃跑", 1)
  781.       # 逃跑
  782.       @active_battler.escape
  783.       return
  784.     end
  785.     # 什么也不做的情况下
  786.     if @active_battler.current_action.basic == 3
  787.       # 清除强制行动对像的战斗者
  788.       $game_temp.forcing_battler = nil
  789.       # 移至步骤 1
  790.       @phase4_step = 1
  791.       return
  792.     end
  793.   end
  794.   #--------------------------------------------------------------------------
  795.   # ● 生成特技行动结果
  796.   #--------------------------------------------------------------------------
  797.   def make_skill_action_result
  798.     # 获取特技
  799.     [url=home.php?mod=space&uid=260100]@skill[/url] = $data_skills[@active_battler.current_action.skill_id]
  800.     # 如果不是强制行动
  801.     unless @active_battler.current_action.forcing
  802.       # 因为 SP 耗尽而无法使用的情况下
  803.       unless @active_battler.skill_can_use?(@skill.id)
  804.         # 清除强制行动对像的战斗者
  805.         $game_temp.forcing_battler = nil
  806.         # 移至步骤 1
  807.         @phase4_step = 1
  808.         return
  809.       end
  810.     end
  811.     # 消耗 SP
  812.     @active_battler.sp -= @skill.sp_cost
  813.     # 刷新状态窗口
  814.     @status_window.refresh
  815.     # 在帮助窗口显示特技名
  816.     @help_window.set_text(@skill.name, 1)
  817.     # 设置动画 ID
  818.     @animation1_id = @skill.animation1_id
  819.     @animation2_id = @skill.animation2_id
  820.     # 设置公共事件 ID
  821.     @common_event_id = @skill.common_event_id
  822.     # 设置对像侧战斗者
  823.     set_target_battlers(@skill.scope)
  824.     # 应用特技效果
  825.     for target in @target_battlers
  826.       case @skill.scope
  827.       when 1  
  828.        $am = "#{@active_battler.name}施展#{@skill.name}攻击#{target.name}!"
  829.       when 2  
  830.        $am = "#{@active_battler.name}施展#{@skill.name}攻击#{target.name}!"
  831.       when 7  
  832.         $am = "#{@active_battler.name}对自己施展#{@skill.name}."
  833.       else
  834.         if target == @active_battler
  835.           $am = "#{@active_battler.name}对自己施展#{@skill.name}."
  836.           else
  837.           $am = "#{@active_battler.name}对#{target.name}施展#{@skill.name}."
  838.         end  
  839.       end
  840.       bluefool_sort
  841.       target.skill_effect(@active_battler, @skill)
  842.     end
  843.   end
  844.   #--------------------------------------------------------------------------
  845.   # ● 生成物品行动结果
  846.   #--------------------------------------------------------------------------
  847.   def make_item_action_result
  848.     # 获取物品
  849.     @item = $data_items[@active_battler.current_action.item_id]
  850.     # 因为物品耗尽而无法使用的情况下
  851.     unless $game_party.item_can_use?(@item.id)
  852.       # 移至步骤 1
  853.       @phase4_step = 1
  854.       return
  855.     end
  856.     # 消耗品的情况下
  857.     if @item.consumable
  858.       # 使用的物品减 1
  859.       $game_party.lose_item(@item.id, 1)
  860.     end
  861.     # 在帮助窗口显示物品名
  862.     @help_window.set_text(@item.name, 1)
  863.     # 设置动画 ID
  864.     @animation1_id = @item.animation1_id
  865.     @animation2_id = @item.animation2_id
  866.     # 设置公共事件 ID
  867.     @common_event_id = @item.common_event_id
  868.     # 确定对像
  869.     index = @active_battler.current_action.target_index
  870.     target = $game_party.smooth_target_actor(index)
  871.     # 设置对像侧战斗者
  872.     set_target_battlers(@item.scope)
  873.     # 应用物品效果
  874.     for target in @target_battlers
  875.       target.item_effect(@item)
  876.       if target == @active_battler
  877.         $am = "#{@active_battler.name}对自己使用了#{@item.name}"
  878.        else
  879.         $am = "#{@active_battler.name}对#{target.name}使用了#{@item.name}"
  880.       end
  881.       bluefool_sort
  882.     end
  883.   end
  884.   #--------------------------------------------------------------------------
  885.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  886.   #--------------------------------------------------------------------------
  887.   def update_phase4_step4
  888.     # 对像方动画
  889.     for target in @target_battlers
  890.       target.animation_id = @animation2_id
  891.       target.animation_hit = (target.damage != "Miss")
  892.     end
  893.     @down_window.refresh
  894.     @wait_count = 8
  895.     # 移至步骤 5
  896.     @phase4_step = 5
  897.   end
  898.   def bluefool_sort
  899.       if $am != nil
  900.        if $a.size > Blue::NAM_MAX
  901.           a_temp = {}
  902.           j = 0
  903.           for i in ($a.size - Blue::Blue_max)...$a.size
  904.             a_temp[j] = $a[i]
  905.             j += 1
  906.           end  
  907.          $a = a_temp
  908.        end  
  909.         if $am.length < 54
  910.            $a[$a.size] = $am
  911.         else
  912.            while $am.length > 53
  913.              i = 53
  914.              while (/\W/ =~ $am[i-3,3]) != nil
  915.               i -= 1
  916.              end
  917.              $a[$a.size] = $am[0,i]
  918.              $am = $am[i ,$am.length - i]
  919.            end
  920.            $a[$a.size] = $am
  921.         end
  922.        $am = nil
  923.       end
  924.   end
  925.   def main
  926.     $am = "队伍进入战斗!"
  927.     bluefool_sort
  928.     $game_temp.in_battle = true
  929.     $game_temp.battle_turn = 0
  930.     $game_temp.battle_event_flags.clear
  931.     $game_temp.battle_abort = false
  932.     $game_temp.battle_main_phase = false
  933.     $game_temp.battleback_name = $game_map.battleback_name
  934.     $game_temp.forcing_battler = nil
  935.     $game_system.battle_interpreter.setup(nil, 0)
  936.     @troop_id = $game_temp.battle_troop_id
  937.     $game_troop.setup(@troop_id)
  938.     #生成角色命令窗口
  939.     s1 = $data_system.words.attack
  940.     s2 = $data_system.words.skill
  941.     s3 = $data_system.words.guard
  942.     s4 = $data_system.words.item
  943.     @actor_command_window = Window_Command.new(80, [s1, s2, s3, s4])
  944.     @actor_command_window.y = 160
  945.     @actor_command_window.back_opacity = 220
  946.     @actor_command_window.active = false
  947.     @actor_command_window.visible = false
  948.     # 生成其它窗口
  949.     @party_command_window = Window_PartyCommand.new
  950.     @help_window = Window_Help.new
  951.     @help_window.back_opacity = 220
  952.     @help_window.visible = false
  953.     @status_window = Window_BattleStatus.new
  954.     @message_window = Window_Message.new
  955.     @down_window = Window_Down.new
  956.     @down_window.y = Blue::BATAM_Y
  957.     @down_window.z = @actor_command_window.z - 10
  958.     # 生成活动块
  959.     @spriteset = Spriteset_Battle.new
  960.     # 初始化等待计数
  961.     @wait_count = 0
  962.     # 执行过渡
  963.     if $data_system.battle_transition == ""
  964.       Graphics.transition(20)
  965.     else
  966.       Graphics.transition(40, "Graphics/Transitions/" +
  967.         $data_system.battle_transition)
  968.     end
  969.     # 开始自由战斗回合
  970.     start_phase1
  971.     # 主循环
  972.     loop do
  973.       Graphics.update
  974.       Input.update
  975.       update
  976.       if $scene != self
  977.         break
  978.       end
  979.     end
  980.     # 刷新地图
  981.     $game_map.refresh
  982.     # 准备过渡
  983.     Graphics.freeze
  984.     # 释放窗口
  985.     @actor_command_window.dispose
  986.     @party_command_window.dispose
  987.     @help_window.dispose
  988.     @status_window.dispose
  989.     @message_window.dispose
  990.     @down_window.dispose
  991.     $am = "战斗结束"
  992.     bluefool_sort
  993.     if @skill_window != nil
  994.       @skill_window.dispose
  995.     end
  996.     if @item_window != nil
  997.       @item_window.dispose
  998.     end
  999.     if @result_window != nil
  1000.       @result_window.dispose
  1001.     end
  1002.     # 释放活动块
  1003.     @spriteset.dispose
  1004.     # 标题画面切换中的情况
  1005.     if $scene.is_a?(Scene_Title)
  1006.       # 淡入淡出画面
  1007.       Graphics.transition
  1008.       Graphics.freeze
  1009.     end
  1010.     # 战斗测试或者游戏结束以外的画面切换中的情况
  1011.     if $BTEST and not $scene.is_a?(Scene_Gameover)
  1012.       $scene = nil
  1013.     end
  1014.   end
  1015. end
  1016. #---------------------------------------------------------
  1017. class Interpreter
  1018.   def bluefool_sort
  1019.       if $am != nil
  1020.        if $a.size > Blue::NAM_MAX
  1021.           a_temp = {}
  1022.           j = 0
  1023.           for i in ($a.size - Blue::Blue_max)...$a.size
  1024.             a_temp[j] = $a[i]
  1025.             j += 1
  1026.           end  
  1027.          $a = a_temp
  1028.        end  
  1029.         if $am.length < 54
  1030.            $a[$a.size] = $am
  1031.         else
  1032.            while $am.length > 53
  1033.              i = 53
  1034.              while (/\W/ =~ $am[i-3,3]) != nil
  1035.               i -= 1
  1036.              end
  1037.              $a[$a.size] = $am[0,i]
  1038.              $am = $am[i ,$am.length - i]
  1039.            end
  1040.            $a[$a.size] = $am
  1041.         end
  1042.        $am = nil
  1043.       end
  1044.   end
  1045.   def command_101
  1046.     if $game_temp.message_text != nil
  1047.       return false
  1048.     end
  1049.     # 设置信息结束后待机和返回调用标志
  1050.     @message_waiting = true
  1051.     $game_temp.message_proc = Proc.new { @message_waiting = false }
  1052.     # message_text 设置为 1 行
  1053.     $game_temp.message_text = @list[@index].parameters[0] + "\n"
  1054.     if (@list[@index].parameters[0]).split(/\\/)[1] != nil
  1055.      $am = @list[@index].parameters[0].split(/\\/)[0]
  1056.      else
  1057.      $am = @list[@index].parameters[0]
  1058.     end  
  1059.     bluefool_sort
  1060.     line_count = 1
  1061.     # 循环
  1062.     loop do
  1063.       # 下一个事件指令为文章两行以上的情况
  1064.       if @list[@index+1].code == 401
  1065.         # message_text 添加到第 2 行以下
  1066.         $game_temp.message_text += @list[@index+1].parameters[0] + "\n"
  1067.         $am = @list[@index+1].parameters[0]
  1068.         bluefool_sort
  1069.         line_count += 1
  1070.       # 事件指令不在文章两行以下的情况
  1071.       else
  1072.         # 下一个事件指令为显示选择项的情况下
  1073.         if @list[@index+1].code == 102
  1074.           # 如果选择项能收纳在画面里
  1075.           if @list[@index+1].parameters[0].size <= 4 - line_count
  1076.             # 推进索引
  1077.             @index += 1
  1078.             # 设置选择项
  1079.             $game_temp.choice_start = line_count
  1080.             setup_choices(@list[@index].parameters)
  1081.           end
  1082.         # 下一个事件指令为处理输入数值的情况下
  1083.         elsif @list[@index+1].code == 103
  1084.           # 如果数值输入窗口能收纳在画面里
  1085.           if line_count < 4
  1086.             # 推进索引
  1087.             @index += 1
  1088.             # 设置输入数值
  1089.             $game_temp.num_input_start = line_count
  1090.             $game_temp.num_input_variable_id = @list[@index].parameters[0]
  1091.             $game_temp.num_input_digits_max = @list[@index].parameters[1]
  1092.           end
  1093.         end
  1094.         # 继续
  1095.         return true
  1096.       end
  1097.       # 推进索引
  1098.       @index += 1
  1099.     end
  1100.   end
  1101.   def command_125
  1102.     value = operate_value(@parameters[0], @parameters[1], @parameters[2])
  1103.     $game_party.gain_gold(value)
  1104.     if value >= 0
  1105.       $am = "#{$game_party.actors[0].name}得到了#{value}#{$data_system.words.gold}"
  1106.     else
  1107.       $am = "#{$game_party.actors[0].name}失去了#{value.abs.to_s}#{$data_system.words.gold}"
  1108.     end  
  1109.     bluefool_sort
  1110.     #Audio.se_play("Audio/SE/",100,100)
  1111.     return true
  1112.   end
  1113.   def command_126
  1114.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  1115.     # 增减物品
  1116.     $game_party.gain_item(@parameters[0], value)
  1117.     if value >= 0
  1118.       $am = "#{$game_party.actors[0].name}得到了#{value.abs.to_s}个#{$data_items[@parameters[0]].name}"
  1119.     else
  1120.       $am = "#{$game_party.actors[0].name}失去了#{value.abs.to_s}个#{$data_items[@parameters[0]].name}"
  1121.     end
  1122.     bluefool_sort
  1123.     #Audio.se_play("Audio/SE/",100,100)
  1124.     return true
  1125.   end
  1126.   def command_127
  1127.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  1128.     # 增减武器
  1129.     $game_party.gain_weapon(@parameters[0], value)
  1130.     if value >= 0
  1131.       $am = "#{$game_party.actors[0].name}得到了#{value.abs.to_s}个#{$data_weapons[@parameters[0]].name}"
  1132.     else
  1133.       $am = "#{$game_party.actors[0].name}失去了#{value.abs.to_s}个#{$data_weapons[@parameters[0]].name}"
  1134.     end
  1135.     bluefool_sort
  1136.    # Audio.se_play("Audio/SE/",100,100)
  1137.     return true
  1138.   end
  1139.   def command_128
  1140.     value = operate_value(@parameters[1], @parameters[2], @parameters[3])
  1141.     # 增减防具
  1142.     $game_party.gain_armor(@parameters[0], value)
  1143.     if value >= 0
  1144.       $am = "#{$game_party.actors[0].name}得到了#{value.abs.to_s}个#{$data_armors[@parameters[0]].name}"
  1145.     else
  1146.       $am = "#{$game_party.actors[0].name}失去了#{value.abs.to_s}个#{$data_armors[@parameters[0]].name}"
  1147.     end
  1148.     bluefool_sort
  1149.    # Audio.se_play("Audio/SE/",100,100)
  1150.     return true
  1151.   end
  1152.   def command_129
  1153.     # 获取角色
  1154.     actor = $game_actors[@parameters[0]]
  1155.     # 角色有效的情况下
  1156.     if actor != nil
  1157.       # 操作分支
  1158.       if @parameters[1] == 0
  1159.         if @parameters[2] == 1
  1160.           $game_actors[@parameters[0]].setup(@parameters[0])
  1161.         end
  1162.         $game_party.add_actor(@parameters[0])
  1163.         $am = ""
  1164.         bluefool_sort
  1165.       else
  1166.         $game_party.remove_actor(@parameters[0])
  1167.         $am = ""
  1168.         bluefool_sort
  1169.       end
  1170.     end
  1171.     # 继续
  1172.     return true
  1173.   end
  1174.   #-------------------------
  1175. end
  1176. #==============================================================================
  1177. # ■ Window_Down
  1178. #------------------------------------------------------------------------------
  1179. #   信息窗口。
  1180. #==============================================================================

  1181. class Window_Down < Window_Selectable
  1182.   #--------------------------------------------------------------------------
  1183.   # ● 初始化对像
  1184.   #--------------------------------------------------------------------------
  1185.   def initialize
  1186.     super(0, 320, 450, 160)
  1187.     @column_max = 1
  1188.     self.opacity = 0
  1189.     #self.z = 999
  1190.     if $a != nil and $a.size < 21
  1191.       self.index = $a.size/2
  1192.       elsif $a != nil and $a.size > 20
  1193.       self.index = 10
  1194.     end  
  1195.     refresh
  1196.     self.active = false
  1197.   end
  1198.   #--------------------------------------------------------------------------
  1199.   # ● 刷新
  1200.   #--------------------------------------------------------------------------
  1201.   def refresh
  1202.     if self.contents != nil
  1203.       self.contents.dispose
  1204.       self.contents = nil
  1205.     end
  1206.     if $a != nil and $a.size < Blue::Blue_max + 1
  1207.       @item_max = $a.size
  1208.       elsif $a != nil and $a.size > Blue::Blue_max
  1209.       @item_max = Blue::Blue_max
  1210.     end  
  1211.     if @item_max > 0
  1212.       self.contents = Bitmap.new(width - 32, row_max * 16)
  1213.       for i in 0...@item_max
  1214.          draw_item(i)
  1215.       end
  1216.     end
  1217.   end
  1218.   def item_max
  1219.     return @item_max
  1220.   end  
  1221.   #--------------------------------------------------------------------------
  1222.   # ● 描绘项目
  1223.   #     index : 项目编号
  1224.   #--------------------------------------------------------------------------
  1225.   def draw_item(index)
  1226.     if $a.size < Blue::Blue_max + 1
  1227.      item = $a[index]
  1228.      else
  1229.      item = $a[index + $a.size - Blue::Blue_max]
  1230.     end
  1231.     x = 0
  1232.     y = index * 16
  1233.     self.contents.font.size = 12
  1234.     self.contents.font.color = Color.new(-170,-170,-170,255)
  1235.     self.contents.draw_text(x + 6, y + 1, self.contents.text_size(item).width, 16, item, 0)
  1236.     self.contents.font.color = normal_color
  1237.     self.contents.draw_text(x + 5, y, self.contents.text_size(item).width, 16, item, 0)
  1238.   end
  1239.   #--------------------------------------
  1240.   #  ● 刷新光标
  1241.   #--------------------------------------
  1242.   def update_cursor_rect
  1243.     # 光标位置不满 0 的情况下
  1244.     if @index < 0
  1245.       self.cursor_rect.empty
  1246.       return
  1247.     end
  1248.     # 获取当前的行
  1249.     row = @index / @column_max
  1250.     # 当前行被显示开头行前面的情况下
  1251.     if row < self.top_row
  1252.       # 从当前行向开头行滚动
  1253.       self.top_row = row
  1254.     end
  1255.     # 当前行被显示末尾行之后的情况下
  1256.     if row > self.top_row + (self.page_row_max - 1)
  1257.       # 从当前行向末尾滚动
  1258.       self.top_row = row - (self.page_row_max - 1)
  1259.     end
  1260.     # 计算光标的宽
  1261.     cursor_width = self.width / @column_max - 32
  1262.     cursor_width = 0
  1263.     # 计算光标坐标
  1264.     x = @index % @column_max * (cursor_width + 32)
  1265.     y = @index / @column_max * 32 - self.oy
  1266.     # 更新国标矩形
  1267.     self.cursor_rect.set(x, y, cursor_width, 16)
  1268.   end
  1269. end
复制代码

博客:我的博客

Lv1.梦旅人

梦石
0
星屑
50
在线时间
31 小时
注册时间
2014-2-20
帖子
87
2
发表于 2014-2-28 12:15:58 | 只看该作者
一个很简单的方法写两次脚本就行了,嘻嘻。。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
117
在线时间
552 小时
注册时间
2012-8-18
帖子
1429
3
发表于 2014-2-28 12:19:00 | 只看该作者
就是他没有按照换行符分割再输出,有一个解决办法就是第一段脚本的最后加上\
  1. $a = "123456\
  2. 789"
复制代码

点评

可以了,谢谢了。你这样比较容易。  发表于 2014-3-2 03:55
貌似之前的Fuki脚本也有这样的问题……  发表于 2014-2-28 14:33
我要填坑!我要背单词!我要学日语!我要每天锻炼!
好吧呵呵= =
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3176
在线时间
1442 小时
注册时间
2009-7-27
帖子
1454
4
 楼主| 发表于 2014-2-28 13:09:30 | 只看该作者
无脑之人 发表于 2014-2-28 12:19
就是他没有按照换行符分割再输出,有一个解决办法就是第一段脚本的最后加上\ ...

没有冲突也没改变,具体是哪段?可能是我弄错地方了

点评

还不行那就用LX的方法……  发表于 2014-3-1 19:37
在\之前加一个",第二行头上加一个"试试  发表于 2014-3-1 19:36

博客:我的博客
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
466 小时
注册时间
2013-2-8
帖子
424
5
发表于 2014-3-1 00:28:38 手机端发表。 | 只看该作者
用<<把2段字符连起来
  1. $am="11111" <<
  2. "22222"
复制代码

点评

谢谢,解决了。  发表于 2014-3-2 03:51

评分

参与人数 1星屑 +90 收起 理由
myownroc + 90 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1556
在线时间
626 小时
注册时间
2010-8-5
帖子
451
6
发表于 2014-3-1 19:02:06 | 只看该作者
我也遇到过这个问题,貌似把1.02的DLL换回来就好了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-22 04:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表