赞 | 0 |
VIP | 4 |
好人卡 | 1 |
积分 | 1 |
经验 | 3388 |
最后登录 | 2020-5-20 |
在线时间 | 153 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 110
- 在线时间
- 153 小时
- 注册时间
- 2008-5-25
- 帖子
- 585
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
小Z:这是我改的黑剑的脚本,把它用到自己游戏里了,请问有什么“把个”(BUG)?
- class Scene_EquipRight < Window_Selectable
- # ----------------------------
- attr_accessor :translucent_text
- # ----------------------------
- def initialize(actor)
- super(272, 0, 368, 208)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.contents.font.name = "楷体"
- self.contents.font.size = 20
- @actor = actor
- @translucent_text = [false, false]
- @y_point = 0
- refresh
- self.index = 0
- end
- # ----------------------------
- def item
- return @data[self.index]
- end
- # ----------------------------
- def refresh
- self.contents.clear
- @data = []
- @data.push($data_weapons[@actor.weapon_id])
- @data.push($data_armors[@actor.armor1_id])
- @data.push($data_armors[@actor.armor2_id])
- @data.push($data_armors[@actor.armor3_id])
- @item_max = @data.size
-
- case @actor.name
- when "小勇"
-
- self.contents.font.color = system_color
- self.contents.draw_text(4, 4+0, 92, 32, "剑")
- self.contents.draw_text(4, 4+44, 92, 32, "身体护甲")
- self.contents.draw_text(4, 4+88, 92, 32, "魔石一")
- self.contents.draw_text(4, 4+132, 92, 32,"魔石二")
-
- self.contents.font.color = normal_color
- draw_item_name(@data[0], 92, 4+0)
- draw_item_name(@data[1], 92, 4+44)
- draw_item_name(@data[2], 92, 4+88)
- draw_item_name(@data[3], 92, 4+132)
-
- $equip_amount = 4 #、可装备物品数量
- $actor_equip_type[2]=0 #、第二个装备的回避修正值
- $actor_equip_type[3]=0 #、第三个装备的回避修正值
- $actor_equip_type[4]=0
-
- when "小强"
- self.contents.font.color = system_color
- self.contents.draw_text(4, 4+0, 92, 32, "刀")
- self.contents.draw_text(4, 4+33, 92, 32, "铠甲")
- self.contents.draw_text(4, 4+66, 92, 32, "魔石一")
- self.contents.draw_text(4, 4+99, 92, 32, "魔石二")
-
- self.contents.font.color = normal_color
- draw_item_name(@data[0], 92, 4+0)
- draw_item_name(@data[1], 92, 4+33)
- draw_item_name(@data[2], 92, 4+66)
- draw_item_name(@data[3], 92, 4+99)
- draw_item_name(@data[4], 92, 4+132)
-
- $equip_amount = 4
- $actor_equip_type[2]=0
- $actor_equip_type[3]=0
- $actor_equip_type[4]=0
-
- when "灵儿"
- self.contents.font.color = system_color
- self.contents.draw_text(4, 4+0, 92, 32, "仙杖")
- self.contents.draw_text(4, 4+33, 92, 32, "仙袍")
- self.contents.draw_text(4, 4+66, 92, 32, "天人之石")
- self.contents.draw_text(4, 4+99, 92, 32, "戒指")
- self.contents.draw_text(4, 4+132, 92, 32,"守护符")
-
- self.contents.font.color = normal_color
- draw_item_name(@data[0], 92, 4+0)
- draw_item_name(@data[1], 92, 4+33)
- draw_item_name(@data[2], 92, 4+66)
- draw_item_name(@data[3], 92, 4+99)
- draw_item_name(@data[4], 92, 4+132)
-
- $equip_amount = 5
- $actor_equip_type[2]=0
- $actor_equip_type[3]=0
- $actor_equip_type[4]=0
- $actor_equip_type[5]=0
-
- when "山丘之王·锤圣"
- self.contents.font.color = system_color
- self.contents.draw_text(4, 4+0, 92, 32, "雷霆之锤")
- self.contents.draw_text(4, 4+44, 92, 32,"风暴之衣")
- self.contents.draw_text(4, 4+88, 92, 32, "山丘之石")
- self.contents.font.color = normal_color
- draw_item_name(@data[0], 92, 4+0)
- draw_item_name(@data[1], 92, 4+44)
- draw_item_name(@data[2], 92, 4+88)
- draw_item_name(@data[3], 92, 4+132)
-
- $equip_amount = 3
- $actor_equip_type[2]=0
- $actor_equip_type[3]=0
- $actor_equip_type[4]=0
-
- #self.contents.font.color = system_color
- #self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
- #self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
- #self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
- #self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor3)
- #self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
- #draw_item_name(@data[0], 92, 32 * 0, @translucent_text[0])
- #draw_item_name(@data[1], 92, 32 * 1, @translucent_text[1])
- #draw_item_name(@data[2], 92, 32 * 2, false)
- #draw_item_name(@data[3], 92, 32 * 2, false)
- #draw_item_name(@data[4], 92, 32 * 4, false)
- end
- # ----------------------------
- def update_help
- @help_window.set_text(self.item == nil ? "" : self.item.description)
- end
- # ----------------------------
-
- def update_cursor_rect
-
- case $equip_amount
-
- when 2
- case @index
- when 0
- @y_point = 33
- when 1
- @y_point = 99
- else
- if @index != -1
- @index = 1
- @y_point = 99
- end
- end
-
- when 3
- case @index
- when 0
- @y_point = 0
- when 1
- @y_point = 66
- when 2
- @y_point = 132
- else
- if @index != -1
- @index = 2
- @y_point = 132
- end
- end
-
- when 4
- case @index
- when 0
- @y_point = 0
- when 1
- @y_point = 44
- when 2
- @y_point = 88
- when 3
- @y_point = 132
- else
- if @index != -1
- @index = 3
- @y_point = 132
- end
- end
- else
- if @index != -1
- @index = 4
- @y_point = 132
- end
- end
-
- else
- @y_point = 33
-
- end
-
- if @index<0
- self.cursor_rect.empty
- else
- self.cursor_rect.set(0, @y_point+5 , 280, 28)
- end
- end
-
-
-
-
- end
复制代码
哦!对了,还有Scene_menu
|
|