赞 | 7 |
VIP | 866 |
好人卡 | 185 |
积分 | 32 |
经验 | 130059 |
最后登录 | 2024-10-29 |
在线时间 | 3618 小时 |
Lv3.寻梦者 双子人
- 梦石
- 0
- 星屑
- 3185
- 在线时间
- 3618 小时
- 注册时间
- 2009-4-4
- 帖子
- 4154
|
本帖最后由 hys111111 于 2012-7-1 10:06 编辑
- #==============================================================================
- # ■ Window_LevelUp
- #==============================================================================
- class Window_LevelUp < Window_Base
- #——初始化 ——
- def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
- super(16, 32, 240, 288)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.visible = false
- self.back_opacity = 160
- refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
- end
-
- #——刷新 ——
- def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
- self.contents.clear
- self.contents.font.size = 20
- self.contents.font.color = Color.new(0,0,0,255)
- self.contents.draw_text( 1, 1, 100, 32, actor.name)
- self.contents.draw_text( 1, 1, 192, 32, "等级提升", 2)
- self.contents.font.color = Color.new(150,238,185,255)
- self.contents.draw_text( 0, 0, 100, 32, actor.name)
- self.contents.font.color = Color.new(255,119,74,255)
- self.contents.draw_text( 0, 0, 192, 32, "等级提升", 2)
- self.contents.font.size = 18
- self.contents.font.color = Color.new(0,0,0,255)
- self.contents.draw_text( 1, 33, 64, 32, "等级")
- self.contents.draw_text( 1, 65, 160, 32, $data_system.words.hp)
- self.contents.draw_text( 1, 97, 160, 32, $data_system.words.sp)
- self.contents.draw_text( 1, 128, 80, 32, $data_system.words.str)
- self.contents.draw_text( 1, 161, 80, 32, $data_system.words.dex)
- self.contents.draw_text( 1, 192, 80, 32, $data_system.words.agi)
- self.contents.draw_text( 1, 225, 80, 32, $data_system.words.int)
- self.contents.font.color = system_color
- self.contents.draw_text( 0, 32, 64, 32, "等级")
- self.contents.draw_text( 0, 64, 160, 32, $data_system.words.hp)
- self.contents.draw_text( 0, 96, 160, 32, $data_system.words.sp)
- self.contents.draw_text( 0, 128, 80, 32, $data_system.words.str)
- self.contents.draw_text( 0, 160, 80, 32, $data_system.words.dex)
- self.contents.draw_text( 0, 192, 80, 32, $data_system.words.agi)
- self.contents.draw_text( 0, 224, 80, 32, $data_system.words.int)
- self.contents.draw_text(1, 33, 126, 32, "→",2)
- self.contents.draw_text(1, 65, 128, 32, "=",2)
- self.contents.draw_text(1, 97, 128, 32, "=",2)
- self.contents.draw_text(1, 129, 128, 32, "=",2)
- self.contents.draw_text(1, 161, 128, 32, "=",2)
- self.contents.draw_text(1, 193, 128, 32, "=",2)
- self.contents.draw_text(1, 225, 128, 32, "=",2)
- self.contents.font.color = normal_color
- self.contents.draw_text( 1, 33, 96, 32, last_lv.to_s, 2)
- self.contents.draw_text( 1, 65, 96, 32, "+" + up_hp.to_s, 2)
- self.contents.draw_text( 1, 97, 96, 32, "+" + up_sp.to_s, 2)
- self.contents.draw_text( 1, 129, 96, 32, "+" + up_str.to_s, 2)
- self.contents.draw_text( 1, 161, 96, 32, "+" + up_dex.to_s, 2)
- self.contents.draw_text( 1, 193, 96, 32, "+" + up_agi.to_s, 2)
- self.contents.draw_text( 1, 225, 96, 32, "+" + up_int.to_s, 2)
- self.contents.font.size = 20
- self.contents.font.color = Color.new(0,0,0,255)
- self.contents.draw_text( 1, 33, 192, 32, actor.level.to_s, 2)
- self.contents.draw_text( 1, 65, 192, 32, actor.maxhp.to_s, 2)
- self.contents.draw_text( 1, 97, 192, 32, actor.maxsp.to_s, 2)
- self.contents.draw_text( 1, 129, 192, 32, actor.str.to_s, 2)
- self.contents.draw_text( 1, 161, 192, 32, actor.dex.to_s, 2)
- self.contents.draw_text( 1, 193, 192, 32, actor.agi.to_s, 2)
- self.contents.draw_text( 1, 225, 192, 32, actor.int.to_s, 2)
-
- self.contents.font.color = Color.new(255,255,74,255)
- self.contents.draw_text( 0, 32, 192, 32, actor.level.to_s, 2)
- self.contents.draw_text( 0, 64, 192, 32, actor.maxhp.to_s, 2)
- self.contents.draw_text( 0, 96, 192, 32, actor.maxsp.to_s, 2)
- self.contents.draw_text( 0, 128, 192, 32, actor.str.to_s, 2)
- self.contents.draw_text( 0, 160, 192, 32, actor.dex.to_s, 2)
- self.contents.draw_text( 0, 192, 192, 32, actor.agi.to_s, 2)
- self.contents.draw_text( 0, 224, 192, 32, actor.int.to_s, 2)
- end
- end
- #==============================================================================
- # ■ Window_SkillLearning
- #==============================================================================
- class Window_SkillLearning < Window_Base
-
- attr_reader :learned
- #——初始化 ——
- def initialize(class_id, last_lv, now_lv)
- super(256, 256, 320, 64)
- self.contents = Bitmap.new(width - 32, height - 28) # わざと▽を表示
- self.contents.font.size = 22
- self.visible = false
- self.back_opacity = 160
- @learned = false
- refresh(class_id, last_lv, now_lv)
- end
-
- #——刷新 ——
- def refresh(class_id, last_lv, now_lv)
- for i in 0...$data_classes[class_id].learnings.size
- learn_lv = $data_classes[class_id].learnings[i].level
- #——判断学习技能条件是否满足 ——
- if learn_lv > last_lv and learn_lv <= now_lv
- @learned = true
- #——播放音效 ——
- if $data_system_skilllearn_se != ""
- Audio.se_play($data_system_skilllearn_se)
- end
- #——各内容描写 ——
- skill_name = $data_skills[$data_classes[class_id].learnings[i].skill_id].name
- self.contents.clear
- self.contents.font.color = Color.new(0,0,0,255)
- self.contents.draw_text(1,1,110,30, "学会特技:",2)
- self.contents.draw_text(1,1,264,30,skill_name,2)
-
- self.contents.font.color = Color.new(150,238,185,255)
- self.contents.draw_text(0,0,110,30, "学会特技:",2)
- self.contents.font.color = Color.new(255,255,74,255)
- self.contents.draw_text(0,0,264,30,skill_name,2)
- self.z = 1000
- self.visible = true
- loop do
- Graphics.update
- Input.update
- update
- if @learned == false
- break
- end
- end
- end
- end
- end
-
- #——刷新 ——
- def update
- if Input.trigger?(Input::C)
- @learned = false
- self.visible = false
- end
- end
-
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码 无责任扔出脚本 |
评分
-
查看全部评分
|