| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 17573 | 
 
| 最后登录 | 2020-3-13 | 
 
| 在线时间 | 304 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 138 
 
        - 在线时间
 - 304 小时
 
        - 注册时间
 - 2014-4-11
 
        - 帖子
 - 419
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
- $imported = {} if $imported.nil?
 
 - if $imported["RuntimeDB"].nil?
 
 -   $imported["RuntimeDB"] = true
 
 -   module DataManager
 
 -     class <<self
 
 -       alias make_save_contents_runtimedb_zabing make_save_contents
 
 -       alias extract_save_contents_runtimedb_zabing extract_save_contents
 
 -     end
 
 -     def self.make_save_contents
 
 -       contents = make_save_contents_runtimedb_zabing
 
 -       contents[:dataactorszabing] = $data_actors
 
 -       contents[:dataclasseszabing] = $data_classes
 
 -       contents[:dataskillszabing] = $data_skills
 
 -       contents[:dataitemszabing] = $data_items
 
 -       contents[:dataweaponszabing] = $data_weapons
 
 -       contents[:dataarmorszabing] = $data_armors
 
 -       contents[:dataenemieszabing] = $data_enemies
 
 -       contents[:datatroopszabing] = $data_troops
 
 -       contents[:datastateszabing] = $data_states
 
 -       contents[:dataanimationszabing] = $data_animations
 
 -       contents[:datatilesetszabing] = $data_tilesets
 
 -       contents[:datacommoneventszabing] = $data_common_events
 
 -       contents[:datasystemzabing] = $data_system
 
 -       contents[:datamapinfoszabing] = $data_mapinfos
 
 -       contents
 
 -     end
 
 -     def self.extract_save_contents(contents)
 
 -       extract_save_contents_runtimedb_zabing(contents)
 
 -       $data_actors = contents[:dataactorszabing]
 
 -       $data_classes = contents[:dataclasseszabing]
 
 -       $data_skills = contents[:dataskillszabing]
 
 -       $data_items = contents[:dataitemszabing]
 
 -       $data_weapons = contents[:dataweaponszabing]
 
 -       $data_armors = contents[:dataarmorszabing]
 
 -       $data_enemies = contents[:dataenemieszabing]
 
 -       $data_troops = contents[:datatroopszabing]
 
 -       $data_states = contents[:datastateszabing]
 
 -       $data_animations = contents[:dataanimationszabing]
 
 -       $data_tilesets = contents[:datatilesetszabing]
 
 -       $data_common_events = contents[:datacommoneventszabing]
 
 -       $data_system = contents[:datasystemzabing]
 
 -       $data_mapinfos = contents[:datamapinfoszabing]
 
 -     end
 
 -   end
 
 - else
 
 -   msgbox "请不要重复加载脚本。"
 
 - end
 
 - $imported = {} if $imported.nil?
 
 - if $imported["RatiosClov"].nil?
 
 - #--------------------------------------------------------------------------
 
 - # 多项比率选一(Ratios) By.Clov
 
 - # 使用 Ratios.Co({对象=>比率},分比数)
 
 - #--------------------------------------------------------------------------
 
 -   $imported["RatiosClov"] = true  
 
 -   module Ratios
 
 -     def self.Co(data = {}, b = 100)
 
 -       r = rand b;n = data.keys;f = data.values;arr = [];mii = []
 
 -       f.each {|v| if v >= r;arr.push v;else;arr.push nil;end}
 
 -       unless arr.compact.empty?
 
 -         arr.each {|a|
 
 -         if a;mii.push a - rand(a) - r
 
 -         else;mii.push b;end}
 
 -         x = mii.index mii.min
 
 -       else
 
 -         x = f.index f.max
 
 -       end
 
 -       return [n[x],f[x]]
 
 -     end
 
 -   end
 
 - else
 
 -   msgbox "请不要重复加载脚本。"
 
 - end
 
 - class Game_Interpreter
 
 -   def createweapon
 
 -     thishash = {
 
 -     ["龙神","晋库走龙剑,吴室荡燕雏。"]=>100,
 
 -     ["照胆","武丁在位五十九年,以元年岁次午铸一剑,长三尺,铭曰‘照胆’,古文篆书。"]=>500,
 
 -     ["青霜","紫电青霜,王将军之武库。"]=>800,
 
 -     ["龙泉","章帝赐尚书剑,韩棱渊深有谋,故得龙泉剑。"]=>1000,
 
 -     ["磐郢","吴王得越所献宝剑三枚。一曰鱼肠,二曰磐郢,三曰湛泸。"]=>50,
 
 -     ["淳钧","山崩而落洛之水涸,欧治子而淳钧之剑成。"]=>10,
 
 -     ["卧槽","卧槽泥马勒戈壁,兰州芝麻大烧饼。"]=>1000,
 
 - }
 
 -  
 
 -     thathash = {}
 
 -     temp = RPG::BaseItem::Feature.new
 
 -     temp.code = 31
 
 -     temp.data_id = 1
 
 -     temp.value = 0
 
 -     thathash[temp]=100#100几率物理武器专精
 
 -     temp = RPG::BaseItem::Feature.new
 
 -     temp.code = 22
 
 -     temp.data_id = 0
 
 -     temp.value = 0.5
 
 -     thathash[temp]=50#50几率精准专精
 
 -     temp = RPG::BaseItem::Feature.new
 
 -     temp.code = 33
 
 -     temp.data_id = 0
 
 -     temp.value = 500
 
 -     thathash[temp]=25#25几率超速专精
 
 -     c = Ratios.Co(thathash)
 
 -     a = RPG::Weapon.new
 
 -     a.icon_index = 147
 
 -     a.animation_id = 7
 
 -     a.features = [c[0]]
 
 -     a.params = [0,0,0,0,0,0,0,0]
 
 -     a.etype_id = 0
 
 -     a.wtype_id = 1
 
 -     a.params[0] = rand(1000)
 
 -     a.params[1] = rand(50)
 
 -     a.params[2] = rand(150)
 
 -     a.params[3] = rand(100)
 
 -     a.params[4] = rand(100)
 
 -     a.params[5] = rand(100)
 
 -     a.params[6] = rand(100)
 
 -     a.params[7] = rand(100)
 
 -     a.price = 0
 
 -     for i in 0..7
 
 -       case i
 
 -       when 0
 
 -         a.price += a.params[i] * 100
 
 -       when 1
 
 -         a.price += a.params[i] * 2000
 
 -       when 2
 
 -         a.price += a.params[i] * 2000
 
 -       else
 
 -         a.price += a.params[i] * 1000
 
 -       end
 
 -     end
 
 -     a.price = a.price.to_i
 
 -     c = Ratios.Co(thishash)
 
 - #~     a.name = "价值"+a.price.to_s+"的"+c[0][0]+"剑"
 
 -     a.name = c[0][0]+"剑"
 
 -     if c[0][0]=="卧槽"
 
 -       temp = RPG::BaseItem::Feature.new
 
 -       temp.code = 43
 
 -       temp.data_id = 24
 
 -       temp.value = 0.0
 
 -       a.features.push(temp)
 
 -     end
 
 -     a.description = c[0][1]
 
 -     a.id = $data_weapons.size
 
 -     $data_weapons[$data_weapons.size] = a.clone
 
 -     a=nil
 
 -     $game_party.gain_item($data_weapons[$data_weapons.size-1], 1, false)
 
 -   end
 
 - end
 
 
  复制代码 如何给生成的武器添加图标&绘制字体颜色 |   
 
 
 
 |