赞 | 0 |
VIP | 0 |
好人卡 | 1 |
积分 | 4 |
经验 | 868 |
最后登录 | 2014-6-14 |
在线时间 | 628 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 448
- 在线时间
- 628 小时
- 注册时间
- 2011-9-27
- 帖子
- 3996
|
这个脚本找过吗,用法很简单,武器防具名字后@技能ID,如长剑@4 装备长剑就获得4号技能
原地址
http://rpg.blue/forum.php?mod=vi ... B%E6%8A%80%E8%83%BD- #------------------------------------------------------------------------------
-
- # ■ 装备附加技能(VX)
-
- # by:Ultra
-
- # /2010.10.6
-
- # 使用方法:装备名字+@+技能ID
-
- # 例如:巨剑@10
-
- # 说明尾部显示附加技能信息开关
-
- $sk_name = true
-
- # 武器附加信息标识
-
- $w_txt = "附技能:"
-
- # 防具附加信息标识
-
- $a_txt = "附技能:"
-
- #------------------------------------------------------------------------------
-
- class Game_Actor
-
- alias :orig_initialize :initialize
-
- def initialize(actor_id)
-
- orig_initialize(actor_id)
-
- inisk
-
- end
-
- #*# t:类型u:旧d:新
-
- def udsk(t,u,d)
-
- case t
- when 0
-
- data = $data_weapons
-
- when 1..4
-
- data = $data_armors
-
- end
-
- if u == 0 and d > 0
-
- learn_skill(data[d].sk) if data[d].sk != nil
-
- elsif u > 0 and d == 0
-
- forget_skill(data[u].sk) if data[u].sk != nil
-
- elsif u > 0 and d > 0
-
- if data[u].sk != nil and data[d].sk != nil
-
- learn_skill(data[d].sk)
-
- forget_skill(data[u].sk)
-
- elsif data[d].sk != nil
-
- learn_skill(data[d].sk)
-
- elsif data[u].sk != nil
-
- forget_skill(data[u].sk)
-
- elsif data[d].sk == data[u].sk
-
- end
-
- end
-
- end
-
- #*# 初始检测
-
- def inisk
-
- data = equips
-
- data.compact!
-
- for i in 0...data.size
-
- if data[i].sk != nil
-
- learn_skill(data[i].sk)
-
- end
-
- end
-
- end
-
- #*# 更改装备
-
- def change_equip(equip_type, item, test = false)
-
- last_item = equips[equip_type]
-
- unless test
-
- return if $game_party.item_number(item) == 0 if item != nil
-
- $game_party.gain_item(last_item, 1)
-
- $game_party.lose_item(item, 1)
-
- end
-
- item_id = item == nil ? 0 : item.id
-
- case equip_type
-
- when 0 # 武器
-
- udsk(equip_type,@weapon_id,item_id)#★
-
- @weapon_id = item_id
-
- unless two_hands_legal? # 非双手装备的场合,自动卸下装备
-
- sk = equips[1].sk #★
-
- forget_skill(sk) if sk != nil #★
-
- change_equip(1, nil, test)
-
- end
-
- when 1 # 盾
-
- udsk(equip_type,@armor1_id,item_id)#★
-
- @armor1_id = item_id
-
- unless two_hands_legal? # 非双手装备的场合,自动卸下装备
-
- sk = equips[0].sk #★
-
- forget_skill(sk) if sk != nil #★
-
- change_equip(0, nil, test)
-
- end
-
- when 2 # 头部防具
-
- udsk(equip_type,@armor2_id,item_id)#★
-
- @armor2_id = item_id
-
- when 3 # 身体防具
-
- udsk(equip_type,@armor3_id,item_id)#★
-
- @armor3_id = item_id
-
- when 4 # 装饰品
-
- udsk(equip_type,@armor4_id,item_id)#★
-
- @armor4_id = item_id
-
- end
-
- end
-
- end
-
- class Scene_Equip
-
- def update_status_window
-
- if @equip_window.active
-
- @status_window.set_new_parameters(nil, nil, nil, nil)
-
- elsif @item_window.active
-
- temp_actor = Marshal.load(Marshal.dump(@actor))
-
- temp_actor.change_equip(@equip_window.index, @item_window.item, true)
-
- new_atk = temp_actor.atk
-
- new_def = temp_actor.def
-
- new_spi = temp_actor.spi
-
- new_agi = temp_actor.agi
-
- @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
-
- end
-
- @status_window.update
-
- end
-
- end
-
- module RPG
-
- class Armor
-
- def description
-
- if sk != nil and $sk_name
-
- name = $a_txt + $data_skills[sk].name
-
- else
-
- name = ""
-
- end
-
- return @description + name
-
- end
-
- end
-
- class Weapon
-
- def description
-
- if sk != nil and $sk_name
-
- name = $w_txt + $data_skills[sk].name
-
- else
-
- name = ""
-
- end
-
- return @description + name
-
- end
-
- end
-
- class Armor
-
- def name
-
- name = @name.split(/@/)[0]
-
- return name != nil ? name : ""
-
- end
-
- def sk
-
- sk = @name.split(/@/)[1]
-
- return sk != nil ? sk.to_i : nil
-
- end
-
- end
-
- class Weapon
-
- def name
-
- name = @name.split(/@/)[0]
-
- return name != nil ? name : ""
-
- end
-
- def sk
-
- sk = @name.split(/@/)[1]
-
- return sk != nil ? sk.to_i : nil
-
- end
-
- end
-
- end
复制代码 |
评分
-
查看全部评分
|