Sei sulla pagina 1di 38

creation asylum -> atb - simple edit

www.dubealex.comhelp upload rules custom bb code searchmembers calendar member


map chat arcade stats
welcome guest ( log in | register )
creation asylum > game making > rpg maker xp > scripts & tutorials submission
and request
3 pages 1 2 3 >

outline · [ standard ] · linear+ atb - simple edit


track this topic | email this topic | print this topic
dark akiko nov 26 2004, 09:34 pm post #1

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

i thought people might want this as this is a simple edit of the atb
battle system by makiorau (something like that) this shows new skills
learned at level up

code
#===========================================================================
===
# new_battle
#---------------------------------------------------------------------------
---
# compiled by : makirouaru
#===========================================================================
===
# ?????? xrxs_bp 3. ??????hp? ver.1.01 ??????
# by fukuyama, ???‫ݓ‬y

# battle_end_recovery
#
# ?퓬?れ? ??????w???[??
#
# request: stay
# script: fukuyama
# test: ?m?r?m?q
#
# url: http://www4.big.or.jp/~fukuyama/rgss/battle_end_recovery.txt
#

#===========================================================================
===
# new_battle
#---------------------------------------------------------------------------
---
# compiled by : makirouaru
#===========================================================================
===
# ?????? xrxs_bp 3. ??????hp? ver.1.01 ??????
# by fukuyama, ???‫ݓ‬y

# battle_end_recovery
#
# ?퓬?れ? ??????w???[??
#
# request: stay
# script: fukuyama
# test: ?m?r?m?q
#
# url: http://www4.big.or.jp/~fukuyama/rgss/battle_end_recovery.txt
#

module battle_end_recovery

module scene_battle_module

# ? ??ϐ??̉d
@@recovery_rate_variable_id = nil

# ? ??̎擾
def battle_end_recovery_rate
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id =
$data_system.variables.index '?퓬?れ? ?'
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id = false
end
end
return 0 unless @@recovery_rate_variable_id
return $game_variables[@@recovery_rate_variable_id]
end

# ?퓬?れ? ???
def battle_end_recovery

# ? ?
recovery_rate = battle_end_recovery_rate

# ? ??ϐ????o?Ȋo???ƒa?n?^?[?????????Ă??鏪???a?퓬?れ? ??????
if recovery_rate != 0 and not actor.dead?

# ?p?[?e?b?a?n?^?[???
̃ Ƀ??[?v
$game_party.actors.each do |actor|

# ? ʌv?z
recovery_hp = (actor.maxhp / 20.0 * recovery_rate).truncate
recovery_sp = (actor.maxsp / 20.0 * recovery_rate).truncate
# ??‫ۂ‬ɉ br /> actor.hp += recovery_hp
actor.sp += recovery_sp

# ?a?j???[?v?????‫ݒ‬輢 r /> actor.damage = - recovery_hp


actor.damage_pop = true

end

# ?x?e?[?^?x?e?b???h?e??v
@status_window.refresh

end
end

end # module scene_battle_module


end # module battle_end_recovery

#------------------------------
# ?퓬?v?[???̍Ē 苠
#------------------------------
class scene_battle

# scene_battle?p???w???[??????n???[?h
include battle_end_recovery::scene_battle_module

# ???t?f?[?y?t?j?n?
̃ ɕʖ?????鼢 r /> alias
battle_end_recovery_original_start_phase5 start_phase5

# ?t?f?[?y?t?j?n??苠
def start_phase5

# ?퓬?れ? ?????яo??
battle_end_recovery

# ???t?f?[?y?t?j?n??
̃ яo??
battle_end_recovery_original_start_phase5

end
end

# battle_end_recovery

# ?????? xrxs_bp10. level up!?e?b???h?e ??????


# by ???‫ݓ‬y

#===========================================================================
===
# ? ?j?x?^?}?c?y?|?c???g
#===========================================================================
===
class scene_battle
level_up_se = "" # ???x???a?b?vse?b""?Ŗ????b
level_up_me = "audio/me/007-fanfare01" # ???x???a?b?vme
end
class window_skilllearning < window_base
skilllearn_se = "audio/se/106-heal02" # ?x?l???k??se?b
end
#===========================================================================
===
# ?? window_levelupwindow
#---------------------------------------------------------------------------
---
# ?@?o?g???i?????a???x???a?b?v????? ?Ƀx?e?[?^?x? 092;?????郅?b???h?e?ł??b
#===========================================================================
===
class window_levelupwindow < window_base

#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(x, y, actor, last_lv, up_hp, up_sp, up_str, up_dex,
up_agi, up_int)
# super(x, y, 160, 192)
super(x, y-32, 160, 192+32)

self.contents = bitmap.new(width - 32, height - 32)


self.visible = false
self.back_opacity = 160
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end

#--------------------------------------------------------------------------
# ?? ???t???b?v??

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.name = "arial"
self.contents.font.size = 14
self.contents.draw_text( 0, 0, 160, 24, "level up!!")
self.contents.font.size = 18
self.contents.draw_text( 0, 28, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50, 160, 24, $data_system.words.sp)
self.contents.font.size = 14
self.contents.draw_text( 0, 72, 80, 24, $data_system.words.str)
self.contents.draw_text( 0, 94, 80, 24, $data_system.words.dex)
self.contents.draw_text( 0, 116, 80, 24, $data_system.words.agi)
self.contents.draw_text( 0, 138, 80, 24, $data_system.words.int)
self.contents.draw_text(92, 0, 128, 24, "??")
self.contents.draw_text(76, 28, 128, 24, "=")
self.contents.draw_text(76, 50, 128, 24, "=")
self.contents.draw_text(76, 72, 128, 24, "=")
self.contents.draw_text(76, 94, 128, 24, "=")
self.contents.draw_text(76, 116, 128, 24, "=")
self.contents.draw_text(76, 138, 128, 24, "=")
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0, 88, 24, last_lv.to_s, 2)
self.contents.draw_text( 0, 28, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.draw_text( 0, 0, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136, 128, 24, actor.int.to_s, 2)
end
end
#===========================================================================
===
# ?? window_skilllearning
#---------------------------------------------------------------------------
---
# ?@???x???a?b?v???ȂǂɃx?l?????????? ?ɂ?? ?\?????郅?b???h?e?ł??b
#===========================================================================
===
class window_skilllearning < window_base

#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?

#--------------------------------------------------------------------------
attr_reader :learned # ?x?l????????????ǂ???

#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(class_id, last_lv, now_lv)
super(160, 64-32, 320, 64)

self.contents = bitmap.new(width - 32, height - 28) # ?킴?Ɓ?? 092;??


self.visible = false
self.back_opacity = 160
@learned = false
refresh(class_id, last_lv, now_lv)
end

#--------------------------------------------------------------------------
# ?? ???t???b?v??

#--------------------------------------------------------------------------
def refresh(class_id, last_lv, now_lv)
for i in 0...$data_classes[class_id].learnings.size
learn_lv = $data_classes[class_id].learnings[i].level
# ??? ??x???a?b?v?͈͂ŏk?????郘?l???̏
if learn_lv > last_lv and learn_lv <= now_lv
@learned = true
# se?̍Đ?
if skilllearn_se != ""
audio.se_play(skilllearn_se)
end
# ?e?`?ʼbr /> skill_name =
$data_skills[$data_classes[class_id].learnings[i].skill_id].name
self.contents.clear
self.contents.font.name = $fontface
self.contents.draw_text(0,0,448,32, skill_name + " learned !!")
self.visible = true
# ???c?????[?v
loop do
# ?q?[???斊??v
graphics.update
# ?? x?v
input.update
# ?t???[???x?v
update
# ?斊???‫؂‬葖?킁???烋?[?v? f
if @learned == false
break
end
end
# ???c?????[?v?????‫܂‬żbr /> end
end
end

#--------------------------------------------------------------------------
# ?? ?t???[???x?v

#--------------------------------------------------------------------------
def update
# c ?{?^????????? ?
if input.trigger?(input::c)
@learned = false
self.visible = false
end
end
end
#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base

#--------------------------------------------------------------------------
# ?? ?lj?e??c???x?^???x?ϐ?

#--------------------------------------------------------------------------
attr_accessor :level_up_flags # level up!?\??
end
#===========================================================================
===
# ?? scene_battle
#===========================================================================
===
class scene_battle

#--------------------------------------------------------------------------
# ?? ?a?t?^?[?o?g???t?f?[?y?j?n

#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
xrxs_bp10_start_phase5
# ?l?? exp???
@exp_gained = battle_exp
# exp ?l????菁??
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp -= @exp_gained
if actor.level < last_level
@status_window.level_up_flags[i] = false
end
end
end
# ?‫ݒ‬輢 r /> @exp_gain_actor = -1
# ???u???g?e?b???h?e? 092;??
@result_window.visible = true
end

#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?a?t?^?[?o?g???t?f?[?y)

#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
@level_up_phase_done = false if @level_up_phase_done != true
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?e?b???h?e? ??Ď??̃a?n?^?[?ּbr /> @levelup_window.visible =
false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
@level_up_phase_done = phase5_next_levelup
end
if @level_up_phase_done
if @phase5_wait_count < 2
# ???u???g?e?b???h?e? ible=true?ł??Ž??ɼbr />
@result_window.opacity = 0
@result_window.back_opacity = 0
@result_window.contents_opacity = 0
end
# ?Ăі ?
xrxs_bp10_update_phase5
͋
# ???x???a?b?v???Ă??鏪???????o?g???i??
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end

#--------------------------------------------------------------------------
# ?? ???a?n?^?[???x???a?b?v?\???
̃ ̃ ּbr />
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ???a?n?^?[?
̃ ּbr /> @exp_gain_actor += 1

# ?Ō れ?a?n?^?[?̏
if @exp_gain_actor >= $game_party.actors.size
# ?a?t?^?[?o?g???t?f?[?y?j?n
return true
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# ???݂̔\?l?
͒ ?
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# ?퓬?o???l?̍Ď 擾
actor.exp += @exp_gained
# ???輢 r /> if actor.level > last_level

# ???x???a?b?v?????
@status_window.level_up(@exp_gain_actor)
# ???u???g?e?b???h?e???
@result_window.visible = false
# se?̍Đ?
if level_up_se != ""
audio.se_play(level_up_se)
end
# me?̍Đ?
if level_up_me != ""
audio.me_stop
audio.me_play(level_up_me)
end
# level-up?e?b???h?e?̐‫ݒ‬輢 r /> actors_size =
[$game_party.actors.size, 4].max
x_shift = 160 + (640 - 160*actors_size)/(actors_size - 1)
x = x_shift * @exp_gain_actor
y = 128
@levelup_window = window_levelupwindow.new(x, y, actor,
last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str -
last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int -
last_int)
@levelup_window.visible = true
# ?x?e?[?^?x?e?b???h?e??t???b?v??
@status_window.refresh
# ?x?l???k???e?b???h?e?̐‫ݒ‬輢 r /> @skilllearning_window =
window_skilllearning.new(actor.class_id, last_level, actor.level)
# ?e?f?c?g?j?e???g? 輢 r /> @phase5_wait_count = 40
return false
end
end
end until false
end

def battle_exp
bexp = 0
# ???[?v
for enemy in $game_troop.enemies
# ?g?l?~?[???b? ?ԂłȂ??
unless enemy.hidden
# ?l??? ?br /> bexp += enemy.exp
end
end
return bexp
end

end

#===========================================================================
===
# ?? game_battler
#===========================================================================
===
class game_battler
#--------------------------------------------------------------------------
# ?? ?x???b?v?_???[?w?̌??p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# ???l?̏???r /> slip_damage_percent = 0
slip_damage_plus = 0
# ???‫ݕ‬t???? ???郘?e?[?g?̒????烘???b?v?_???[?w?l?肌???m? ?
for i in @states
if $data_states[i].slip_damage
# ???x?e?[?g??????
̃ Ă??郘???b?v?_???[?w?̼br /> #

͌
lv?v???x?x?e?[?g?‫??܂‬v?}?c?i?x?x?e?[?g? 聂
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^?x???b?v([0-9]+)(%|??)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^?x???b?v([0-9]+)$/
slip_damage_plus += $1.to_i
end
end
end
for j in $data_states[i].minus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^?x???b?v([0-9]+)(%|??)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^?x???b?v([0-9]+)$/
slip_damage_plus -= $1.to_i
end
end
end
end
end
if slip_damage_percent == 0 and slip_damage_plus == 0
xrxs_bp7_slip_damage_effect
else
# ?h? ?x???b?v?h? ? ?鏪??? 輢 r /> for i in [@armor1_id, @armor2_id,
@armor3_id, @armor4_id]
armor = $data_armors[i]
next if armor == nil
for j in armor.guard_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^?x???b?v([0-9]+)(%|??)/
if slip_damage_percent > 0
slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
end
end
if $data_states[j].name =~ /^?x???b?v([0-9]+)$/
if slip_damage_percent > 0
slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
end
end
end
end
end
# ?_???[?w? 輢 r /> self.damage = self.maxhp * slip_damage_percent
/ 100 + slip_damage_plus
# ???u
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# hp ???烟???[?w??z
self.hp -= self.damage
# ???\?b?h?i??
return true
end
end
end
# ?????? xrxs_bp 1. cp??????15 ??????
# by ???‫ݓ‬y, ?a? ack-r

#===========================================================================
===
# ?? scene_battle_cp
#===========================================================================
===
class scene_battle_cp
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :stop # cp??z?x?g?b?v
#---------------------------------------------------------------------------
-
# ?? ?i?u?w?f?n?g?̏???r />
#---------------------------------------------------------------------------
-
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# ?z? ount_battlers ???r /> @count_battlers = []
# ?g?l?~?[? ount_battlers ?ɒlj?br /> for enemy in
$game_troop.enemies
@count_battlers.push(enemy)
end
# ?a?n?^?[? ount_battlers ?ɒlj?br /> for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi /
@agi_total * 4, 0].max, 65535].min
end
end
#---------------------------------------------------------------------------
-
# ?? cp?j?e???g?̊j?n
#---------------------------------------------------------------------------
-
def start
if @cp_thread != nil then
return
end
@cancel = false
@stop = false
# ???????烘???b?h
@cp_thread = thread.new do
while @cancel != true
if @stop != true
self.update # ?x?v
sleep(0.05)
end
end
end
# ?????‫܂‬Ńx???b?h
end
#---------------------------------------------------------------------------
-
# ?? cp?j?e???g?a?b?v
#---------------------------------------------------------------------------
-
def update
if @count_battlers != nil then
for battler in @count_battlers
# ?s???o???Ȃ?? ????
if battler.dead? == true #or battler.movable? == false then
battler.cp = 0
next
end
# ?????̠1.3? ??邱?ƂŁ??x?s?[?h? x?”\?b???????????_?g?p???
͎ 邱?Ɓb
battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total,
0].max, 65535].min
end
end
end
#---------------------------------------------------------------------------
-
# ?? cp?j?e???g?̊j?n
#---------------------------------------------------------------------------
-
def stop
@cancel = true
if @cp_thread != nil then
@cp_thread.join
@cp_thread = nil
end
end
end
#===========================================================================
===
# ?? game_battler
#===========================================================================
===
class game_battler
attr_accessor :now_guarding # ???‫ݖ‬h? ?t???o

attr_accessor :cp # ???݃p


attr_accessor :slip_state_update_ban # ?x???b?v?e?x?e?[?g?????????̋ ~
#--------------------------------------------------------------------------
# ?? ?r?}???h??\???輢 r />
#--------------------------------------------------------------------------
def inputable?
return (not @hidden and restriction <= 1 and @cp >=65535)
end
#--------------------------------------------------------------------------
# ?? ?x?e?[?g [?x???b?v?_???[?w] ???輢 r />
#--------------------------------------------------------------------------
alias xrxs_bp1_slip_damage? slip_damage?
def slip_damage?
return false if @slip_state_update_ban
return xrxs_bp1_slip_damage?
end
#--------------------------------------------------------------------------
# ?? ?x?e?[?g???r??(?^?[?????Ƃ Ăяo??)
#--------------------------------------------------------------------------
alias xrxs_bp1_remove_states_auto remove_states_auto
def remove_states_auto
return if @slip_state_update_ban
xrxs_bp1_remove_states_auto
end
end
#===========================================================================
===
# ?? game_actor
#===========================================================================
===
class game_actor < game_battler
#--------------------------------------------------------------------------
# ?? ?z?b?g?a?b?v
#--------------------------------------------------------------------------
alias xrxs_bp1_setup setup
def setup(actor_id)
xrxs_bp1_setup(actor_id)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#===========================================================================
===
# ?? game_enemy
#===========================================================================
===
class game_enemy < game_battler
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize(troop_id, member_index)
xrxs_bp1_initialize(troop_id, member_index)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # cp???[?^?[?݂̂̍x?v
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
#--------------------------------------------------------------------------
# ?? cp???[?^?[ ?̕`?漢 r />
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, color.new(128, 128, 0, 255))
end
end
#===========================================================================
===
# ?? scene_battle
#===========================================================================
===
class scene_battle
# ????? ?? 肷?邆?a?a?n?^?[?r?}???h???|?b?v?????Ƃ?? ????
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# ?? ?o?g???i??
# result : ???ʠ(0:???? 1:?s?k 2:????)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# cp?j?e???g?
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# ?? ?v???o?g???t?f?[?y?j?n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
@cp_thread = scene_battle_cp.new
# ?a?n?^?[?r?}???h?e?b???h?e??쐬
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = window_command.new(160, [s1, s2, s3, s4, "run"])
@actor_command_window.y = 128
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.draw_item(4, $game_temp.battle_can_escape ?
@actor_command_window.normal_color : @actor_command_window.disabled_color)
xrxs_bp1_start_phase1
end
#--------------------------------------------------------------------------
# ?? ?p?[?e?b?r?}???h?t?f?[?y?j?n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase2 start_phase2
def start_phase2
xrxs_bp1_start_phase2
@party_command_window.active = false
@party_command_window.visible = false
# ???ּbr /> start_phase3
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?p?[?e?b?r?}???h?t?f?[?y)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?p?[?e?b?r?}???h?e?b???h?e?j?[?\???
̃ ʒu?ŕ?? /> case
@party_command_window.index
when 0 # ?키

# ???蠓 e ??t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# ?a?n?^?[?r?}???h?t?f?[?y?j?n
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# ?? ???a?n?^?[?r?}???h??br
̃ ̃ />
#--------------------------------------------------------------------------
def phase3_next_actor
# ???[?v
begin
# ?a?n?^?[?̖??Ńg?t?f?n?g off
if @active_battler != nil
@active_battler.blink = false
end
# ?Ō れ?a?n?^?[?̏
if @actor_index == $game_party.actors.size-1
# ???c???t?f?[?y?j?n
@cp_thread.start
start_phase4
return
end
# ?a?n?^?[?c???f?b?n?x?
̃ 鼢 r /> @actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
if @active_battler.inputable? == false
@active_battler.current_action.kind = -1
end
# ?a?n?^?[???r?}???h?? t???Ȃ?? Ȃ 炠???
end until @active_battler.inputable?
@cp_thread.stop
# ?a?n?^?[?r?}???h?e?b???h?e??b?g?a?b?v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ?? ?o?a?n?^?[?r?}???h??br
̃ ̃ />
#--------------------------------------------------------------------------
def phase3_prior_actor
# ???[?v
begin
# ?a?n?^?[?̖??Ńg?t?f?n?g off
if @active_battler != nil
@active_battler.blink = false
end
# ?ŏ??a?n?^?[?
̃ ̏
if @actor_index == 0
# ?ŏ??֖ 鼢 r /> start_phase3
return
end
# ?a?n?^?[?c???f?b?n?x?
̃ ?
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# ?a?n?^?[???r?}???h?? t???Ȃ?? Ȃ 炠???
end until @active_battler.inputable?
@cp_thread.stop
# ?a?n?^?[?r?}???h?e?b???h?e??b?g?a?b?v
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ?? ?a?n?^?[?r?}???h?e?b???h?e?z?b?g?a?b?v
̃
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# ???̍Đ?
audio.se_play($data_system_command_up_se) if $data_system_command_up_se
!= ""
# ? ?
xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?a?n?^?[?r?}???h?t?f?[?y : ??r?}???h)
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?a?n?^?[?r?}???h?e?b???h?e?j?[?\???
̃ ʒu?ŕ?? /> case
@actor_command_window.index
when 4 # ?????鼢 r /> if $game_temp.battle_can_escape

# ???蠓 e ??t
$game_system.se_play($data_system.decision_se)
# ?a?n?v????? 輢 r /> @active_battler.current_action.kind =
0
@active_battler.current_action.basic = 4
# ???a?n?^?[?r?}???h??br
̃ ̃ /> phase3_next_actor
else
# ?u?u?[ se ??t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# ?? ???c???t?f?[?y?j?n
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# ?g?l?~?[?a?n?v?????쐬
for enemy in $game_troop.enemies
if enemy.cp < 65535
enemy.current_action.clear
enemy.current_action.kind = -1 # ?^?[??? ??b
next
end
enemy.make_action
end
# ?s???????쐬
make_action_orders
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 1 : ?a?n?v????????1;
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# ????r /> @phase4_act_continuation = 0
# ???s???輢 r /> if judge
@cp_thread.stop
͔
# ?????‫??܂‬s?k?̏ : ???\?b?h?i??
return
end
# ???s???o?g???[?z? 擪???玦??
@active_battler = @action_battlers[0]
# ?x?e?[?^?x?x?v?????? ?聂
@status_window.update_cp_only = true
# ?x?e?[?g?x?v??~?b
@active_battler.slip_state_update_ban = true if @active_battler != nil
# ? ?
xrxs_bp1_update_phase4_step1
# ? ~???
@status_window.update_cp_only = false
@active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 2 : ?a?n?v?????j?n)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ?????a?n?v?????łȂ??
unless @active_battler.current_action.forcing
# cp?????肄???Ȃ??
if @phase4_act_continuation == 0 and @active_battler.cp < 65535
@phase4_step = 6
return
end
# ??? [?g? 퍕?????馣 93; ?? [?????퍕?????馣 93; ?̏
if @active_battler.restriction == 2 or @active_battler.restriction ==
3
# ?a?n?v?????ɍu??? 輢 r /> @active_battler.current_action.kind
= 0
@active_battler.current_action.basic = 0
end
# ??? [?s???ł??Ȃ?] ?̏
if @active_battler.restriction == 4
# ?a?n?v?????????Ώ ̃‫ۂ‬o?g???[????a
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# ?x?e?[?g???r??br /> @active_battler.remove_states_auto
# cp??B r /> @active_battler.cp = [(@active_battler.cp -
65535),0].max
# ?x?e?[?^?x?e?b???h?e??t???b?v??
@status_window.refresh
end
# ?x?e?b?v 1 ?Ɉ‫ڍ‬s
@phase4_step = 1
return
end
end
# ?a?n?v?????̎핊?ŕ?? /> case @active_battler.current_action.kind
when 0
# ?u????h?䁅?????遅?????Ȃ??????
̋ ʏ?
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# ?x?l???g?p???̏?
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# ?a?c?e???g?p???̏?
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# cp?????‫?܂‬Ă??Ȃ?
@phase4_step = 6
return
end
# cp??z???? ???鼢 r /> @cp_thread.stop = true
# ?x?e?[?g???r??br /> @active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# ?? ??a?n?v???? ??? 쐬
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# ?u???̏
if @active_battler.current_action.basic == 0 and
@phase4_act_continuation == 0
@active_battler.cp -= 65535 # ?u?????p??
̃ B r /> end

# ?h? ?
if @active_battler.current_action.basic == 1 and
@phase4_act_continuation == 0
@active_battler.cp -= 32767 # ?h? ?p??
̃ B r /> end

# ?g?̓????邌?
if @active_battler.is_a?(game_enemy) and
@active_battler.current_action.basic == 2 and
@phase4_act_continuation == 0
@active_battler.cp -= 65535 # ???????p??
̃ B r /> end

# ?????Ȃ??̏
if @active_battler.current_action.basic == 3 and
@phase4_act_continuation == 0
@active_battler.cp -= 32767 # ?????Ȃ????p??
̃ B r /> end

# ?????邌?
if @active_battler.current_action.basic == 4 and
@phase4_act_continuation == 0
@active_battler.cp -= 65535 # ???????p??
̃ B r /> # ?????”\?ł͂Ȃ??
if $game_temp.battle_can_escape == false
# ?u?u?[ se ??t
$game_system.se_play($data_system.buzzer_se)
return
end
# ???蠓 e ??t
$game_system.se_play($data_system.decision_se)
# ????????
update_phase2_escape
return
end
xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 5 : ?_???[?w?\??)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# ?x???b?v?_???[?w
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# ?? ?t???[???x?v (???c???t?f?[?y ?x?e?b?v 6 : ???t???b?v??)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# cp??z??j???鼢 r /> @cp_thread.stop = false
# ?w???v?e?b???h?e???
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# ?????? xrxs_bp 7. ?o?g???x?e?[?^?x?e?n???a?f?u?c?? ver.1.02 ??????
# by ???‫ݓ‬y, tomy

#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base
#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # cp???[?^?[?݂̂̍x?v
#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
͉
# ??full-view?̏ ??? ̠# ????Ă????????b
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# ?? ???t???b?v??
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
xrxs_bp7_refresh
return
end
# ?`?ʂ?~???Ȃ??疟??
@draw_ban = true
xrxs_bp7_refresh
# ?`?ʂ̋ ~???
@draw_ban = false
# ?`?ʂ?n
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# ???l?????o???t?b?b?n?̕`?ʼbr /> draw_actor_graphic(actor, actor_x
- 9, 116)
# hp/sp???[?^?[?̕`?ʼbr /> draw_actor_hp_meter_line(actor, actor_x,
72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
# hp???l?̕`?ʼbr /> self.contents.font.size = 24 #
hp/sp???l?̕????̑傫??
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
# sp???l?̕`?ʼbr /> self.contents.font.color = actor.sp == 0 ?
knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
# ?p? hp?v?Ɨp? sp?v?̕`?ʼbr /> self.contents.font.size = 12

# ?p? hp/sp?v?̕????̑傫??

self.contents.font.color = system_color # ?p? hp/sp?v?̕????̐f


draw_shadow_text(actor_x, 60, 96, 12, $data_system.words.hp)
draw_shadow_text(actor_x, 92, 96, 12, $data_system.words.sp)

draw_actor_state(actor, actor_x, 100)


end
end
end
#===========================================================================
===
# ?? window_base
#===========================================================================
===
class window_base < window
#--------------------------------------------------------------------------
# ?? hp???[?^?[ ?̕`?漢 r />
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / actor.maxhp
hp_color_1 = color.new(255, 0, 0, 192)
hp_color_2 = color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ?? sp???[?^?[ ?̕`?漢 r />
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / actor.maxsp
hp_color_1 = color.new( 0, 0, 255, 192)
hp_color_2 = color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, color.new(0,
0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ?? ???o?̕`?漢 r />
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ?? ?x?e?[?g?̕`?漢 r />
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ?? hp ?̕`?漢 r />
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ?? sp ?̕`?漢 r />
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#===========================================================================
===
# ?? ?o?????c?u????
#===========================================================================
===
class window_base
#--------------------------------------------------------------------------
# ?? ???c???`?栢 y ???‫ݓ‬y
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1,
end_color = start_color)
# ?`?ʋ????̌v?z?b?傫? ɒ??p??? ̒ ????b
distance = (start_x - end_x).abs + (start_y - end_y).abs
# ?`?ʊj?n
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.fill_rect(x, y, width, width, start_color)
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red *
i/distance
g = start_color.green * (distance-i)/distance + end_color.green *
i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue *
i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha *
i/distance
self.contents.fill_rect(x, y, width, width, color.new(r, g, b, a))
end
end
end

#--------------------------------------------------------------------------
# ?? ?e?????`?栢 y tomy
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
# ???̐f? ????Ă???
color = self.contents.font.color.dup
# ?????ʼne?`?漢 r /> self.contents.font.color = color.new(0, 0, 0)
self.contents.draw_text(x + 2, y + 2, width, height, string, align)
# ???̐f?ɖ ??ĕ`?漢 r /> self.contents.font.color = color
self.contents.draw_text(x, y, width, height, string, align)
end
end

prtyfly4awhtguyx nov 26 2004, 11:19 pm post #2

expert

group: expert
posts: 92
joined: 10-november 04
from: usa - california
member no.: 3
rpg maker level: expert
class title:
i am a writer and mapmaking

nice, that's pretty cool. has it been tested yet?

ex-armadia status
|||||||||| - story
|||||||||| - scripting
|||||||||| - map making
|||||||||| - finish editing heros and all bosses
|||||||||| - finishing touches/beta testing

click here.

dark akiko nov 27 2004, 12:29 am post #3

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

yeah, it works fine well for me anywayz. i'm using it in my game

mrman nov 27 2004, 12:38 am post #4

newbie

group: newbie
posts: 11
joined: 26-november 04
member no.: 35

as i already said, the enemies don't attack. what's wrong?

dark akiko nov 27 2004, 01:47 pm post #5

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

you must of done something wrong, you are the only one who has problems
with this script. everyone else who i have given it to, it works fine
did you make a new script above "main" ?

mrman nov 28 2004, 12:21 am post #6

newbie

group: newbie
posts: 11
joined: 26-november 04
member no.: 35

quote(dark akiko @ nov 27 2004, 06:47 am)


you must of done something wrong, you are the only one who has problems
with this script. everyone else who i have given it to, it works fine

did you make a new script above "main" ?

yup. and i tried it without the script and it still doesn't work!

dark akiko nov 28 2004, 02:02 pm post #7

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

that's pretty strange...hmmm...


are you using the default monsters?
are your hero's speed too high so the enemies dont get a chance?

if no to those, your rmxp is faulty

mrman nov 28 2004, 07:22 pm post #8

newbie
group: newbie
posts: 11
joined: 26-november 04
member no.: 35

quote(dark akiko @ nov 28 2004, 07:02 am)


that's pretty strange...hmmm...
are you using the default monsters?
are your hero's speed too high so the enemies dont get a chance?

if no to those, your rmxp is faulty

edit: i the enemy to attack, but it is after 7 of my turns. i turned the


agility to 12. now what's wrong?

neonlightning nov 30 2004, 03:40 am post #9

newbie

group: newbie
posts: 13
joined: 29-november 04
from: thunder bay, ontario, canada
member no.: 41

um is there a script that just has the level up info because i don't know
how to cut out just that part

dark akiko dec 1 2004, 07:57 pm post #10

member

group: member
posts: 32
joined: 26-november 04
member no.: 36
this is the code for the level-up

code
#================================================
# ====create a new script above main and put all that code in it. ======
#================================================
#
#
#
#
#
# window_battlestatus
#
#?????? xrxs_bp10. level up!?\?͏㏸?\???e?b???h?e plus! ??????

# by ???‫ݓ‬y
#
# ?v?fxrxs.rgss??x?^?}?c?y
#
#
#script found at http://f26.aaa.livedoor.jp/~xxms/rpgxp_xrxs_bp10.htm
#modified by guillaume777
#
#
#===========================================================================
===
# ? ?j?x?^?}?c?y?|?c???g
#===========================================================================
===
class scene_battle
level_up_se = "" # ???x???a?b?vse?b""?Ŗ????b
level_up_me = "audio/me/007-fanfare01" # ???x???a?b?vme
end
class window_skilllearning < window_base
skilllearn_se = "audio/se/106-heal02" # ?x?l???k??se?b
end
#===========================================================================
===
# ?? window_levelupwindow
#---------------------------------------------------------------------------
---
# ?@?o?g???i?????a???x???a?b?v????? ?Ƀx?e?[?^?x? 092;?????郅?b???h?e?ł??b
#===========================================================================
===
class window_levelupwindow < window_base

#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(x, y, actor, last_lv, up_hp, up_sp, up_str, up_dex,
up_agi, up_int)
# super(x, y, 160, 192)
super(x, y-32, 160, 192+32)

self.contents = bitmap.new(width - 32, height - 32)


self.visible = false
self.back_opacity = 160
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end

#--------------------------------------------------------------------------
# ?? ???t???b?v??

#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 20, 0, 160, 24, "level up!!")
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 28+32, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50+32, 160, 24, $data_system.words.sp)
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 0+32, 80, 24, "level")
self.contents.draw_text( 0, 72+32, 80, 24,
$data_system.words.str[0,3])
self.contents.draw_text( 0, 94+32, 80, 24,
$data_system.words.dex[0,3])
self.contents.draw_text( 0, 116+32, 80, 24,
$data_system.words.agi[0,3])
self.contents.draw_text( 0, 138+32, 80, 24,
$data_system.words.int[0,3])
self.contents.draw_text(76, 0+32, 128, 24, "=")
self.contents.draw_text(76, 28+32, 128, 24, "=")
self.contents.draw_text(76, 50+32, 128, 24, "=")
self.contents.draw_text(76, 72+32, 128, 24, "=")
self.contents.draw_text(76, 94+32, 128, 24, "=")
self.contents.draw_text(76, 116+32, 128, 24, "=")
self.contents.draw_text(76, 138+32, 128, 24, "=")
self.contents.font.size = 20
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0+32, 72, 24, "+" +
(actor.level-last_lv).to_s, 2)
self.contents.draw_text( 0, 28+32, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50+32, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72+32, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94+32, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116+32, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138+32, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.font.name = $fontface
self.contents.draw_text( 0, 0+32, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26+32, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48+32, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70+32, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92+32, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114+32, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136+32, 128, 24, actor.int.to_s, 2)
end
end
#===========================================================================
===
# ?? window_skilllearning
#---------------------------------------------------------------------------
---
# ?@???x???a?b?v???ȂǂɃx?l?????????? ?ɂ?? ?\?????郅?b???h?e?ł??b
#===========================================================================
===
class window_skilllearning < window_base

#--------------------------------------------------------------------------
# ?? ??c???x?^???x?ϐ?

#--------------------------------------------------------------------------
attr_reader :learned # ?x?l????????????ǂ???

#--------------------------------------------------------------------------
# ?? ?i?u?w?f?n?g????r />
#--------------------------------------------------------------------------
def initialize(class_id, last_lv, now_lv)
super(160, 64-32, 320, 64)

self.contents = bitmap.new(width - 32, height - 28) # ?킴?Ɓ?? 092;??


self.visible = false
self.back_opacity = 160
@learned = false
refresh(class_id, last_lv, now_lv)
end

#--------------------------------------------------------------------------
# ?? ???t???b?v??

#--------------------------------------------------------------------------
def refresh(class_id, last_lv, now_lv)
for i in 0...$data_classes[class_id].learnings.size
learn_lv = $data_classes[class_id].learnings[i].level
# ??? ??x???a?b?v?͈͂ŏk?????郘?l???̏
if learn_lv > last_lv and learn_lv <= now_lv
@learned = true
# se?̍Đ?
if skilllearn_se != ""
audio.se_play(skilllearn_se)
end
# ?e?`?ʼbr /> skill_name =
$data_skills[$data_classes[class_id].learnings[i].skill_id].name
self.contents.clear
self.contents.font.name = $fontface
self.contents.draw_text(0,0,448,32, skill_name + " learned !!")
self.visible = true
# ???c?????[?v
loop do
# ?q?[???斊??v
graphics.update
# ?? x?v
input.update
# ?t???[???x?v
update
# ?斊???‫؂‬葖?킁???烋?[?v? f
if @learned == false
break
end
end
# ???c?????[?v?????‫܂‬żbr /> end
end
end

#--------------------------------------------------------------------------
# ?? ?t???[???x?v

#--------------------------------------------------------------------------
def update
# c ?{?^????????? ?
if input.trigger?(input::c)
@learned = false
self.visible = false
end
end
end
#===========================================================================
===
# ?? window_battlestatus
#===========================================================================
===
class window_battlestatus < window_base

#--------------------------------------------------------------------------
# ?? ?lj?e??c???x?^???x?ϐ?

#--------------------------------------------------------------------------
attr_accessor :level_up_flags # level up!?\??
end
#===========================================================================
===
# ?? scene_battle
#===========================================================================
===
class scene_battle

#--------------------------------------------------------------------------
# ?? ?a?t?^?[?o?g???t?f?[?y?j?n

#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
xrxs_bp10_start_phase5
# ?l?? exp???
@exp_gained = battle_exp
# exp ?l????菁??
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp -= @exp_gained
if actor.level < last_level
@status_window.level_up_flags[i] = false
end
end
end
# ?‫ݒ‬輢 r /> @exp_gain_actor = -1
# ???u???g?e?b???h?e? 092;??
@result_window.visible = true
end

#--------------------------------------------------------------------------
# ?? ?t???[???x?v (?a?t?^?[?o?g???t?f?[?y)

#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
@level_up_phase_done = false if @level_up_phase_done != true
# c ?{?^????????? ?
if input.trigger?(input::c)
# ?e?b???h?e? ??Ď??̃a?n?^?[?ּbr /> @levelup_window.visible =
false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
@level_up_phase_done = phase5_next_levelup
end
if @level_up_phase_done
if @phase5_wait_count < 2
# ???u???g?e?b???h?e? ible=true?ł??Ž??ɼbr />
@result_window.opacity = 0
@result_window.back_opacity = 0
@result_window.contents_opacity = 0
end
# ?Ăі ?
xrxs_bp10_update_phase5
͋
# ???x???a?b?v???Ă??鏪???????o?g???i??
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end

#--------------------------------------------------------------------------
# ?? ???a?n?^?[???x???a?b?v?\???
̃ ̃ ּbr />
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ???a?n?^?[?
̃ ּbr /> @exp_gain_actor += 1

# ?Ō れ?a?n?^?[?̏
if @exp_gain_actor >= $game_party.actors.size
# ?a?t?^?[?o?g???t?f?[?y?j?n
return true
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# ???݂̔\?l?
͒ ?
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# ?퓬?o???l?̍Ď 擾
actor.exp += @exp_gained
# ???輢 r /> if actor.level > last_level

# ???x???a?b?v?????
@status_window.level_up(@exp_gain_actor)
# ???u???g?e?b???h?e???
@result_window.visible = false
# se?̍Đ?
if level_up_se != ""
audio.se_play(level_up_se)
end
# me?̍Đ?
if level_up_me != ""
audio.me_stop
audio.me_play(level_up_me)
end
# level-up?e?b???h?e?̐‫ݒ‬輢 r /> actors_size =
[$game_party.actors.size, 4].max
x_shift = 160 + (640 - 160*actors_size)/(actors_size - 1)
x = x_shift * @exp_gain_actor
y = 128
@levelup_window = window_levelupwindow.new(x, y, actor,
last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str -
last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int -
last_int)
@levelup_window.visible = true
# ?x?e?[?^?x?e?b???h?e??t???b?v??
@status_window.refresh
# ?x?l???k???e?b???h?e?̐‫ݒ‬輢 r /> @skilllearning_window =
window_skilllearning.new(actor.class_id, last_level, actor.level)
# ?e?f?c?g?j?e???g? 輢 r /> @phase5_wait_count = 40
return false
end
end
end until false
end

def battle_exp
bexp = 0
# ???[?v
for enemy in $game_troop.enemies
# ?g?l?~?[???b? ?ԂłȂ??
unless enemy.hidden
# ?l??? ?br /> bexp += enemy.exp
end
end
return bexp
end

end

agemosu dec 1 2004, 09:12 pm post #11

x-treme

group: x-treme
posts: 192
joined: 30-november 04
from: usa, ohio
member no.: 46
rpg maker level: master
class title:
artist, designer, creator

on the topic of this battle system, how do you enable auto heal after
battle. every time i try to enable it, it makes the script fail. so i
figure i'll just pose the question to someone who knows what they're
doing.

dark akiko dec 3 2004, 08:22 am post #12

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

after battle is automatically turned on when you insert the script into ur
rmxp o.o
agemosu dec 3 2004, 12:53 pm post #13

x-treme

group: x-treme
posts: 192
joined: 30-november 04
from: usa, ohio
member no.: 46
rpg maker level: master
class title:
artist, designer, creator

@_# hmm it wasn't working when i first put it in. . . i'll have to look
some more into this

dark akiko dec 3 2004, 03:01 pm post #14

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

do you mean it comes up with a pop-up after battle


or it just doesnt heal them?

agemosu dec 3 2004, 09:01 pm post #15

x-treme

group: x-treme
posts: 192
joined: 30-november 04
from: usa, ohio
member no.: 46
rpg maker level: master
class title:
artist, designer, creator

i didn't even know there was supposed to be a pop-up, and they nobody gets
healed.

neonlightning dec 3 2004, 09:26 pm post #16

newbie

group: newbie
posts: 13
joined: 29-november 04
from: thunder bay, ontario, canada
member no.: 41

thanks it works perfectly how i wanted it

the jack ross dec 5 2004, 05:34 am post #17

newbie

group: newbie
posts: 26
joined: 3-december 04
member no.: 53

can someone post the script with out auto heal in it i'm new and can't
find it

insomniacmg dec 12 2004, 07:30 pm post #18

newbie
group: newbie
posts: 1
joined: 12-december 04
member no.: 82
rpg maker level: not applicable

if someone could post the script with the auto heal removed i'd be
grateful as well.

dark akiko dec 16 2004, 12:11 am post #19

member

group: member
posts: 32
joined: 26-november 04
member no.: 36

just set the autoheal to zero,

parasun feb 18 2005, 09:05 pm post #20

newbie

group: newbie
posts: 5
joined: 29-january 05
member no.: 195
rpg maker level: not applicable

everything works ok but the text for the spells learned are not showing...
just an empty box...

edit: i figured it out... thanks for all the help (j/k )

« next oldest · scripts & tutorials submission and request · next newest »

3 pages 1 2 3 >
1 user(s) are reading this topic (1 guests and 0 anonymous users)
0 members:

close topic options


track this topic
receive email notification when a reply has been made to this topic and you are
not active on the board.

subscribe to this forum


receive email notification when a new topic is posted in this forum and you are
not active on the board.

download / print this topic


download this topic in different formats or view a printer friendly version.
forum home search help the asylum |-- website\forum feedback &
suggestions |-- forum news & events |---- terminated contest & projects
|-- presentation & greetings |-- test & help forum |-- advertising
|-- the pub |---- the arcade room |---- the debate room entertainment
|-- movies discussion |-- anime discussion |-- videogames discussion
|-- music discussion |-- role playing & interactive story telling |--
frustration asylum game making |-- general discussion |-- game maker
developments |-- rpg maker xp |---- general discussion |---- utility &
rmxp enhancement development |---- help forum (even about script!) |----
scripts & tutorials submission and request |---- resources submission &
request |------ general computer art submission & request |---- your
projects & teams |-- other game makers & game dev |---- general
discussion |---- help forum |---- tutorials submission and request
|---- resources submission & request |------ general computer art
submission & request |---- your projects & teams |-- your projects &
teams |---- alphavision development forum movie making |-- general
discussion |-- help forum |-- tutorials submission & request |-- your
movies project computer art making |-- general discussion |-- help forum
|-- tutorials submission & request |-- your portfolio & art request
story & literature making |-- general discussion |-- your essays music
making |-- general discussion |-- help forum |-- tutorials submission
& request |-- your music projects & request translation & foreign language
forum |-- traducción & discusión en español (spanish forum) |----
discusión en español |-- forum & traduzioni in italiano (italian forum)
|---- forum in italiano |-- vertalingen & discussies in het nederlands
(dutch forum) |---- nederlandse discussie

lo-fi versiontime is now: 19th may 2005 - 02:30 pm

invision power board v2.0.3 © 2005 ips, inc.


licensed to: creation asylum

Potrebbero piacerti anche