Войти на сайт

Авторизация, ждите ...
×

ТЕМА: Помогите добавить тп бар к скрипту

Помогите добавить тп бар к скрипту 8 года 2 мес. назад #89743

  • Seibur
  • Seibur аватар
  • Вне сайта
  • Просветлённый
  • Сообщений: 371
  • Спасибо получено: 308
  • ВетеранРазработчик
Скрипт показывает ХП и МП в битве, но ТП отсутствует. Помогите его дописать пожалуйста =)
=begin =========================================================================
Dekita's                                                                   v1.1 
                    ★ THE MOST BASIC ENEMY INFO EVER™ ★
 
================================================================================
 Script Information:
====================
 This script gives you basic information about your enemy during battle
 this is "VERY" basic...
 
================================================================================
 ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
================================================================================
 1. You must give credit to "Dekita"
 2. You are NOT allowed to repost this script.(or modified versions)
 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
 4. You are NOT allowed to use this script for Commercial games.
 5. ENJOY!
 
"FINE PRINT" 
By using this script you hereby agree to the above terms and conditions, 
 if any violation of the above terms occurs "legal action" may be taken.
Not understanding the above terms and conditions does NOT mean that 
 they do not apply to you.
If you wish to discuss the terms and conditions in further detail you can 
contact me at http://dekitarpg.wordpress.com/ or [email protected] 
 
================================================================================
 History:
=========
 D /M /Y
 18/10/2o12 - wrote script,
================================================================================
 INSTRUCTIONS:
==============
 Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
 
=end #==========================================================================#
module Dekita__Enemy_HP_MP_BASIC
 
  # CUSTOMISATION OPTIONS
 
  Enemy_Info_Column =[
  [:mhp],
  [:mmp],
  ]#
 
  # MaxHP Settings
  MHP_Color_1 = Color.new(0, 50, 0, 100)  
  MHP_Color_2 = Color.new(0, 255, 0, 150)  
 
  # MaxMP Settings
  MMP_Color_1 = Color.new(0, 0, 50) 
  MMP_Color_2 = Color.new(0, 0, 255)
 
  Gauge_Width = (Graphics.width / 4 - 12)
 
 
  # CUSTOMISATION OPTIONS END!
  p 'Loaded : DPBz - Basic Enemy Info'
end # Dekita__Enemy_HP_MP_BASIC
 
$imported = {} if $imported.nil?
$imported[:Dekita__Basic_Enemy_Info] = true
 
#==============================================================================
class Window_BattleEnemy < Window_Selectable
#==============================================================================
 
# // Overwrite method
def col_max
  return 1
end
 
 
# // Alias method
alias basic_enemy_info draw_item
def draw_item(index)
  basic_enemy_info(index)
  e_i_index = $game_troop.alive_members[0]
  e_i_index1 = $game_troop.alive_members[1]
  e_i_index2 = $game_troop.alive_members[2]
  e_i_index3 = $game_troop.alive_members[3]
  e_i_index4 = $game_troop.alive_members[4]
  e_i_index5 = $game_troop.alive_members[5]
  e_i_index6 = $game_troop.alive_members[6]
  e_i_index7 = $game_troop.alive_members[7]
  draw_enemy_info_column(e_i_index, 0)
  if !$game_troop.alive_members[1].nil?
  draw_enemy_info_column(e_i_index1, line_height * 1)
  end
  if !$game_troop.alive_members[2].nil?
  draw_enemy_info_column(e_i_index2, line_height * 2)
  end
  if !$game_troop.alive_members[3].nil?
  draw_enemy_info_column(e_i_index3, line_height * 3)
  end
  if !$game_troop.alive_members[4].nil?
  draw_enemy_info_column(e_i_index4, line_height * 4)
  end
  if !$game_troop.alive_members[5].nil?
  draw_enemy_info_column(e_i_index5, line_height * 5)
  end
  if !$game_troop.alive_members[6].nil?
  draw_enemy_info_column(e_i_index6, line_height * 6)
  end
  if !$game_troop.alive_members[7].nil?
  draw_enemy_info_column(e_i_index7, line_height * 7)
  end
end
 
# // New method
def draw_enemy_info_column(index, dy)
  dx = window_width / 3 * 1
  dw = Dekita__Enemy_HP_MP_BASIC::Gauge_Width
  for information in Dekita__Enemy_HP_MP_BASIC::Enemy_Info_Column
    draw_basic_enemy_info(information, index, dx, dy, dw)
    dx += (dw+2)
  end
end
 
# // New method 
def draw_basic_enemy_info(stat_info, target, dx, dy, dw)
  dpbz_target = target
  case stat_info[0]
  when :mhp
    text = Vocab.hp
    value = "#{dpbz_target.hp.to_i} / #{dpbz_target.mhp}"
    rate = dpbz_target.hp_rate
    color1 = Dekita__Enemy_HP_MP_BASIC::MHP_Color_1
    color2 = Dekita__Enemy_HP_MP_BASIC::MHP_Color_2
  when :mmp
    text = Vocab.mp
    value = "#{dpbz_target.mp.to_i} / #{dpbz_target.mmp}"
    rate = dpbz_target.mp_rate
    color1 = Dekita__Enemy_HP_MP_BASIC::MMP_Color_1
    color2 = Dekita__Enemy_HP_MP_BASIC::MMP_Color_2
  else; return dy
  end
  contents.font.size = 18
  change_color(system_color)
  draw_gauge(dx, dy-2, dw-4, rate, color1, color2)
  draw_text(dx, dy-2, dw-2, line_height, text, 0)
  change_color(normal_color)
  draw_text(dx, dy-2, dw-2, line_height, value, 2)
  return dy + line_height
end
 
 
end # Window_BattleEnemy
#===============================================================================#
#                               - SCRIPT END -                                  #
#===============================================================================#
#                      http://dekitarpg.wordpress.com/                          #
#===============================================================================#
Будь таким, каким хочешь казаться.
Администратор запретил публиковать записи гостям.

Помогите добавить тп бар к скрипту 8 года 2 мес. назад #89747

  • Amphilohiy
  • Amphilohiy аватар
  • Вне сайта
  • Светлый дракон
  • Сообщений: 547
  • Спасибо получено: 666
  • Победитель Сбитой кодировкиОраторПрограммист Ruby2 место ГотвУчитель
Мои глаза жжет! Боль, невыносимая боль!
Вот это вроде работает:
ВНИМАНИЕ: Спойлер! [ Нажмите, чтобы развернуть ]
Радует меня это лицензионное соглашение, по сути ты его уже нарушил, запостив сюда код.
Я верю, что иногда компьютер сбоит, и он выдает неожиданные результаты, но остальные 100% случаев это чья-то криворукость.
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Ren310, Демий

Помогите добавить тп бар к скрипту 8 года 2 мес. назад #89752

  • Seibur
  • Seibur аватар
  • Вне сайта
  • Просветлённый
  • Сообщений: 371
  • Спасибо получено: 308
  • ВетеранРазработчик
Спасибо, Амфи) Все работает^^
Будь таким, каким хочешь казаться.
Администратор запретил публиковать записи гостям.
Модераторы: NeKotZima
Время создания страницы: 0.292 секунд