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

Project1

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

[已经解决] 关于UI的问题[已解决]

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
跳转到指定楼层
1
发表于 2019-3-27 12:40:44 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 wyw838 于 2019-3-30 23:20 编辑

emmm想在黑框位置插入图片...图片表示支线任务的完成度,如下图...请问各位大佬,这样该如何修改呢QWQ谢谢

KYLTRWT0R%I}]V2Z8J)MXU0.png (1019.73 KB, 下载次数: 13)

KYLTRWT0R%I}]V2Z8J)MXU0.png

Lv4.逐梦者

梦石
0
星屑
14048
在线时间
2070 小时
注册时间
2016-9-20
帖子
844
2
发表于 2019-3-27 14:30:37 | 只看该作者
那你支线任务想用什么表示方法,进度条,文字还是
内容仅供参考,
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
2
星屑
13088
在线时间
2273 小时
注册时间
2011-6-4
帖子
613
3
发表于 2019-3-27 18:11:30 | 只看该作者
先把所使用的任务脚本贴出来吧
BUG反馈请加QQ 529283039
水友群 917854767

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
4
 楼主| 发表于 2019-3-28 12:28:56 | 只看该作者
本帖最后由 wyw838 于 2019-3-28 12:32 编辑

脚本如下Q
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Scene_Menu
  3. #------------------------------------------------------------------------------
  4. #  处理菜单画面的类。
  5. #==============================================================================
  6.  
  7. #修改部分:
  8. #添加了升级加点
  9. #去除了步数的描绘
  10. class Scene_Menu
  11.   #--------------------------------------------------------------------------
  12.   # ● 初始化对像
  13.   #     menu_index : 命令光标的初期位置
  14.   #--------------------------------------------------------------------------
  15.   def initialize(menu_index = 0)
  16.     @menu_index = menu_index
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● 主处理
  20.   #--------------------------------------------------------------------------
  21.   def main
  22.     # 生成命令窗口
  23.     s1 = $data_system.words.item
  24.     s2 = $data_system.words.skill
  25.     s3 = $data_system.words.equip
  26.     s4 = "状态"
  27.     s5 = "存档"
  28.     s7 = "结束游戏"
  29.     s6 = "加点"
  30.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])#宽度
  31.     @command_window.index = @menu_index
  32.     # 同伴人数为 0 的情况下
  33.     if $game_party.actors.size == 0
  34.       # 物品、特技、装备、状态无效化
  35.       @command_window.disable_item(0)
  36.       @command_window.disable_item(1)
  37.       @command_window.disable_item(2)
  38.       @command_window.disable_item(3)
  39.     end
  40.     # 禁止存档的情况下
  41.     if $game_system.save_disabled
  42.       # 存档无效
  43.       @command_window.disable_item(4)
  44.     end
  45.     # 生成游戏时间窗口
  46.     @playtime_window = Window_PlayTime.new
  47.     @playtime_window.x = 0
  48.     @playtime_window.y = 320
  49.     # 生成步数窗口
  50.     #删@steps_window = Window_Steps.new
  51.     #@steps_window.x = 0
  52.     #@steps_window.y = 320
  53.     # 生成金钱窗口
  54.     @gold_window = Window_Gold.new
  55.     @gold_window.x = 0
  56.     @gold_window.y = 416
  57.     # 生成状态窗口
  58.     @status_window = Window_MenuStatus.new
  59.     @status_window.x = 160
  60.     @status_window.y = 0
  61.     # 执行过渡
  62.     Graphics.transition
  63.     # 主循环
  64.     loop do
  65.       # 刷新游戏画面
  66.       Graphics.update
  67.       # 刷新输入信息
  68.       Input.update
  69.       # 刷新画面
  70.       update
  71.       # 如果切换画面就中断循环
  72.       if $scene != self
  73.         break
  74.       end
  75.     end
  76.     # 准备过渡
  77.     Graphics.freeze
  78.     # 释放窗口
  79.     @command_window.dispose
  80.     @playtime_window.dispose
  81.     #删@steps_window.dispose
  82.     @gold_window.dispose
  83.     @status_window.dispose
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # ● 刷新画面
  87.   #--------------------------------------------------------------------------
  88.   def update
  89.     # 刷新窗口
  90.     @command_window.update
  91.     @playtime_window.update
  92.     #删@steps_window.update
  93.     @gold_window.update
  94.     @status_window.update
  95.     # 命令窗口被激活的情况下: 调用 update_command
  96.     if @command_window.active
  97.       update_command
  98.       return
  99.     end
  100.     # 状态窗口被激活的情况下: 调用 update_status
  101.     if @status_window.active
  102.       update_status
  103.       return
  104.     end
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # ● 刷新画面 (命令窗口被激活的情况下)
  108.   #--------------------------------------------------------------------------
  109.   def update_command
  110.     # 按下 B 键的情况下
  111.     if Input.trigger?(Input::B)
  112.       # 演奏取消 SE
  113.       $game_system.se_play($data_system.cancel_se)
  114.       # 切换的地图画面
  115.       $scene = Scene_Map.new
  116.       return
  117.     end
  118.     # 按下 C 键的情况下
  119.     if Input.trigger?(Input::C)
  120.       # 同伴人数为 0、存档、游戏结束以外的场合
  121.       if $game_party.actors.size == 0 and @command_window.index < 4
  122.         # 演奏冻结 SE
  123.         $game_system.se_play($data_system.buzzer_se)
  124.         return
  125.       end
  126.       # 命令窗口的光标位置分支
  127.       case @command_window.index
  128.       when 0  # 物品
  129.         # 演奏确定 SE
  130.         $game_system.se_play($data_system.decision_se)
  131.         # 切换到物品画面
  132.         $scene = Scene_Item.new
  133.       when 1  # 特技
  134.         # 演奏确定 SE
  135.         $game_system.se_play($data_system.decision_se)
  136.         # 激活状态窗口
  137.         @command_window.active = false
  138.         @status_window.active = true
  139.         @status_window.index = 0
  140.       when 2  # 装备
  141.         # 演奏确定 SE
  142.         $game_system.se_play($data_system.decision_se)
  143.         # 激活状态窗口
  144.         @command_window.active = false
  145.         @status_window.active = true
  146.         @status_window.index = 0
  147.       when 3  # 状态
  148.         # 演奏确定 SE
  149.         $game_system.se_play($data_system.decision_se)
  150.         # 激活状态窗口
  151.         @command_window.active = false
  152.         @status_window.active = true
  153.         @status_window.index = 0
  154.       when 4  # 存档
  155.         # 禁止存档的情况下
  156.         if $game_system.save_disabled
  157.           # 演奏冻结 SE
  158.           $game_system.se_play($data_system.buzzer_se)
  159.           return
  160.         end
  161.         # 演奏确定 SE
  162.         $game_system.se_play($data_system.decision_se)
  163.         # 切换到存档画面
  164.         $scene = Scene_Save.new
  165.       when 6  # 游戏结束
  166.         # 演奏确定 SE
  167.         $game_system.se_play($data_system.decision_se)
  168.         # 切换到游戏结束画面
  169.         $scene = Scene_End.new
  170.       when 5           ###改
  171.         # 演奏确定 SE
  172.         $game_system.se_play($data_system.decision_se)
  173.         # 切换到加点
  174.         $scene = Scene_Lvup.new        
  175.       end
  176.       return
  177.     end
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # ● 刷新画面 (状态窗口被激活的情况下)
  181.   #--------------------------------------------------------------------------
  182.   def update_status
  183.     # 按下 B 键的情况下
  184.     if Input.trigger?(Input::B)
  185.       # 演奏取消 SE
  186.       $game_system.se_play($data_system.cancel_se)
  187.       # 激活命令窗口
  188.       @command_window.active = true
  189.       @status_window.active = false
  190.       @status_window.index = -1
  191.       return
  192.     end
  193.     # 按下 C 键的情况下
  194.     if Input.trigger?(Input::C)
  195.       # 命令窗口的光标位置分支
  196.       case @command_window.index
  197.       when 1  # 特技
  198.         # 本角色的行动限制在 2 以上的情况下
  199.         if $game_party.actors[@status_window.index].restriction >= 2
  200.           # 演奏冻结 SE
  201.           $game_system.se_play($data_system.buzzer_se)
  202.           return
  203.         end
  204.         # 演奏确定 SE
  205.         $game_system.se_play($data_system.decision_se)
  206.         # 切换到特技画面
  207.         $scene = Scene_Skill.new(@status_window.index)
  208.       when 2  # 装备
  209.         # 演奏确定 SE
  210.         $game_system.se_play($data_system.decision_se)
  211.         # 切换的装备画面
  212.         $scene = Scene_Equip.new(@status_window.index)
  213.       when 3  # 状态
  214.         # 演奏确定 SE
  215.         $game_system.se_play($data_system.decision_se)
  216.         # 切换到状态画面
  217.         $scene = Scene_Status.new(@status_window.index)
  218.       end
  219.       return
  220.     end
  221.   end
  222. end
Q
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #==============================================================================
  4. #需要调整的地方:
  5. #1.菜单中改角色脸谱为角色头像
  6. #2.升级加点中改角色脸谱为战斗图
  7. #3.加点属性更改
  8. class Scene_Save
  9.   #--------------------------------------------------------------------------
  10.   # ● 写入存档数据
  11.   #     file : 写入用文件对像 (已经打开)
  12.   #--------------------------------------------------------------------------
  13.   def write_save_data(file)
  14.     # 生成描绘存档文件用的角色图形
  15.     characters = []
  16.     for i in 0...[$game_party.actors.size,4].min
  17.       actor = $game_party.actors[i]
  18.       characters.push([actor.character_name, actor.character_hue])
  19.     end
  20.     # 写入描绘存档文件用的角色数据
  21.     Marshal.dump(characters, file)
  22.     # 写入测量游戏时间用画面计数
  23.     Marshal.dump(Graphics.frame_count, file)
  24.     # 增加 1 次存档次数
  25.     $game_system.save_count += 1
  26.     # 保存魔法编号
  27.     # (将编辑器保存的值以随机值替换)
  28.     $game_system.magic_number = $data_system.magic_number
  29.     # 写入各种游戏对像
  30.     Marshal.dump($game_system, file)
  31.     Marshal.dump($game_switches, file)
  32.     Marshal.dump($game_variables, file)
  33.     Marshal.dump($game_self_switches, file)
  34.     Marshal.dump($game_screen, file)
  35.     Marshal.dump($game_actors, file)
  36.     Marshal.dump($game_party, file)
  37.     Marshal.dump($game_troop, file)
  38.     Marshal.dump($game_map, file)
  39.     Marshal.dump($game_player, file)
  40.   end
  41. end
  42.  
  43. class Scene_Battle
  44.   #--------------------------------------------------------------------------
  45.   # ● 设置物品或特技对像方的战斗者
  46.   #     scope : 特技或者是物品的范围
  47.   #--------------------------------------------------------------------------
  48.   def set_target_battlers(scope)
  49.     # 行动方的战斗者是敌人的情况下
  50.     if @active_battler.is_a?(Game_Enemy)
  51.       # 效果范围分支
  52.       case scope
  53.       when 1  # 敌单体
  54.         index = @active_battler.current_action.target_index
  55.         @target_battlers.push($game_party.smooth_target_actor(index))
  56.       when 2  # 敌全体
  57.         for actor in 0...[$game_party.actors.size,4].min
  58.           if $game_party.actors[actor].exist?
  59.             @target_battlers.push($game_party.actors[actor])
  60.           end
  61.         end
  62.       when 3  # 我方单体
  63.         index = @active_battler.current_action.target_index
  64.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  65.       when 4  # 我方全体
  66.         for enemy in $game_troop.enemies
  67.           if enemy.exist?
  68.             @target_battlers.push(enemy)
  69.           end
  70.         end
  71.       when 5  # 我方单体 (HP 0)
  72.         index = @active_battler.current_action.target_index
  73.         enemy = $game_troop.enemies[index]
  74.         if enemy != nil and enemy.hp0?
  75.           @target_battlers.push(enemy)
  76.         end
  77.       when 6  # 我方全体 (HP 0)
  78.         for enemy in $game_troop.enemies
  79.           if enemy != nil and enemy.hp0?
  80.             @target_battlers.push(enemy)
  81.           end
  82.         end
  83.       when 7  # 使用者
  84.         @target_battlers.push(@active_battler)
  85.       end
  86.     end
  87.     # 行动方的战斗者是角色的情况下
  88.     if @active_battler.is_a?(Game_Actor)
  89.       # 效果范围分支
  90.       case scope
  91.       when 1  # 敌单体
  92.         index = @active_battler.current_action.target_index
  93.         @target_battlers.push($game_troop.smooth_target_enemy(index))
  94.       when 2  # 敌全体
  95.         for enemy in $game_troop.enemies
  96.           if enemy.exist?
  97.             @target_battlers.push(enemy)
  98.           end
  99.         end
  100.       when 3  # 我方单体
  101.         index = @active_battler.current_action.target_index
  102.         @target_battlers.push($game_party.smooth_target_actor(index))
  103.       when 4  # 我方全体
  104.         for actor in 0...[$game_party.actors.size,4].min
  105.           if $game_party.actors[actor].exist?
  106.             @target_battlers.push($game_party.actors[actor])
  107.           end
  108.         end
  109.       when 5  # 我方单体 (HP 0)
  110.         index = @active_battler.current_action.target_index
  111.         actor = $game_party.actors[index]
  112.         if actor != nil and actor.hp0?
  113.           @target_battlers.push(actor)
  114.         end
  115.       when 6  # 我方全体 (HP 0)
  116.         for actor in 0...[$game_party.actors.size,4].min
  117.           if $game_party.actors[actor] != nil and $game_party.actors[actor].hp0?
  118.             @target_battlers.push($game_party.actors[actor])
  119.           end
  120.         end
  121.       when 7  # 使用者
  122.         @target_battlers.push(@active_battler)
  123.       end
  124.     end
  125.   end  
  126.   #--------------------------------------------------------------------------
  127.   # ● 生成行动循序
  128.   #--------------------------------------------------------------------------
  129.   def make_action_orders
  130.     # 初始化序列 @action_battlers
  131.     @action_battlers = []
  132.     # 添加敌人到 @action_battlers 序列
  133.     for enemy in $game_troop.enemies
  134.       @action_battlers.push(enemy)
  135.     end
  136.     # 添加角色到 @action_battlers 序列
  137.     for actor in 0...[$game_party.actors.size,4].min
  138.       @action_battlers.push($game_party.actors[actor])
  139.     end
  140.     # 确定全体的行动速度
  141.     for battler in @action_battlers
  142.       battler.make_action_speed
  143.     end
  144.     # 按照行动速度从大到小排列
  145.     @action_battlers.sort! {|a,b|
  146.       b.current_action.speed - a.current_action.speed }
  147.   end
  148.   #--------------------------------------------------------------------------
  149.   # ● 开始结束战斗回合
  150.   #--------------------------------------------------------------------------
  151.   def start_phase5
  152.     # 转移到回合 5
  153.     @phase = 5
  154.         if $game_switches[79] == true
  155.   $game_variables[100] += 1
  156.   end
  157.     # 演奏战斗结束 ME
  158.     $game_system.me_play($game_system.battle_end_me)
  159.     # 还原为战斗开始前的 BGM
  160.     $game_system.bgm_play($game_temp.map_bgm)
  161.     # 初始化 EXP、金钱、宝物
  162.     exp = 0
  163.     gold = 0
  164.     treasures = []
  165.     # 循环
  166.     for enemy in $game_troop.enemies
  167.       # 敌人不是隐藏状态的情况下
  168.       unless enemy.hidden
  169.         # 获得 EXP、增加金钱
  170.         exp += enemy.exp
  171.         gold += enemy.gold
  172.         # 出现宝物判定
  173.         if rand(100) < enemy.treasure_prob
  174.           if enemy.item_id > 0
  175.             treasures.push($data_items[enemy.item_id])
  176.           end
  177.           if enemy.weapon_id > 0
  178.             treasures.push($data_weapons[enemy.weapon_id])
  179.           end
  180.           if enemy.armor_id > 0
  181.             treasures.push($data_armors[enemy.armor_id])
  182.           end
  183.         end
  184.       end
  185.     end
  186.     # 限制宝物数为 6 个
  187.     treasures = treasures[0..5]
  188.     # 获得 EXP
  189.     for i in 0...[$game_party.actors.size,4].min
  190.       actor = $game_party.actors[i]
  191.       if actor.cant_get_exp? == false
  192.         last_level = actor.level
  193.         actor.exp += exp
  194.         if actor.level > last_level
  195.           @status_window.level_up(i)
  196.         end
  197.       end
  198.     end
  199.     # 获得金钱
  200.     $game_party.gain_gold(gold)
  201.     # 获得宝物
  202.     for item in treasures
  203.       case item
  204.       when RPG::Item
  205.         $game_party.gain_item(item.id, 1)
  206.       when RPG::Weapon
  207.         $game_party.gain_weapon(item.id, 1)
  208.       when RPG::Armor
  209.         $game_party.gain_armor(item.id, 1)
  210.       end
  211.     end
  212.     # 生成战斗结果窗口
  213.     @result_window = Window_BattleResult.new(exp, gold, treasures)
  214.     # 设置等待计数
  215.     @phase5_wait_count = 100
  216.   end
  217.   #--------------------------------------------------------------------------
  218.   # ● 转到输入下一个角色的命令
  219.   #--------------------------------------------------------------------------
  220.   def phase3_next_actor
  221.     # 循环
  222.     begin
  223.       # 角色的明灭效果 OFF
  224.       if @active_battler != nil
  225.         @active_battler.blink = false
  226.       end
  227.       # 最后的角色的情况
  228.       if @actor_index == [$game_party.actors.size-1,3].min
  229.         # 开始主回合
  230.         start_phase4
  231.         return
  232.       end
  233.       # 推进角色索引
  234.       @actor_index += 1
  235.       @active_battler = $game_party.actors[@actor_index]
  236.       @active_battler.blink = true
  237.     # 如果角色是在无法接受指令的状态就再试
  238.     end until @active_battler.inputable?
  239.     # 设置角色的命令窗口
  240.     phase3_setup_command_window
  241.   end
  242. end
  243.  
  244. class Arrow_Actor < Arrow_Base  
  245.   #--------------------------------------------------------------------------
  246.   # ● 刷新画面
  247.   #--------------------------------------------------------------------------
  248.   def update
  249.     super
  250.     # 光标右
  251.     if Input.repeat?(Input::RIGHT)
  252.       $game_system.se_play($data_system.cursor_se)
  253.       @index += 1
  254.       @index %= [$game_party.actors.size,4].min
  255.     end
  256.     # 光标左
  257.     if Input.repeat?(Input::LEFT)
  258.       $game_system.se_play($data_system.cursor_se)
  259.       @index += $game_party.actors.size - 1
  260.       @index %= [$game_party.actors.size,4].min
  261.     end
  262.     # 设置活动块坐标
  263.     if self.actor != nil
  264.       self.x = self.actor.screen_x
  265.       self.y = self.actor.screen_y
  266.     end
  267.   end
  268. end
  269.  
  270. #==============================================================================
  271. # ■ Window_Target
  272. #------------------------------------------------------------------------------
  273. #  物品画面与特技画面的、使用对像角色选择窗口。
  274. #==============================================================================
  275.  
  276. class Window_Target < Window_Selectable
  277. #--------------------------------------------------------------------------
  278. # ● 初始化对像
  279. #--------------------------------------------------------------------------
  280. def initialize
  281.    super(0, 0, 336, 480)
  282.    self.contents = Bitmap.new(width - 32, $game_party.actors.size*112)
  283.    self.z += 10
  284.    @item_max = $game_party.actors.size
  285.    @top_row = 0
  286.    refresh
  287. end
  288. #--------------------------------------------------------------------------
  289. # ● 刷新
  290. #--------------------------------------------------------------------------
  291. def refresh
  292.    self.contents.clear
  293.    for i in 0...$game_party.actors.size
  294.      x = 4
  295.      y = i * 112
  296.      actor = $game_party.actors[i]
  297.      draw_actor_name(actor, x-40, y)
  298.      #draw_actor_class(actor, x + 144, y)
  299.      draw_actor_level(actor, x -32 , y + 32)
  300.      draw_actor_state(actor, x -32, y + 64)
  301.      draw_actor_hp(actor, x + 152, y + 32)
  302.      draw_actor_sp(actor, x + 152, y + 64)
  303.    end
  304. end  
  305. #--------------------------------------------------------------------------
  306. # ● 刷新光标矩形
  307. #--------------------------------------------------------------------------
  308. def update_cursor_rect   
  309.    # 光标位置 -1 为全选、-2 以下为单独选择 (使用者自身)
  310.    if @index <= -2
  311.      self.cursor_rect.set(0, (@index + 10) * 112, self.width - 32, 96)
  312.    elsif @index == -1
  313.      self.cursor_rect.set(0, 0, self.width - 32, @item_max * 112 - 20)
  314.    else
  315.      tpy = @index * 112 - self.oy
  316.      self.cursor_rect.set(0, tpy, self.width - 32, 96)
  317.      if @index < @top_row
  318.        @top_row = @index
  319.        self.oy = @top_row *112
  320.      end
  321.      if @index > @top_row+3
  322.        @top_row = @index-3
  323.        self.oy = @top_row *112
  324.      end
  325.    end   
  326. end
  327. end
  328. #==============================================================================
  329. # ■ Window_MenuStatus
  330. #------------------------------------------------------------------------------
  331. #  显示菜单画面和同伴状态的窗口。
  332. #==============================================================================
  333.  
  334. class Window_MenuStatus < Window_Selectable
  335.   #--------------------------------------------------------------------------
  336.   # ● 初始化目标
  337.   #--------------------------------------------------------------------------
  338.   def initialize
  339.     super(0, 0, 480, 380)
  340.     self.contents = Bitmap.new(width - 32,  $game_party.actors.size*112)
  341.     refresh
  342.     @top_row = 0
  343.     self.active = false
  344.     self.index = -1
  345.   end
  346.   #--------------------------------------------------------------------------
  347.   # ● 刷新
  348.   #--------------------------------------------------------------------------
  349.   def refresh
  350.     self.contents.clear
  351.     @item_max = $game_party.actors.size
  352.     for i in 0...$game_party.actors.size
  353.       x = 64
  354.       y = i * 112
  355.       if i <=3
  356.         self.contents.font.color = Color.new(255,255,0,255)
  357.         #self.contents.draw_text(x,y,340,32,"[出战]",2)
  358.         self.contents.font.color = normal_color
  359.       else
  360.         self.contents.font.color = Color.new(128,128,128,255)
  361.         self.contents.draw_text(x,y,340,32,"[支援]",2)
  362.         self.contents.font.color = normal_color
  363.       end      
  364.       actor = $game_party.actors[i]
  365.       draw_actor_graphic(actor, x-20, y + 80)
  366.       draw_actor_name(actor, x+20, y)
  367.       #draw_actor_class(actor, x + 144, y)
  368.       draw_actor_level(actor, x+20, y + 32)
  369.       draw_actor_state(actor, x+20, y + 64)
  370.       #draw_actor_exp(actor, x, y + 64)
  371.       draw_actor_hp(actor, x + 136, y + 32)
  372.       draw_actor_sp(actor, x + 136, y + 64)
  373.     end
  374.   end
  375.   #--------------------------------------------------------------------------
  376.   # ● 刷新光标矩形
  377.   #--------------------------------------------------------------------------
  378.   def update_cursor_rect
  379.     if @index < 0
  380.       self.cursor_rect.empty
  381.     else
  382.       tpy = @index * 112 - self.oy
  383.       self.cursor_rect.set(0, tpy, self.width - 32, 96)
  384.       if @index < @top_row
  385.         @top_row = @index
  386.         self.oy = @top_row *112
  387.       end
  388.       if @index > @top_row+3
  389.         @top_row = @index-3
  390.         self.oy = @top_row *112
  391.       end
  392.     end
  393.   end
  394. end
  395.  
  396. class Game_Party
  397.   #--------------------------------------------------------------------------
  398.   # ● 全灭判定
  399.   #--------------------------------------------------------------------------
  400.   def all_dead?
  401.     # 同伴人数为 0 的情况下
  402.     if $game_party.actors.size == 0
  403.       return false
  404.     end
  405.     # 同伴中无人 HP 在 0 以上
  406.     for i in 0..3
  407.       if @actors[i] != nil and@actors[i].hp >0
  408.         return false
  409.       end
  410.     end
  411.     # 全灭
  412.     return true
  413.   end
  414.   #--------------------------------------------------------------------------
  415.   # ● 加入同伴
  416.   #     actor_id : 角色 ID
  417.   #--------------------------------------------------------------------------
  418.   def add_actor(actor_id)
  419.     # 获取角色
  420.     actor = $game_actors[actor_id]
  421.     # 同伴人数未满 4 人、本角色不在队伍中的情况下
  422.     if not @actors.include?(actor)
  423.       # 添加角色
  424.       @actors.push(actor)
  425.       # 还原主角
  426.       $game_player.refresh
  427.     end
  428.   end
  429. end
  430.  
  431. #==============================================================================
  432. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  433. #==============================================================================
  434.  
  435.  
  436. class Scene_Menu
  437. # --------------------------------
  438.   def initialize(menu_index = 0)
  439.     @menu_index = menu_index
  440.     @changer = 0
  441.     @where = 0
  442.     @checker = 0
  443.   end
  444. # --------------------------------
  445.   def main
  446.     s1 = $data_system.words.item
  447.     s2 = $data_system.words.skill
  448.     s3 = $data_system.words.equip
  449.     s4 = "状态"
  450.     s5 = "储存进度"
  451.     s6 = "离开游戏"
  452.     s7 = "调整队伍"
  453.     s8 = "升级加点"
  454.     s9 = "任务列表(未实装)"
  455.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9])
  456.     @command_window.index = @menu_index
  457.     if $game_party.actors.size == 0
  458.       @command_window.disable_item(0)
  459.       @command_window.disable_item(1)
  460.       @command_window.disable_item(2)
  461.       @command_window.disable_item(3)
  462.     end
  463.     if $game_system.save_disabled
  464.       @command_window.disable_item(4)
  465.     end
  466.     if $game_party.actors.size == 1
  467.       @command_window.disable_item(6)
  468.     end
  469.     @playtime_window = Window_PlayTime.new
  470.     @playtime_window.x = 0
  471.     @playtime_window.y = 320
  472.     @gold_window = Window_Gold.new
  473.     @gold_window.x = 0
  474.     @gold_window.y = 416
  475.     @status_window = Window_MenuStatus.new
  476.     @status_window.x = 260
  477.     @status_window.y = 0
  478.     Graphics.transition
  479.     loop do
  480.       Graphics.update
  481.       Input.update
  482.       update
  483.       if $scene != self
  484.         break
  485.       end
  486.     end
  487.     Graphics.freeze
  488.     @command_window.dispose
  489.     @playtime_window.dispose
  490.     @gold_window.dispose
  491.     @status_window.dispose
  492.   end
  493. # --------------------------------
  494.   def update
  495.     @command_window.update
  496.     @playtime_window.update
  497.     @gold_window.update
  498.     @status_window.update
  499.     if @command_window.active
  500.       update_command
  501.       return
  502.     end
  503.     if @status_window.active
  504.       update_status
  505.       return
  506.     end
  507.   end
  508. # --------------------------------
  509.   def update_command
  510.     if Input.trigger?(Input::B)
  511.       $game_system.se_play($data_system.cancel_se)
  512.       $scene = Scene_Map.new
  513.       return
  514.     end
  515.     if Input.trigger?(Input::C)
  516.       if $game_party.actors.size == 0 and @command_window.index < 4
  517.         $game_system.se_play($data_system.buzzer_se)
  518.         return
  519.       end
  520.       if $game_party.actors.size == 1 and @command_window.index ==6
  521.         $game_system.se_play($data_system.buzzer_se)
  522.         return
  523.       end
  524.       case @command_window.index
  525.       when 0
  526.         $game_system.se_play($data_system.decision_se)
  527.         $scene = Scene_Item.new
  528.       when 1
  529.         $game_system.se_play($data_system.decision_se)
  530.         @command_window.active = false
  531.         @status_window.active = true
  532.         @status_window.index = 0
  533.       when 2
  534.         $game_system.se_play($data_system.decision_se)
  535.         @command_window.active = false
  536.         @status_window.active = true
  537.         @status_window.index = 0
  538.       when 3
  539.         $game_system.se_play($data_system.decision_se)
  540.         @command_window.active = false
  541.         @status_window.active = true
  542.         @status_window.index = 0
  543.       when 4
  544.         if $game_system.save_disabled
  545.           $game_system.se_play($data_system.buzzer_se)
  546.           return
  547.         end
  548.         $game_system.se_play($data_system.decision_se)
  549.         $scene = Scene_Save.new
  550.       when 5
  551.         $game_system.se_play($data_system.decision_se)
  552.         $scene = Scene_End.new
  553.       when 6
  554.         $game_system.se_play($data_system.decision_se)
  555.         @checker = 0
  556.         @command_window.active = false
  557.         @status_window.active = true
  558.         @status_window.index = 0
  559.       when 7
  560.         $game_system.se_play($data_system.decision_se)
  561.         @command_window.active = false
  562.         @status_window.active = true
  563.         @status_window.index = 0
  564.       when 8
  565.         $game_system.se_play($data_system.decision_se)
  566.         @command_window.active = false
  567.         @status_window.active = true
  568.         @status_window.index = 0
  569.       end
  570.       return
  571.     end
  572.   end
  573. # --------------------------------
  574.   def update_status
  575.     if Input.trigger?(Input::B)
  576.       $game_system.se_play($data_system.cancel_se)
  577.       @command_window.active = true
  578.       @status_window.active = false
  579.       @status_window.index = -1
  580.       return
  581.     end
  582.     if Input.trigger?(Input::C)
  583.       case @command_window.index
  584.       when 1
  585.         if $game_party.actors[@status_window.index].restriction >= 2
  586.           $game_system.se_play($data_system.buzzer_se)
  587.           return
  588.         end
  589.         $game_system.se_play($data_system.decision_se)
  590.         $scene = Scene_Skill.new(@status_window.index)
  591.       when 2
  592.         $game_system.se_play($data_system.decision_se)
  593.         $scene = Scene_Equip.new(@status_window.index)
  594.       when 3
  595.         $game_system.se_play($data_system.decision_se)
  596.         $scene = Scene_Status.new(@status_window.index)
  597.       when 6
  598.         $game_system.se_play($data_system.decision_se)
  599.         if @checker == 0
  600.           @changer = $game_party.actors[@status_window.index]
  601.           @where = @status_window.index
  602.           @checker = 1
  603.         else
  604.           $game_party.actors[@where] = $game_party.actors[@status_window.index]
  605.           $game_party.actors[@status_window.index] = @changer
  606.           @checker = 0
  607.           @status_window.refresh
  608.         end
  609.       when 7
  610.         $game_system.se_play($data_system.decision_se)
  611.         $scene = Scene_Lvup.new(@status_window.index)
  612.       when 8
  613.         $game_system.se_play($data_system.decision_se)
  614.         $scene = Scene_Charactor.new(@status_window.index)
  615.       end
  616.       return
  617.     end
  618.   end
  619. end
  620.  
  621.  
  622.  
  623.     #插件(升级加点,换队伍顺序,人物介绍,动态行走图)
  624.  
  625. #==============================================================================
  626. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  627. #==============================================================================
  628.  
  629.  
  630. # 作者: 柳柳
  631. #
  632. # 说明:这是功能我再比较早期的时候发布在幻森,不过那时候比较笨,方法很糟糕
  633. #       这次是拿上就可以用的。
  634. #
  635. # 感谢:Claimh的脚本使我想起这个功能重做了一遍,本想直接用他的,不过他的算法过分
  636. #       冗余了,没好意思用。
  637. #==============================================================================
  638. # 使用方法:默认情况下把静态图变为了走步图。如果想自行修改,提供功能如下:
  639. #
  640. # 角色走步图:draw_walk_actor_graphic
  641. # 角色转向图:draw_turn_actor_graphic
  642. #
  643. # 回复原有静态角色图:删除100行以后的内容。修改下面这个变量可以更改行走速度
  644. #==============================================================================
  645.  
  646. WALK_REFRESH_FRAME_SPEED = 15  # 刷新的速度,越大越慢,你可以改为3左右试试看
  647.  
  648. #==============================================================================
  649. # Window_Base
  650. #==============================================================================
  651. class Window_Base < Window
  652.   #--------------------------------------------------------------------------
  653.   # 初始化方法
  654.   #--------------------------------------------------------------------------
  655.   alias initialize_walk initialize
  656.   def initialize(x, y, width, height)
  657.     initialize_walk(x, y, width, height)
  658.     @start_walk = false
  659.     @turn_index = 0
  660.     @turn_phase = 0
  661.   end
  662.   #--------------------------------------------------------------------------
  663.   # ★  角色行走图
  664.   #     actor : 角色
  665.   #     x     : 描绘的 X 坐标
  666.   #     y     : 描绘的 Y 坐标
  667.   #--------------------------------------------------------------------------
  668.   def draw_walk_actor_graphic(actor, x, y)
  669.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  670.     cw = bitmap.width / 4
  671.     ch = bitmap.height / 4
  672.     @start_turn = true
  673.     case @turn_phase
  674.     when 0
  675.       x_x = 0
  676.     when 1
  677.       x_x = cw
  678.     when 2
  679.       x_x = cw * 2
  680.     when 3
  681.       x_x = cw * 3
  682.     end
  683.     src_rect = Rect.new(x_x, 0, cw, ch)
  684.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  685.   end
  686.   #--------------------------------------------------------------------------
  687.   # ★  角色转向图
  688.   #     actor : 角色
  689.   #     x     : 描绘的 X 坐标
  690.   #     y     : 描绘的 Y 坐标
  691.   #--------------------------------------------------------------------------
  692.   def draw_turn_actor_graphic(actor, x, y)
  693.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  694.     cw = bitmap.width / 4
  695.     ch = bitmap.height / 4
  696.     @start_turn = true
  697.     case @turn_phase
  698.     when 0
  699.       x_x = 0
  700.     when 1
  701.       x_x = ch
  702.     when 2
  703.       x_x = ch * 3
  704.     when 3
  705.       x_x = ch * 2
  706.     end
  707.     src_rect = Rect.new(0, x_x, cw, ch)
  708.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  709.   end
  710.   #--------------------------------------------------------------------------
  711.   #  更新(可别使用刷新,玩命耗费内存= =)
  712.   #--------------------------------------------------------------------------
  713.   alias walk_update update
  714.   def update
  715.     walk_update
  716.     if @start_turn == true
  717.       @turn_index += 1
  718.       if @turn_index == WALK_REFRESH_FRAME_SPEED
  719.         refresh
  720.         @turn_index = 0
  721.         @turn_phase = (@turn_phase+1)%4
  722.       end
  723.     end
  724.   end  
  725. end
  726.  
  727. #==============================================================================
  728. # Window_Base
  729. #==============================================================================
  730. class Window_Base < Window
  731.   #--------------------------------------------------------------------------
  732.   # 把原有静态图改为动态走步图
  733.   #--------------------------------------------------------------------------
  734.   def draw_actor_graphic(actor, x, y)
  735.     draw_walk_actor_graphic(actor, x, y)
  736.   end
  737. end
  738.  
  739. #==============================================================================
  740. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  741. #==============================================================================
  742.  
  743. #==============================================================================
  744. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  745. #==============================================================================
  746.  
  747.  
  748. # 脚本使用设定:
  749.  
  750. LEVEL_UP_POINT = 3  # 每升一级所增加的点数
  751. LEVEL_UP_VARIABLE = 200  # 储存角色点数的变量编号与角色id编号的差值
  752.                          # 默认情况 = 200,
  753.                          # 则是数据库里1号角色的加点数存于101号变量
  754.                          # 3号角色的加点数存于103号变量。
  755.                          # 你可以直接操作变量赠与角色可分配点数
  756.  
  757. # 每增加一次点数,各项能力值的变化:357-410行
  758.  
  759. # 使用方法介绍:
  760.  
  761. # 本脚本不会取代原升级功能 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  762. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  763. # 1-99级全部等于一个相同数值就行了。
  764.  
  765. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  766. # 默认都是0号
  767.  
  768. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  769. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new
  770.  
  771. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG
  772.  
  773. #==============================================================================
  774. # ■ Window_Command
  775. #------------------------------------------------------------------------------
  776. #  一般的命令选择行窗口。(追加定义)
  777. #==============================================================================
  778. class Window_Command < Window_Selectable
  779.   #--------------------------------------------------------------------------
  780.   # ● 项目有效化
  781.   #     index : 项目编号
  782.   #--------------------------------------------------------------------------
  783.   def able_item(index)
  784.     draw_item(index, normal_color)
  785.   end
  786. end
  787. #==============================================================================
  788. # ■ Game_Actor
  789. #------------------------------------------------------------------------------
  790. #  处理角色的类。(再定义)
  791. #==============================================================================
  792. class Game_Actor < Game_Battler
  793.   #--------------------------------------------------------------------------
  794.   # ● 更改 EXP
  795.   #     exp : 新的 EXP
  796.   #--------------------------------------------------------------------------
  797.   def exp=(exp)
  798.     @exp = [[exp, 9999999].min, 0].max
  799.     # 升级
  800.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  801.       @level += 1
  802.       # 增加4点可自由分配的点数
  803.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  804.       # 学会特技
  805.       for j in $data_classes[@class_id].learnings
  806.         if j.level == @level
  807.           learn_skill(j.skill_id)
  808.         end
  809.       end
  810.     end
  811.     # 降级
  812.     while @exp < @exp_list[@level]
  813.       @level -= 1
  814.     end
  815.     # 修正当前的 HP 与 SP 超过最大值
  816.     @hp = [@hp, self.maxhp].min
  817.     @sp = [@sp, self.maxsp].min
  818.   end
  819. end
  820. #==============================================================================
  821. # ■ Window_Base
  822. #------------------------------------------------------------------------------
  823. #  游戏中全部窗口的超级类(追加定义)
  824. #==============================================================================
  825. class Window_Base < Window
  826.   #--------------------------------------------------------------------------
  827.   # ● 描绘 HP
  828.   #     actor : 角色
  829.   #     x     : 描画目标 X 坐标
  830.   #     y     : 描画目标 Y 坐标
  831.   #     width : 描画目标的宽
  832.   #--------------------------------------------------------------------------
  833.   def draw_actor_hp_lvup(actor, x, y)
  834.     self.contents.font.color = system_color
  835.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
  836.     if $temp_hp == 0
  837.       self.contents.font.color = normal_color
  838.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  839.     else
  840.       maxhp = actor.maxhp + $temp_hp
  841.       self.contents.font.color = Color.new(255, 128, 128, 255)
  842.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  843.       self.contents.font.color = normal_color      
  844.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  845.       if $temp_hp >=0
  846.         self.contents.font.color = Color.new(255, 128, 128, 255)
  847.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  848.       else
  849.         self.contents.font.color = Color.new(255,255,0,255)
  850.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  851.       end
  852.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  853.       self.contents.font.color = normal_color
  854.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  855.     end
  856.   end
  857.   #--------------------------------------------------------------------------
  858.   # ● 描绘 SP
  859.   #     actor : 角色
  860.   #     x     : 描画目标 X 坐标
  861.   #     y     : 描画目标 Y 坐标
  862.   #     width : 描画目标的宽
  863.   #--------------------------------------------------------------------------
  864.   def draw_actor_sp_lvup(actor, x, y)
  865.     self.contents.font.color = system_color
  866.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
  867.     if $temp_sp == 0
  868.       self.contents.font.color = normal_color
  869.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
  870.     else
  871.       maxsp = actor.maxsp + $temp_sp
  872.       self.contents.font.color = Color.new(255, 128, 128, 255)
  873.       self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
  874.       self.contents.font.color = normal_color      
  875.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  876.       if $temp_sp >=0
  877.         self.contents.font.color = Color.new(255, 128, 128, 255)
  878.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  879.       else
  880.         self.contents.font.color = Color.new(255,255,0,255)
  881.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  882.       end
  883.       self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
  884.       self.contents.font.color = normal_color
  885.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  886.     end
  887.   end
  888.   #--------------------------------------------------------------------------
  889.   # ● 描绘能力值
  890.   #     actor : 角色
  891.   #     x     : 描画目标 X 坐标
  892.   #     y     : 描画目标 Y 坐标
  893.   #     type  : 能力值种类 (0~4)
  894.   #--------------------------------------------------------------------------
  895.   def draw_actor_lvup(actor, x, y, type)   
  896.     # 定义数字颜色
  897.     lvup = normal_color
  898.     upcolor = Color.new(255, 128, 128, 255)
  899.     self.contents.font.color = normal_color   
  900.     case type
  901.     when 0
  902.       parameter_name = $data_system.words.str
  903.       parameter_value = actor.str
  904.       parameter_value_temp = parameter_value + $temp_str
  905.       if $temp_str != 0
  906.         lvup = upcolor
  907.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  908.         if $temp_str >= 0
  909.           self.contents.font.color = lvup
  910.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  911.         else
  912.           self.contents.font.color = Color.new(255,255,0,255)
  913.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  914.         end        
  915.         self.contents.draw_text(x + 272, y, 80, 32, $temp_str.abs.to_s,1)
  916.         self.contents.font.color = normal_color
  917.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  918.       end
  919.     when 1
  920.       parameter_name = $data_system.words.dex
  921.       parameter_value = actor.dex
  922.       parameter_value_temp = parameter_value + $temp_dex
  923.       if $temp_dex != 0
  924.         lvup = upcolor
  925.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  926.         if $temp_dex >= 0
  927.           self.contents.font.color = lvup
  928.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  929.         else
  930.           self.contents.font.color = Color.new(255,255,0,255)
  931.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  932.         end        
  933.         self.contents.draw_text(x + 272, y, 80, 32, $temp_dex.abs.to_s,1)
  934.         self.contents.font.color = normal_color
  935.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  936.       end
  937.     when 2
  938.       parameter_name = $data_system.words.agi
  939.       parameter_value = actor.agi
  940.       parameter_value_temp = parameter_value + $temp_agi
  941.       if $temp_agi != 0
  942.         lvup = upcolor
  943.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  944.         if $temp_agi >= 0
  945.           self.contents.font.color = lvup
  946.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  947.         else
  948.           self.contents.font.color = Color.new(255,255,0,255)
  949.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  950.         end        
  951.         self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
  952.         self.contents.font.color = normal_color
  953.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  954.       end
  955.     when 3
  956.       parameter_name = $data_system.words.int
  957.       parameter_value = actor.int
  958.       parameter_value_temp = parameter_value + $temp_int
  959.       if $temp_int != 0
  960.         lvup = upcolor
  961.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  962.         if $temp_int >= 0
  963.           self.contents.font.color = lvup
  964.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  965.         else
  966.           self.contents.font.color = Color.new(255,255,0,255)
  967.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  968.         end        
  969.         self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
  970.         self.contents.font.color = normal_color
  971.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  972.       end
  973.     when 4
  974.       parameter_name = "剩余点数"
  975.       parameter_value = $point
  976.       if $point != 0
  977.         lvup = upcolor
  978.       end
  979.     end   
  980.     self.contents.font.color = system_color
  981.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  982.     self.contents.font.color = normal_color
  983.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  984.     if type != 4
  985.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  986.     end  
  987.     self.contents.font.color = lvup
  988.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  989.     self.contents.font.color = normal_color        
  990.   end
  991. end
  992. #==============================================================================
  993. # ■ Window_lvup
  994. #------------------------------------------------------------------------------
  995. #  显示升级状态窗口。
  996. #==============================================================================
  997. class Window_Lvup < Window_Base
  998.   #--------------------------------------------------------------------------
  999.   # ● 初始化对像
  1000.   #     actor : 角色
  1001.   #--------------------------------------------------------------------------
  1002.   def initialize(actor)
  1003.     super(0, 0, 512, 320)
  1004.     self.contents = Bitmap.new(width - 32, height - 32)
  1005.     @actor = actor
  1006.     refresh
  1007.   end  
  1008.   #--------------------------------------------------------------------------
  1009.   # ● 刷新
  1010.   #--------------------------------------------------------------------------
  1011.   def refresh
  1012.     self.contents.clear
  1013.     draw_actor_graphic(@actor, 40, 112)
  1014.     draw_actor_name(@actor, 4, 0)
  1015.     draw_actor_class(@actor, 4 + 144, 0)
  1016.     draw_actor_level(@actor, 96, 32)
  1017.     draw_actor_state(@actor, 96, 64)   
  1018.     draw_actor_hp_lvup(@actor, 96+128, 32)
  1019.     draw_actor_sp_lvup(@actor, 96+128, 64)
  1020.     draw_actor_lvup(@actor, 96, 128, 0)
  1021.     draw_actor_lvup(@actor, 96, 160, 1)
  1022.     draw_actor_lvup(@actor, 96, 192, 2)
  1023.     draw_actor_lvup(@actor, 96, 224, 3)
  1024.     draw_actor_lvup(@actor, 96, 256, 4)
  1025.   end
  1026. end
  1027. #==============================================================================
  1028. # ■ Window_Help
  1029. #------------------------------------------------------------------------------
  1030. #  特技及物品的说明、角色的状态显示的窗口。
  1031. #==============================================================================
  1032. class Window_Lvup_Help < Window_Base
  1033.   #--------------------------------------------------------------------------
  1034.   # ● 初始化对像
  1035.   #--------------------------------------------------------------------------
  1036.   def initialize
  1037.     super(0, 320, 640, 160)
  1038.     self.contents = Bitmap.new(width - 32, height - 32)
  1039.     @test = "" #——这个东西用来检测,节约内存专用
  1040.   end  
  1041.   #--------------------------------------------------------------------------
  1042.   # ● 设置文本
  1043.   #--------------------------------------------------------------------------
  1044.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
  1045.     if @test != text1
  1046.       @test = text1
  1047.     else
  1048.       return
  1049.     end   
  1050.     self.contents.clear
  1051.     self.contents.font.color = normal_color
  1052.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  1053.     if text2 != nil
  1054.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  1055.     end
  1056.     self.contents.font.size -= 4
  1057.     if text3 != nil
  1058.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  1059.     end
  1060.     if text4 != nil
  1061.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  1062.     end
  1063.     self.contents.font.size += 4
  1064.   end
  1065. end
  1066. #==============================================================================
  1067. # ■ Scene_lvup
  1068. #------------------------------------------------------------------------------
  1069. #  处理升级画面的类。
  1070. #==============================================================================
  1071. class Scene_Lvup
  1072.   #--------------------------------------------------------------------------
  1073.   # ● 初始化对像
  1074.   #     actor_index : 角色索引
  1075.   #     menu_index : 选项起始位置
  1076.   #--------------------------------------------------------------------------
  1077.   def initialize(actor_index = 0 , menu_index = 0)
  1078.     @actor_index = actor_index
  1079.     @menu_index = menu_index
  1080.   end
  1081.   #--------------------------------------------------------------------------
  1082.   # ● 主处理
  1083.   #--------------------------------------------------------------------------
  1084.   def main
  1085.     s1 = "增加体力"
  1086.     s2 = "增加"+$data_system.words.str
  1087.     s3 = "增加"+$data_system.words.dex
  1088.     s4 = "增加"+$data_system.words.agi
  1089.     s5 = "增加"+$data_system.words.int
  1090.     s6 = "确认加点"
  1091.     s7 = "点数重置"
  1092.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  1093.     @command_window.index = @menu_index
  1094.     # 获取角色
  1095.     @actor = $game_party.actors[@actor_index]
  1096.     # 将角色的剩余点数带入
  1097.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  1098.     # 初始化临时量
  1099.     $temp_str = 0
  1100.     $temp_dex = 0
  1101.     $temp_agi = 0
  1102.     $temp_int = 0
  1103.     $temp_hp = 0
  1104.     $temp_sp = 0
  1105.     #=========================================================================
  1106.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  1107.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  1108.     #=========================================================================
  1109.     # 每提升一次力量,提升多少附加能力
  1110.     #=========================================================================
  1111.     @str_hp = 5     # 每提升一次力量附加提升多少HP
  1112.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  1113.     @str_dex = 1    # 每提升一次力量附加提升多少灵巧
  1114.     @str_agi = 1    # 每提升一次力量附加提升多少速度
  1115.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  1116.     @str_str = 3    # 每提升一次力量附加提升多少力量
  1117.     #=========================================================================
  1118.     # 每提升一次灵巧,提升多少附加能力
  1119.     #=========================================================================
  1120.     @dex_hp = 2     # 每提升一次灵巧附加提升多少HP
  1121.     @dex_sp = 3     # 每提升一次灵巧附加提升多少SP
  1122.     @dex_str = 1    # 每提升一次灵巧附加提升多少力量
  1123.     @dex_agi = 1    # 每提升一次灵巧附加提升多少速度
  1124.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  1125.     @dex_dex = 3    # 每提升一次灵巧附加提升多少灵巧
  1126.     #=========================================================================
  1127.     # 每提升一次速度,提升多少附加能力
  1128.     #=========================================================================
  1129.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  1130.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  1131.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  1132.     @agi_dex = 1    # 每提升一次速度附加提升多少灵巧
  1133.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  1134.     @agi_agi = 3    # 每提升一次速度附加提升多少速度
  1135.     #=========================================================================
  1136.     # 每提升一次魔力,提升多少附加能力
  1137.     #=========================================================================
  1138.     @int_hp = 1     # 每提升一次魔力附加提升多少HP
  1139.     @int_sp = 15    # 每提升一次魔力附加提升多少SP
  1140.     @int_str = -1   # 每提升一次魔力附加提升多少力量
  1141.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  1142.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  1143.     @int_int = 7   # 每提升一次魔力附加提升多少魔力
  1144.     #=========================================================================
  1145.     # 每提升一次体力,提升多少附加能力
  1146.     #=========================================================================
  1147.     @hp = 20       # 每提升一次体力提升多少HP
  1148.     @sp = 10       # 每提升一次体力提升多少SP
  1149.     @hp_str = 0   # 每提升一次体力提升多少力量
  1150.     @hp_dex = 0   # 每提升一次体力提升多少速度
  1151.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  1152.     @hp_int = -1   # 每提升一次体力提升多少魔力   
  1153.     # 定义说明文字
  1154.     @text_hp_sc = "体力可以增加生存的能力,增加HP与SP的最大上限!"
  1155.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  1156.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和防御系数!"
  1157.     @text_agi_sc = $data_system.words.agi + "可以提高行动速度、逃跑成功率!"
  1158.     @text_int_sc = $data_system.words.int + "可以提高魔法攻击的效果!"
  1159.     @text_save = "保存分配情况并返回游戏"
  1160.     @text_reset= "重新分配能力点数"
  1161.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  1162.     @text_hp = "最大" + $data_system.words.hp + "值"
  1163.     @text_sp = "最大" + $data_system.words.sp + "值"
  1164.     @text_str = "最大" + $data_system.words.str + "值"
  1165.     @text_dex = "最大" + $data_system.words.dex + "值"
  1166.     @text_agi = "最大" + $data_system.words.agi + "值"
  1167.     @text_int = "最大" + $data_system.words.int + "值"
  1168.     s_disable
  1169.     # 生成状态窗口
  1170.     @lvup_window = Window_Lvup.new(@actor)
  1171.     @lvup_window.x = 128
  1172.     @lvup_window.y = 0   
  1173.     # 生成帮助窗口并初始化帮助文本
  1174.     @help_window = Window_Lvup_Help.new   
  1175.     # 执行过渡
  1176.     Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
  1177.     # 主循环
  1178.     loop do
  1179.       # 刷新游戏画面
  1180.       Graphics.update
  1181.       # 刷新输入信息
  1182.       Input.update
  1183.       # 刷新画面
  1184.       update
  1185.       # 如果切换画面就中断循环
  1186.       if $scene != self
  1187.         break
  1188.       end
  1189.     end
  1190.     # 准备过渡
  1191.     Graphics.freeze
  1192.     # 释放窗口
  1193.     @command_window.dispose
  1194.     @lvup_window.dispose
  1195.     @help_window.dispose
  1196.   end
  1197.   #--------------------------------------------------------------------------
  1198.   # ● 刷新画面
  1199.   #--------------------------------------------------------------------------
  1200.   def update
  1201.     # 刷新窗口
  1202.     @command_window.update
  1203.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  1204.     s_disable
  1205.     @lvup_window.update
  1206.     #=============================================================
  1207.     # 按下 B 键的情况下
  1208.     #=============================================================
  1209.     if Input.trigger?(Input::B)
  1210.       # 演奏取消 SE
  1211.       $game_system.se_play($data_system.cancel_se)
  1212.       # 切换到地图画面
  1213.       $scene = Scene_Menu.new
  1214.       return
  1215.     end
  1216.     #=============================================================
  1217.     # 按下 C 键的情况下
  1218.     #=============================================================
  1219.     if Input.trigger?(Input::C)      
  1220.       if @command_window.index == 5
  1221.           # 演奏确定 SE
  1222.         $game_system.se_play($data_system.decision_se)
  1223.         # 将角色的剩余点数带回
  1224.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  1225.         # 将角色点数实际加上
  1226.         @actor.str += $temp_str
  1227.         @actor.dex += $temp_dex
  1228.         @actor.agi += $temp_agi
  1229.         @actor.int += $temp_int
  1230.         @actor.maxhp += $temp_hp
  1231.         @actor.maxsp += $temp_sp
  1232.         # 切换到地图画面
  1233.         $scene = Scene_Menu.new
  1234.         return
  1235.       end
  1236.       if @command_window.index == 6
  1237.           # 演奏确定 SE
  1238.         $game_system.se_play($data_system.cancel_se)
  1239.           # 将角色的剩余点数带入
  1240.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  1241.           # 初始化临时量
  1242.         $temp_str = 0
  1243.         $temp_dex = 0
  1244.         $temp_agi = 0
  1245.         $temp_int = 0
  1246.         $temp_hp = 0
  1247.         $temp_sp = 0
  1248.         @lvup_window.refresh
  1249.         return
  1250.       end
  1251.       if $point == 0
  1252.         # 演奏冻结 SE
  1253.         $game_system.se_play($data_system.buzzer_se)
  1254.         return
  1255.       end
  1256.       case @command_window.index
  1257.       when 0
  1258.         # 演奏确定 SE
  1259.         $game_system.se_play($data_system.decision_se)
  1260.         $temp_hp += @hp
  1261.         $temp_sp += @sp
  1262.         $temp_str += @hp_str
  1263.         $temp_dex += @hp_dex
  1264.         $temp_agi += @hp_agi
  1265.         $temp_int += @hp_int
  1266.         $point -= 1
  1267.         @lvup_window.refresh
  1268.         s_disable
  1269.         return
  1270.       when 1
  1271.         # 演奏确定 SE
  1272.         $game_system.se_play($data_system.decision_se)
  1273.         $temp_str += @str_str
  1274.         $temp_hp += @str_hp
  1275.         $temp_sp += @str_sp
  1276.         $temp_dex += @str_dex
  1277.         $temp_agi += @str_agi
  1278.         $temp_int += @str_int
  1279.         $point -= 1
  1280.         @lvup_window.refresh
  1281.         s_disable
  1282.         return
  1283.       when 2
  1284.         # 演奏确定 SE
  1285.         $game_system.se_play($data_system.decision_se)
  1286.         $temp_dex += @dex_dex
  1287.         $temp_hp += @dex_hp
  1288.         $temp_sp += @dex_sp
  1289.         $temp_str += @dex_str
  1290.         $temp_agi += @dex_agi
  1291.         $temp_int += @dex_int
  1292.         $point -= 1
  1293.         @lvup_window.refresh
  1294.         s_disable
  1295.         return
  1296.       when 3
  1297.         # 演奏确定 SE
  1298.         $game_system.se_play($data_system.decision_se)
  1299.         $temp_agi += @agi_agi
  1300.         $temp_hp += @agi_hp
  1301.         $temp_sp += @agi_sp
  1302.         $temp_str += @agi_str
  1303.         $temp_dex += @agi_dex
  1304.         $temp_int += @agi_int
  1305.         $point -= 1
  1306.         @lvup_window.refresh
  1307.         s_disable
  1308.         return
  1309.       when 4
  1310.         # 演奏确定 SE
  1311.         $game_system.se_play($data_system.decision_se)
  1312.         $temp_int += @int_int
  1313.         $temp_hp += @int_hp
  1314.         $temp_sp += @int_sp
  1315.         $temp_str += @int_str
  1316.         $temp_dex += @int_dex
  1317.         $temp_agi += @int_agi
  1318.         $point -= 1
  1319.         @lvup_window.refresh
  1320.         s_disable
  1321.         return
  1322.       end
  1323.     end
  1324.     #=============================================================
  1325.     # 什么都没有按下的情况
  1326.     #=============================================================
  1327.     case @command_window.index   
  1328.     when 0  # 增加体力
  1329.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  1330.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  1331.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  1332.     when 1  # 增加力量
  1333.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  1334.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  1335.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  1336.     when 2  # 增加灵巧
  1337.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  1338.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  1339.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  1340.     when 3  # 增加速度
  1341.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  1342.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  1343.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  1344.     when 4  # 增加魔力
  1345.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  1346.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  1347.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  1348.     when 5 # 保存设定
  1349.       @help_window.lvup_text(@text_save)
  1350.     when 6 # 点数重置
  1351.       @help_window.lvup_text(@text_reset)     
  1352.     end
  1353.     #=============================================================
  1354.     # 按下R与L换人的情况
  1355.     #=============================================================      
  1356.     if Input.trigger?(Input::R)
  1357.       # 演奏光标 SE
  1358.       $game_system.se_play($data_system.cursor_se)
  1359.       # 移至下一位角色
  1360.       @actor_index += 1
  1361.       @actor_index %= $game_party.actors.size
  1362.       # 切换到别的状态画面
  1363.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  1364.       return
  1365.     end
  1366.     # 按下 L 键的情况下
  1367.     if Input.trigger?(Input::L)
  1368.       # 演奏光标 SE
  1369.       $game_system.se_play($data_system.cursor_se)
  1370.       # 移至上一位角色
  1371.       @actor_index += $game_party.actors.size - 1
  1372.       @actor_index %= $game_party.actors.size
  1373.       # 切换到别的状态画面
  1374.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  1375.       return
  1376.     end
  1377.   end  
  1378.   #--------------------------------------------------------------------------
  1379.   # ● 选项明暗判断
  1380.   #--------------------------------------------------------------------------
  1381.   def s_disable
  1382.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  1383.     if $point == 0
  1384.       @command_window.disable_item(0)
  1385.       @command_window.disable_item(1)
  1386.       @command_window.disable_item(2)
  1387.       @command_window.disable_item(3)
  1388.       @command_window.disable_item(4)
  1389.     else
  1390.       @command_window.able_item(0)
  1391.       @command_window.able_item(1)      
  1392.       @command_window.able_item(2)
  1393.       @command_window.able_item(3)
  1394.       @command_window.able_item(4)
  1395.     end
  1396.   end
  1397. end
  1398.  
  1399. #==============================================================================
  1400. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  1401. #==============================================================================
  1402.  
  1403. #==============================================================================
  1404. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  1405. #==============================================================================

点评

一个是原版的,一个是后加调整队伍顺序的QWQ  发表于 2019-3-28 12:33
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
5
 楼主| 发表于 2019-3-28 12:48:14 | 只看该作者
插入图片的示意图差不多是这样...(画的很丑==)

新建画布1.png (27.45 KB, 下载次数: 20)

新建画布1.png
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
6
 楼主| 发表于 2019-3-30 11:24:17 | 只看该作者
顶顶QWQ(应该没有违规吧==)
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
37789
在线时间
5398 小时
注册时间
2006-11-10
帖子
6546
7
发表于 2019-3-30 14:34:15 | 只看该作者
你上面那些脚本 并没有"任务脚本", 我想应该不会有能在不知道你用什么脚本的情况下, 给你变窗口来的大神

还是说你还没使用任务脚本?  那你的任务完成度数值是怎么来的?

点评

支线任务系统后面再加嘛..任务完成度可以用变量表示..只需要显示变量就行了吧QWQ  发表于 2019-3-30 14:37
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
37789
在线时间
5398 小时
注册时间
2006-11-10
帖子
6546
8
发表于 2019-3-30 15:04:45 | 只看该作者
那你可以自己加窗口

常规窗口写法可以参考 game gold 它就是标准的XP窗口模范,  把def refresh 这段 里面保留第一句, 下面的擦掉, 它就是一个空窗口, 然后填上自己的内容

描绘文字写法 self.contents.draw_text(x, y, 宽, 高, 要描绘的字符串, 对齐0左1中2右)
要描绘某个变量的数值, 就在"要描绘的字符串"里,填上 $game_variables[编号].to_s

描绘图片写法 self.contents.blt(x, y, bitmap, Rect.new(x, y, 宽, 高),透明度)
bitmap 是图片文件, 例如 bitmap = RPG::Cache.picture("一张图片")  这样写就可以调用pictures文件夹里的叫"一张图片.png"名字的图片文件
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
14048
在线时间
2070 小时
注册时间
2016-9-20
帖子
844
9
发表于 2019-3-30 15:49:34 | 只看该作者
本帖最后由 ppspssss 于 2019-3-30 17:18 编辑

第一步插入腳本Window_j_mission
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Window_j_mission
  3. #------------------------------------------------------------------------------
  4. #  显示任务的窗口。
  5. #==============================================================================
  6. $任务叙术_1 = "打以下列怪"
  7. $任务叙术_2 = "吱喳鸡"
  8. $任务叙术_3 = "狸花猫"
  9. $任务类型 = "打怪"
  10. $已完成任务 = 1
  11. $任务完成率 = 1
  12. $任务要求打多少只_1 = 5
  13. $任务你打了多少只_1 = 10
  14. $任务要求打多少只_2 = 0
  15. $任务你打了多少只_2 = 20
  16.  
  17. $是否已完成 = "不是"
  18.  
  19.  
  20. class Window_j_mission < Window_Base
  21.   #--------------------------------------------------------------------------
  22.   # ● 初始化窗口
  23.   #--------------------------------------------------------------------------
  24.   def initialize
  25.     super(0, 0, 100, 480)
  26.     self.contents = Bitmap.new(width - 32, height - 32)
  27.     refresh
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 刷新
  31.   #--------------------------------------------------------------------------
  32.   def refresh
  33.     self.contents.clear
  34.     #cx = contents.text_size($data_system.words.gold).width
  35.     self.contents.font.color = normal_color
  36.     self.contents.font.size = 16
  37.     self.contents.draw_text(0, 0, 70, 60, "现在任务", 0)
  38.     self.contents.draw_text(0, 0+20, 70, 60, "#{$任务类型}", 0)
  39.     self.contents.draw_text(0, 0+40, 70, 60, "#{$任务叙术_1}", 0)
  40.     self.contents.draw_text(0, 0+60, 70, 60, "#{$任务叙术_2}", 0)
  41.     self.contents.draw_text(0, 0+80, 70, 60, "#{$任务叙术_3}", 0)
  42.  
  43.     self.contents.font.color = text_color(5)
  44.     self.contents.font.size = 16
  45.     self.contents.draw_text(0, 150, 70, 60, "已打完成数量", 0)
  46.     self.contents.draw_text(0, 150+20, 70, 60, "#{$任务你打了多少只_1}"+"/"+"#{$任务要求打多少只_1}", 0)
  47.     self.contents.draw_text(0, 150+40, 70, 60, "#{$任务你打了多少只_2}"+"/"+"#{$任务要求打多少只_2}", 0)
  48.     self.contents.font.color = text_color(6)
  49.     self.contents.font.size = 16
  50.     self.contents.draw_text(0, 350, 70, 60, "任务进度", 0)
  51.     self.contents.draw_text(0, 350+20, 70, 60,"是否已完成", 0)
  52.     self.contents.draw_text(0, 350+40, 70, 60,"#{$是否已完成}" , 0)
  53.   end
  54. end


之后照图修改,$符那些變量我只是打例子

点评

跟着学习了!  发表于 2019-3-31 22:31
我已经学会了QWQ谢谢大佬的帮助了QWQ  发表于 2019-3-30 22:11
那你要不要显示图片的功能  发表于 2019-3-30 17:53
虽然说大佬没有理解我的意思==,但是代码给了我很多参考价值,谢谢QWQ  发表于 2019-3-30 17:29

评分

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

查看全部评分

内容仅供参考,
回复 支持 2 反对 0

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
10
 楼主| 发表于 2019-3-30 16:13:13 | 只看该作者
本帖最后由 wyw838 于 2019-3-30 16:34 编辑
灯笼菜刀王 发表于 2019-3-30 15:04
那你可以自己加窗口

常规窗口写法可以参考 game gold 它就是标准的XP窗口模范,  把def refresh  ...


感谢大佬的帮助,但是我描绘的字符串和图片并没有出来,只有一个孤零零窗口QAQ如下图

9RYOPPO808XSL]$`]_1R)9L.png (717.49 KB, 下载次数: 11)

9RYOPPO808XSL]$`]_1R)9L.png

OS%X@6K[T7$W{Y}WGD4WQ[M.png (1.12 MB, 下载次数: 14)

OS%X@6K[T7$W{Y}WGD4WQ[M.png

点评

测试用的字符串真是皮  发表于 2019-3-30 19:06
嗯嗯...现在好了,谢谢qwq  发表于 2019-3-30 17:28
坐标问题哦, x,y不是根据640*480的窗口, 而是要根据你的这个窗口为标准的, 很显然, 你这个窗口宽肯定没有120, 所以你文字都显示到外太空去了  发表于 2019-3-30 17:18
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-25 01:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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