This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
This script is for recover the SP (MP) outside the battle. Is easy acitvate or deactivate with events use the Call Script and write something like it:
Code:
case $slipsprec.recover_sp
when false
$slipsprec.sp=(true)
when true
$slipsprec.sp=(false)
end
or change the recover speed:
Code:
$slipsprec.sp_time=(20) # too fast
To use the script only paste the Code below Scene_Map and above Main.
Code
Code:
#-----------------------------------------------------------------
# Slipknot SP Recover
#-----------------------------------------------------------------
# To deactivate it use Call Script in an event and write $slipsprec.sp=(false) or true to activate it.
# To change the recover speed use $slipsprec.sp_time=(new speed).
#-----------------------------------------------------------------
class SPrecover
#-----------------------------------------------------------------
attr_accessor :recover_sp
attr_accessor :recover_sp_time
#-----------------------------------------------------------------
def initialize
@recover_sp = true # true to use it, false to don't use it
@recover_sp_time = 50 # default = 50
end
#-----------------------------------------------------------------
def sp=(new)
@recover_sp = new
end
#-----------------------------------------------------------------
def sp_time=(new)
@recover_sp_time = new
end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Scene_Map
#-----------------------------------------------------------------
alias recover_initialize initialize
def initialize
@time = $slipsprec.recover_sp_time
recover_initialize
end
#-----------------------------------------------------------------
alias recover_update update
def update
if $slipsprec.recover_sp
if @time > 0;@time -= 1
elsif @time == 0
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.sp < actor.maxsp; actor.sp+=(1)
end
end; @time = $slipsprec.recover_sp_time
end
end; recover_update
end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Scene_Title
#-----------------------------------------------------------------
$slipsprec = SPrecover.new
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Scene_Save < Scene_File
#-----------------------------------------------------------------
alias sprec_save_data write_save_data
def write_save_data(file)
sprec_save_data(file)
Marshal.dump($slipsprec,file)
end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Scene_Load < Scene_File
#-----------------------------------------------------------------
alias sprec_load_data read_save_data
def read_save_data(file)
sprec_load_data(file)
$slipsprec = Marshal.load(file)
end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------