赞 | 0 |
VIP | 44 |
好人卡 | 0 |
积分 | 1 |
经验 | 6016 |
最后登录 | 2015-11-12 |
在线时间 | 1 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1 小时
- 注册时间
- 2008-8-27
- 帖子
- 1581
|
好吧,正好把最近写的脚本给你(双倍经验)- class Game_Actor < Game_Battler
- attr_accessor :add_exp #############
- def initialize(actor_id)
- super()
- setup(actor_id)
- @add_exp = false #############
- end
- end
- class Scene_Battle
- def start_phase5
- @phase = 5
- $game_system.me_play($game_system.battle_end_me)
- $game_system.bgm_play($game_temp.map_bgm)
- exp = 0
- gold = 0
- treasures = []
- for enemy in $game_troop.enemies
- unless enemy.hidden
- exp += enemy.exp
- gold += enemy.gold
- if rand(100) < enemy.treasure_prob
- if enemy.item_id > 0
- treasures.push($data_items[enemy.item_id])
- end
- if enemy.weapon_id > 0
- treasures.push($data_weapons[enemy.weapon_id])
- end
- if enemy.armor_id > 0
- treasures.push($data_armors[enemy.armor_id])
- end
- end
- end
- end
- treasures = treasures[0..5]
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- if actor.cant_get_exp? == false
- last_level = actor.level
- if actor.add_exp == true
- exp = exp*2
- actor.exp += exp
- else
- actor.exp += exp
- end
- if actor.level > last_level
- @status_window.level_up(i)
- end
- end
- end
- $game_party.gain_gold(gold)
- for item in treasures
- case item
- when RPG::Item
- $game_party.gain_item(item.id, 1)
- when RPG::Weapon
- $game_party.gain_weapon(item.id, 1)
- when RPG::Armor
- $game_party.gain_armor(item.id, 1)
- end
- end
- @result_window = Window_BattleResult.new(exp, gold, treasures)
- @phase5_wait_count = 100
- end
- end
复制代码
开启双倍经验的方法是:$game_actors[x].add_exp = true/false,x是角色的编号
----------------------------------------
装备的等级限制是:http://rpg.blue/web/htm/news429.htm 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|