赞 | 189 |
VIP | 627 |
好人卡 | 188 |
积分 | 95 |
经验 | 171230 |
最后登录 | 2024-7-3 |
在线时间 | 5073 小时 |
Lv4.逐梦者 (版主)
- 梦石
- 0
- 星屑
- 9532
- 在线时间
- 5073 小时
- 注册时间
- 2013-6-21
- 帖子
- 3580
|
这脚本写得好别扭,刷新的东西居然放到initialize里面。而且很多地方都不太合理,例如应该可以用PGUP/PGDN切换队员,这里也没有。
简单改了下,实际使用的时候,用$scene = Rw_zt.new(角色ID)来表示给当前队伍的第几个角色加点(第一个角色的ID是0)。URL请自行去掉。
# 作者:风若·飘絮 # 二次更改:个快快 class Rw_Zt def initialize(id) @id = id end def main @view = Viewport.new(383,0,257,451) @back = Sprite.new(@view) @back.x = 0 @back.y = 0 @back.bitmap = RPG::Cache.picture("状态栏1.png") @art = Bitmap.new(257,451) @a = Sprite.new(@view) @a.bitmap = @art @a.bitmap.font.size = 15 @a.bitmap.font.name = ["宋体","方正像素16"] @a.bitmap.font.color = Color.new(0,0,0) @jn = Window_Command2.new(42,["杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具",]) @jn.contents_opacity = 0 @jn.opacity = 0 @jn.back_opacity = 0 @jnblt = RPG::Cache.picture("技能1") @actor = $game_party.actors[@id] @加点 = [] #加点绘制 for i in 0..4 @加点[i] = Sprite.new(@view) @加点[i].x = 200 @加点[i].y = 253+i*23 @加点[i].bitmap = Bitmap.new(19,19) @bit0 = RPG::Cache.picture("加点.png") @加点[i].bitmap.blt(0,0,@bit0,Rect.new(0,0,19,19)) end @减点 = [] #减点绘制 for i in 0..4 @减点[i] = Sprite.new(@view) @减点[i].x = 230 @减点[i].y = 253+i*23 @减点[i].bitmap = Bitmap.new(19,19) @bit= RPG::Cache.picture("减点.png") @减点[i].bitmap.blt(0,0,@bit,Rect.new(0,0,19,19)) end refresh Graphics.transition loop do Graphics.update Graphics.update Input.update update if Input.trigger?(Input::B) # $scene0 = nil break end end @jn.dispose @back.dispose @a.bitmap.dispose @art.dispose @view.dispose for i in 0..4 @加点[i].dispose @减点[i].dispose end end def update @jn.update @jnblt = RPG::Cache.picture("技能1") @a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22)) for i in 0..4 @加点[i].bitmap.clear @加点[i].bitmap.blt(0,0,@bit0,Rect.new(0,0,19,19)) @减点[i].bitmap.clear @减点[i].bitmap.blt(0,0,@bit,Rect.new(0,0,19,19)) end a = @jn.index case @jn.index when 0 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19)) @actor.ti += 1 @actor.hp = @actor.maxhp $game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1 $game_system.se_play($data_system.decision_se) refresh end end when 1 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19)) @actor.int += 1 @actor.sp = @actor.maxsp $game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1 $game_system.se_play($data_system.decision_se) refresh end end when 2 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19)) @actor.str += 1 $game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1 $game_system.se_play($data_system.decision_se) refresh end end when 3 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19)) @actor.dex += 1 $game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1 $game_system.se_play($data_system.decision_se) refresh end end when 4 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0 @加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19)) @actor.min += 1 $game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1 $game_system.se_play($data_system.decision_se) refresh end end when 5 @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19)) if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5 $game_party.qld[$game_party.actors[@id].name] += 1 end refresh end when 6 @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19)) if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5 #$game_party.qld[$game_party.actors[@id].name] += 1 end refresh end when 7 @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19)) if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5 # $game_party.qld[$game_party.actors[@id].name] += 1 end refresh end when 8 @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19)) if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5 # $game_party.qld[$game_party.actors[@id].name] += 1 end refresh end when 9 @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19)) if Input.trigger?(Input::C) @减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19)) if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5 # $game_party.qld[$game_party.actors[@id].name] += 1 end refresh end when 10 @jnblt = RPG::Cache.picture("技能3") @a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22)) if Input.trigger?(Input::C) # 命令窗口的光标位置的分支 @jnblt = RPG::Cache.picture("技能2") @a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22)) @jn.active = false @jnn = Rw_Jn.new(@id) end end end def refresh @a.bitmap.clear @a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22)) # @潜力点 = $game_party.actors[@id].level*5 - $game_party.qld[$game_party.actors[@id].name] @a.bitmap.draw_text(60,30,45,20,$game_party.actors[@id].level.to_s) @a.bitmap.draw_text(170,32,45,20,$game_party.actors[@id].name.to_s) @a.bitmap.draw_text(85,77,60,20,"无") @a.bitmap.draw_text(216,77,60,20,"0") @a.bitmap.draw_text(85,100,60,20,$game_party.actors[@id].class_name.to_s) @a.bitmap.draw_text(216,100,45,20,"0") @a.bitmap.draw_text(85,130,80,20,$game_party.actors[@id].hp.to_s + "/" + $game_party.actors[@id].maxhp.to_s) @a.bitmap.draw_text(85,153,80,20,$game_party.actors[@id].sp.to_s + "/" + $game_party.actors[@id].maxsp.to_s) @a.bitmap.draw_text(85,178,45,20,"未开发") @a.bitmap.draw_text(85,201,45,20,"未开发") @a.bitmap.draw_text(85,225,45,20,"未开发") atk = $game_party.actors[@id].atk/2+7 @a.bitmap.draw_text(53,253,30,20,atk.to_s) @a.bitmap.draw_text(53,276,30,20,$game_party.actors[@id].atk.to_s) @a.bitmap.draw_text(53,299,30,20,$game_party.actors[@id].pdef.to_s) @a.bitmap.draw_text(53,323,30,20,$game_party.actors[@id].agi.to_s) @a.bitmap.draw_text(53,343,30,20,$game_party.actors[@id].eva.to_s + "%") @a.bitmap.draw_text(53,368,30,20,$game_party.actors[@id].mdef.to_s) 体质 = $game_party.actors[@id].ti 魔力 = $game_party.actors[@id].int 力量 = $game_party.actors[@id].str 耐力 = $game_party.actors[@id].dex 敏捷 = $game_party.actors[@id].min @a.bitmap.draw_text(150,253,30,20,体质.to_s) @a.bitmap.draw_text(150,276,30,20,魔力.to_s) @a.bitmap.draw_text(150,299,30,20,力量.to_s) @a.bitmap.draw_text(150,323,30,20,耐力.to_s) @a.bitmap.draw_text(150,343,30,20,敏捷.to_s) @a.bitmap.draw_text(140,368,30,20,$game_variables[@actor.id + LEVEL_UP_VARIABLE].to_s) @a.bitmap.draw_text(85,400,80,20,$game_party.actors[@id].next_exp_s) @a.bitmap.draw_text(85,423,80,20,$game_party.actors[@id].exp_s) end end
# 作者:风若·飘絮
# 二次更改:个快快
class Rw_Zt
def initialize(id)
@id = id
end
def main
@view = Viewport.new(383,0,257,451)
@back = Sprite.new(@view)
@back.x = 0
@back.y = 0
@back.bitmap = RPG::Cache.picture("状态栏1.png")
@art = Bitmap.new(257,451)
@a = Sprite.new(@view)
@a.bitmap = @art
@a.bitmap.font.size = 15
@a.bitmap.font.name = ["宋体","方正像素16"]
@a.bitmap.font.color = Color.new(0,0,0)
@jn = Window_Command2.new(42,["杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具","杯具",])
@jn.contents_opacity = 0
@jn.opacity = 0
@jn.back_opacity = 0
@jnblt = RPG::Cache.picture("技能1")
@actor = $game_party.actors[@id]
@加点 = []
#加点绘制
for i in 0..4
@加点[i] = Sprite.new(@view)
@加点[i].x = 200
@加点[i].y = 253+i*23
@加点[i].bitmap = Bitmap.new(19,19)
@bit0 = RPG::Cache.picture("加点.png")
@加点[i].bitmap.blt(0,0,@bit0,Rect.new(0,0,19,19))
end
@减点 = []
#减点绘制
for i in 0..4
@减点[i] = Sprite.new(@view)
@减点[i].x = 230
@减点[i].y = 253+i*23
@减点[i].bitmap = Bitmap.new(19,19)
@bit= RPG::Cache.picture("减点.png")
@减点[i].bitmap.blt(0,0,@bit,Rect.new(0,0,19,19))
end
refresh
Graphics.transition
loop do
Graphics.update
Graphics.update
Input.update
update
if Input.trigger?(Input::B)
# $scene0 = nil
break
end
end
@jn.dispose
@back.dispose
@a.bitmap.dispose
@art.dispose
@view.dispose
for i in 0..4
@加点[i].dispose
@减点[i].dispose
end
end
def update
@jn.update
@jnblt = RPG::Cache.picture("技能1")
@a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22))
for i in 0..4
@加点[i].bitmap.clear
@加点[i].bitmap.blt(0,0,@bit0,Rect.new(0,0,19,19))
@减点[i].bitmap.clear
@减点[i].bitmap.blt(0,0,@bit,Rect.new(0,0,19,19))
end
a = @jn.index
case @jn.index
when 0
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19))
@actor.ti += 1
@actor.hp = @actor.maxhp
$game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1
$game_system.se_play($data_system.decision_se)
refresh
end
end
when 1
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19))
@actor.int += 1
@actor.sp = @actor.maxsp
$game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1
$game_system.se_play($data_system.decision_se)
refresh
end
end
when 2
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19))
@actor.str += 1
$game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1
$game_system.se_play($data_system.decision_se)
refresh
end
end
when 3
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19))
@actor.dex += 1
$game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1
$game_system.se_play($data_system.decision_se)
refresh
end
end
when 4
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
if $game_variables[@actor.id + LEVEL_UP_VARIABLE] > 0
@加点[a].bitmap.blt(0,0,@bit0,Rect.new(38,0,19,19))
@actor.min += 1
$game_variables[@actor.id + LEVEL_UP_VARIABLE] -= 1
$game_system.se_play($data_system.decision_se)
refresh
end
end
when 5
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19))
if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5
$game_party.qld[$game_party.actors[@id].name] += 1
end
refresh
end
when 6
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19))
if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5
#$game_party.qld[$game_party.actors[@id].name] += 1
end
refresh
end
when 7
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19))
if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5
# $game_party.qld[$game_party.actors[@id].name] += 1
end
refresh
end
when 8
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19))
if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5
# $game_party.qld[$game_party.actors[@id].name] += 1
end
refresh
end
when 9
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(19,0,19,19))
if Input.trigger?(Input::C)
@减点[a-5].bitmap.blt(0,0,@bit,Rect.new(38,0,19,19))
if $game_party.qld[$game_party.actors[@id].name] < $game_party.actors[@id].level*5
# $game_party.qld[$game_party.actors[@id].name] += 1
end
refresh
end
when 10
@jnblt = RPG::Cache.picture("技能3")
@a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22))
if Input.trigger?(Input::C)
# 命令窗口的光标位置的分支
@jnblt = RPG::Cache.picture("技能2")
@a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22))
@jn.active = false
@jnn = Rw_Jn.new(@id)
end
end
end
def refresh
@a.bitmap.clear
@a.bitmap.blt(175,397,@jnblt,Rect.new(0,0,90,22))
# @潜力点 = $game_party.actors[@id].level*5 - $game_party.qld[$game_party.actors[@id].name]
@a.bitmap.draw_text(60,30,45,20,$game_party.actors[@id].level.to_s)
@a.bitmap.draw_text(170,32,45,20,$game_party.actors[@id].name.to_s)
@a.bitmap.draw_text(85,77,60,20,"无")
@a.bitmap.draw_text(216,77,60,20,"0")
@a.bitmap.draw_text(85,100,60,20,$game_party.actors[@id].class_name.to_s)
@a.bitmap.draw_text(216,100,45,20,"0")
@a.bitmap.draw_text(85,130,80,20,$game_party.actors[@id].hp.to_s + "/" + $game_party.actors[@id].maxhp.to_s)
@a.bitmap.draw_text(85,153,80,20,$game_party.actors[@id].sp.to_s + "/" + $game_party.actors[@id].maxsp.to_s)
@a.bitmap.draw_text(85,178,45,20,"未开发")
@a.bitmap.draw_text(85,201,45,20,"未开发")
@a.bitmap.draw_text(85,225,45,20,"未开发")
atk = $game_party.actors[@id].atk/2+7
@a.bitmap.draw_text(53,253,30,20,atk.to_s)
@a.bitmap.draw_text(53,276,30,20,$game_party.actors[@id].atk.to_s)
@a.bitmap.draw_text(53,299,30,20,$game_party.actors[@id].pdef.to_s)
@a.bitmap.draw_text(53,323,30,20,$game_party.actors[@id].agi.to_s)
@a.bitmap.draw_text(53,343,30,20,$game_party.actors[@id].eva.to_s + "%")
@a.bitmap.draw_text(53,368,30,20,$game_party.actors[@id].mdef.to_s)
体质 = $game_party.actors[@id].ti
魔力 = $game_party.actors[@id].int
力量 = $game_party.actors[@id].str
耐力 = $game_party.actors[@id].dex
敏捷 = $game_party.actors[@id].min
@a.bitmap.draw_text(150,253,30,20,体质.to_s)
@a.bitmap.draw_text(150,276,30,20,魔力.to_s)
@a.bitmap.draw_text(150,299,30,20,力量.to_s)
@a.bitmap.draw_text(150,323,30,20,耐力.to_s)
@a.bitmap.draw_text(150,343,30,20,敏捷.to_s)
@a.bitmap.draw_text(140,368,30,20,$game_variables[@actor.id + LEVEL_UP_VARIABLE].to_s)
@a.bitmap.draw_text(85,400,80,20,$game_party.actors[@id].next_exp_s)
@a.bitmap.draw_text(85,423,80,20,$game_party.actors[@id].exp_s)
end
end
|
|