Ekwipunek jak w FF7
Wystąpiły następujące problemy:
Warning [2] Cannot modify header information - headers already sent by (output started at /home/ayene/public_html/forum/inc/languages/polish/global.lang.php:1) - Line: 411 - File: inc/plugins/google_seo/redirect.php PHP 5.6.40 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/plugins/google_seo/redirect.php 411 header
/inc/plugins/google_seo/redirect.php 399 google_seo_redirect_header
/inc/class_plugins.php 101 google_seo_redirect_hook
/global.php 101 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] Cannot modify header information - headers already sent by (output started at /home/ayene/public_html/forum/inc/languages/polish/global.lang.php:1) - Line: 1710 - File: inc/functions.php PHP 5.6.40 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/functions.php 1710 header
/inc/functions.php 1772 my_setcookie
/inc/functions_indicators.php 42 my_set_array_cookie
/showthread.php 578 mark_thread_read
Warning [2] Cannot modify header information - headers already sent by (output started at /home/ayene/public_html/forum/inc/languages/polish/global.lang.php:1) - Line: 1710 - File: inc/functions.php PHP 5.6.40 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/functions.php 1710 header
/inc/functions.php 1772 my_setcookie
/inc/functions_indicators.php 218 my_set_array_cookie
/inc/functions_indicators.php 48 mark_forum_read
/showthread.php 578 mark_thread_read



Aktualny czas: 26-04-24, 03:17 Witaj! Przejdź do zakładki Logowanie lub Rejestracja


Wątek zamknięty 
[VX] Ekwipunek jak w FF7
MrCorniszon Offline
*


Liczba postów: 9
Dołączył: 18-06-13

Pomógł: 0



Post: #1
Ekwipunek jak w FF7

Hej to znowu ja i znów proszę o skrypt.

Potrzebuję czegoś co zmieni ekwipunek postaci na taki jak w Final Fantasy 7. Zamiast pięciu "slotów" (broń, tarcza, hełm, zbroja i akcesoria) tylko trzy (broń, zbroja i akcesoria).
(Ten post był ostatnio modyfikowany: 07-09-13 12:00 przez MrCorniszon.)
07-09-13 12:00
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Ayene Offline
*


Liczba postów: 758
Dołączył: 09-04-13

Pomógł: 112



Post: #2
RE: Ekwipunek jak w FF7

Wrzuć link do skryptu w tym temacie.

[Obrazek: aye_furniture_pres.png]
07-09-13 14:38
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
MrCorniszon Offline
*


Liczba postów: 9
Dołączył: 18-06-13

Pomógł: 0



Post: #3
RE: Ekwipunek jak w FF7

Ale ja nie mam żadnego skryptu. Chodzi mi o to żeby bohater nie miał 5 slotów tylko 3/2.
Normalnie ma 5:
Broń
Tarcza
Hełm
Zbroja
Akcesoria
Ja chcę coś takiego jak w FF7 czyli:
Broń
Zbroja
07-09-13 19:01
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a):
Ayene Offline
*


Liczba postów: 758
Dołączył: 09-04-13

Pomógł: 112



Post: #4
RE: Ekwipunek jak w FF7

OK, źle zrozumiałam. Myślałam, że chcesz przerobić jakiś skrypt.

Możesz skorzystać ze skryptu KGC na rozszerzenie ekwipunku:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ Tytuł: Equipment Extension  /  Rozszerzenie Ekwipunku
#_/ Autor: KGC
#_/ Tłumaczenie i korekta: Ayene
#_/ www.ultimateam.pl
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/   Skrypt umożliwia dodanie nowych lokacji w ekwipunku i wyróżnienie
#_/   przedmiotów (takich jak Buty lub Naramienniki), które dotąd były
#_/   zaklasyfikowane jako 'akcesoria'.
#_/----------------------------------------------------------------------------
#_/  INSTRUKCJA
#_/
#_/  By skorzystać z funkcji musisz umieścić w oknie 'Notes' pancerza w bazie
#_/  danych notatkę <equipkind TypEkwipunku>, gdzie TypEkwipunku to konkretna
#_/  lokacja zdefiniowana poniżej (patrz EXTRA_EQUIP_KIND), np.
#_/  Wpisanie notatki <equipkind Nogi> sprawi, że wybrany pancerz będzie
#_/  przyporządkowany nogom.
#_/
#_/
#_/  Dodatkowe polecenia
#_/
#_/  * set_actor_equip_type(ID_Postaci, [TypEkwipunku])
#_/  Pozwala ręcznie ustalić sloty ekwipunku konkretnej postaci.
#_/  np. set_actor_equip_type(2, [0, 2, 3, 3, 3])
#_/  Gdzie:
#_/  0:Broń / Tarcza   1:Hełm   2:Zbroja   3:Akcesoria   4:"Nogi"   5:"Ramiona"
#_/  Tym samym postać o nr id 2 będzie miała w ekwipunku:
#_/  broń i tarczę, hełm oraz trzy akcesoria.
#_/
#_/  * change_actor_equipment(ID_Postaci, slot_ekwipunku, ID_Przedmiotu)
#_/  Pozwala zmienić ekwipunek wybranej postaci pod warunkiem, że wybrany
#_/  przedmiot znajduje się w inwentarzu drużyny.
#_/  UWAGA! slot_ekwipunku różni się od Typu Ekwipnuku:
#_/  0:Broń   1: Tarcza   2:Hełm   3:Zbroja   4:Akcesoria   5:"Nogi"   6:"Ramiona"
#_/    
#_/  np.  change_actor_equipment(1, 3, 15)
#_/  Zmieni bohaterowi o id 1 (Ralph domyślnie) zbroją (3) na Chainmail
#_/  (15 w bazie danych)
#_/  Wskazówka: ustawienie ID_Przedmiotu na 0 usunie go z ekwipunku (nadal będzie
#_/  w inwentarzu).
#_/
#_/============================================================================
#_/ Instalacja: Umieść skrypt nad Main
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#=============================================================================#
#                           KONFIGURACJA                                      #
#=============================================================================#

module KGC
  module EquipExtension
  # Dodatkowe rodzaje ekwipunku:
  # Tutaj możesz dodać nowe 'sloty' ekwipunku.
  # Każdej nowej lokacji przyporządkowany jest numer.
  # Pierwsze cztery numery przyporządkowane czterem typom ekwipunku
  # (Tarcza, Hełm, Zbroja, Akcesoria) to kolejno 0, 1, 2, 3.
  # Poniższe dwa typy zatem mają przydzielone cyfry 4 i 5. Oczywiście można dodać
  # ich dowolną ilość.
  # Przykład: EXTRA_EQUIP_KIND = ["Nogi", "Ramiona", "Księga zaklęć"]
  
  EXTRA_EQUIP_KIND = ["Nogi", "Ramiona"]

  # Lokacje ekwipunku
  # Tutaj można wybrać listę lokacji, która wyświetlać się będzie w menu.
  # Istotna jest kolejność!                
  #  0:Broń / Tarcza   1:Hełm   2:Zbroja   3:Akcesoria   4:"Nogi"   5:"Ramiona"

  EQUIP_TYPE = [2]
  end
end

#=============================================================================#
#                          KONIEC KONFIGURACJI                                #
#=============================================================================#

$imported = {} if $imported == nil
$imported["EquipExtension"] = true

module KGC::EquipExtension
#==============================================================================
# KGC::EquipExtension::Regexp
#==============================================================================

# Wpisz <equipkind Lokacja> w Notatkach przedmiotu w bazie danych i w miejsce
# lokacji wpisz rodzaj ekwipunku.
# Przykład: <equipkind Nogi> lub <EQUIP_KIND Nogi> sprawi, że dany przedmiot
# będzie przyporządkowany nogom

  module Regexp        
    module Armor      
      EQUIP_KIND = /<(?:EQUIP_KIND|equipkind)\s*(.+)>/i
    end    
  end
end

#==============================================================================
# KGC::Commands
#==============================================================================

module KGC
module Commands
  module_function
  
  def set_actor_equip_type(actor_id, equip_type = nil)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.equip_type = equip_type
  end
  
  def change_actor_equipment(actor_id, index, item_id)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.change_equip_by_id(index, item_id)
  end
end
end

class Game_Interpreter
  include KGC::Commands
end

#==============================================================================
# Vocab
#==============================================================================

module Vocab
  def self.extra_armor(index)
    return KGC::EquipExtension::EXTRA_EQUIP_KIND[index]
  end
end

#==============================================================================
# RPG::BaseItem
#==============================================================================

class RPG::BaseItem
  def create_equip_extension_cache
    @__equip_type = []
  end
  def equip_type
    create_equip_extension_cache if @__equip_type == nil
    return @__equip_type
  end
end
#==============================================================================
# RPG::Armor
#==============================================================================

class RPG::Armor < RPG::BaseItem
  
  def create_equip_extension_cache
    super
    @__kind = -1

    self.note.split(/[\r\n]+/).each { |line|
      if line =~ KGC::EquipExtension::Regexp::Armor::EQUIP_KIND
        e_index = KGC::EquipExtension::EXTRA_EQUIP_KIND.index($1)
        next if e_index == nil
        @__kind = e_index + 4
      end
    }
  end

unless $@
  alias kind_KGC_EquipExtension kind
  def kind
    create_equip_extension_cache if @__kind == nil
    return (@__kind == -1 ? kind_KGC_EquipExtension : @__kind)
  end
end
end


#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  
  attr_writer   :equip_type
  
  alias setup_KGC_EquipExtension setup
  def setup(actor_id)
    actor = $data_actors[actor_id]
    @extra_armor_id = []
    setup_KGC_EquipExtension(actor_id)
  end
  
  def equip_type
    if @equip_type.is_a?(Array)
      return @equip_type
    else
      return KGC::EquipExtension::EQUIP_TYPE
    end
  end
  
  def armor_number
    return equip_type.size
  end
  
  def extra_armor_number
    return [armor_number - 4, 0].max
  end
  
  def extra_armor_id
    @extra_armor_id = [] if @extra_armor_id == nil
    return @extra_armor_id
  end
  
  alias armors_KGC_EquipExtension armors
  def armors
    result = armors_KGC_EquipExtension
    extra_armor_number.times { |i|
      armor_id = extra_armor_id[i]
      result << (armor_id == nil ? nil : $data_armors[armor_id])
    }
    return result
  end
  
  alias change_equip_KGC_EquipExtension change_equip
  def change_equip(equip_type, item, test = false)
    change_equip_KGC_EquipExtension(equip_type, item, test)

    if extra_armor_number > 0
      item_id = item == nil ? 0 : item.id
      case equip_type
      when 5..armor_number
        @extra_armor_id = [] if @extra_armor_id == nil
        @extra_armor_id[equip_type - 5] = item_id
      end
    end

    restore_battle_skill if $imported["SkillCPSystem"]
    restore_passive_rev  if $imported["PassiveSkill"]
  end
  
  
  alias discard_equip_KGC_EquipExtension discard_equip
  def discard_equip(item)
    last_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]

    discard_equip_KGC_EquipExtension(item)

    curr_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
    return unless item.is_a?(RPG::Armor)
    return if last_armors != curr_armors
    
    extra_armor_number.times { |i|
      if extra_armor_id[i] == item.id
        @extra_armor_id[i] = 0
        break
      end
    }

    restore_battle_skill if $imported["SkillCPSystem"]
    restore_passive_rev  if $imported["PassiveSkill"]
  end
  
  alias class_id_equal_KGC_EquipExtension class_id=
  def class_id=(class_id)
    class_id_equal_KGC_EquipExtension(class_id)
    return if extra_armor_number == 0      
    for i in 5..armor_number
      change_equip(i, nil) unless equippable?(equips[i])
    end
  end    
end

#==============================================================================
# Window_Equip
#==============================================================================

class Window_Equip < Window_Selectable
  
  def refresh
    self.contents.clear
    @data = @actor.equips.clone
    @item_max = [@data.size, @actor.armor_number + 1].min
    create_contents
    
    self.contents.font.color = system_color
    if @actor.two_swords_style
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon1)
      self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab::weapon2)
    else
      self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon)
      name = armor_slot_name(@actor.equip_type[0])
      self.contents.draw_text(4, WLH * 1, 92, WLH, name)
    end
    for i in 1...@actor.armor_number
      name = armor_slot_name(@actor.equip_type[i])
      self.contents.draw_text(4, WLH * (i + 1), 92, WLH, name)
    end
    
    rect = Rect.new(92, 0, self.width - 128, WLH)
    @item_max.times { |i|
      rect.y = WLH * i
      draw_item_name(@data[i], rect.x, rect.y)    }
  end
  
  def armor_slot_name(kind)
    case kind
    when 0..3
      return eval("Vocab.armor#{kind + 1}")
    else
      return Vocab.extra_armor(kind - 4)
    end
  end


unless $imported["ExtendedEquipScene"]
  
  def cursor_pagedown
    return if Input.repeat?(Input::R)
    super
  end
  
  def cursor_pageup
    return if Input.repeat?(Input::L)
    super
  end
  
  def update
    super
    return unless self.active

    if Input.repeat?(Input::RIGHT)
      cursor_pagedown
    elsif Input.repeat?(Input::LEFT)
      cursor_pageup
    end
  end
end

end

#==============================================================================
# Window_Status
#==============================================================================

class Window_Status < Window_Base
  def draw_equipments(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
    item_number = [@actor.equips.size, @actor.armor_number + 1].min
    item_number.times { |i|
      draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1)) }
  end
end


#==============================================================================
# Window_ShopStatus
#==============================================================================

class Window_ShopStatus < Window_Base
  def draw_actor_parameter_change(actor, x, y)
    return if @item.is_a?(RPG::Item)
    enabled = actor.equippable?(@item)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(x, y, 200, WLH, actor.name)
    if @item.is_a?(RPG::Weapon)
      item1 = weaker_weapon(actor)
    elsif actor.two_swords_style and @item.kind == 0
      item1 = nil
    else
      index = actor.equip_type.index(@item.kind)
      item1 = (index != nil ? actor.equips[1 + index] : nil)
    end
    if enabled
      if @item.is_a?(RPG::Weapon)
        atk1 = item1 == nil ? 0 : item1.atk
        atk2 = @item == nil ? 0 : @item.atk
        change = atk2 - atk1
      else
        def1 = item1 == nil ? 0 : item1.def
        def2 = @item == nil ? 0 : @item.def
        change = def2 - def1
      end
      self.contents.draw_text(x, y, 200, WLH, sprintf("%+d", change), 2)
    end
    draw_item_name(item1, x, y + WLH, enabled)
  end
end

#=========================================================================
# Scene_Equip
#=========================================================================

class Scene_Equip < Scene_Base

  EQUIP_TYPE_MAX = KGC::EquipExtension::EXTRA_EQUIP_KIND.size + 5

  alias initialize_KGC_EquipExtension initialize
  def initialize(actor_index = 0, equip_index = 0)
    initialize_KGC_EquipExtension(actor_index, equip_index)

    unit = ($imported["LargeParty"] ?
      $game_party.all_members : $game_party.members)
    actor = unit[actor_index]
    @equip_index = [@equip_index, actor.armor_number].min
  end

  alias create_item_windows_KGC_EquipExtension create_item_windows
  def create_item_windows
    create_item_windows_KGC_EquipExtension

    kind = equip_kind(@equip_index)
    EQUIP_TYPE_MAX.times { |i|
      @item_windows[i].visible = (kind == i)
    }
  end

  def update_item_windows
    kind = equip_kind(@equip_window.index)
    for i in 0...EQUIP_TYPE_MAX
      @item_windows[i].visible = (kind == i)
      @item_windows[i].update
    end
    @item_window = @item_windows[kind]
  end
  
  def equip_kind(index)
    if index == 0
      return 0
    else
      return @actor.equip_type[index - 1] + 1
    end
  end

unless $imported["ExtendedEquipScene"]

  def update_status_window
    if @equip_window.active
      @status_window.set_new_parameters(nil, nil, nil, nil)
    elsif @item_window.active
      temp_actor = Marshal.load(Marshal.dump(@actor))
      temp_actor.change_equip(@equip_window.index, @item_window.item, true)
      new_atk = temp_actor.atk
      new_def = temp_actor.def
      new_spi = temp_actor.spi
      new_agi = temp_actor.agi
      @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
    end
    @status_window.update
  end
end

alias update_item_selection_KGC_EquipExtension update_item_selection
  def update_item_selection
    if Input.trigger?(Input::C)      
      index = @equip_window.index
      item = @item_window.item
      unless item == nil ||
        @actor.equippable?(item)
        Sound.play_buzzer
        return
      end
    end

    update_item_selection_KGC_EquipExtension
  end
end

#=========================================================================
# Scene_File
#=========================================================================

class Scene_File < Scene_Base
  alias read_save_data_KGC_EquipExtension read_save_data
  def read_save_data(file)
    read_save_data_KGC_EquipExtension(file)
    Graphics.frame_reset
  end
end

[Obrazek: aye_furniture_pres.png]
08-09-13 13:15
Znajdź wszystkie posty użytkownika
"Pomógł" przyznał(a): MrCorniszon
Wątek zamknięty 


Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości

Kontakt | Ultima Forum | Wróć do góry | Wróć do forów | Wersja bez grafiki | RSS
Powered By MyBB. © 2013 MyBB Group. All Rights Reserved.
Skórka by Ayene.