Ability Meter v0.1Ini hanya prototype yang mau kusempurnain dirumah
Emang belum selesai sih, dan gak ada flash disk
numpang
Nih script ngekloning Skill Treenya Monster Hunter series, dan karena namanya jelek, Skill Tree, nama script ini jadi Ability Meter. Scriptnya ngeberi skill kalo meterannya cukup dengan yang di syaratkan.
- Code:
-
module WLTR
module ABILITY_METER
GROUPS = {}
GROUPS[0] = ["Fire",
"Increases ability to control fire.",
[[-10, 33], [10, 34]]
]
end
end
class Game_Actor < Game_Battler
include WLTR::ABILITY_METER
attr_accessor :ability_meter
alias meter_setup setup
def setup(actor_id)
@ability_meter = []
for i in GROUPS.keys
@ability_meter[i] = 0
end
meter_setup(actor_id)
end
def ability_meters
@ability_meter[0] = 10
return @ability_meter
end
alias skill_metered skills
def skills
result = skill_metered
ability_m = ability_meters
plus = []
for i in GROUPS.keys
list = GROUPS[i][2]
meter = ability_m[i]
add = 0
for j in list
n = j[0]
if n > 0
if meter >= n
add = j[1]
end
elsif n < 0
if meter <= n
add = j[1]
end
end
end
plus.push($data_skills[add])
end
return result + plus
end
end
Silahkan tes, tapi belum sempurna