设为首页收藏本站

仙剑之十里坡

 找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
楼主: 仙剑轩辕
打印 上一主题 下一主题

帮朋友找个高手写一个脚本 进来在说

   关闭 [复制链接]

1008

主题

5

听众

2万

积分

返璞归真

不器用な星の瞬き

会员等级: 10

  • TA的每日心情
    擦汗
    昨天 22:18
  • 签到天数: 1365 天

    [LV.10]以坛为家III

    精华
    2
    积分
    23737
    历练
    3
    声望
    133
    人气
    2540

    转帖之王 金融巨子 黑色羽翼

    单身中……
    帮我摆脱单身吧
    31
    发表于 2010-6-13 17:18:39 |只看该作者
    他是伤害翻倍,我这个是“两次攻击判定”
    夜空の星に 捧げた願いの
    欠片積めて 爆誕する奇跡
    回复

    使用道具 举报

    3

    主题

    1

    听众

    114

    积分

    略有小成

    会员等级: 2

    该用户从未签到

    精华
    0
    积分
    114
    历练
    0
    声望
    2
    人气
    11
    单身中……
    帮我摆脱单身吧
    32
    发表于 2010-6-13 18:12:46 |只看该作者
    本帖最后由 仙剑轩辕 于 2010-6-13 18:17 编辑

    [img]file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/U}E%YBJL]9D3J9OHP(TG@0R.jpg[/img]

        Scene_Battle 4 的最后一行712的end 发生了冲突 小雨大哥 还是脚本的问题 快来啊 怎么发不了截图的
      脚本'★Scene_Battle 4’的712行 发生了SyntaxError.
    回复

    使用道具 举报

    1082

    主题

    15

    听众

    1万

    积分

    管理员

    魔尊

    管理员

  • TA的每日心情
    无聊
    2024-4-22 00:16
  • 签到天数: 2281 天

    [LV.Master]伴坛终老

    精华
    3
    积分
    18263
    历练
    9
    声望
    342
    人气
    6122

    出神入化 润泽万物 金融巨子 神仙眷侣

    佛珠
    幸福:605℃
    33
    发表于 2010-6-13 18:54:59 |只看该作者
    回复 32# 仙剑轩辕


        截图也不是你这么发的……要先上传到网络相册
    回复

    使用道具 举报

    160

    主题

    6

    听众

    1万

    积分

    超级版主

    蜀山剑侠银行行长

    超级版主

  • TA的每日心情
    开心
    3 天前
  • 签到天数: 859 天

    [LV.10]以坛为家III

    精华
    3
    积分
    13202
    历练
    7
    声望
    24
    人气
    2364

    金融巨子 润泽万物 坚若磐石

    单身中……
    帮我摆脱单身吧
    34
    发表于 2010-6-13 20:50:18 |只看该作者
    回复 32# 仙剑轩辕


        图片无效,上传图片请看此帖http://www.palslp.com/bbs/viewth ... &extra=page%3D1
    回复

    使用道具 举报

    28

    主题

    11

    听众

    5325

    积分

    管理员

    昨日黄昏

    管理员

  • TA的每日心情

    2010-9-25 00:07
  • 签到天数: 3 天

    [LV.2]偶尔看看I

    精华
    5
    积分
    5325
    历练
    10
    声望
    119
    人气
    141

    润泽万物 匠心独运

    单身中……
    帮我摆脱单身吧
    35
    发表于 2010-6-14 00:12:18 |只看该作者
    我汗~!我都做好自己试验成功了啊- -把你Scene_Battle 4’
    贴上来。老夫看看
    回复

    使用道具 举报

    160

    主题

    6

    听众

    1万

    积分

    超级版主

    蜀山剑侠银行行长

    超级版主

  • TA的每日心情
    开心
    3 天前
  • 签到天数: 859 天

    [LV.10]以坛为家III

    精华
    3
    积分
    13202
    历练
    7
    声望
    24
    人气
    2364

    金融巨子 润泽万物 坚若磐石

    单身中……
    帮我摆脱单身吧
    36
    发表于 2010-6-14 08:34:24 |只看该作者
    小雨大哥怎么自称老夫了……
    于是饮酒乐甚,扣舷而歌之。歌曰:“桂棹兮兰桨,击空明兮溯流光。残阳阳兮是羊羊,吾乃最爱南宫煌。”
    回复

    使用道具 举报

    3

    主题

    1

    听众

    114

    积分

    略有小成

    会员等级: 2

    该用户从未签到

    精华
    0
    积分
    114
    历练
    0
    声望
    2
    人气
    11
    单身中……
    帮我摆脱单身吧
    37
    发表于 2010-6-15 11:11:35 |只看该作者
    1. #==============================================================================
    2. # ■ Scene_Battle (分割定义 4)
    3. #------------------------------------------------------------------------------
    4. #  处理战斗画面的类。
    5. #==============================================================================

    6. class Scene_Battle
    7. #--------------------------------------------------------------------------
    8. # ● 开始主回合
    9. #--------------------------------------------------------------------------
    10. def start_phase4
    11. # 转移到回合 4
    12. @phase = 4
    13. # 回合数计数
    14. $game_temp.battle_turn += 1
    15. # 搜索全页的战斗事件
    16. for index in 0...$data_troops[@troop_id].pages.size
    17. # 获取事件页
    18. page = $data_troops[@troop_id].pages[index]
    19. # 本页的范围是 [回合] 的情况下
    20. if page.span == 1
    21. # 设置已经执行标志
    22. $game_temp.battle_event_flags[index] = false
    23. end
    24. end
    25. # 设置角色为非选择状态
    26. @actor_index = -1
    27. @active_battler = nil
    28. # 有效化同伴指令窗口
    29. @party_command_window.active = false
    30. @party_command_window.visible = false
    31. # 无效化角色指令窗口
    32. @actor_command_window.active = false
    33. @actor_command_window.visible = false
    34. # 设置主回合标志
    35. $game_temp.battle_main_phase = true
    36. # 生成敌人行动
    37. for enemy in $game_troop.enemies
    38. enemy.make_action
    39. end
    40. # 生成行动顺序
    41. make_action_orders
    42. # 移动到步骤 1
    43. @phase4_step = 1
    44. end
    45. #--------------------------------------------------------------------------
    46. # ● 生成行动循序
    47. #--------------------------------------------------------------------------
    48. def make_action_orders
    49. # 初始化序列 @action_battlers
    50. @action_battlers = []
    51. # 添加敌人到 @action_battlers 序列
    52. for enemy in $game_troop.enemies
    53. @action_battlers.push(enemy)
    54. end
    55. # 添加角色到 @action_battlers 序列
    56. for actor in $game_party.actors
    57. @action_battlers.push(actor)
    58. end
    59. # 确定全体的行动速度
    60. for battler in @action_battlers
    61. battler.make_action_speed
    62. end
    63. # 按照行动速度从大到小排列
    64. @action_battlers.sort! {|a,b|
    65. b.current_action.speed - a.current_action.speed }
    66. end
    67. #--------------------------------------------------------------------------
    68. # ● 刷新画面 (主回合)
    69. #--------------------------------------------------------------------------
    70. def update_phase4
    71. case @phase4_step
    72. when 1
    73. update_phase4_step1
    74. when 2
    75. update_phase4_step2
    76. when 3
    77. update_phase4_step3
    78. when 4
    79. update_phase4_step4
    80. when 5
    81. update_phase4_step5
    82. when 6
    83. update_phase4_step6
    84. end
    85. end
    86. #--------------------------------------------------------------------------
    87. # ● 刷新画面 (主回合步骤 1 : 准备行动)
    88. #--------------------------------------------------------------------------
    89. def update_phase4_step1
    90. # 隐藏帮助窗口
    91. @help_window.visible = false
    92. # 判定胜败
    93. if judge
    94. # 胜利或者失败的情况下 : 过程结束
    95. return
    96. end
    97. # 强制行动的战斗者不存在的情况下
    98. if $game_temp.forcing_battler == nil
    99. # 设置战斗事件
    100. setup_battle_event
    101. # 执行战斗事件中的情况下
    102. if $game_system.battle_interpreter.running?
    103. return
    104. end
    105. end
    106. # 强制行动的战斗者存在的情况下
    107. if $game_temp.forcing_battler != nil
    108. # 在头部添加后移动
    109. @action_battlers.delete($game_temp.forcing_battler)
    110. @action_battlers.unshift($game_temp.forcing_battler)
    111. end
    112. # 未行动的战斗者不存在的情况下 (全员已经行动)
    113. if @action_battlers.size == 0
    114. # 开始同伴命令回合
    115. start_phase2
    116. return
    117. end
    118. # 初始化动画 ID 和公共事件 ID
    119. @animation1_id = 0
    120. @animation2_id = 0
    121. @common_event_id = 0
    122. # 未行动的战斗者移动到序列的头部
    123. @active_battler = @action_battlers.shift
    124. # 如果已经在战斗之外的情况下
    125. if @active_battler.index == nil
    126. return
    127. end
    128. # 连续伤害
    129. if @active_battler.hp > 0 and @active_battler.slip_damage?
    130. @active_battler.slip_damage_effect
    131. @active_battler.damage_pop = true
    132. end
    133. # 自然解除状态
    134. @active_battler.remove_states_auto
    135. # 刷新状态窗口
    136. @status_window.refresh
    137. # 移至步骤 2
    138. @phase4_step = 2
    139. end
    140. #--------------------------------------------------------------------------
    141. # ● 刷新画面 (主回合步骤 2 : 开始行动)
    142. #--------------------------------------------------------------------------
    143. def update_phase4_step2
    144. # 如果不是强制行动
    145. unless @active_battler.current_action.forcing
    146. # 限制为 [敌人为普通攻击] 或 [我方为普通攻击] 的情况下
    147. if @active_battler.restriction == 2 or @active_battler.restriction == 3
    148. # 设置行动为攻击
    149. @active_battler.current_action.kind = 0
    150. @active_battler.current_action.basic = 0
    151. end
    152. # 限制为 [不能行动] 的情况下
    153. if @active_battler.restriction == 4
    154. # 清除行动强制对像的战斗者
    155. $game_temp.forcing_battler = nil
    156. # 移至步骤 1
    157. @phase4_step = 1
    158. return
    159. end
    160. end
    161. # 清除对像战斗者
    162. @target_battlers = []
    163. # 行动种类分支
    164. case @active_battler.current_action.kind
    165. when 0 # 基本
    166. make_basic_action_result
    167. when 1 # 特技
    168. make_skill_action_result
    169. when 2 # 物品
    170. make_item_action_result
    171. end
    172. # 移至步骤 3
    173. if @phase4_step == 2
    174. @phase4_step = 3
    175. end
    176. end
    177. #--------------------------------------------------------------------------
    178. # ● 生成基本行动结果
    179. #--------------------------------------------------------------------------
    180. def make_basic_action_result
    181. # 攻击的情况下
    182. if @active_battler.current_action.basic == 0
    183. # 设置攻击 ID
    184. @animation1_id = @active_battler.animation1_id
    185. @animation2_id = @active_battler.animation2_id
    186. # 行动方的战斗者是敌人的情况下
    187. if @active_battler.is_a?(Game_Enemy)
    188. if @active_battler.restriction == 3
    189. target = $game_troop.random_target_enemy
    190. elsif @active_battler.restriction == 2
    191. target = $game_party.random_target_actor
    192. else
    193. index = @active_battler.current_action.target_index
    194. target = $game_party.smooth_target_actor(index)
    195. end
    196. end
    197. # 行动方的战斗者是角色的情况下
    198. if @active_battler.is_a?(Game_Actor)
    199. if @active_battler.restriction == 3
    200. target = $game_party.random_target_actor
    201. elsif @active_battler.restriction == 2
    202. target = $game_troop.random_target_enemy
    203. else
    204. index = @active_battler.current_action.target_index
    205. target = $game_troop.smooth_target_enemy(index)
    206. end
    207. end
    208. # 设置对像方的战斗者序列
    209. @target_battlers = [target]
    210. # 应用通常攻击效果
    211. for target in @target_battlers
    212. target.attack_effect(@active_battler)
    213. end
    214. return
    215. end
    216. # 防御的情况下
    217. if @active_battler.current_action.basic == 1
    218. # 帮助窗口显示"防御"
    219. @help_window.set_text($data_system.words.guard, 1)
    220. return
    221. end
    222. # 逃跑的情况下
    223. if @active_battler.is_a?(Game_Enemy) and
    224. @active_battler.current_action.basic == 2
    225. # 帮助窗口显示"逃跑"
    226. @help_window.set_text("逃跑", 1)
    227. # 逃跑
    228. @active_battler.escape
    229. return
    230. end
    231. # 什么也不做的情况下
    232. if @active_battler.current_action.basic == 3
    复制代码

    系统限制字节 所有发两次 接着
    回复

    使用道具 举报

    3

    主题

    1

    听众

    114

    积分

    略有小成

    会员等级: 2

    该用户从未签到

    精华
    0
    积分
    114
    历练
    0
    声望
    2
    人气
    11
    单身中……
    帮我摆脱单身吧
    38
    发表于 2010-6-15 11:12:02 |只看该作者
    1. # 清除强制行动对像的战斗者
    2. $game_temp.forcing_battler = nil
    3. # 移至步骤 1
    4. @phase4_step = 1
    5. return
    6. end
    7. end
    8. #--------------------------------------------------------------------------
    9. # ● 设置物品或特技对像方的战斗者
    10. # scope : 特技或者是物品的范围
    11. #--------------------------------------------------------------------------
    12. def set_target_battlers(scope)
    13. # 行动方的战斗者是敌人的情况下
    14. if @active_battler.is_a?(Game_Enemy)
    15. # 效果范围分支
    16. case scope
    17. when 1 # 敌单体
    18. index = @active_battler.current_action.target_index
    19. @target_battlers.push($game_party.smooth_target_actor(index))
    20. when 2 # 敌全体
    21. for actor in $game_party.actors
    22. if actor.exist?
    23. @target_battlers.push(actor)
    24. end
    25. end
    26. when 3 # 我方单体
    27. index = @active_battler.current_action.target_index
    28. @target_battlers.push($game_troop.smooth_target_enemy(index))
    29. when 4 # 我方全体
    30. for enemy in $game_troop.enemies
    31. if enemy.exist?
    32. @target_battlers.push(enemy)
    33. end
    34. end
    35. when 5 # 我方单体 (HP 0)
    36. index = @active_battler.current_action.target_index
    37. enemy = $game_troop.enemies[index]
    38. if enemy != nil and enemy.hp0?
    39. @target_battlers.push(enemy)
    40. end
    41. when 6 # 我方全体 (HP 0)
    42. for enemy in $game_troop.enemies
    43. if enemy != nil and enemy.hp0?
    44. @target_battlers.push(enemy)
    45. end
    46. end
    47. when 7 # 使用者
    48. @target_battlers.push(@active_battler)
    49. end
    50. end
    51. # 行动方的战斗者是角色的情况下
    52. if @active_battler.is_a?(Game_Actor)
    53. # 效果范围分支
    54. case scope
    55. when 1 # 敌单体
    56. index = @active_battler.current_action.target_index
    57. @target_battlers.push($game_troop.smooth_target_enemy(index))
    58. when 2 # 敌全体
    59. for enemy in $game_troop.enemies
    60. if enemy.exist?
    61. @target_battlers.push(enemy)
    62. end
    63. end
    64. when 3 # 我方单体
    65. index = @active_battler.current_action.target_index
    66. @target_battlers.push($game_party.smooth_target_actor(index))
    67. when 4 # 我方全体
    68. for actor in $game_party.actors
    69. if actor.exist?
    70. @target_battlers.push(actor)
    71. end
    72. end
    73. when 5 # 我方单体 (HP 0)
    74. index = @active_battler.current_action.target_index
    75. actor = $game_party.actors[index]
    76. if actor != nil and actor.hp0?
    77. @target_battlers.push(actor)
    78. end
    79. when 6 # 我方全体 (HP 0)
    80. for actor in $game_party.actors
    81. if actor != nil and actor.hp0?
    82. @target_battlers.push(actor)
    83. end
    84. end
    85. when 7 # 使用者
    86. @target_battlers.push(@active_battler)
    87. end
    88. end
    89. end
    90. #--------------------------------------------------------------------------
    91. # ● 生成特技行动结果
    92. #--------------------------------------------------------------------------
    93. def make_skill_action_result
    94. # 获取特技
    95. @skill = $data_skills[@active_battler.current_action.skill_id]
    96. # 如果不是强制行动
    97. unless @active_battler.current_action.forcing
    98. # 因为 SP 耗尽而无法使用的情况下
    99. unless @active_battler.skill_can_use?(@skill.id)
    100. # 清除强制行动对像的战斗者
    101. $game_temp.forcing_battler = nil
    102. # 移至步骤 1
    103. @phase4_step = 1
    104. return
    105. end
    106. end
    107. # 消耗 SP
    108. @active_battler.sp -= @skill.sp_cost
    109. # 刷新状态窗口
    110. @status_window.refresh
    111. # 在帮助窗口显示特技名
    112. @help_window.set_text(@skill.name, 1)
    113. # 设置动画 ID
    114. @animation1_id = @skill.animation1_id
    115. @animation2_id = @skill.animation2_id
    116. # 设置公共事件 ID
    117. @common_event_id = @skill.common_event_id
    118. # 设置对像侧战斗者
    119. set_target_battlers(@skill.scope)
    120. # 应用特技效果
    121. for target in @target_battlers
    122. target.skill_effect(@active_battler, @skill)
    123. end
    124. end
    125. #--------------------------------------------------------------------------
    126. # ● 生成物品行动结果
    127. #--------------------------------------------------------------------------
    128. def make_item_action_result
    129. # 获取物品
    130. @item = $data_items[@active_battler.current_action.item_id]
    131. # 因为物品耗尽而无法使用的情况下
    132. unless $game_party.item_can_use?(@item.id)
    133. # 移至步骤 1
    134. @phase4_step = 1
    135. return
    136. end
    137. # 消耗品的情况下
    138. if @item.consumable
    139. # 使用的物品减 1
    140. $game_party.lose_item(@item.id, 1)
    141. end
    142. # 在帮助窗口显示物品名
    143. @help_window.set_text(@item.name, 1)
    144. # 设置动画 ID
    145. @animation1_id = @item.animation1_id
    146. @animation2_id = @item.animation2_id
    147. # 设置公共事件 ID
    148. @common_event_id = @item.common_event_id
    149. # 确定对像
    150. index = @active_battler.current_action.target_index
    151. target = $game_party.smooth_target_actor(index)
    152. # 设置对像侧战斗者
    153. set_target_battlers(@item.scope)
    154. # 应用物品效果
    155. for target in @target_battlers
    156. target.item_effect(@item)
    157. end
    158. end
    159. #--------------------------------------------------------------------------
    160. # ● 刷新画面 (主回合步骤 3 : 行动方动画)
    161. #--------------------------------------------------------------------------
    162. def update_phase4_step3
    163. # 行动方动画 (ID 为 0 的情况下是白色闪烁)
    164. if @animation1_id == 0
    165. @active_battler.white_flash = true
    166. else
    167. @active_battler.animation_id = @animation1_id
    168. @active_battler.animation_hit = true
    169. end
    170. # 移至步骤 4
    171. @phase4_step = 4
    172. end
    173. #--------------------------------------------------------------------------
    174. # ● 刷新画面 (主回合步骤 4 : 对像方动画)
    175. #--------------------------------------------------------------------------
    176. def update_phase4_step4
    177. # 对像方动画
    178. for target in @target_battlers
    179. if target.states.include?(17)
    180. if @active_battler.current_action.kind = 0 and @active_battler.current_action.basic = 0
    181. target.animation_id = @animation2_id
    182. target.animation_id = @animation2_id
    183. target.animation_hit = (target.damage != "Miss")
    184. else
    185. target.animation_id = @animation2_id
    186. target.animation_hit = (target.damage != "Miss")
    187. end

    188. else
    189. target.animation_id = @animation2_id
    190. target.animation_hit = (target.damage != "Miss")
    191. end
    192. end

    193. # 限制动画长度、最低 8 帧
    194. @wait_count = 8
    195. # 移至步骤 5
    196. @phase4_step = 5
    197. end

    198. #--------------------------------------------------------------------------
    199. # ● 刷新画面 (主回合步骤 5 : 显示伤害)
    200. #--------------------------------------------------------------------------
    201. def update_phase4_step5
    202. # 隐藏帮助窗口
    203. @help_window.visible = false
    204. # 刷新状态窗口
    205. @status_window.refresh
    206. # 显示伤害
    207. for target in @target_battlers
    208. if target.damage != nil
    209. target.damage_pop = true
    210. end
    211. end
    212. # 移至步骤 6
    213. @phase4_step = 6
    214. end
    215. #--------------------------------------------------------------------------
    216. # ● 刷新画面 (主回合步骤 6 : 刷新)
    217. #--------------------------------------------------------------------------
    218. def update_phase4_step6
    219. # 清除强制行动对像的战斗者
    220. $game_temp.forcing_battler = nil
    221. # 公共事件 ID 有效的情况下
    222. if @common_event_id > 0
    223. # 设置事件
    224. common_event = $data_common_events[@common_event_id]
    225. $game_system.battle_interpreter.setup(common_event.list, 0)
    226. end
    227. # 移至步骤 1
    228. @phase4_step = 1
    229. end
    230. end
    复制代码
    回复

    使用道具 举报

    160

    主题

    6

    听众

    1万

    积分

    超级版主

    蜀山剑侠银行行长

    超级版主

  • TA的每日心情
    开心
    3 天前
  • 签到天数: 859 天

    [LV.10]以坛为家III

    精华
    3
    积分
    13202
    历练
    7
    声望
    24
    人气
    2364

    金融巨子 润泽万物 坚若磐石

    单身中……
    帮我摆脱单身吧
    39
    发表于 2010-6-15 11:50:29 |只看该作者
    LS我们现在正在忙《时空传2 》发布,你的问题暂时押后。
    于是饮酒乐甚,扣舷而歌之。歌曰:“桂棹兮兰桨,击空明兮溯流光。残阳阳兮是羊羊,吾乃最爱南宫煌。”
    回复

    使用道具 举报

    3

    主题

    1

    听众

    114

    积分

    略有小成

    会员等级: 2

    该用户从未签到

    精华
    0
    积分
    114
    历练
    0
    声望
    2
    人气
    11
    单身中……
    帮我摆脱单身吧
    40
    发表于 2010-6-15 12:05:56 |只看该作者
    恩恩
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 加入我们

    手机版|Archiver|仙剑之十里坡 ( 苏ICP备11022766号 )  

    GMT+8, 2024-5-4 08:23 , Processed in 0.595125 second(s), 59 queries .

    Powered by Discuz! X2.5

    © 2001-2012 Comsenz Inc.

    回顶部