), a hunter rank script where you gain ranks of hunter when you kill a certain number of mobs. At the moment is working fine but I noticed that mobs don´t respawn anymore. If I remove my script, the mobs respawn again, so I´m doing something wrong that affect the blizz-abs respawn feature. I hope that a scripter could take a look at the script code because I can´t find the error.
#- Mob count by G_G
#- Modificado por Dwellercoc para añadir rangos de cazador segun mobs matados
#- Sonido cuando se sube de Rango de cazador
#- 17-09-2010
if BlizzABS::VERSION < 2.51
raise "Blizz ABS Version isnt high enough. Now Closing."
end
#- Play a sound when you reach a new Hunter Rank
module Sound_Change
Sound = "022-Dive02"
end
class BlizzABS::Processor
KillCountVariable = 1
alias exp_result_kill_count_later exp_result
def exp_result(enemy)
$game_variables[KillCountVariable] += 1
case $game_variables[KillCountVariable]
when 1
$HunterRank = "n00b"
Audio.se_play("Audio/SE/" + Sound_Change::Sound)
$scene = Scene_ShowWindow.new
when 2
$HunterRank = "Hunter"
Audio.se_play("Audio/SE/" + Sound_Change::Sound)
$scene = Scene_ShowWindow.new
when 3
$HunterRank = "Assasin"
Audio.se_play("Audio/SE/" + Sound_Change::Sound)
$scene = Scene_ShowWindow.new
when 4
$HunterRank = "Triturador"
Audio.se_play("Audio/SE/" + Sound_Change::Sound)
$scene = Scene_ShowWindow.new
when 5
$HunterRank = "Master"
Audio.se_play("Audio/SE/" + Sound_Change::Sound)
$scene = Scene_ShowWindow.new
end
return exp_result_kill_count_later(enemy)
end
end
$BlizzABS = BlizzABS::Processor.new
#==============================================================================
# ***Hunter Rank Window***
# Hunter Rank level up window
# by dwellercoc - 17/09/2010
#
#==============================================================================
class MyCustomWindow < Window_Selectable
#----------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------
def initialize
super(242, 90, 195, 275)
@column_max = 3
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 26
cx = contents.text_size("123123123123123123123").width
self.contents.font.color = Color.new(225, 215, 255)
self.contents.font.bold = true
self.contents.draw_text(11, 0, cx, 32, " Hunter Rank")
self.contents.draw_text(11, 20, cx, 32, "Now you are a:")
self.contents.font.color = normal_color
self.contents.font.bold = false
case $game_variables[1]
when 1
@bitmap = RPG::Cache.battler("n00B.png", 0)
when 10
@bitmap = RPG::Cache.battler("Hunter.png", 0)
when 20
@bitmap = RPG::Cache.battler("Assasin.png", 0)
when 30
@bitmap = RPG::Cache.battler("Triturador.png", 0)
when 40
@bitmap = RPG::Cache.battler("Master.png", 0)
end
self.contents.blt(11, 47, @bitmap, Rect.new(0, 0, @bitmap.width, @bitmap.height), 160)
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(@index * 64, 0, 64, 64)
end
end
end
$BlizzABS = BlizzABS::Processor.new
#==============================================================================
# * Scene_ShowWindow
#==============================================================================
class Scene_ShowWindow
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#call the window
@window = MyCustomWindow.new
@window.opacity = 0
# Execute transition
@spriteset = Spriteset_Map.new
@sprite = Sprite.new
# @sprite.bitmap = RPG::Cache.picture("Hunter")
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@window.dispose
@spriteset.dispose
@sprite.dispose
#@sprite.bitmap.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to Menu screen
$scene = Scene_Map.new
return
end
end
end