Project1
标题:
求RMXP显示大图片的脚本,装备物品武器的都行
[打印本页]
作者:
wkhfh
时间:
2011-8-25 13:14
标题:
求RMXP显示大图片的脚本,装备物品武器的都行
求一个这样的脚本,简易的都行,不用太华丽,能显示武器装备物品的大图标就好,本人收集几百MB的图标都等着用呢。
求教
求教 dsu_plus_rewardpost_czw
作者:
liuziyuan201019
时间:
2011-8-25 13:24
本帖最后由 亿万星辰 于 2011-8-25 13:55 编辑
==============================================================================
# 本脚本来自[url]www.66rpg.com[/url],转载和使用请保留此信息 #==============================================================================
module RPG
class Weapon
def name
name = @name.split(/@/)[0]
return name != nil ? name : ''
end
def pic_name
pic_name = @name.split(/@/)[1]
return pic_name != nil ? pic_name : ""
end
end
class Armor
def name
name = @name.split(/@/)[0]
return name != nil ? name : ''
end
def pic_name
pic_name = @name.split(/@/)[1]
return pic_name != nil ? pic_name : ""
end
end
end
#==============================================================================
# ■ Window_Equip
#------------------------------------------------------------------------------
# 装备物品大图标显示。
#==============================================================================
class Window_Equip < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(495, 64, 640, 480) #具体位置自己调节
@item = nil
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if @item != nil
bitmap = RPG::Cache.icon(@item.pic_name)
pic_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, pic_rect)
end
end
def set_item(item)
@item = item
end
end
#==============================================================================
# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
#==============================================================================
复制代码
liuziyuan201019于2011-8-25 13:24补充以下内容:
#==============================================================================
# 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
#==============================================================================
SYSTEM_X偏移 = 0
SYSTEM_Y偏移 = 0
class Interpreter
#--------------------------------------------------------------------------
# ● 增减金钱
#--------------------------------------------------------------------------
def command_125
value = operate_value(@parameters[0], @parameters[1], @parameters[2])
$game_party.gain_gold(value)
kkme_66RPG_item = $data_items[@parameters[0]]
kkme_66RPG = Sprite.new
kkme_66RPG.bitmap = Bitmap.new(640,480)
kkme_66RPG.x = 0
kkme_66RPG.y = 0
kkme_66RPG.opacity = 0
pic = false
if value >= 0
begin
Audio.se_play("Audio/SE/"+"006-System06",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("GET_MONEY.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得金钱:")
kkme_66RPG_line1.opacity = 0
else
begin
Audio.se_play("Audio/SE/"+"005-System05",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("LOST_MONEY.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去金钱:")
kkme_66RPG_line1.opacity = 0
end
kkme_66RPG_line2 = Sprite.new
kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
kkme_66RPG_line2.opacity = 0
kkme_66RPG_bigicon = Sprite.new
begin
kkme_66RPG_bigicon.bitmap = RPG::Cache.icon("SYSTEM_MONEY_big.png")
kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
kkme_66RPG_bigicon.opacity = 0
kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
kkme_66RPG_line2.bitmap.draw_text(0,0,240,32,value.abs.to_s)
kkme_66RPG_line2.bitmap.draw_text(0,0,140,32, $data_system.words.gold,2)
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_bigicon.opacity += 30
Graphics.update
end
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 8
Graphics.update
end
rescue
kkme_66RPG_line2.bitmap.draw_text(0,0,240,32,value.abs.to_s)
kkme_66RPG_line2.bitmap.draw_text(0,0,140,32, $data_system.words.gold,2)
kkme_66RPG_line1.x = 176
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 176
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 16
Graphics.update
end
end
for i in 0..10
kkme_66RPG.opacity -= 30
kkme_66RPG_bigicon.opacity -= 30
kkme_66RPG_line1.opacity -= 30
kkme_66RPG_line2.opacity -= 30
Graphics.update
end
kkme_66RPG.dispose
kkme_66RPG_bigicon.dispose
kkme_66RPG_line1.dispose
kkme_66RPG_line2.dispose
return true
end
def command_126
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_item(@parameters[0], value)
kkme_66RPG_item = $data_items[@parameters[0]]
kkme_66RPG = Sprite.new
kkme_66RPG.bitmap = Bitmap.new(640,480)
kkme_66RPG.x = 0
kkme_66RPG.y = 0
kkme_66RPG.opacity = 0
pic = false
if value >= 0
begin
Audio.se_play("Audio/SE/"+"006-System06",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("GET_ITEM.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得物品:")
kkme_66RPG_line1.opacity = 0
else
begin
Audio.se_play("Audio/SE/"+"005-System05",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("LOST_ITEM.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去物品:")
kkme_66RPG_line1.opacity = 0
end
kkme_66RPG_line2 = Sprite.new
kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
kkme_66RPG_line2.opacity = 0
kkme_66RPG_bigicon = Sprite.new
begin
kkme_66RPG_bigicon.bitmap = RPG::Cache.icon(kkme_66RPG_item.name)
kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
kkme_66RPG_bigicon.opacity = 0
kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
kkme_66RPG_line2.bitmap.draw_text(0, 0, 212, 32, kkme_66RPG_item.name, 0)
kkme_66RPG_line2.bitmap.draw_text(0, 0, 200, 32, "×"+value.abs.to_s, 2)
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_bigicon.opacity += 30
Graphics.update
end
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 8
Graphics.update
end
rescue
kkme_66RPG_smallicon_bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name)
kkme_66RPG_line2.bitmap.blt(0, 0, kkme_66RPG_smallicon_bitmap, Rect.new(0, 0, 24, 24), 255)
kkme_66RPG_line2.bitmap.draw_text(0 + 28, 0, 212, 32, kkme_66RPG_item.name, 0)
kkme_66RPG_line2.bitmap.draw_text(0, 0, 200, 32, "×"+value.abs.to_s, 2)
kkme_66RPG_line1.x = 176
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 176
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 16
Graphics.update
end
kkme_66RPG_smallicon_bitmap.dispose
end
for i in 0..10
kkme_66RPG.opacity -= 30
kkme_66RPG_bigicon.opacity -= 30
kkme_66RPG_line1.opacity -= 30
kkme_66RPG_line2.opacity -= 30
Graphics.update
end
kkme_66RPG.dispose
kkme_66RPG_bigicon.dispose
kkme_66RPG_line1.dispose
kkme_66RPG_line2.dispose
return true
end
#--------------------------------------------------------------------------
# ● 增减武器
#--------------------------------------------------------------------------
def command_127
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_weapon(@parameters[0], value)
kkme_66RPG_item = $data_weapons[@parameters[0]]
kkme_66RPG = Sprite.new
kkme_66RPG.bitmap = Bitmap.new(640,480)
kkme_66RPG.x = 0
kkme_66RPG.y = 0
kkme_66RPG.opacity = 0
pic = false
if value >= 0
begin
Audio.se_play("Audio/SE/"+"006-System06",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("GET_ITEM.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得武器:")
kkme_66RPG_line1.opacity = 0
else
begin
Audio.se_play("Audio/SE/"+"005-System05",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("LOST_ITEM.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去武器:")
kkme_66RPG_line1.opacity = 0
end
kkme_66RPG_line2 = Sprite.new
kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
kkme_66RPG_line2.opacity = 0
kkme_66RPG_bigicon = Sprite.new
begin
kkme_66RPG_bigicon.bitmap = RPG::Cache.icon(kkme_66RPG_item.name)
kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
kkme_66RPG_bigicon.opacity = 0
kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line2.y = 245
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
kkme_66RPG_line2.bitmap.draw_text(0, 0, 212, 32, kkme_66RPG_item.name, 0)
kkme_66RPG_line2.bitmap.draw_text(0, 0, 200, 32, "×"+value.abs.to_s, 2)
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_bigicon.opacity += 30
Graphics.update
end
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 8
Graphics.update
end
rescue
kkme_66RPG_smallicon_bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name)
kkme_66RPG_line2.bitmap.blt(0, 0, kkme_66RPG_smallicon_bitmap, Rect.new(0, 0, 24, 24), 255)
kkme_66RPG_line2.bitmap.draw_text(0 + 28, 0, 212, 32, kkme_66RPG_item.name, 0)
kkme_66RPG_line2.bitmap.draw_text(0, 0, 200, 32, "×"+value.abs.to_s, 2)
kkme_66RPG_line1.x = 176
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 176
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 16
Graphics.update
end
kkme_66RPG_smallicon_bitmap.dispose
end
for i in 0..10
kkme_66RPG.opacity -= 30
kkme_66RPG_bigicon.opacity -= 30
kkme_66RPG_line1.opacity -= 30
kkme_66RPG_line2.opacity -= 30
Graphics.update
end
kkme_66RPG.dispose
kkme_66RPG_bigicon.dispose
kkme_66RPG_line1.dispose
kkme_66RPG_line2.dispose
return true
end
#--------------------------------------------------------------------------
# ● 增减防具
#--------------------------------------------------------------------------
def command_128
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_armor(@parameters[0], value)
kkme_66RPG_item = $data_armors[@parameters[0]]
kkme_66RPG = Sprite.new
kkme_66RPG.bitmap = Bitmap.new(640,480)
kkme_66RPG.x = 0
kkme_66RPG.y = 0
kkme_66RPG.opacity = 0
pic = false
if value >= 0
begin
Audio.se_play("Audio/SE/"+"006-System06",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("GET_ITEM.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"获得装备:")
kkme_66RPG_line1.opacity = 0
else
begin
Audio.se_play("Audio/SE/"+"005-System05",80,100)
kkme_66RPG.bitmap = RPG::Cache.title("LOST_ITEM.png")
pic = true
rescue
kkme_66RPG.bitmap.fill_rect(0, 180, 640, 120, Color.new(0,10,90,255))
end
kkme_66RPG_line1 = Sprite.new
kkme_66RPG_line1.bitmap = Bitmap.new(320,32)
kkme_66RPG_line1.bitmap.draw_text(0,0,320,32,"失去装备:")
kkme_66RPG_line1.opacity = 0
end
kkme_66RPG_line2 = Sprite.new
kkme_66RPG_line2.bitmap = Bitmap.new(320,32)
kkme_66RPG_line2.opacity = 0
kkme_66RPG_bigicon = Sprite.new
begin
kkme_66RPG_bigicon.bitmap = RPG::Cache.icon(kkme_66RPG_item.name)
kkme_66RPG_bigicon.x = 140 - kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_bigicon.y = 240 - kkme_66RPG_bigicon.bitmap.height/2
kkme_66RPG_bigicon.opacity = 0
kkme_66RPG_line1.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 156 + kkme_66RPG_bigicon.bitmap.width/2
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
kkme_66RPG_line2.bitmap.draw_text(0, 0, 212, 32, kkme_66RPG_item.name, 0)
kkme_66RPG_line2.bitmap.draw_text(0, 0, 200, 32, "×"+value.abs.to_s, 2)
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_bigicon.opacity += 30
Graphics.update
end
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 8
Graphics.update
end
rescue
kkme_66RPG_smallicon_bitmap = RPG::Cache.icon(kkme_66RPG_item.icon_name)
kkme_66RPG_line2.bitmap.blt(0, 0, kkme_66RPG_smallicon_bitmap, Rect.new(0, 0, 24, 24), 255)
kkme_66RPG_line2.bitmap.draw_text(0 + 28, 0, 212, 32, kkme_66RPG_item.name, 0)
kkme_66RPG_line2.bitmap.draw_text(0, 0, 268, 32, "×"+value.abs.to_s, 2)
kkme_66RPG_line1.x = 176
kkme_66RPG_line1.y = 200
kkme_66RPG_line2.x = 176
kkme_66RPG_line2.y = 240
kkme_66RPG_line1.x += SYSTEM_X偏移
kkme_66RPG_line2.x += SYSTEM_X偏移
kkme_66RPG_line1.y += SYSTEM_Y偏移
kkme_66RPG_line2.y += SYSTEM_Y偏移
for i in 0..5
kkme_66RPG.opacity += 36
Graphics.update
end
kkme_66RPG.opacity = 255 if pic
for i in 0..10
kkme_66RPG_line1.opacity += 30
Graphics.update
end
for i in 0..50
kkme_66RPG_line2.opacity += 16
Graphics.update
end
kkme_66RPG_smallicon_bitmap.dispose
end
for i in 0..10
kkme_66RPG.opacity -= 30
kkme_66RPG_bigicon.opacity -= 30
kkme_66RPG_line1.opacity -= 30
kkme_66RPG_line2.opacity -= 30
Graphics.update
end
kkme_66RPG.dispose
kkme_66RPG_bigicon.dispose
kkme_66RPG_line1.dispose
kkme_66RPG_line2.dispose
return true
end
end
复制代码
作者:
wkhfh
时间:
2011-8-25 18:34
liuziyuan201019 发表于 2011-8-25 13:24
liuziyuan201019于2011-8-25 13:24补充以下内容:
貌似不管用,我全部复制到脚本编辑器上,可还是原样没变,怎么用?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1