hey
i dont know whats wrong with it..
it dont work.. no errors but no regenration when the state is applied.
anyone can tell me why?
its my first script...
i dont know whats wrong with it..
Code:
class Game_Battler
HP_STATE = 18 # state id
MP_STATE = 19 # state id
HP_RATE = 50 # in percent
MP_RATE = 40 # in percent
def hp_mp_recovery
for state_id in HP_STATE
if state?(state_id) and @hp > 0
@hp_regen = (self.maxhp / 100) * HP_RATE
self.hp += @hp_regen
end
for state_id in MP_STATE
if state?(state_id) and @sp > 0
@mp_regen = (self.maxsp / 100) * MP_RATE
self.sp += @mp_regen
end
end
end
end
end
it dont work.. no errors but no regenration when the state is applied.
anyone can tell me why?
its my first script...