那你這樣好了: def make_exp_list
actor = $data_actors[@actor_id]
case actor.id
when 1
@exp_list = [
0, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ,15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 0
]
when 2
# ............
when 3
# ............
end
end [ ] 里面的第一個數不用管,第二個 0 表示等級 1 的時候的初始經驗,后面的就是每升一級需要的經驗, when 1 是數據庫中第一個角色,when 2 是第二個,復制粘貼后慢慢改吧……如果每個角色的升級 exp 都是一樣的話,就把 case...when 去掉即可 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |