Jump to content
Rpg²S Forum

Andre4e

Utenti
  • Posts

    158
  • Joined

  • Last visited

Posts posted by Andre4e

  1. In questo modo si vede il numero di quanto hai recuperato solo se hp < hp max:

     

    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    #_/ Rigenerazione in difesa: Translated by Ojiro e in italiano da payam
    #_/------------------------------------------ ----------------------------------
    #_/ Rigenerazione di un personaggio che si difende
    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
    
    begin
    
    class Scene_Battle
    	# HP Regen %
    	RECOVER_HP_RATE = 7
    	# SP Regen %
    	RECOVER_SP_RATE = 5
    end
    
    
    #============================================ ======================
    # ? Scene_Battle (4)
    #-------------------------------------------- ----------------------------------
    # E' la scena che segue dopo l'attacco
    #============================================ ======================
    
    class Scene_Battle
    	#-------------------------------------------- ------------------------------
    	# Compila i risultati basilari di combattimento
    	#-------------------------------------------- ------------------------------
    	alias make_basic_action_result_KGC_GuardRecover make_basic_action_result
    	def make_basic_action_result
    		# Esegue il processo di origine
    		make_basic_action_result_KGC_GuardRecover
    		
    		# Avviene quando si sceglie un'altr'azione. Cio? non la difesa.
    		return if @active_battler.current_action.basic != 1
    		# Segue il calcolo di rigenerazione
    		
    		recover_hp = @active_battler.maxhp * RECOVER_HP_RATE / 100
    		recover_sp = @active_battler.maxsp * RECOVER_SP_RATE / 100
    		#if recover_hp < 0
    		if @active_battler.hp != @active_battler.maxhp
    			@active_battler.damage = -(@active_battler.maxhp * RECOVER_HP_RATE / 100)#-recover_hp
    			@active_battler.damage_pop = true
    			#end
    			@active_battler.hp += (@active_battler.maxhp * RECOVER_HP_RATE / 100)#recover_hp
    		end
    		#@active_battler.hp += recover_hp
    		
    		#if recover_sp < 0
    		if @active_battler.sp != @active_battler.maxsp
    			#@active_battler.damage = "#{$data_system.words.sp}+ #{recover_sp}"
    			#end
    			@active_battler.sp += @active_battler.maxsp * RECOVER_SP_RATE / 100#recover_sp
    		end
    		# Indique la valeur de reg?n?ration
    		@target_battlers.push(@active_battler)
    		
    	end
    end
    end
    
    
  2. Ma non sarebbe più bello colorare il numero che sta dopo?

    Io nel mio window_equip_left, quando cambio equip se metto un oggetto + forte mi viene la scritta in verde tipo

     

    100 >> 150

     

    quando è + debole

     

    100 >>80

     

    e quando è uguale non cambia colore

     

    Comunque bravo!

  3. Nel mio game_actor era gia in giapponese perchè io ho la versione 1.03 di rpg maker xp!

    Ci ho messo 3 giorni per capire come fare, di certo non l'ho rubato a nessuno!

    io ho modificato solo exp_s e next_rest_exp_s

    Ve lo posso giurare su chi volete!

  4. L'esperienza viene visualizzata in questo modo:

     

    Esperienza accumulata in tutti i livelli / Esperienza per arrivare al prossimo livello

     

    Esempio siamo appena arrivati al liv 10 e l'esperienza viene visualizzata cosi

    es: 700 / 1000

     

    Con la modifica che ho apportato io l'esperienza viene visualizzata cosi

     

    0 / 300

     

    Cioè esperienza accumulata nel livello corrente / esperienza x raggiungere il prossimo livello!

    Che è la stessa cosa di prima solo che ha un aspetto più gradevole!

    Se usiamo il metodo base alla fine ci portiamo dietro numeri enormi che ci danno noia a vederli!

     

     

    Se volete modificare l'esperienza in questo modo andate nella classe Game_actor

     

    Cercate questo blocco

    def exp_s

    return @exp_list[@level+1] > 0 ? @exp.to_s : "-------"

    end

    #--------------------------------------------------------------------------

    # * Get Next Level EXP String

    #--------------------------------------------------------------------------

    def next_exp_s

    return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"

    end

    #--------------------------------------------------------------------------

    # * Get Until Next Level EXP String

    #--------------------------------------------------------------------------

    def next_rest_exp_s

    return @exp_list[@level+1] > 0 ?

    (@exp_list[@level+1] - @exp).to_s : "-------"

    end

     

    e sostituitelo con questo:

     

    def exp_s

    return @exp_list[@level+1] > 0 ? (@exp - @exp_list[@level]).to_s : "-------"

    end

    #--------------------------------------------------------------------------

    # ● 次のレベルの EXP の文字列取得

    #--------------------------------------------------------------------------

    def next_exp_s

    return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"

    end

    #--------------------------------------------------------------------------

    # ● 次のレベルまでの EXP の文字列取得

    #--------------------------------------------------------------------------

    def next_rest_exp_s

    return @exp_list[@level+1] > 0 ?

    (@exp_list[@level+1] - @exp_list[@level]).to_s : "-------"

    end

     

     

    Poi andate in window_Base e cercate questa stringa

     

    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)

     

    e sostituitela con questa

    self.contents.draw_text(x + 120, y, 84, 32, actor.next_rest_exp_s)
  5. Dopo 3000 ore ci sono riuscito finalmente

     

     

    Ecco qua la banca x soli oggetti

    Ho messo font arial poi cambialo come vuoi te

    dimmi se ci sono problemi!

     

     

     

     

     

     

    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    #_/script da fare nell'evento: --> chiama_banca <--

    #_/----------------------------------------------------------------------------

    #_/ ??????????????????????????

    #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

    module KGC

    $game_special_elements = {}

    $imported = {}

    $data_states = load_data("Data/States.rxdata")

    $data_system = load_data("Data/System.rxdata")

    end

    #==============================================================================

    # ? ???????? ?

    #==============================================================================

     

    module KGC

     

    # ??????????????

    DEPOSITORY_COMMAND = [

     

    "Deposita Oggetti", # ????????

    "Ritira Oggetti",

    # ?????????

    ]

    # ????????????

    DEPOSITORY_HELP = [

     

    "Deposita Oggetti", # ????????

    "Ritira Oggetti" ,

    # ?????????

    ]

     

     

     

    # ????????????????(????????)

     

    DEPOSIT_ITEM = "Deposita Oggetti"

    # ?????????????????(???????)

    WDEPOSIT_ITEM = "Ritira Oggetti"

    end

     

    #???????????????????????????????????????

     

    $imported = {} if $imported == nil

    $imported["Banca"] = true

     

    #--------------------------------------------------------------------------

    # ? ????????

    #--------------------------------------------------------------------------

    def chiama_banca

    # ???????????

    $game_player.straighten

    # ???????????

    $scene = Scene_Depository.new

    end

     

    #???????????????????????????????????????

     

    #==============================================================================

    # ¦ Game_Party

    #==============================================================================

     

    class Game_Party

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    alias initialize_KGC_Depository initialize

    def initialize

    # ???????

    initialize_KGC_Depository

    $defaultfonttype = "Arial"

     

     

    @deposit_item, @deposit_weapon, @deposit_armor = [], [], []

    end

    #--------------------------------------------------------------------------

    # ? ??????

    #--------------------------------------------------------------------------

     

    #--------------------------------------------------------------------------

    # ? ??????

    # number : ???

    #--------------------------------------------------------------------------

    #--------------------------------------------------------------------------

    # ? ??????

    # number : ???

    #--------------------------------------------------------------------------

     

    #--------------------------------------------------------------------------

    # ? ?????????

    # id : ID

    #--------------------------------------------------------------------------

    def deposit_item_number(id)

    $defaultfonttype = "Arial"

    @deposit_item = [] if @deposit_item == nil

    return @deposit_item[id] != nil ? @deposit_item[id] : 0

    end

    #--------------------------------------------------------------------------

    # ? ?????????

    # id : ID

    # number : ??

    #--------------------------------------------------------------------------

    def gain_deposit_item(id, number)

    $defaultfonttype = "Arial"

    @deposit_item = [] if @deposit_item == nil

    @deposit_item[id] = 0 if @deposit_item[id] == nil

    @deposit_item[id] += number

    end

    #--------------------------------------------------------------------------

    # ? ?????????

    # id : ID

    # number : ??

    #--------------------------------------------------------------------------

    def lose_deposit_item(id, number)

    $defaultfonttype = "Arial"

    self.gain_deposit_item(id, -number)

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # id : ID

    #--------------------------------------------------------------------------

    def deposit_weapon_number(id)

    @deposit_weapon = [] if @deposit_weapon == nil

    return @deposit_weapon[id] != nil ? @deposit_weapon[id] : 0

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # id : ID

    # number : ??

    #--------------------------------------------------------------------------

    def gain_deposit_weapon(id, number)

    @deposit_weapon = [] if @deposit_weapon == nil

    @deposit_weapon[id] = 0 if @deposit_weapon[id] == nil

    @deposit_weapon[id] += number

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # id : ID

    # number : ??

    #--------------------------------------------------------------------------

    def lose_deposit_weapon(id, number)

    self.gain_deposit_weapon(id, -number)

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # id : ID

    #--------------------------------------------------------------------------

    def deposit_armor_number(id)

    @deposit_armor = [] if @deposit_armor == nil

    return @deposit_armor[id] != nil ? @deposit_armor[id] : 0

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # id : ID

    # number : ??

    #--------------------------------------------------------------------------

    def gain_deposit_armor(id, number)

    @deposit_armor = [] if @deposit_armor == nil

    @deposit_armor[id] = 0 if @deposit_armor[id] == nil

    @deposit_armor[id] += number

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # id : ID

    # number : ??

    #--------------------------------------------------------------------------

    def lose_deposit_armor(id, number)

    self.gain_deposit_armor(id, -number)

    end

    end

     

    #???????????????????????????????????????

     

    #==============================================================================

    # ¦ Window_DepositoryCommand

    #------------------------------------------------------------------------------

    # ???????????????????????

    #==============================================================================

     

    class Window_DepositoryCommand < Window_Selectable

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def initialize

    super(0, 64, 640, 64)

    self.y = 128 if $imported["HelpExtension"]

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

    self.contents.font.name = "Arial"

    self.contents.font.size = 20

    # ?????????

    @commands = KGC::DEPOSITORY_COMMAND

    @item_max = 2 #@commands.size

    @column_max = 2 #@commands.size

    @item_width = (width - 32) / 2 #@commands.size

    self.back_opacity = 160

    self.index = 0

    refresh

    end

    #--------------------------------------------------------------------------

    # ? ??????

    #--------------------------------------------------------------------------

    def refresh

    for i in 0...2 #@commands.size

    rect = Rect.new(@item_width * i, 0, @item_width, 32)

    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

    self.contents.font.color = system_color

    self.contents.font.name = "Arial"

    self.contents.draw_text(rect, @commands, 1)

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def update_cursor_rect

    if index != -1

    self.cursor_rect.set(@item_width * index, 0, @item_width, 32)

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def update_help

    $defaultfonttype = "Arial"

    @help_window.set_text(KGC::DEPOSITORY_HELP[self.index])

    end

    end

     

    #???????????????????????????????????????

     

    #==============================================================================

    #

    #------------------------------------------------------------------------------

    # ???????????????????????

    #==============================================================================

     

     

     

    #==============================================================================

    # ¦ Window_DepositoryItem

    #------------------------------------------------------------------------------

    # ???????????????????????????????

    #==============================================================================

     

    class Window_DepositoryItem < Window_Selectable

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def initialize

    super(0, 128, 640, 352)

    if $imported["HelpExtension"]

    self.y = 192

    self.height = 288

    end

    self.back_opacity = 160

    self.active = false

    self.visible = false

    @column_max = 2

    #self.contents.font.name = "Arial"

    #self.contents.font.size = 20

    self.index = 0

    end

    #--------------------------------------------------------------------------

    # ? ???????

    #--------------------------------------------------------------------------

    def item

    return @data[self.index]

    end

    #--------------------------------------------------------------------------

    # ? ??????

    # type : ??

    #--------------------------------------------------------------------------

    def refresh(type)

    if self.contents != nil

    self.contents.dispose

    self.contents = nil

    end

    @data = []

    self.index = 0

    # ????·??·?????

    if type == 0

    for i in 1...$data_items.size

    if $game_party.item_number(i) > 0

    @data.push($data_items)

    end

    end

    for i in 1...$data_weapons.size

    if $game_party.weapon_number(i) > 0

    @data.push($data_weapons)

    end

    end

    for i in 1...$data_armors.size

    if $game_party.armor_number(i) > 0

    @data.push($data_armors)

    end

    end

    else

    for i in 1...$data_items.size

    if $game_party.deposit_item_number(i) > 0

    @data.push($data_items)

    end

    end

    for i in 1...$data_weapons.size

    if $game_party.deposit_weapon_number(i) > 0

    @data.push($data_weapons)

    end

    end

    for i in 1...$data_armors.size

    if $game_party.deposit_armor_number(i) > 0

    @data.push($data_armors)

    end

    end

     

    end

    # ???? 0 ??????????????????????

    @item_max = @data.size

    if @item_max > 0

    self.contents = Bitmap.new(width - 32, row_max * 32)

    for i in 0...@item_max

    draw_item(i, type)

    end

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????

    # index : ????

    # type : ??

    #--------------------------------------------------------------------------

    def draw_item(index, type)

    $defaultfonttype = "Arial"

    item = @data[index]

    case item

    when RPG::Item

    number = type == 0 ? $game_party.item_number(item.id) :

    $game_party.deposit_item_number(item.id)

    when RPG::Weapon

    number = type == 0 ? $game_party.weapon_number(item.id) :

    $game_party.deposit_weapon_number(item.id)

    when RPG::Armor

    number = type == 0 ? $game_party.armor_number(item.id) :

    $game_party.deposit_armor_number(item.id)

    end

    x = 4 + index % 2 * (288 + 32)

    y = index / 2 * 32

    rect = Rect.new(x, y, self.width / @column_max - 32, 32)

    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

    bitmap = RPG::Cache.icon(item.icon_name)

    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))

    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)

    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)

    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)

    end

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def update_help

    $defaultfonttype = "Arial"

     

    @help_window.set_text(self.item == nil ? "" : self.item.description)

    end

    end

     

    #???????????????????????????????????????

     

    #==============================================================================

    # ¦ Window_DepositoryNumber

    #------------------------------------------------------------------------------

    # ????????????????????????

    #==============================================================================

     

    class Window_DepositoryNumber < Window_Base

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def initialize

    $defaultfonttype = "Arial"

    @digits_max, @number = 2, 0

    # ??????????????? (0~9 ??????)

    dummy_bitmap = Bitmap.new(32, 32)

    @cursor_width = dummy_bitmap.text_size("0").width + 8

    dummy_bitmap.dispose

    @default_size = @cursor_width * @digits_max + 32

    super(0, 0, @default_size, 128)

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

    self.z = 1000

    self.back_opacity = 160

    self.active = false

    self.visible = false

    @index = 0

    @item = nil

    refresh

    update_cursor_rect

    self.contents.font.name = "Arial"

    self.contents.font.size = 20

    end

    #--------------------------------------------------------------------------

    # ? ???????

    # item : ????

    #--------------------------------------------------------------------------

    def item=(item)

    @item = item

    end

    #--------------------------------------------------------------------------

    # ? ?????

    #--------------------------------------------------------------------------

    def number

    return @number

    end

    #--------------------------------------------------------------------------

    # ? ?????

    # number : ?????

    #--------------------------------------------------------------------------

    def number=(number)

    @number = [[number, 0].max, @max].min

    refresh

    end

    #--------------------------------------------------------------------------

    # ? ?????????

    #--------------------------------------------------------------------------

    def update_cursor_rect

    self.cursor_rect.set(@index * @cursor_width, 32, @cursor_width, 32)

    end

    #--------------------------------------------------------------------------

    # ? ????

    #--------------------------------------------------------------------------

    def reset(type)

    @number = 0

    @index = @digits_max - 1

    if type == 0

    case @item

    when RPG::Item

    @max = $game_party.item_number(@item.id)

    dep = $game_party.deposit_item_number(@item.id)

    when RPG::Weapon

    @max = $game_party.weapon_number(@item.id)

    dep = $game_party.deposit_weapon_number(@item.id)

    when RPG::Armor

    @max = $game_party.armor_number(@item.id)

    dep = $game_party.deposit_armor_number(@item.id)

    end

    # ??????????

    self.contents.fill_rect(0, 64, width - 32, 32, Color.new(0, 0, 0, 0))

    self.contents.font.color = system_color

    self.contents.font.name = "Arial"

    self.contents.draw_text(0, 64, width - 32, 32, "#{dep} Depositati")

    else

    case @item

    when RPG::Item

    @max = [$game_party.deposit_item_number(@item.id),

    10 ** @digits_max - $game_party.item_number(@item.id) - 1].min

    having = $game_party.item_number(@item.id)

    when RPG::Weapon

    @max = [$game_party.deposit_weapon_number(@item.id),

    10 ** @digits_max - $game_party.weapon_number(@item.id) - 1].min

    having = $game_party.weapon_number(@item.id)

    when RPG::Armor

    @max = [$game_party.deposit_armor_number(@item.id),

    10 ** @digits_max - $game_party.armor_number(@item.id) - 1].min

    having = $game_party.armor_number(@item.id)

    end

    # ??????

    self.contents.fill_rect(0, 64, width - 32, 32, Color.new(0, 0, 0, 0))

    self.contents.font.color = system_color

    self.contents.font.name = "Arial"

    self.contents.draw_text(0, 64, width - 32, 32, "#{having} Posseduti")

    end

    refresh

    end

    #--------------------------------------------------------------------------

    # ? ??????

    #--------------------------------------------------------------------------

    def refresh

    self.contents.fill_rect(0, 32, width - 32, 32, Color.new(0, 0, 0, 0))

    self.contents.font.color = normal_color

    s = sprintf("%0*d", @digits_max, @number)

    for i in 0...@digits_max

    self.contents.draw_text(i * @cursor_width + 4, 32, 32, 32, s[i,1])

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????

    # string : ?????

    #--------------------------------------------------------------------------

    def set_text(string = " ")

    self.resize(self.contents.text_size(string).width + 40)

    self.contents.fill_rect(0, 0, width - 32, 32, Color.new(0, 0, 0, 0))

    self.contents.font.color = normal_color

    self.contents.draw_text(0, 0, width - 32, 32, string, 1)

    refresh

    centering

    end

    #--------------------------------------------------------------------------

    # ? ?????

    # nw : ????

    #--------------------------------------------------------------------------

    def resize(nw)

    self.width = nw

    buf = self.contents.dup

    self.contents.dispose

    self.contents = Bitmap.new(nw - 32, 96)

    self.contents.blt(0, 0, buf, buf.rect)

    buf.dispose

    end

    #--------------------------------------------------------------------------

    # ? ????

    #--------------------------------------------------------------------------

    def centering

    self.x = 320 - self.width / 2

    self.y = 240 - self.height / 2

    end

    #--------------------------------------------------------------------------

    # ? ??????

    #--------------------------------------------------------------------------

    def update

    super

    return unless self.active

    # ????????????????

    if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)

    $game_system.se_play($data_system.cursor_se)

    # ???????????????? 0 ???

    place = 10 ** (@digits_max - 1 - @index)

    n = self.number / place % 10

    self.number -= n * place

    # ??? +1???? -1

    n = (n + 1) % 10 if Input.repeat?(Input::UP)

    n = (n + 9) % 10 if Input.repeat?(Input::DOWN)

    # ???????????

    self.number += n * place

    refresh

    end

    # ?????

    if Input.repeat?(Input::RIGHT)

    if @digits_max >= 2

    $game_system.se_play($data_system.cursor_se)

    @index = (@index + 1) % @digits_max

    end

    end

    # ?????

    if Input.repeat?(Input::LEFT)

    if @digits_max >= 2

    $game_system.se_play($data_system.cursor_se)

    @index = (@index + @digits_max - 1) % @digits_max

    end

    end

    update_cursor_rect

    end

    end

     

    #???????????????????????????????????????

     

    #==============================================================================

    # ¦ Scene_Depository

    #------------------------------------------------------------------------------

    # ??????????????????

    #==============================================================================

     

    class Scene_Depository

    #--------------------------------------------------------------------------

    # ? ?????

    #--------------------------------------------------------------------------

    def main

    # ??????????

    @spriteset = Spriteset_Map.new

    # ??????????

    if $imported["HelpExtension"]

    @dummy_window = Window_Base.new(0, 192, 640, 288)

    @help_window = Window_HelpExtension.new

    else

    @dummy_window = Window_Base.new(0, 128, 640, 352)

    @help_window = Window_Help.new

    end

    @dummy_window.back_opacity = 160

    @help_window.back_opacity = 160

    @command_window = Window_DepositoryCommand.new

     

    @item_window = Window_DepositoryItem.new

    @number_window = Window_DepositoryNumber.new

    # ?????????????

    @command_window.help_window = @help_window

    @item_window.help_window = @help_window

    # ?????????

    Graphics.transition

    # ??????

    loop do

    # ????????

    Graphics.update

    # ???????

    Input.update

    # ??????

    update

    # ????????????????

    if $scene != self

    break

    end

    end

    # ?????????

    Graphics.freeze

    # ??

    @spriteset.dispose

    @dummy_window.dispose

    @help_window.dispose

    @command_window.dispose

     

    @item_window.dispose

    @number_window.dispose

    end

    #--------------------------------------------------------------------------

    # ? ??????

    #--------------------------------------------------------------------------

    def update

    # ????????

    @dummy_window.update

    @help_window.update

    @command_window.update

     

    @item_window.update

    @number_window.update

    # ??????????????????: update_command ???

    if @command_window.active

    update_command

    return

    end

     

    # ??????????????????: update_item ???

    if @item_window.active

    update_item

    return

    end

    # ????????????????: update_number ???

    if @number_window.active

    update_number

    return

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????? (??????????????????)

    #--------------------------------------------------------------------------

    def update_command

    # B ??????????

    if Input.trigger?(Input::B)

    # ????? SE ???

    $game_system.se_play($data_system.cancel_se)

    # ??????????

    $scene = Scene_Map.new

    return

    end

    # C ??????????

    if Input.trigger?(Input::C)

    # ?? SE ???

    $game_system.se_play($data_system.decision_se)

    # ?????????

    case @command_window.index

     

     

     

     

     

    when 0

    # ??????????????

    @item_window.active = true

    @item_window.visible = true

    @item_window.refresh(0)

    when 1

    # ??????????????

    @item_window.active = true

    @item_window.visible = true

    @item_window.refresh(1)

    end

    @command_window.active = false

    # ??????????

    @dummy_window.visible = false

    return

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????? (??????????????????)

    #--------------------------------------------------------------------------

     

    #--------------------------------------------------------------------------

    # ? ?????? (??????????????????)

    #--------------------------------------------------------------------------

    def update_item

    # B ??????????

    if Input.trigger?(Input::B)

    # ????? SE ???

    $game_system.se_play($data_system.cancel_se)

    # ??????????????

    @command_window.active = true

    @item_window.active = false

    @item_window.visible = false

    @dummy_window.visible = true

    return

    end

    # C ??????????

    if Input.trigger?(Input::C)

    # ?????????

    @item = @item_window.item

    # ?????

    if @item == nil

    # ??? SE ???

    $game_system.se_play($data_system.buzzer_se)

    return

    end

    # ???????????????

    @number_window.item = @item

    # ?? SE ???

    $game_system.se_play($data_system.decision_se)

    # ?????????

    case @command_window.index

    when 0 # ???

    @number_window.set_text(KGC::DEPOSIT_ITEM)

    when 1# ????

    @number_window.set_text(KGC::WDEPOSIT_ITEM)

    end

    # ????????????

    @number_window.reset(@command_window.index)

    # ????????????

    @item_window.active = false

    @number_window.active = true

    @number_window.visible = true

    return

    end

    end

    #--------------------------------------------------------------------------

    # ? ?????? (????????????????)

    #--------------------------------------------------------------------------

    def update_number

    # B ??????????

    if Input.trigger?(Input::B)

    # ????? SE ???

    $game_system.se_play($data_system.cancel_se)

    # ??????????????

    @item_window.active = true

    @number_window.active = false

    @number_window.visible = false

    return

    end

    # C ??????????

    if Input.trigger?(Input::C)

    # ?? SE ???

    $game_system.se_play($data_system.decision_se)

    number = @number_window.number

    # ?????????

    case @command_window.index

    when 0 # ???

    case @item

    when RPG::Item

    $game_party.lose_item(@item.id, number)

    $game_party.gain_deposit_item(@item.id, number)

    when RPG::Weapon

    $game_party.lose_weapon(@item.id, number)

    $game_party.gain_deposit_weapon(@item.id, number)

    when RPG::Armor

    $game_party.lose_armor(@item.id, number)

    $game_party.gain_deposit_armor(@item.id, number)

    end

    when 1 # ????

    case @item

    when RPG::Item

    $game_party.gain_item(@item.id, number)

    $game_party.lose_deposit_item(@item.id, number)

    when RPG::Weapon

    $game_party.gain_weapon(@item.id, number)

    $game_party.lose_deposit_weapon(@item.id, number)

    when RPG::Armor

    $game_party.gain_armor(@item.id, number)

    $game_party.lose_deposit_armor(@item.id, number)

    end

    end

    # ????????????????

    @item_window.refresh(@command_window.index)

    # ??????????????

    @item_window.active = true

    @number_window.active = false

    @number_window.visible = false

    return

    end

    end

    end

     

     

     

     

     

     

     

     

     

  6. Auto Font install

    Descrizione

     

    In questo forum non mi è sembrato di trovarlo quindi lo posto qui!
    Questo script installa automaticamente i font per il tuo gioco!

    Autore

     

    Autore originale wachunga
    Tradotto da Andre4e

    Allegati

    Demo


    Screenshot:


    post-2796-1251802380_thumb.png

     

    Istruzioni per l'uso

     

    Inserite lo script in una cartella sopra main
    Istruzioni all'interno dello script
    Questo script necessita di un file "fileutils.rb" che troverete nella cartella data

    Script:

     

     

    #==============================================================================
    # ** Auto Font Install
    #------------------------------------------------------------------------------
    # Wachunga Tradotto da:
    # Version 1.1 Andre4e
    # 2006-05-26
    #------------------------------------------------------------------------------
    =begin
    
    Italiano
    
    Questo script installa automaticamente i font!
    Istruzioni:
    1)Creare una cartella all'interno della cartella del
    gioco chiamata (Vedi Module fonts), se non è stata
    cambiata la cartella si deve chiamare Fonts
    2)all'interno della cartella Fonts,inserire i
    font che si desidera installare
    3)Andare alla riga 80 al Module Fonts e inserire
    il nome del font come richiesto
    4)Questo script per funzionare ha bisogno di
    un file chiamato "fileutils.rb" e che deve esssere
    inserito nella cartella data
    5) è compatibile con sdk. se si usa l'sdk
    togliere l'asterisco alle righe 69,74,162
    
    English
    Automatically installs one or more fonts so the player doesn't have to. It
    only does this the first time the game is run and the process is quite
    transparent (notification to the player is optional).
    
    Thanks to MagicMagor for the pointer to one of the Win32 functions.
    
    FEATURES
    - handles installation of fonts so players don't have to
    - supports multiple fonts
    - process is quite transparent
    
    SETUP
    Create a Fonts folder in the game directory and place all fonts to be
    installed within. Then update the Filenames and Names constants below,
    adding an element to both arrays for each font.
    
    This script only installs the fonts on the player's computer. You'll
    still have to refer to them as necessary within the game,
    e.g. by setting a new default as follows (in main):
    Font.default_name = [Fonts::Names[0], 'MS PGothic']
    
    This script uses the SDK, available from:
    [url="http://www.rmxp.org/forums/showthread.php?t=1802"]http://www.rmxp.org/forums/showthread.php?t=1802[/url]
    
    (To remove this dependency, just delete the three SDK-labeled lines,
    including the 'end' at the bottom of the script.)
    
    This script also requires the free FileUtils module by Minero Aoki, which
    is included in the standard Ruby distribution but for some reason not
    available in RMXP. Download and place it in your scripts subdirectory:
    [url="http://s88387243.onlinehome.us/rmxp/auto_font_install/fileutils.rb"]http://s88387243.onlinehome.us/rmxp/auto_f...ll/fileutils.rb[/url]
    
    Note: if player does not have the rights to install fonts on their machine,
    this probably won't work -- but then they wouldn't be able to do it manually
    	either. :)
    	
    	=end
    	
    	#------------------------------------------------------------------------------
    	# * SDK Log Script
    	#------------------------------------------------------------------------------
    	#SDK.log('Auto Font Install', 'Wachunga', 1.1, '2006-05-26')
    	
    	#------------------------------------------------------------------------------
    	# * Begin SDK Enabled Check
    	#------------------------------------------------------------------------------
    	#if SDK.state('Auto Font Install') == true
    	
    	
    	
    	
    	
    	module Fonts
    		# Nome dei font che devo essere installati
    		# Inserire anche l'estensione
    		Filenames = ['Harrington.TTF','OLDENGL.TTF']
    		
    		# Nome dei font, non dei file.
    		# Per visualizzare il nome del font, fare doppio
    		# clic su esso
    		Names = ['Harrington','Old English Text MT']
    		
    		# True = Visualizza messaggio di installazione
    		# false = Non lo visualizza
    		Notify = true
    		
    		# Cartella contenente i font da installare
    		# La cartella deve essere all'interno della
    		# cartella del gioco
    		Source = 'Fonts/'
    		
    		# Cartella dove installare i font
    		# Non modifcare
    		Dest = ENV['SystemRoot'] + '\Fonts\\'
    	end
    	
    	class Scene_Title
    		
    		AFR = Win32API.new('gdi32', 'AddFontResource', ['P'], 'L')
    		WPS = Win32API.new('kernel32', 'WriteProfileString', ['P'] * 3, 'L')
    		SM = Win32API.new('user32', 'SendMessage', ['L'] * 4, 'L')
    		WM_FONTCHANGE = 0x001D
    		HWND_BROADCAST = 0xffff
    		
    		alias wachunga_autofontinstall_st_main main
    		def main
    			success = []
    			for i in 0...Fonts::Filenames.size
    				f = Fonts::Filenames[i]
    				# check if already installed...
    				if not FileTest.exists?(Fonts::Dest + f)
    					# check to ensure font is in specified location...
    					if FileTest.exists?(Fonts::Source + f)
    						require Dir.getwd + '/Data/fileutils.rb'
    						# copy file to fonts folder
    						FileUtils.cp(Fonts::Source + f, Fonts::Dest + f)
    						# add font resource
    						AFR.call(Fonts::Dest + f)
    						# add entry to win.ini/registry
    						WPS.call('Fonts', Fonts::Names[i] + ' (TrueType)', f)
    						SM.call(HWND_BROADCAST,WM_FONTCHANGE,0,0)
    						if FileTest.exists?(Fonts::Dest + f)
    							success.push(Fonts::Names[i])
    						else
    							print "Auto Font Install:\n\nFailed to install " +
    							Fonts::Names[i] + '.'
    						end
    					else
    						print "Auto Font Install:\n\nFont " + f + " not found."
    					end
    				end
    			end
    			if success != [] # one or more fonts successfully installed
    				if Fonts::Notify
    					fonts = ''
    					success.each do |f|
    						fonts << f << ', '
    					end
    					print "Auto Font Install:\n\nSucessfully installed " + fonts[0..-3] +
    					'.'
    				end
    				# new fonts aren't recognized in RMXP until the program is
    				# restarted, so this is (unfortunately) necessary
    				a = Thread.new { system('Game') }
    				exit
    			end
    			wachunga_autofontinstall_st_main
    		end
    		
    	end
    	
    	#------------------------------------------------------------------------------
    	# * End SDK Enable Test
    	#------------------------------------------------------------------------------
    	#end
    

     



    Bugs e Conflitti Noti

     

    N/A

    Altri Dettagli

     

    N/A

  7. Diario di viaggio modificato

    Descrizione


    Corretto bug colore perchè non funzionava
    Aggiunta funzione cambia font
    Aggiunta funzione Faceset

    Autore

     

    Autore originale sylaer
    Modificato da Andre4e

    Allegati

     

    Demo

    Istruzioni per l'uso

     

    Inserite lo script in una nuova classe sopra main..istruzioni x l'uso all'interno dello script!
    Immagini all'interno della demo!

    Script:

     

     

     

    =begin
    
    --------------------------------------------------------------------------
    Scipt Diario
    
    ################################################
    ##Creato da Sylaer###### Modificato da Andre4e##
    ################################################
    
    
    
    Per richiamare il diario
    usare il chiama script tramite evento e inserire
    questo codice :
    
    $scene = Scene_Diary.new(true)
    
    
    --------------------------------------------------------------------------
    
    Instruzioni per inserire il diario nel menu:
    Per prima cosa bisogna modificare il menu in modo che visualizzi il diario:
    
    1)Aprire il Scene_Menu e trovare una serie sN = "Qualche cosa" es.
    s6 = "Esci dal Gioco" e mettere sotto questi elementi un'altro elemento
    con scritto s e accanto il numero successivo all'ultimo visulizzato es.
    nel mio caso sarà s7 = "Diario".
    
    2)Modificare la linea sottostante vale dire:
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    con questa:
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s7, s6])
    Cioè mettere il Diario al penultimo posto del menu.
    
    3)In fondo al Scene_Menu c'è il def update con una serie di when
    l'ultimo dovrebbe essere when 5, di solito è così, va sostituito con when 6
    sotto a questo mettete:
    when 5
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Diary.new
    e sotto a questo dovrebbe esserci un end.
    
    E' inoltre possibile impostare il gioco in modo che il diario sia chiamato da
    un evento comune basta inserire questo nel call script:
    
    $scene = Scene_Diary.new(true)
    
    In questo modo è possibile richiamare il diario anche da oggetto.
    --------------------------------------------------------------------------
    Ora veniamo a come funziona:
    In breve nel diario viene scritto tutto quello che si trova nei file delle
    pagine presenti nella cartella di gioco Data\Diary\. Questo significa che
    per funzionare il diario ha bisogno della cartella. Quindi creala.
    Per qunato riguarda le pagine basta specificare il numero di pagine
    che si vuole qui:
    =end
    NUM_DIARY_PAGES = 10
    =begin
    Ora avvia il gioco una volta e richiama il diario. Si può notare che è vuoto
    ma ha esattamente le pagine indicate(Per cambiare pagina i tasti sono
    ovviamente le frecce direzionali sinistra e destra).
    Adesso nella cartella Diary su Data ci saranno un numero di file pari al
    numero di pagine indicate.
    E' sufficente aprire questi file con un editor di testo e modificare il
    contenuto per osservare i risultati.
    Sul diario viene mostrato ciò che è scritto in questi file, lettera per
    lettara, tuttavia le lettere accentate non vengono riconosciute.
    --------------------------------------------------------------------------
    Ci sono poi una serie di funzioni che è possibile utilizzare.
    Funzioni del testo:
    1)/[N] Se inserite questo nel testo del Diary con N il numero di una switch
    la righa a cui è asseggnata non verrà visualizzata se la switch è impostata
    su off, IMPORTANTE: la / va PER FORZA messa come primo carattere della riga.
    
    2)/K[N] Come sopra solo che se mettete il valore K ad un numero maggiore di 1
    la condizione di visualizzazzione verrà estesa alle K-1 righe succssive.
    
    3)Se inserite [t] oppure [T] si inserirà nel testo una tabulazione " ".
    --------------------------------------------------------------------------
    Si può specificare il font e la grandezza di esso con queste righe:
    =end
    DIARY_FONT = "Monotype Corsiva"
    DIARY_FONT_SIZE = 16
    =begin
    Alcune funzioni sono le stesse dei messaggi:
    - \c[N] Imposta il colore della linea ad uno degli 8 colori
    predefiniti(1-7).
    - \v[N] Mostra il valore della variabile N nel punto in cui è inserita.
    - \n[N] Mostra il nome dell'eroe N.
    
    *************************************************
    Funzioni aggiunte da Andre4e:
    **************
    - \t[Font] Cambiare Font(Permanente)
    Se il carattere è formato da più di una parola scriverlo così:
    es: \t[Times New Roman] e non \t[TimesNewRoman]
    **************
    - \f[Nome grafica] Visualizzare un'immagine
    della cartella progetto/graphics/pictures
    La stringa corretta per visualizzare un'immagine è
    \x[X] \y[Y] \f[Nome grafica]
    
    X = coordinata x....se non viene inserito x
    default è 0
    Y = coordinata y....se non viene inserito x
    default è 0
    Nome grafica = nome dell'immagine da visualizzare
    Il file deve essere .png
    Le immagini posso avvere una dimensione massima
    di 96 x 96.. x modificare questo paramentro
    cercare la riga:
    self.contents.blt(@x, @y, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
    e Modificare il due numeri in fondo
    *************************************************
    
    Se volete commentare qualcosa tutto quello dopo il carattere # non verrà
    visualizzato, almeno per quella linea.
    
    Infine se si esce e si rientra dalla finestra del diario le pagine visualizzate
    sono le stesse, cioè viene memorizzata la posizione nel diario.
    
    Questo è tutto. Spero che vi piaccia.
    =end
    
    # ---------------------------------
    # Little_Arrow class
    # ---------------------------------
    class Little_Arrow < Sprite
    
    def initialize(viewport,mirror = false)
    super(viewport)
    self.bitmap = RPG::Cache.picture("arrow")
    self.ox = 0
    self.oy = 0
    self.z = 250
    self.mirror = mirror
    end
    end
    
    # ---------------------------------
    # Window_DiaryPage class
    # ---------------------------------
    
    class Window_DiaryPage < Window_Base
    
    def initialize(page)
    
    @page = page
    
    if @page % 2 == 1
    super(64,32,320-64,480-64)
    else
    super(320+16,32,320-64,480-64)
    end
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    self.contents.font.name = DIARY_FONT
    self.contents.font.size = DIARY_FONT_SIZE
    self.contents.font.color = Color.new(0,0,0)
    
    
    refresh unless @page == 0
    end
    
    def refresh
    
    file = File.open("Data/Diary/Page" + @page.to_s + ".rxdata","a")
    file.close
    file = File.open("Data/Diary/Page" + @page.to_s + ".rxdata")
    str = file.readlines
    
    
    
    
    
    y = 0
    k_lines = 0
    k_switch = 0
    pace = self.contents.font.size
    for i in 0..str.size-1
    color = 8
    
    str[i].gsub!(/\\[Cc]\[([0-9]+)\]/) do
    color = $1.to_i
    str[i].sub!(/\\[Cc]olor\[([0-9]+)\]/){ "" }
    end
    
    
    str[i].gsub!(/#/) do
    str[i].gsub!(/./m,"")
    
    end
    
    
    
    @x = 0
    str[i].gsub!(/\\[xX]\[([0-9]+)\]/)do
    @x = $1.to_i
    str[i].sub!(/\\[xX]co\[([0-9]+)\]/){ "" }
    end
    
    @y = 0
    str[i].gsub!(/\\[yY]\[([0-9]+)\]/)do
    @y = $1.to_i
    str[i].sub!(/\\[yY]co\[([0-9]+)\]/){ "" }
    end
    
    
    str[i].gsub!(/\\[Ff]\[(.+?)\]/)do
    @face_file = $1.to_s + ".png"
    # @x = @face_indent = 128
    if FileTest.exist?("Graphics/Pictures/" + $1.to_s + ".png")
    
    self.contents.blt(@x, @y, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
    end
    # @str[i].gsub!(/\\[Ff]\[(.*?)\]/) { "" }
    #end
    #end
    end
    str[i].gsub(/\\[Tt]\[(.*?)\]/) do
    font = $1.to_s
    self.contents.font.name = font
    str[i].sub!(/\\[Tt]\[(.*?)\]/) { "" }
    end
    
    
    
    str[i].gsub!(/\[[Tt]\]/) { " " }
    str[i].gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
    
    
    
    
    
    
    str[i].gsub!(/\\[Nn]\[([0-9]+)\]/) do
    $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
    end
    if k_lines > 1
    if $game_switches[k_switch]
    set_text(y,str[i],color)
    y+=pace
    end
    k_lines -=1
    elsif str[i].index("/")==0
    if str[i].index(/[0-9]/)==1
    str[i].sub!(/([0-9]+)/, "")
    k_lines = $1.to_i
    end
    str[i].sub!(/\[([0-9]+)\]/, "")
    str[i].slice!(0)
    switch = $1.to_i
    k_switch = switch if k_lines > 0
    if $game_switches[switch]
    set_text(y,str[i],color)
    y+=pace
    end
    else
    set_text(y,str[i],color)
    y+=pace
    end
    end
    file.close
    if @page % 2 == 1
    self.contents.font.color = Color.new(0,0,0)
    self.contents.draw_text(0,320+32, self.width-32, 32, @page.to_s,2)
    else
    self.contents.font.color = Color.new(0,0,0)
    self.contents.draw_text(0,320+32, self.width-32, 32, @page.to_s)
    end
    end
    
    def set_text(y,text,color)
    if color == 8
    self.contents.font.color = Color.new(0,0,0)
    else
    self.contents.font.color = text_color(color)
    end
    
    x = 0
    while ((c = text.slice!(/./)) != nil)#/./m
    if c == 97
    p "ciao"
    end
    
    self.contents.draw_text(4 + x, y, 40, 32, c)
    x += self.contents.text_size©.width
    end
    end
    end
    
    # ---------------------------------
    # Game_Temp class
    # ---------------------------------
    class Game_Temp
    attr_accessor :diary_current_page
    alias sylaer_diary_temp_initialize initialize
    def initialize
    @diary_current_page = 1
    sylaer_diary_temp_initialize
    end
    end
    # ---------------------------------
    # Scene_Diary class
    # ---------------------------------
    class Scene_Diary
    def initialize(no_menu_call = false)
    @no_menu_call = no_menu_call
    @current_page = $game_temp.diary_current_page
    end
    def main
    create_arrow
    @pages = []
    @pages[0] = Window_DiaryPage.new(@current_page)
    if @current_page + 1 > NUM_DIARY_PAGES
    @pages[1] = Window_DiaryPage.new(0)
    else
    @pages[1] = Window_DiaryPage.new(@current_page + 1)
    end
    Graphics.transition
    loop do
    Graphics.update
    Input.update
    update
    if $scene != self
    break
    end
    end
    Graphics.freeze
    @pages[0].dispose
    @pages[1].dispose
    @left_arrow.dispose
    @right_arrow.dispose
    @back_drop.dispose
    end
    
    def create_arrow
    viewport = Viewport.new(0, 0, 640, 480)
    viewport.z = 3000
    @left_arrow = Little_Arrow.new(viewport)
    @left_arrow.x = 64
    @left_arrow.y = 424
    @left_arrow.visible = false
    @right_arrow = Little_Arrow.new(viewport,true)
    @right_arrow.x = 640 - 100
    @right_arrow.y = 424
    @right_arrow.visible = false
    back_drop_viewport = Viewport.new(0, 0, 640, 480)
    back_drop_viewport.z = 1
    @back_drop = Sprite.new(back_drop_viewport)
    @back_drop.bitmap = RPG::Cache.picture("Backdrop")
    end
    
    
    def update
    
    
    
    
    $game_temp.diary_current_page = @current_page
    if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    if @no_menu_call == false
    $scene = Scene_Menu.new(6)
    else
    $scene = Scene_Map.new
    end
    end
    if @current_page + 1 < NUM_DIARY_PAGES
    if Input.trigger?(Input::RIGHT)
    Audio.se_play("Audio/SE/046-Book01")
    @current_page += 2
    @pages[0].dispose
    @pages[1].dispose
    @pages[0] = Window_DiaryPage.new(@current_page)
    if @current_page + 1 > NUM_DIARY_PAGES
    @pages[1] = Window_DiaryPage.new(0)
    else
    @pages[1] = Window_DiaryPage.new(@current_page + 1)
    end
    end
    @right_arrow.visible = true
    else
    @right_arrow.visible = false
    end
    if @current_page > 1
    if Input.trigger?(Input::LEFT)
    Audio.se_play("Audio/SE/046-Book01")
    @current_page -= 2
    @pages[0].dispose
    @pages[1].dispose
    @pages[0] = Window_DiaryPage.new(@current_page)
    @pages[1] = Window_DiaryPage.new(@current_page + 1)
    end
    @left_arrow.visible = true
    else
    @left_arrow.visible = false
    end
    end
    end
    

     



    Bugs e Conflitti Noti

     

    N/A

    Altri Dettagli

     

    N/A

  8. Allora io uso lo script x visualizzare gli hp dei mostri

    Però uso anche quest'altro script:

    XRXS's Full-View Battleback & Movable Camera

     

     

    Cioè praticamente lo sfondo insieme ai mostri si muovono per fare in modo che il mostro selezionato sia al centro dello schermo, però in questo modo la barra degli hp rimane dove era prima e quindi alla fine succde questo

    Vedi screenshot

     

    Screenshot

     

     

     

    Vi posto i due script

     

     

     

     

     

    Vita Mostri

     

     

    class Window_Base

    #--------------------------------------------------------------------------

    # œ ƒ‰ƒCƒ“•`‰æ by ÷‰ë Ý“y

    #--------------------------------------------------------------------------

    def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)

    # •`ŽÊ‹——£‚ÌŒvŽZB‘å‚«‚߂ɒ¼Š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

    end

    class Window_Base < Window

    #--------------------------------------------------------------------------

    # * Draw Slant Bar(by SephirothSpawn)

    #--------------------------------------------------------------------------

    def draw_slant_bar(x, y, min, max, width = 152, height = 6,

    bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))

    # Draw Border

    for i in 0..height

    self.contents.fill_rect(x+i+3, y + height - i + 3, width+ 2,1, Color.new(0, 0, 0, 128))

    #self.contents.fill_rect(x + i + 4, y + height - i + 4, width + 2, 1, Color.new(50, 50, 50, 255))

    end

    # Draw Background

    for i in 1..(height - 1)

    r = 100 * (height - i) / height + 0 * i / height

    g = 100 * (height - i) / height + 0 * i / height

    b = 100 * (height - i) / height + 0 * i / height

    a = 255 * (height - i) / height + 255 * i / height

    self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))

    end

    # Draws Bar

    for i in 1..( (min / max.to_f) * width - 1)

    for j in 1..(height - 1)

    r = bar_color.red * (width - i) / width + end_color.red * i / width

    g = bar_color.green * (width - i) / width + end_color.green * i / width

    b = bar_color.blue * (width - i) / width + end_color.blue * i / width

    a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width

    self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))

    end

    end

    end

    end

     

     

     

     

    def draw_enemy_hp_meter_line(x, y, width = 356, height = 4)

    w = width * @enemy.hp / @enemy.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

     

     

     

    def draw_enemy_sp_meter_line(x, y, width = 156, height = 4)

    w = width * @enemy.sp / @enemy.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

     

     

     

    def draw_shadow_text_enemy(x, y, width, height, string, align = 0)

    # Œ³‚ÌF‚ð•Û‘¶‚µ‚Ä‚¨‚

    color = self.contents.font.color.dup

    # •Žš‚ʼne•`‰æ

    self.contents.font.color = Color.new(0, 0, 0)

    self.contents.draw_text(x + 2, y + 2, width, height, string, align)

    # Œ³‚ÌF‚É–ß‚µ‚Ä•`‰æ

    self.contents.font.color = color

    self.contents.draw_text(x, y, width, height, string, align)

    end

     

     

     

    def draw_enemy_cp_meter(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 @enemy.cp == nil

    @enemy.cp = 0

    end

    w = width * [@enemy.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

     

    #alias xrxs_bp7_draw_enemy_state draw_enemy_state

    #def draw_enemy_state(x, y, width = 120)

    #xrxs_bp7_draw_enemy_state(x, y, width) if @draw_ban != true

    #end

     

     

    class Window_EnemyHP < Window_Base

     

    def initialize

    super(0, 0, 640, 480)

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

    self.opacity = 0

    refresh

    end

     

    def refresh

    self.contents.clear

    for i in 0...$game_troop.enemies.size

    @enemy = $game_troop.enemies

     

    #no# @percent = (@enemy.hp * 100) / @enemy.maxhp

    unless @enemy.hp == 0

    #per abilitare mp togliere astersico alle righe

    #con scritto si e ad ogni parola sottostante

    #e non soprastante sostituire sp con hp

    #e viceversa

    # @enemy.hp, @enemy.maxhp

    #draw_slant_bar(@enemy.screen_x - 65, @enemy.screen_y - 60, @enemy.hp, @enemy.maxhp, width = 85, height = 12, bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))

    #si# draw_enemy_sp_meter_line(@enemy.screen_x - 62, @enemy.screen_y - 120, width = 85, height = 8)

    draw_enemy_hp_meter_line(@enemy.screen_x - 62, @enemy.screen_y - 90, width = 85, height = 8)

     

     

     

     

    #no# draw_slant_bar(@enemy.screen_x - 65, @enemy.screen_y - 60, @enemy.hp, @enemy.maxhp, width = 85, height = 12, bar_color = Color.new(255, 0, 0, 192), end_color = Color.new(255, 255, 0, 192))

    #no# self.contents.draw_text(@enemy.screen_x - 20, @enemy.screen_y - 75, 100, 32, "#{@enemy.hp}")

     

    self.contents.font.size = 30 # HP/SP”’l‚Ì•¶Žš‚̑傫‚³

    #si# self.contents.font.color = @enemy.sp == 0 ? knockout_color :

    #si# @enemy.sp <= @enemy.maxsp / 4 ? crisis_color : normal_color

    #si# draw_shadow_text_enemy(@enemy.screen_x - 80, @enemy.screen_y - 142, 100, 32, @enemy.sp.to_s, 2)

     

    self.contents.font.color = @enemy.hp == 0 ? knockout_color :

    @enemy.hp <= @enemy.maxhp / 4 ? crisis_color : normal_color

    draw_shadow_text_enemy(@enemy.screen_x - 80, @enemy.screen_y - 112, 100, 32, @enemy.hp.to_s, 2)

    self.contents.font.size = 12 # —pŒêuHP/SPv‚Ì•¶Žš‚̑傫‚³

    self.contents.font.color = system_color # —pŒêuHP/SPv‚Ì•¶Žš‚ÌF

    #si# draw_shadow_text_enemy(@enemy.screen_x - 63 , @enemy.screen_y - 132, 96, 12, $data_system.words.sp)

    draw_shadow_text_enemy(@enemy.screen_x - 63 , @enemy.screen_y - 102, 96, 12, $data_system.words.hp)

    #si# draw_enemy_cp_meter(@enemy.screen_x - 70, @enemy.screen_y - 65, 120, 0)

    #no# draw_enemy_state(@enemy.screen_x - 68, @enemy.screen_y - 56)

     

    end

     

    end

    end

    end

     

     

     

     

     

     

     

    class Scene_Battle

     

    alias raz_update update

    alias raz_update_phase5 update_phase5

    alias raz_update_phase4_step1 update_phase4_step1

    alias raz_update_phase4_step5 update_phase4_step5

    alias raz_enemy_hp_main main

     

     

    def main

    @troop_id = $game_temp.battle_troop_id

    $game_troop.setup(@troop_id)

    @enemy_window = Window_EnemyHP.new

    @enemy_window.z = 95

    raz_enemy_hp_main

     

    @enemy_window.dispose

    end

     

     

    def update

    @enemy_window.update

    raz_update

    end

     

    def update_phase5

    # If wait count is larger than 0

    if @phase5_wait_count > 0

    # Decrease wait count

    @phase5_wait_count -= 1

    # If wait count reaches 0

    if @phase5_wait_count == 0

    @enemy_window.visible = false

    # Show result window

    @result_window.visible = true

    # Clear main phase flag

    $game_temp.battle_main_phase = false

    # Refresh status window

    @status_window.refresh

    @enemy_window.refresh

    end

    return

    end

    raz_update_phase5

    end

     

    def update_phase4_step1

    raz_update_phase4_step1

    @enemy_window.refresh

    end

     

    def update_phase4_step5

    # Hide help window

    @help_window.visible = false

    # Refresh status window

    @status_window.refresh

    @enemy_window.refresh

    raz_update_phase4_step5

    end

    end

     

     

     

    =begin

    class Window_BattleStatus < Window_Base

    #--------------------------------------------------------------------------

    # * Object Initialization

    #--------------------------------------------------------------------------

    def initialize

    super(0, 320, 640, 160)

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

    @level_up_flags = [false, false, false, false]

    refresh

    end

    #--------------------------------------------------------------------------

    # * Dispose

    #--------------------------------------------------------------------------

    def dispose

    super

    end

    #--------------------------------------------------------------------------

    # * Set Level Up Flag

    # actor_index : actor index

    #--------------------------------------------------------------------------

    def level_up(actor_index)

    @level_up_flags[actor_index] = true

    end

    #--------------------------------------------------------------------------

    # * Refresh

    #--------------------------------------------------------------------------

    def refresh

    self.contents.clear

    @item_max = $game_party.actors.size

    for i in 0...$game_party.actors.size

    actor = $game_party.actors

    actor_x = i * 160 + 4

    draw_slant_bar(actor_x, 55, actor.hp, actor.maxhp, 120)

    draw_slant_bar(actor_x, 88, actor.sp, actor.maxsp, 120, 6, bar_color = Color.new(150, 0, 150, 255), end_color = Color.new(0, 0, 255, 255))

    draw_actor_name(actor, actor_x, 0)

    draw_actor_hp(actor, actor_x, 32, 120)

    draw_actor_sp(actor, actor_x, 64, 120)

    if @level_up_flags

    self.contents.font.color = normal_color

    self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")

    else

    draw_actor_state(actor, actor_x, 96)

    end

    end

    end

    #--------------------------------------------------------------------------

    # * Frame Update

    #--------------------------------------------------------------------------

    def update

    super

    # Slightly lower opacity level during main phase

    if $game_temp.battle_main_phase

    self.contents_opacity -= 4 if self.contents_opacity > 191

    else

    self.contents_opacity += 4 if self.contents_opacity < 255

    end

    end

    end

    =end

     

     

     

     

     

     

     

    XRXS's Full-View Battleback & Movable Camera

     

     

    # *** XRXS's Full-View Battleback & Movable Camera ver.2 *** built 221612

    # by XRXS

     

    #==============================================================================

    # ** Customization point

    #==============================================================================

    module XRXS_BP8

    #

    # Camera Drift Speed

    # ( SPEED1 : Distance number of partitions. Smaller values give quicker moves.

    # SPEED2 : Lowest drift speed [ unit: Px/F ]

    #

    SPEED1 = 8

    SPEED2 = 8

    #

    # Setting the width size of the GA

    # ( 1024:XGA Size, 640:VGA Size )

    GA_W = 1024

    end

     

     

    #==============================================================================

    # ** Scene_Battle (part 1)

    #------------------------------------------------------------------------------

    # This class performs battle screen processing.

    #==============================================================================

     

    class Scene_Battle

    #--------------------------------------------------------------------------

    # * Start Party Command Phase

    #--------------------------------------------------------------------------

    alias xrxs_bp8_start_phase2 start_phase2

    def start_phase2

    # Camera: Centering

    $xcam.centering

    # Original Call

    xrxs_bp8_start_phase2

    end

    #--------------------------------------------------------------------------

    # * Frame Updat (actor command phase : enemy selection)

    #--------------------------------------------------------------------------

    alias xrxs_bp8_update_phase3_enemy_select update_phase3_enemy_select

    def update_phase3_enemy_select

    # Acquiring the enemy which currently being selected

    enemy = $game_troop.enemies[@enemy_arrow.index]

    # Camera: Attention

    if @last_enemy_arrow != enemy

    $xcam.watch(enemy)

    @last_enemy_arrow = enemy

    end

    # Reset Call

    xrxs_bp8_update_phase3_enemy_select

    end

    #--------------------------------------------------------------------------

    # * End Enemy Selection

    #--------------------------------------------------------------------------

    alias xrxs_bp8_end_enemy_select end_enemy_select

    def end_enemy_select

    # Camera: Centering

    $xcam.centering

    @last_enemy_arrow = nil

    # Original Call

    xrxs_bp8_end_enemy_select

    end

    #--------------------------------------------------------------------------

    # * Frame Update (main phase step 2 : start action)

    #--------------------------------------------------------------------------

    alias xrxs_bp8_update_phase4_step2 update_phase4_step2

    def update_phase4_step2

    # Reset Call

    xrxs_bp8_update_phase4_step2

    # In the system is changing to step 3

    if @phase4_step == 3

    # If the current battler is still on the field

    if @active_battler.in_battlefield?

    # Camera: Attention

    $xcam.watch(@active_battler)

    end

    end

    end

    #--------------------------------------------------------------------------

    # * Frame Update (main phase step 3 : animation for action performer)

    #--------------------------------------------------------------------------

    alias xrxs_bp8_update_phase4_step3 update_phase4_step3

    def update_phase4_step3

    # Reset Call

    xrxs_bp8_update_phase4_step3

    # Calculating the average X value of the target to set the camera

    x_average = 0

    number = 0

    cam_target = nil

    for target in @target_battlers

    if target.in_battlefield?

    x_average += target.x

    number += 1

    cam_target = target

    end

    end

    # If the camera target is found

    if number > 0

    # Set the object animation's position

    animation = $data_animations[@animation2_id]

    if animation != nil and animation.position == 3

    # Camera: Centering

    $xcam.centering

    # Camera: Zoom Out

    $xcam.zoomout

    elsif number == 1

    # Camera: Attention

    $xcam.watch(cam_target)

    else

    # Camera: Using the designated X position

    $xcam.watch_at(x_average / number)

    end

    end

    end

    #--------------------------------------------------------------------------

    # * Start After Battle Phase

    #--------------------------------------------------------------------------

    alias xrxs_bp8_start_phase5 start_phase5

    def start_phase5

    # Camera: Centering

    $xcam.centering

    # Original Call

    xrxs_bp8_start_phase5

    end

    end

    #------------------------------------------------------------------------------

    # To customization point here

    #==============================================================================

     

     

    #------------------------------------------------------------------------------

    #

    # * Movable camera system *

    #

    #==============================================================================

    # ** XCam

    #------------------------------------------------------------------------------

    # This class handles the movable camera.

    #==============================================================================

     

    class XCam

    #--------------------------------------------------------------------------

    # * Public Instance Variables

    #--------------------------------------------------------------------------

    attr_reader :x

    attr_reader :y

    attr_reader :z

    attr_accessor :x_destination

    attr_accessor :y_destination

    attr_accessor :z_destination

    attr_accessor :watch_battler

    attr_accessor :freeze_count

    #--------------------------------------------------------------------------

    # * Object Initialization

    #--------------------------------------------------------------------------

    def initialize

    # Camera initial position

    @x = 320

    @y = 240

    @z = 296

    # Calculation of largest range

    @x_max = 0

    @y_max = 0

    @z_max = XRXS_BP8::GA_W * 37 / 128

    # The largest restriction of Z

    @z = @z_max if @z > @z_max

    # Camera: Centering

    self.centering

    # Initialization

    @freeze_count = 0

    end

    #--------------------------------------------------------------------------

    # * Frame Update

    #--------------------------------------------------------------------------

    def update

    @moved = false

    # Renew of camera position

    if @freeze_count > 0

    # Freezing count is decreased

    @freeze_count -= 1

    return

    end

    # Coordinate acquisition

    z_dest = @z_destination

    x_dest = @watch_battler == nil ? @x_destination : @watch_battler.x

    y_dest = @watch_battler == nil ? @y_destination : 88 + @watch_battler.y/2

    # Camera: Z coordinate (priority)

    if @z != z_dest

    @z = slide(@z, z_dest, @z_speed, 37, @z_max)

    @x_max = (@z_max - @z) * 64 / 37

    @y_max = (@z_max - @z) * 48 / 37

    @moved = true

    end

    # Camera: X coordinate

    if @x != x_dest or @moved

    @x = slide(@x, x_dest, @x_speed, 320 - @x_max, 320 + @x_max)

    @moved = true

    end

    # Camera: Y coordinate

    if @y != y_dest or @moved

    @y = slide(@y, y_dest, @y_speed, 240 - @y_max, 240 + @y_max)

    @moved = true

    end

    end

    #--------------------------------------------------------------------------

    # * Sliding (Action returned = 'current location' to 'destination location')

    #--------------------------------------------------------------------------

    def slide(from, to, move_speed, to_min, to_max)

    # Distinguishing the result

    if (to - from).abs < move_speed

    result = to

    else

    sign = from > to ? -1 : 1

    result = from + sign * move_speed

    end

    # Return with the range

    return [[result, to_min].max, to_max].min

    end

    #--------------------------------------------------------------------------

    # * Moved?

    #--------------------------------------------------------------------------

    def moved?

    return @moved

    end

    #--------------------------------------------------------------------------

    # * Set Speed

    #--------------------------------------------------------------------------

    def set_speed

    x_dest = @watch_battler == nil ? @x_destination : @watch_battler.x

    y_dest = @watch_battler == nil ? @y_destination : 88 + @watch_battler.y/2

    z_dest = @z_destination

    @x_speed = [[(x_dest - @x).abs / XRXS_BP8::SPEED1, 1].max, XRXS_BP8::SPEED2].min

    @y_speed = [[(y_dest - @y).abs / XRXS_BP8::SPEED1, 1].max, XRXS_BP8::SPEED2].min

    @z_speed = [[(z_dest - @z).abs / XRXS_BP8::SPEED1, 1].max, XRXS_BP8::SPEED2].min

    end

    #--------------------------------------------------------------------------

    # * Centering

    #--------------------------------------------------------------------------

    def centering

    @watch_battler = nil

    @x_destination = 320

    @y_destination = 240

    @z_destination = 185

    set_speed

    end

    #--------------------------------------------------------------------------

    # * Zoom Out

    #--------------------------------------------------------------------------

    def zoomout

    @z_destination = 222

    set_speed

    end

    #--------------------------------------------------------------------------

    # * Watch

    #--------------------------------------------------------------------------

    def watch(battler)

    @watch_battler = battler

    @z_destination = 180

    set_speed

    end

    #--------------------------------------------------------------------------

    # * Watch At

    #--------------------------------------------------------------------------

    def watch_at(x)

    @watch_battler = nil

    @x_destination = x

    @y_destination = 240

    @z_destination = 185

    set_speed

    end

    #--------------------------------------------------------------------------

    # * Zoom

    #--------------------------------------------------------------------------

    def zoom

    return 185.00 / self.z

    end

    end

     

     

    #==============================================================================

    # ** Game_Battler

    #------------------------------------------------------------------------------

    # This class deals with battlers. It's used as a superclass for the Game_Actor

    # and Game_Enemy classes.

    #==============================================================================

    class Game_Battler

     

    #--------------------------------------------------------------------------

    # * Public Instance Variables

    #--------------------------------------------------------------------------

    attr_reader :x # Battlefield side position (+ to the right)

    attr_reader :y # Battlefield height position (+ lower)

    attr_reader :z # Battlefield depth position (+ forewards)

    #--------------------------------------------------------------------------

    # * In Battlefield?

    #--------------------------------------------------------------------------

    def in_battlefield?

    return false

    end

    end

     

     

    #==============================================================================

    # ** Game_Enemy

    #------------------------------------------------------------------------------

    # This class handles enemies. It's used within the Game_Troop class

    # ($game_troop).

    #==============================================================================

    class Game_Enemy < Game_Battler

     

    #--------------------------------------------------------------------------

    # * In Battlefield

    #--------------------------------------------------------------------------

    def in_battlefield?

    return true

    end

    #--------------------------------------------------------------------------

    # * Object Initialization

    # troop_id : troop ID

    # member_index : troop member index

    #--------------------------------------------------------------------------

    alias xrxs_bp8_initialize initialize

    def initialize(troop_id, member_index)

    @z = 0

    xrxs_bp8_initialize(troop_id, member_index)

    end

    #--------------------------------------------------------------------------

    # * Get Battle Screen X-Coordinate

    #--------------------------------------------------------------------------

    alias x screen_x

    def screen_x

    return self.x if $xcam == nil

    return 320 + (self.x - $xcam.x) * 185 / $xcam.z

    end

    #--------------------------------------------------------------------------

    # * Get Battle Screen Y-Coordinate

    #--------------------------------------------------------------------------

    alias y screen_y

    def screen_y

    return self.y if $xcam == nil

    return 240 + (self.y - $xcam.y) * 185 / $xcam.z

    end

    end

     

     

    #==============================================================================

    # ** Spriteset_Battle

    #------------------------------------------------------------------------------

    # This class brings together battle screen sprites. It's used within

    # the Scene_Battle class.

    #==============================================================================

    class Spriteset_Battle

     

    #--------------------------------------------------------------------------

    # ○ Frame Update (movable camera)

    #--------------------------------------------------------------------------

    def update_xcam

    # If the camera position moved

    if $xcam.moved?

    # Calculating zoom rate from camera position

    zoom = 185.00 / $xcam.z

    w = XRXS_BP8::GA_W / 2

    h = w * 3 / 4

    # Setting renewal of background

    @battleback_sprite.zoom_x = zoom

    @battleback_sprite.zoom_y = zoom

    @battleback_sprite.x = (320 - $xcam.x) * zoom - w * (zoom - 1)

    @battleback_sprite.y = (240 - $xcam.y) * zoom - h * (zoom - 1)

    end

    end

    end

     

     

    #==============================================================================

    # --- Battle Sprite movable camera application ---

    #==============================================================================

    module XRXS_Cam_Deal

    def update

    # Recalls

    super

    # Return if the battler is not in the battlefield

    return if @battler == nil or not @battler.in_battlefield?

    # Return if the bitmap is empty

    return if self.bitmap == nil

    # Modifies the zoom rate (the sprite coordinate & camera zoom)

    zoom = 1.00 * 185 / (185 - @battler.z)

    self.zoom_x = zoom * $xcam.zoom

    self.zoom_y = zoom * $xcam.zoom

    end

    end

     

    class Sprite_Battler < RPG::Sprite

    include XRXS_Cam_Deal

    end

     

    #==============================================================================

    # --- Damage following module ---

    #==============================================================================

    module XRXS_DamageFollow

    def update

    # Recalls

    super

    # Return if no camera

    return if $xcam == nil

    # Return if no battler sprite or battler not in the battlefield

    return if @battler == nil or not @battler.in_battlefield?

    # Calculate the moving values

    x_moved = @last_cam_x == nil ? 0 : $xcam.x - @last_cam_x

    y_moved = @last_cam_y == nil ? 0 : $xcam.y - @last_cam_y

    # Compile thef damage sprite arrangement

    damage_sprites = [@_damage_sprite]

    damage_sprites += @damage_sprites if @damage_sprites != nil

    # Following camera

    for sprite in damage_sprites

    next if sprite == nil

    next if sprite.disposed?

    sprite.x -= x_moved

    sprite.y -= y_moved

    end

    # Retain the original camera position

    @last_cam_x = $xcam.x

    @last_cam_y = $xcam.y

    end

    end

     

    class Sprite_Battler < RPG::Sprite

    include XRXS_DamageFollow

    end

     

    #==============================================================================

    # ** Scene_Battle (part 1)

    #------------------------------------------------------------------------------

    # This class performs battle screen processing.

    #==============================================================================

    class Scene_Battle

    #--------------------------------------------------------------------------

    # * Main Processing

    #--------------------------------------------------------------------------

    alias xrxs_bp8_main main

    def main

    # Formation of movable camera

    $xcam = XCam.new

    # Original Call

    xrxs_bp8_main

    # Release the movable camera

    $xcam = nil

    end

    #--------------------------------------------------------------------------

    # * Frame Update

    #--------------------------------------------------------------------------

    alias xrxs_bp8_update update

    def update

    # Update the movable camera

    $xcam.update

    # Original Call

    xrxs_bp8_update

    end

    end

     

     

    #------------------------------------------------------------------------------

    #

    # * Full-View System *

    #

    #==============================================================================

    # ** Spriteset_Battle

    #------------------------------------------------------------------------------

    # This class brings together battle screen sprites. It's used within

    # the Scene_Battle class.

    #==============================================================================

     

    class Spriteset_Battle

    #--------------------------------------------------------------------------

    # * Object Initialization

    #--------------------------------------------------------------------------

    alias xrxs_bp8_initialize initialize

    def initialize

    # Original Call

    xrxs_bp8_initialize

    # Acquiring graphic array

    # Drawing up viewport 0

    w = XRXS_BP8::GA_W

    h = w * 3 / 4

    x = 320 - w / 2

    y = 240 - h / 2

    @viewport0 = Viewport.new(x, y, w, h)

    @viewport0.z = 0

    # Modifying viewport 1

    @viewport1.z += 1

    @viewport1.rect.height = 480

    # Battleback Recompilation (viewport 0 use)

    @battleback_sprite.dispose

    @battleback_sprite = Sprite.new(@viewport0)

    @battleback_name = ""

    # Update Battleback

    update_battleback

    end

    #--------------------------------------------------------------------------

    # * Dispose

    #--------------------------------------------------------------------------

    alias xrxs_bp8_dispose dispose

    def dispose

    # Original Call

    xrxs_bp8_dispose

    # Dispose viewport

    @viewport0.dispose

    end

    #--------------------------------------------------------------------------

    # * Frame Update

    #--------------------------------------------------------------------------

    alias xrxs_bp8_update update

    def update

    # Frame Renewal (battle back)

    update_battleback

    # If camera exists, Frame renewal (movable camera)

    update_xcam if defined? update_xcam

    # Original Call

    xrxs_bp8_update

    # Setting the shake position of the picture

    @viewport0.ox = $game_screen.shake if @viewport0 != nil

    end

    #--------------------------------------------------------------------------

    # * Update Battleback

    #--------------------------------------------------------------------------

    def update_battleback

    # If file name is different from the current one

    if @battleback_name != $game_temp.battleback_name

    @battleback_name = $game_temp.battleback_name

    if @battleback_sprite.bitmap != nil

    @battleback_sprite.bitmap.dispose

    end

    # Acquiring graphic array

    w = XRXS_BP8::GA_W

    h = w * 3 / 4

    # Obtain and resize the battleback

    bg = RPG::Cache.battleback(@battleback_name)

    xga = Bitmap.new(w, h)

    xga.stretch_blt(xga.rect, bg, bg.rect)

    # Apply the settings to the battleback

    @battleback_sprite.bitmap = xga

    end

    end

    end

     

    #==============================================================================

    # ---"If fighting," position correction module of picture "animation" ---

    #==============================================================================

    module XRXS_FullScreen_AnimationOffset

    def animation_set_sprites(sprites, cell_data, position)

    super

    for i in 0..15

    sprite = sprites

    pattern = cell_data[i, 0]

    if sprite == nil or pattern == nil or pattern == -1

    next

    end

    if position == 3

    if self.viewport != nil

    sprite.y = 160 # Just this one line modification

    sprite.y += cell_data[i, 2]

    end

    end

    end

    end

    end

     

    class Sprite_Battler < RPG::Sprite

    include XRXS_FullScreen_AnimationOffset

    end

     

     

     

  9. In giro x internet ho trovato questo script..però da errore di sintassi potete controllarlo??

    L'errore lo da in una stringa dove efettivamente ci sono 5 parentesi aperte e 2 chiuse però anche aggiungendole da sempre errore

     

     

     

     

     

     

    #==============================================================================

    # Quest Journal

    # Version: 1.1

    # Author: modern algebra (rmrk.net)

    # Date: March 24, 2008

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Description:

    # Basically, this script is an objective based quest log that allows the

    # user to make quests and reveal them to the characters through specified

    # script calls. It is objective based, meaning that you advance the quest

    # by having the player complete objectives and you can choose when to reveal

    # these objectives and when to set them as complete or as failed. That being

    # said, this script does not build quests, it more or less gives you a

    # graphical interface for showing quest progress. It does run by script

    # call, and so read the instructions carefully if you want to use this script

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Instructions:

    # Basically, set up all of your quests in the module below. The Constants

    # section is annotated, so read the comments near them to determine what you

    # should set these constants to. As you can see, they are filled in with

    # default values currently, and so that should give you an idea of what to

    # do.

    #

    # Setting up quests can be a little bit harder. You will have to set one

    # of these up for every quest that you want represented in the scene. Refer

    # to the editable region inside the class Quest for further instructions

    #

    # Once they are setup, you can activate them at any time in the game by

    # this code:

    #

    # $game_party.quests[quest_id]

    #

    # There are several methods you can call that are of relevance. Namely:

    #

    # $game_party.quests[quest_id].reveal_objective (objective_id)

    # $game_party.quests[quest_id].conceal_objective (objective_id)

    # $game_party.quests[quest_id].complete_objective (objective_id)

    # $game_party.quests[quest_id].uncomplete_objective (objective_id)

    # $game_party.quests[quest_id].fail_objective (objective_id)

    # $game_party.quests[quest_id].unfail_objective (objective_id)

    # $game_party.quests[quest_id].complete?

    # $game_party.quests[quest_id].failed?

    # $game_party.quests[quest_id].reward_given = true/false

    # $game_party.quests[quest_id].concealed = true/false

    # $game_party.quests.remove (quest_id)

    #

    # There are other methods that you can access, but they are irrelevant for

    # the purposes of controlling quest progress. These are fairly self-

    # explanatory methods, but in case they aren't, reveal_objective naturally

    # allows the specified objective to appear in the Quest Journal for browsing

    # by the user. complete_objective notes when an objective is complete, and

    # fail_objective notes when the player has done something that fails this

    # objective. complete? returns true if all primary objectives have been

    # completed and failed? returns true if any primary objective has been

    # failed. reward_given serves the function of a switch. You should

    # essentially make the reward event look like this:

    #

    # @> Conditional Branch: Script: $game_party.quests[quest_id].complete?

    # @> Conditional Branch: Script: $game_party.quests[quest_id].reward_given

    # @> ...Thank you or whatever you want the event to say once the reward has been given

    # @> Else

    # @> ...Give Reward

    # @> Script: $game_party.quests[quest_id].reward_given = true

    # @> Branch End

    # @> Branch End

    #

    # Later versions of this script will have an auto-reward system and also a

    # Journal to which the player can write notes.

    #

    # You can also disable access to the Quest Log at any time with the code:

    # $game_system.quest_disabled = true

    #

    # And you can change how it is accessed with the codes:

    #

    # $game_system.quest_keyaccess = true / false # ON MAP

    # $game_system.quest_menuaccess = true / false # IN MENU

    #

    # Also, in a message, \nq[quest_id] will retrieve the name of a quest and

    # print it in a message

    #===============================================================================

    =

    # *** Quest Data

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ~

    # This is the configuration class for the Quest Journal

    #===============================================================================

    =

     

    module ModAlg_QuestData

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Constants

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Editable Region

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    QUESTS_LABEL = 'Quests' # What you want Quests to be called (eg. 'Missions')

    ACTIVE_QUEST_ICON = 149 # What icon signifies a quest is active

    COMPLETE_QUEST_ICON = 150 # What icon signifies a quest is complete

    FAILED_QUEST_ICON = 179 # What icon signifies a quest is failed

    BULLET_CHARACTER = '●' # The character used for listing objectives

    ACTIVE_COLOUR = 0 # The colour of a quest that is active

    COMPLETE_COLOUR = 11 # The colour of a quest that is complete

    FAILED_COLOUR = 18 # The colour of a quest that is failed

    MENU_ACCESS = true # Can the script be accessed through the menu?

    MENU_INDEX = 4 # If above is true, where in the command window?

    KEY_ACCESS = false # Can the quest log be accessed by a key

    MAPKEY_BUTTON = Input::L # If above is true, which button?

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Quest Data

    #----------------------------------------------------------------------------

    # Returns skeleton data for the quesr

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def self.quest_data (id)

    # Set class variables to corresponding arguments

    objectives = []

    name = '??????'

    description = '??????????'

    icon_index = 0

    case id

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * EDITABLE REGION

    #------------------------------------------------------------------------

    # To set up a quest, first identify it with an ID - this can be anything

    # as long as it is not the same as another quest, but it is important to

    # remember this ID as it is the only way to access your quest.

    # In any case, the format for setting up a quest is:

    #

    # when <quest_id> # Give the quest an ID number

    # name = '<quest_name>'

    # description = '<quest_description>'

    # objectives[0] = '<first_objective>'

    # ...

    # objectives[n] = '<nth objective>'

    # prime = [<objective_id>, ..., <objective_id>]

    # icon_index = <quest_icon_index>

    #

    # Each of these values have an importance.

    # name is the name of the quest

    # description is a small blurb explaining the overall goal of the quest

    # objective[0..n] are short-term goals that lead to the overall goal

    # primes are which objectives need to be complete before the quest is

    # considered to be complete

    # icon_index is the icon that represents the quest

    #

    # Note that any of the above values can be omitted without throwing an

    # error, but for the quest to work properly you should at least set the

    # name, description, and objectives. If you do omit these, the default

    # values are:

    #

    # name = '??????'

    # description = '??????????'

    # objectives = []

    # prime = [all objectives]

    # icon_index = 0

    #

    # If you do want to require that all objectives must be satisfied before

    # the quest is complete, then do not bother defining it. Otherwise, be

    # sure to set it.

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    when 1 # Fetch

    name = 'Fetch'

    description = 'Martha needs someone to play with her dog'

    objectives[0] = 'Find a stick'

    objectives[1] = 'Throw the stick to the dog'

    objectives[2] = 'Retrieve the stick from the dog'

    icon_index = 79

    when 4 # Cat Retrieval

    name = 'Cat Retrieval'

    description = 'Mrs. Bunderby has lost her cat, and she has employed you to find it.'

    objectives[0] = 'Find the lost cat'

    objectives[1] = 'Climb the tree and retrieve the cat'

    objectives[2] = "Return a cat to Mrs. Bunderby"

    # Set prime objectives in an array based on index

    prime = [0, 2]

    icon_index = 137

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * END EDITABLE REGION

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    end

    return name, description, objectives, prime, icon_index

    end

     

    #============================================================================

    # ** Quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Holds in-game data for a quest

    #============================================================================

     

    class Quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Public Instance Variables

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    attr_reader :name # The name of the quest

    attr_reader :id # The ID in $game_party.quests

    attr_reader :description # A blurb explaining the quest

    attr_reader :objectives # An array of strings holding objectives

    attr_reader :prime_objectives # An array of crucial objectives

    attr_reader :icon_index # The Icon associated with this quest

    attr_reader :revealed_objectives # An array of revealed objectives

    attr_reader :complete_objectives # An array of completed objectives

    attr_reader :failed_objectives # An array of failed objectives

    attr_accessor :reward_given # A switch to ensure only one reward given

    attr_accessor :concealed # A switch to show or not show the quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize (id)

    @id = id

    # Set class variables to corresponding arguments

    @name, @description, @objectives, prime, @icon_index = ModAlg_QuestData.quest_data (id)

    # If no primary objectives are specified

    if prime.nil?

    # All objectives become primary

    prime = []

    for i in 0...@objectives.size

    prime.push (i)

    end

    end

    @prime_objectives = prime

    # Initialize non-public arrays

    @revealed_objectives = []

    @complete_objectives = []

    @failed_objectives = []

    @reward_given = false

    @concealed = false

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Reveal Objective

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def reveal_objective (index)

    return if index >= @objectives.size

    # Add to revealed objectives

    @revealed_objectives |= [index]

    # Sort from lowest index to highest index

    @revealed_objectives.sort!

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Conceal Objective

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def conceal_objective (index)

    @revealed_objectives.delete (index)

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Complete Objective

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def complete_objective (index)

    return if index >= @objectives.size

    # If the objective is failed, you cannot complete it.

    return if @failed_objectives.include? (index)

    # Reveal the objective if it was not previously revealed

    reveal_objective (index) unless @revealed_objectives.include? (index)

    # Add to complete objectives

    @complete_objectives |= [index]

    # Sort from lowest index to highest index

    @complete_objectives.sort!

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Uncomplete Objective

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def uncomplete_objective (index)

    @complete_objectives.delete (index)

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Fail Objective

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def fail_objective (index)

    return if index >= @objectives.size

    # Reveal the objective if it has not yet been revealed

    reveal_objective (index) unless @revealed_objectives.include? (index)

    # Add to revealed objectives

    @failed_objectives |= [index]

    # Sort from lowest index to highest index

    @failed_objectives.sort!

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Unfail Objective

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def unfail_objective (index)

    @failed_objectives.delete (index)

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Complete?

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def complete?

    # Check if all prime objectives have been completed

    return (@complete_objectives & @prime_objectives) == @prime_objectives

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Failed?

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def failed?

    # Check if any prime objectives have been failed

    return (@failed_objectives & @prime_objectives) != []

    end

    end

    end

     

    #==============================================================================

    # ** Ellipse

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Stores an ellipse object.

    #==============================================================================

     

    class Ellipse

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Public Instance Variables

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    attr_reader :a # The width of the oval

    attr_reader :b # The Height of the oval

    attr_reader :x # the top left x position

    attr_reader :y # the top left y position

    attr_reader :h # The x position of the origin

    attr_reader :k # The y position of the origin

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    # x : the top left x position

    # y : the top left y position

    # a : the width of oval from origin to the side

    # b : the height of oval from origin. If nil, then a is radius of circle

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize (x, y, a, b = nil)

    @x = x

    @y = y

    @a = a

    @b = b.nil? ? a : b

    @h = x + a

    @k = y + @b

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Within?

    # x : the x coordinate being tested

    # y : the y coordinate being tested

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def within? (x, y)

    x_square = ((x - @h)*(x - @h)).to_f / (@a*@a)

    y_square = ((y - @k)*(y - @k)).to_f / (@b*@cool.gif)

    # If "radius" <= 1, then it must be within the ellipse

    return (x_square + y_square) <= 1

    end

    end

     

    #==============================================================================

    # ** Bitmap

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This adds the methods fill_ellipse, outline_ellipse, and fill_rounded_rect

    #==============================================================================

     

    class Bitmap

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Outline Ellipse

    # ellipse : the ellipse being drawn

    # width : the width of the bar

    # colour : the colour of the outline

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def outline_ellipse (ellipse, colour = font.color, width = 1, steps = 0)

    # For neatness, define local variables a and b to the ellipse variables

    a, b = ellipse.a, ellipse.b

    # Use Ramanujan's approximation of the Circumference of an ellipse

    steps = Math:tongue.gifI*(3*(a + cool.gif - Math.sqrt((3*a + cool.gif*(a + 3*cool.gif)) if steps == 0

    radian_modifier = (2*Math:tongue.gifI) / steps

    for i in 0...steps

    t = (radian_modifier*i) % (2*Math:tongue.gifI)

    # Expressed parametrically:

    # x = h + acos(t), y = k + bsin(t) : where t ranges from 0 to 2pi

    x = (ellipse.h + (a*Math.cos(t)))

    y = (ellipse.k + (b*Math.sin(t)))

    set_pixel (x, y, colour)

    end

    # Thicken the line

    if width > 1

    ellipse = Ellipse.new (ellipse.x + 1, ellipse.y + 1, ellipse.a - 1, ellipse.b - 1)

    outline_ellipse (ellipse, colour, width - 1, steps)

    end

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Fill Ellipse

    # ellipse : the ellipse being drawn

    # colour : the colour of the outline

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def fill_ellipse (ellipse, colour = font.color, steps = 0)

    # For neatness, define local variables a and b to the ellipse variables

    a, b = ellipse.a, ellipse.b

    # Use Ramanujan's approximation of the Circumference of an ellipse

    steps = Math:tongue.gifI*(3*(a + cool.gif - Math.sqrt((3*a + cool.gif*(a + 3*cool.gif)) if steps == 0

    radian_modifier = (2*Math:tongue.gifI) / steps

    for i in 0...(steps / 2)

    t = (radian_modifier*i) % (2*Math:tongue.gifI)

    # Expressed parametrically:

    # x = h + acos(t), y = k + bsin(t) : where t ranges from 0 to 2pi

    x = ellipse.h + (a*Math.cos(t))

    y = ellipse.k - (b*Math.sin(t))

    fill_rect (x, y, 1, 2*(ellipse.k - y), colour)

    end

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Fill Rounded Rectangle

    # rect : the rectangle being drawn

    # colour : the colour of the outline

    # w : the number of pixels to cover by rounding

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Used to fill a rectangle with rounded corners

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def fill_rounded_rect (rect, colour = font.color, w = 8)

    # Draw Body of the rectangle

    fill_rect (rect.x + w, rect.y, rect.width - 2*w, rect.height, colour)

    # Draw Left Vertical Rect

    fill_rect (rect.x, rect.y + w, w, rect.height - 2*w, colour)

    # Draw Right Vertical Rect

    x = rect.x + rect.width - w

    fill_rect (x, rect.y + w, w, rect.height - 2*w, colour)

    # Make a circle

    circle = Ellipse.new (0, 0, w)

    for i in 0...w

    for j in 0...w

    # Upper Left Corner

    set_pixel (rect.x + i, rect.y + j, colour) if circle.within? (i, j)

    # Upper Right Corner

    set_pixel (rect.x + rect.width - w + i, rect.y + j, colour) if circle.within? (i + w, j)

    # Bottom Left Corner

    set_pixel (rect.x + i, rect.y + rect.height - w + j, colour) if circle.within? (i, j + w)

    # Bottom Right Corner

    set_pixel (rect.x + rect.width - w + i, rect.y + rect.height - w + j, colour) if circle.within? (i + w, j + w)

    end

    end

    end

    end

     

    #==============================================================================

    # ** Window_VarySizeHelp

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This window is the same as Window_Help, but with variable size

    #==============================================================================

     

    class Window_VarySizeHelp < Window_Help

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize (h_x = 0, h_y = 0, h_width = Graphics.width, h_height = WLH + 32)

    super ()

    self.x, self.y, self.width, self.height = h_x, h_y, h_width, h_height

    contents.dispose

    self.contents = Bitmap.new (h_width - 32, h_height - 32)

    end

    end

     

    #==============================================================================

    # ** Game_System

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Summary of Changes:

    # new instance variables - quest_disabled, quest_keyaccess

    # aliased method - initialize

    #==============================================================================

     

    class Game_System

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Public Instance Variables

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    attr_accessor :quest_disabled # Can you access quest journal at this time

    attr_accessor :quest_keyaccess # Is it accessible by key?

    attr_accessor :quest_menuaccess # Is it accessible through the menu

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_qst_jrnl_system_init_quests initialize

    def initialize

    # Run Original Method

    modalg_qst_jrnl_system_init_quests

    # Initialize new variables

    @quest_disabled = false

    @quest_keyaccess = ModAlg_QuestData::KEY_ACCESS

    @quest_menuaccess = ModAlg_QuestData::MENU_ACCESS

    end

    end

     

    #==============================================================================

    # ** Game_Party

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Summary of Changes:

    # new instance variable - quests

    # aliased method - initialize

    #==============================================================================

     

    class Game_Party

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Public Instance Variables

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    attr_reader :quests

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_qst_jrnl_party_init_quests initialize

    def initialize

    # Run Original Method

    modalg_qst_jrnl_party_init_quests

    # Initialize @quests

    @quests = Game_Quests.new

    end

    end

     

    #==============================================================================

    # ** Game_Quests

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This class handles Quests. It is a wrapper for the built-in class "Hash".

    # The instance of this class is accessed by $game_party.quests

    #==============================================================================

     

    class Game_Quests

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize

    @data = {}

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Get Quest

    # quest_id : the ID of the quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def [] (quest_id)

    @data[quest_id] = ModAlg_QuestData::Quest.new (quest_id) if @data[quest_id] == nil

    return @data[quest_id]

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Get Quest List

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def list

    quest_list = @data.values

    quest_list.each { |i| quest_list.delete (i) if i.concealed }

    return quest_list

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Get Completed Quest List

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def completed_list

    complete_quests = []

    list.each { |i| complete_quests.push (i) if i.complete? }

    return complete_quests

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Get Failed Quest List

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def failed_list

    failed_quests = []

    list.each { |i| failed_quests.push (i) if i.failed? }

    return failed_quests

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Get Active Quest List

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def active_list

    return list - failed_list - completed_list

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Revealed?

    # quest_id : the ID of a checked quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def revealed? (quest_id)

    return @data[quest_id] != nil

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Remove Quest

    # quest_id : the ID of a checked quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def remove (quest_id)

    @data.delete (quest_id)

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Clear

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def clear

    @data.clear

    end

    end

     

    #==============================================================================

    # ** Window_Command

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Summary of Changes:

    # new instance variable - disabled_commands

    # aliased method - initialize, draw_item

    #==============================================================================

     

    class Window_Command

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Public Instance Variable

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    attr_reader :disabled_commands

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Initialize

    # width : window width

    # commands : command string array

    # column_max : digit count (if 2 or more, horizontal selection)

    # row_max : row count (0: match command count)

    # spacing : blank space when items are arrange horizontally

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_jrnl_intlz initialize

    def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)

    # Initialize new instance variable

    @disabled_commands = []

    # Run Original Method

    modalg_quest_jrnl_intlz (width, commands, column_max, row_max, spacing)

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Draw Item

    # index : item number

    # enabled : enabled flag. When false, draw semi-transparently

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_jrnl_itm_drw draw_item

    def draw_item (index, enabled = true)

    # Run Original Method

    modalg_quest_jrnl_itm_drw (index, enabled)

    enabled ? @disabled_commands.delete (index) : @disabled_commands.push (index)

    end

    end

     

    #==============================================================================

    # ** Window_Message

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Summary of Changes:

    # aliaed method - convert_special_characters

    #==============================================================================

     

    class Window_Message

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Convert Special Characters

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_jrnl_spec_char_convert convert_special_characters

    def convert_special_characters

    @text.gsub! (/\\NQ\[(\d+)\]/i) { $game_party.quests[$1.to_i] } # Name Quest

    # Run Original Method

    modalg_quest_jrnl_spec_char_convert

    end

    end

     

    #==============================================================================

    # ** Window_QuestLabel

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This window signifies that this is a quest list

    #==============================================================================

     

    class Window_QuestLabel < Window_Base

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize

    super (0, 0, 160 + WLH, 32 + WLH)

    create_contents

    contents.font.color = system_color

    contents.draw_text (0, 0, contents.width, WLH, ModAlg_QuestData::QUESTS_LABEL, 1)

    end

    end

     

    #==============================================================================

    # ** Window_QuestCategory

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This window displays which category is being viewed

    #==============================================================================

     

    class Window_QuestCategory < Window_Base

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize

    super (0, WLH + 32, 160 + WLH, 64)

    create_contents

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Refresh

    # category_index : icon to highlight -

    # 0 => All, 1 => Active, 2 => Complete, 3 => Failed

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def refresh (category_index = 0)

    contents.clear

    # Retrieve Icon Bitmaps

    bitmap = Cache.system("Iconset")

    icon_index = ModAlg_QuestData::ACTIVE_QUEST_ICON

    active_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)

    icon_index = ModAlg_QuestData::COMPLETE_QUEST_ICON

    complete_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)

    icon_index = ModAlg_QuestData::FAILED_QUEST_ICON

    failed_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)

    # Combine the three icons for the All Icon

    all_icon = Bitmap.new (40, 32)

    all_icon.blt (0, 0, bitmap, complete_rect)

    all_icon.blt (20, 0, bitmap, failed_rect)

    all_icon.blt (8, 10, bitmap, active_rect)

    distance = (contents.width - 112) / 3

    x = 0

    # Draw the 'All' Icon onto the window

    contents.blt (x, 0, all_icon, all_icon.rect, category_index == 0 ? 255 : 128)

    x += 40 + distance

    # Draw the 'Active' Icon onto the window

    contents.blt (x, 4, bitmap, active_rect, category_index == 1 ? 255 : 128)

    x += 24 + distance

    # Draw the 'Complete' Icon onto the window

    contents.blt (x, 4, bitmap, complete_rect, category_index == 2 ? 255 : 128)

    x += 24 + distance

    # Draw the 'Failed' Icon onto the window

    contents.blt (x, 4, bitmap, failed_rect, category_index == 3 ? 255 : 128)

    end

    end

     

    #==============================================================================

    # ** Window_QuestList

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This window displays the list of quests

    #==============================================================================

     

    class Window_QuestList < Window_Selectable

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize (category_index = 0, index = 0)

    super (0, 64 + (WLH + 32), 160 + WLH, Graphics.height - 64 - 2*(WLH + 32))

    @data = []

    @column_max = 1

    refresh (category_index)

    self.index = index

    self.active = true

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Quest

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def quest

    return @data[self.index]

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Refresh

    # category_index : List to show -

    # 0 => All, 1 => Active, 2 => Complete, 3 => Failed

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def refresh (category_index = 0)

    font = Font.new

    @data.clear

    self.index = 0

    # Get the quest list to be drawn

    case category_index

    when 0

    @data = $game_party.quests.list

    when 1

    @data = $game_party.quests.active_list

    font.color = text_color (ModAlg_QuestData::ACTIVE_COLOUR)

    when 2

    @data = $game_party.quests.completed_list

    font.color = text_color (ModAlg_QuestData::COMPLETE_COLOUR)

    when 3

    @data = $game_party.quests.failed_list

    font.color = text_color (ModAlg_QuestData::FAILED_COLOUR)

    end

    @item_max = @data.size

    unless contents == nil

    # Clear Contents

    contents.clear

    return if @data.empty?

    contents.dispose

    end

    # Create Contents

    self.contents = Bitmap.new (width - 32, WLH*@data.size)

    contents.font = font

    # Draw the Quest Names

    for i in 0...@data.size

    quest = @data

    # If all, distinguish between quest types by colour

    if category_index == 0

    if quest.complete?

    contents.font.color = text_color (ModAlg_QuestData::COMPLETE_COLOUR)

    elsif quest.failed?

    contents.font.color = text_color (ModAlg_QuestData::FAILED_COLOUR)

    else # Active

    contents.font.color = text_color (ModAlg_QuestData::ACTIVE_COLOUR)

    end

    end

    draw_icon (quest.icon_index, 0, i*WLH)

    # Draw the name of the quest

    contents.draw_text (24, i*WLH, contents.width - 24, WLH, quest.name)

    end

    end

    end

     

    #==============================================================================

    # ** Window_QuestInfo

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # This window displays the information on the quest being viewed

    #==============================================================================

     

    class Window_QuestInfo < Window_Base

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def initialize

    super (160 + WLH, 0, Graphics.width - (160 + WLH), Graphics.height - (32 + WLH))

    create_contents

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Refresh

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    def refresh (quest = nil)

    contents.clear

    return if quest == nil

    # Draw the name of the Quest, centred

    contents.font.color = normal_color

    contents.draw_text (0, 0, contents.width, WLH, quest.name, 1)

    # If the font has set width characters

    if contents.text_size ('w').width == contents.text_size ('i').width

    formatter = Paragrapher::Formatter_2.new

    else

    formatter = Paragrapher::Formatter.new

    end

    # Format the description

    desc_bitmap = Bitmap.new (contents.width - 16, (2.4*WLH).to_i)

    desc_bitmap.font.size -= 4

    formatted_desc = formatter.format (quest.description, desc_bitmap)

    # Draw the Description Box

    box_height = [WLH*(formatted_desc.lines.size + 1), 3*WLH].min

    rect = Rect.new (2, (1.5*WLH).to_i, contents.width - 4, box_height)

    contents.fill_rounded_rect (rect, system_color, 10)

    rect.x, rect.y = rect.x + 2, rect.y + 2

    rect.width, rect.height = rect.width - 4, rect.height - 4

    contents.fill_rounded_rect (rect, Color.new (0, 0, 0, 0), 10)

    tw = contents.text_size ('Description').width

    # Draw the description signifier

    contents.fill_rect (32, (1.5*WLH).to_i, tw + 2, 2, Color.new (0, 0, 0, 0))

    contents.font.color = system_color

    contents.draw_text (33, WLH, tw, WLH, 'Description')

    # Paragraph Artist

    artist = Paragrapher::Artist.new

    # If bitmap is too large

    if formatted_desc.lines.size < 2

    formatted_desc.bitmap = Bitmap.new (contents.width - 16, formatted_desc.lines.size*WLH)

    formatted_desc.bitmap.font.size -= 4

    end

    bmp = artist.draw (formatted_desc)

    # Centre within the box

    y = rect.y + 4 + (rect.height - bmp.height) / 2

    contents.blt (8, y, bmp, bmp.rect)

    bmp.dispose

    y = 2*WLH + rect.height + 4

    # Draw Objectives Signifier Text

    contents.font.color = system_color

    tw = contents.text_size ('Objectives').width

    contents.draw_text (32, y, tw, WLH, 'Objectives')

    y += WLH

    quest.revealed_objectives.each { |i|

    # Get the correct color

    contents.font.color = quest.complete_objectives.include? (i) ?

    text_color (ModAlg_QuestData::COMPLETE_COLOUR) : quest.failed_objectives.include? (i) ?

    text_color (ModAlg_QuestData::FAILED_COLOUR) : text_color (ModAlg_QuestData::ACTIVE_COLOUR)

    # Get objective

    objective = quest.objectives

    # Draw Bullet

    tw = contents.text_size (ModAlg_QuestData::BULLET_CHARACTER).width

    x = 8

    contents.draw_text (x, y, tw, WLH, ModAlg_QuestData::BULLET_CHARACTER)

    x += tw + 4

    # Format the objective

    obj_bitmap = Bitmap.new (contents.width - x, 2*WLH)

    obj_bitmap.font = contents.font

    obj_bitmap.font.size -= 4

    formatted_obj = formatter.format (objective, obj_bitmap)

    # Draw Objective

    bmp = artist.draw (formatted_obj)

    contents.blt (x, y + 4, bmp, bmp.rect)

    # Modify the Y accordingly

    y += WLH*([formatted_obj.lines.size, 2].min)

    }

    end

    end

     

    #==============================================================================

    # ** Scene_Map

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Summary of Changes:

    # aliased method - update

    #==============================================================================

     

    class Scene_Map < Scene_Base

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Frame Update

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_journal_map_upd_key_access update

    def update

    modalg_quest_journal_map_upd_key_access

    # If the quest log can be accessed by key and is not empty or disabled

    if $game_system.quest_keyaccess && !$game_system.quest_disabled && !$game_party.quests.list.empty?

    $scene = Scene_Quest.new if Input.trigger? (ModAlg_QuestData::MAPKEY_BUTTON)

    end

    end

    end

     

    #==============================================================================

    # ** Scene_Menu

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Summary of Changes:

    # aliased methods - initialize, create_command_window, update_command_selection

    #==============================================================================

     

    class Scene_Menu < Scene_Base

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Object Initialization

    # menu_index : command cursor's initial position

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_jrnl_init initialize

    def initialize(menu_index = 0)

    modalg_quest_jrnl_init (menu_index)

    return unless $game_system.quest_menuaccess

    if @menu_index == 'Quest'

    @menu_index = ModAlg_QuestData::MENU_INDEX

    elsif @menu_index >= ModAlg_QuestData::MENU_INDEX

    @menu_index += 1

    end

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Create Command Window

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_journal_menu_cmmnd_win_create create_command_window

    def create_command_window

    modalg_quest_journal_menu_cmmnd_win_create

    # If accessed through map, then don't add it to the menu

    return unless $game_system.quest_menuaccess

    c = @command_window.commands

    c.insert (ModAlg_QuestData::MENU_INDEX, ModAlg_QuestData::QUESTS_LABEL)

    width = @command_window.width

    disabled = @command_window.disabled_commands

    @command_window.dispose

    @command_window = Window_Command.new(width, c)

    @command_window.index = @menu_index

    # Disable all of the old commands as well

    disabled.each { |i|

    i += 1 if i >= ModAlg_QuestData::MENU_INDEX

    @command_window.draw_item (i, false)

    }

    if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled

    @command_window.draw_item (ModAlg_QuestData::MENU_INDEX, false)

    end

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Update Command Selection

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_journal_menu_cmmnd_select_upd update_command_selection

    def update_command_selection

    if $game_system.quest_menuaccess

    changed = false

    if @command_window.index == ModAlg_QuestData::MENU_INDEX && Input.trigger? (Input::C)

    if $game_system.quest_disabled || $game_party.quests.list.empty? # If Quest Journal disabled

    Sound.play_buzzer

    else

    # Open Quest Window

    Sound.play_decision

    $scene = Scene_Quest.new

    end

    return

    end

    # If the command index is greater than it ought to be, make sure

    if @command_window.index > ModAlg_QuestData::MENU_INDEX

    @command_window.index = (@command_window.index - 1) % @command_window.commands.size

    changed = true

    end

    end

    modalg_quest_journal_menu_cmmnd_select_upd

    return unless $game_system.quest_menuaccess

    @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed

    end

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # * Update Actor Selection

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    alias modalg_quest_jrnl_actor_selection_upd update_actor_selection

    def update_actor_selection

    changed = false

    if $game_system.quest_menuaccess && @command_window.index > ModAlg_QuestData::MENU_INDEX

    @command_window.index = (@command_window.index - 1) % @command_window.commands.size

    changed = true

    end

    modalg_quest_jrnl_actor_selection_upd

    return unless $game_system.quest_menuaccess

    @command_window.index = (@command_window.index + 1) % @command_window.commands.size if changed

    end

    end

     

    #==============================================================================

    # ** Scene_Quest

    #------------------------------------------------------------------------------

    # This class performs the quest screen processing.

    #==============================================================================

     

    class Scene_Quest < Scene_Base

    #--------------------------------------------------------------------------

    # * Object Initialization

    # menu_index : command cursor's initial position

    #--------------------------------------------------------------------------

    def initialize(category_index = 0, quest_index = 0)

    @category_index = category_index

    @quest_index = quest_index

    end

    #--------------------------------------------------------------------------

    # * Start processing

    #--------------------------------------------------------------------------

    def start

    super

    create_menu_background

    # Create Windows

    @label_window = Window_QuestLabel.new

    @category_window = Window_QuestCategory.new

    @category_window.refresh (@category_index)

    @list_window = Window_QuestList.new (@category_index, @quest_index)

    @info_window = Window_QuestInfo.new

    @info_window.refresh (@list_window.quest)

    @help_window = Window_VarySizeHelp.new

    @help_window.y = Graphics.height - @help_window.height

    @help_window.set_text ('Use Horizontal Arrow Keys to change categories', 1)

    end

    #--------------------------------------------------------------------------

    # * Termination Processing

    #--------------------------------------------------------------------------

    def terminate

    super

    dispose_menu_background

    @label_window.dispose

    @category_window.dispose

    @list_window.dispose

    @info_window.dispose

    @help_window.dispose

    end

    #--------------------------------------------------------------------------

    # * Frame Update

    #--------------------------------------------------------------------------

    def update

    super

    update_menu_background

    # Since the only possible activity is from @list_window, put it here

    @list_window.update

    if Input.trigger?(Input::cool.gif # If Button B is pressed

    Sound.play_cancel

    # If Returning to Menu

    if $game_system.quest_menuaccess

    $scene = Scene_Menu.new ('Quest')

    else # Returning to Map

    $scene = Scene_Map.new

    end

    elsif Input.trigger? (Input::C) # If C button is pressed

    # Open Journal (eventually)

    elsif Input.trigger? (Input::LEFT) # If Left direction pressed

    # Play Cursor SE

    Sound.play_cursor

    # Refresh Category Window

    @category_index = (@category_index - 1) % 4

    @category_window.refresh (@category_index)

    @list_window.refresh (@category_index)

    @info_window.refresh (@list_window.quest)

    elsif Input.trigger? (Input::RIGHT) # If Right direction pressed

    # Play Cursor SE

    Sound.play_cursor

    # Refresh Category Window

    @category_index = (@category_index + 1) % 4

    @category_window.refresh (@category_index)

    @list_window.refresh (@category_index)

    @info_window.refresh (@list_window.quest)

    # If scrolling through quests

    elsif Input.trigger? (Input::DOWN) || Input.trigger? (Input::UP)

    # Refresh Info Window

    @info_window.refresh (@list_window.quest)

    end

    end

    end

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  10. Io ho uno script x visualizzare l'equip sul pg.. l'inizio dello script è questo

     

    module User_Edit

     

     

     

    # VISUAL EQUIPMENT: Permette di vedere l'equipaggiamento del personaggio

    VE = true # Abilità Visual Equipment [true/false]

    ARMA = false # MOSTRA = true / false

    SCUDO = true # MOSTRA = true / false

    ARMATURA = true # MOSTRA = true / false

    ELMO = true # MOSTRA = true / false

    ALTRO = true # MOSTRA = true / false

     

    end

     

     

    Si può tramite evento con un chiama script , cambiare i valori da true a false??

    se si come???

  11. Dice sempre che undefined method 'count' for Nil:Nilclass

     

    e se salvo e poi vado a caricare mi da errore allo script che mi hai dtt tu

     

    e dice undefined method 'questlog for #<Game_System:0x7a0c0b0>

     

    Vabbè mi sa che torno all rpg maker tradizionale, xk quello online ha troppi problemi!

    Questo è solo 1 poi ce ne sono altre 10000

  12. allora come sappiamo le variabili dell'esperienza che possiamo utilizzare sono

    exp_s | Esperienza attuale

    next_exp_s | Esperienza del prossimo livello

    next_rest_exp_s| Esperianza mancante per il prossimo livello

     

     

    Nel window base è forumala cosi

    def draw_actor_exp(actor, x, y)

    self.contents.font.color = system_color

    self.contents.draw_text(x, y, 24, 32, "Exp")

    self.contents.font.color = normal_color

    #actor.next_exp_s - actor.exp_s

    self.contents.draw_text(x + 24, y, 84, 32,actor.exp_s, 2)

    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)

    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)

    end

     

     

    Io come valori vorrei mettere l'esperienza del livello attuale del personaggio, non tutta l'esperienza acquisita fino a quel livello ...e poi metto " / " e next_rest_exp_s

     

    Ditemi come posso fare!

  13. Mi rivolgo a quelli + esperti..io utlizzo rpg maker online con netplay

    Qui però c'è uno script, lo script delle missione

     

     

     

     

     

     

     

    #==============================================================================

    # ** Scene_Quest

    #------------------------------------------------------------------------------

    # MOSTRA TUTTE LE MISSIONI IN CORSO

    # NON CAMBIARE LA POSIZIONE DI QUESTO SCRIPT!

    # DEVE SEMPRE RIMANERE PRIMA DEGLI HUD

    #==============================================================================

     

     

    class Scene_Quest

    def main

    Network::Main.set_pl_online_status("Offline")

    @window_header = Window_Questlog_Header.new

    @window_titles = Window_Questlog_Titles.new

    description = ""

    picture = ""

    if $game_system.questlog.count > 0

    description = $game_system.questlog.quests[0].description

    picture = $game_system.questlog.quests[0].picture

    end

    @window_description = Window_Questlog_Description.new(

    description, picture)

    @index = @window_titles.index

    @spriteset = Sprite.new

    @spriteset.bitmap = RPG::Cache.title(User_Edit::Sfondo)

     

    Graphics.transition

    loop do

    Graphics.update

    Input.update

    update

    if $scene != self

    break

    end

    end

    Graphics.freeze

    @window_header.dispose

    @window_titles.dispose

    @window_description.dispose

    @spriteset.dispose

    end

    #--------------------------------------------------------------------------

    def update

    @window_titles.update

    if Input.trigger?(Input::B)

    $game_system.se_play($data_system.cancel_se)

    $scene = Scene_Map.new

    return

    end

    if @index != @window_titles.index

    @index = @window_titles.index

    @window_description.description = $game_system.questlog.quests[

    @window_titles.index].description

    @window_description.picture = $game_system.questlog.quests[

    @window_titles.index].picture

    @window_description.refresh

    end

    end

    end

    #=============

    class Quest

    attr_reader :title

    attr_reader :description

    attr_reader :icon

    attr_reader :picture

    attr_accessor :enabled

    def initialize(title, description="Nessuna descrizione disponibile", icon="040-Item09", picture="NoImage")

    @title = title

    @description = description

    @icon = icon

    @picture = picture

    @enabled = true

    end

    end

    #============

    class Questlog

    attr_reader :quests

    def initialize

    @quests = []

    end

    #-----------

    def add(quest, description="Nessuna descrizione disponibile", icon="040-Item09", picture="NoImage")

    return add(Quest.new(quest, description, icon, picture)) unless

    quest.is_a?(Quest)

    i = index(quest.title)

    return @quests = quest if i != nil

    #@quests.push(quest) # Quest wird unten eingefügt

    @quests.unshift(quest) # Quest wird oben eingefügt

    end

    #-----------

    def remove(title)

    @quests.delete_if{ |quest| quest.title == title}

    end

    #-----------

    def enable(title)

    set_enabled(title, true)

    end

    #-----------

    def disable(title)

    set_enabled(title, false)

    end

    #-----------

    def set_enabled(title, enabled)

    @quests.each do |quest|

    quest.enabled = enabled if quest.title == title

    end

    end

    #-----------

    def count

    return @quests.length

    end

    #------------

    def index(title)

    for i in 0..@quests.length - 1

    return i if @quests.title == title

    end

    return nil

    end

    #------------

    def Questlog.add(title, description="Nessuna descrizione disponibile", icon="040-Item09", picture="NoImage")

    $game_system.questlog.add(title, description, icon, picture)

    end

    #------------

    def Questlog.remove(title)

    $game_system.questlog.remove(title)

    end

    #------------

    def Questlog.enable(title)

    $game_system.questlog.enable(title)

    end

    #------------

    def Questlog.disable(title)

    $game_system.questlog.disable(title)

    end

    #------------

    def Questlog.set_enabled(title)

    $game_system.questlog.set_enabled(title)

    end

    end

    #=============

     

    class Window_Questlog_Description < Window_Base

    attr_accessor :description

    attr_accessor :picture

    def initialize(description, picture)

    super(275, 92, 300, 360)

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

    self.contents.font.name = $defaultfonttype

    self.contents.font.size = $defaultfontsize

    @description = description

    @picture = picture

    refresh

    end

    #-----------

    def refresh

    self.contents.clear

    if (@picture != nil) && (not @picture == "")

    bitmap = RPG::Cache.picture(@picture)

    rect = bitmap.rect

    self.contents.blt(width/2-rect.width/2-16, 0, bitmap, rect, 255)

    self.contents.draw_formatted_text(

    4, rect.height, 270, 328-rect.height, @description)

    else

    self.contents.draw_formatted_text(4, 0, 270, 328, @description)

    end

    end

    end

    #=============

     

    class Window_Questlog_Titles < Window_Selectable

    def initialize

    super(65, 92, 210, 360)

    @item_max = $game_system.questlog.count

    self.contents = Bitmap.new(width-32, @item_max > 0 ? @item_max*32 : 32)

    self.contents.font.name = $defaultfonttype

    self.contents.font.size = $defaultfontsize

    self.index = 0

    @column_max = 1

    refresh

    end

    #-------------

    def refresh

    self.contents.clear

    for i in 0...$game_system.questlog.count

    quest = $game_system.questlog.quests

    y = i*32

    self.contents.font.color = quest.enabled ? normal_color : disabled_color

    if (quest.icon != nil) && (not quest.icon == "")

    bitmap = RPG::Cache.icon(quest.icon)

    opacity = quest.enabled ? 255 : 128

    self.contents.blt(4, y+4, bitmap, Rect.new(0, 0, 24, 24), opacity)

    self.contents.draw_formatted_text(29, y, 150, 32, quest.title)

    else

    self.contents.draw_formatted_text(4, y, 150, 32, quest.title)

    end

    end

    end

    end

    #===========

    class Window_Questlog_Header < Window_Base

    def initialize

    super(65, 28, 510, 64)

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

    self.contents.font.name = $defaultfonttype

    self.contents.font.size = 26

    refresh

    end

    #------------

    def refresh

    self.contents.clear

    self.contents.draw_text(self.contents.rect, "Quest in corso da #{$game_party.actors[0].name}", 1)

    end

    end

    #===========

    class Scene_Map

    def call_questlog

    $game_temp.questlog_calling = false

    $game_player.straighten

    $scene = Scene_Quest.new

    end

    end

    #===========

    class Game_System

    attr_reader :questlog

    alias init initialize

    def initialize

    init

    @questlog = Questlog.new

    end

    end

    #===========

    class Game_Temp

    attr_accessor :questlog_calling

    alias init initialize

    def initialize

    init

    @questlog_calling = false

    end

    end

    #==============

    class Bitmap

    def draw_shadow_text(x, y, width, height, str, align=0)

    color = font.color.dup

    font.color = Color.new(192, 192, 192, 156)

    draw_text(x+2, y+2, width, height, str, align)

    font.color = color

    draw_text(x, y, width, height, str, align)

    end

    #----------------

    def draw_formatted_text(x, y, width, height, str, align=0)

    str = str.dup

    color = font.color.dup

    bold = font.bold

    italic = font.italic

    size = font.size

    name = font.name.dup

    #::::::::::

    shadow = false

    underlined = false

    str.gsub!(/<br>/) {"\n"}

    str.gsub!(/\\\\/) {"\00"}

    str.gsub!(/<b>/) {"\01"}

    str.gsub!(/<\/b>/) {"\02"}

    str.gsub!(/<i>/) {"\03"}

    str.gsub!(/<\/i>/) {"\04"}

    str.gsub!(/<color=(#?[0-9a-z]+)>/) {"\05[#{$1}]"}

    str.gsub!(/<\/color>/) {"\06"}

    str.gsub!(/<shadow>/) {"\16"}

    str.gsub!(/<\/shadow>/) {"\17"}

    str.gsub!(/<small>/) {"\20"}

    str.gsub!(/<\/small>/) {"\21"}

    str.gsub!(/<big>/) {"\23"}

    str.gsub!(/<\/big>/) {"\21"}

    str.gsub!(/<size=([0-9]+)>/) {"\24[#{$1}]"}

    str.gsub!(/<\/size>/) {"\21"}

    str.gsub!(/<font=([A-Za-z0-9\s]+)>/) {"\25[#{$1}]"}

    str.gsub!(/<\/font>/) {"\26"}

    str.gsub!(/<u>/) {"\27"}

    str.gsub!(/<\/u>/) {"\30"}

    ix = 0

    iy = 0

    while ((c = str.slice!(/./m)) != nil)

    if c == "\00" # \\

    c = "\\"

    end

    if c == "\01" # <b>

    font.bold = true

    end

    if c == "\02" #</b>

    font.bold = false

    end

    if c == "\03" # <i>

    font.italic = true

    end

    if c == "\04" # </i>

    font.italic = false

    end

    if c == "\05" # <color=xxx>

    str.sub!(/\[(#?[0-9a-z]+)\]/, "")

    if $1[0] == 35

    col = Color.decode($1)

    elsif $1.to_i != 0

    col = Window_Base.text_color($1.to_i)

    else

    col = Color.get($1)

    end

    font.color = col

    end

    if c == "\06" # </color>

    font.color = color

    end

    if c == "\16" # <shadow>

    shadow = true

    end

    if c == "\17" # </shadow>

    shadow = false

    end

    if c == "\20" # <small>

    font.size -= 5

    font.size = 1 if font.size < 1

    end

    if c == "\21" # </small> </big> </size>

    font.size = size

    end

    if c == "\23" # <big>

    font.size += 5

    end

    if c == "\24" # <size=xx>

    str.sub!(/\[([0-9]+)\]/, "")

    font.size = $1.to_i

    font.size = 1 if font.size < 1

    end

    if c == "\25" # <font=xxx>

    str.sub!(/\[([A-Za-z0-9\s]+)\]/, "")

    font.name = $1 if Font.exist?($1)

    end

    if c == "\26" # </font>

    font.name = name

    end

    if c == "\27" # <u>

    underlined = true

    end

    if c == "\30" # </u>

    underlined = false

    end

    if c == "\n"

    iy += 18

    ix = 0

    end

    #:::::::::

    if shadow

    draw_shadow_text(x+ix+4, y+iy, 40, 32, c)

    else

    draw_text(x+ix+4, y+iy, 40, 32, c)

    end

    w = text_size©.width

    if underlined

    fill_rect(x+ix+4, y+iy+text_size("T").height+3, w, 2, font.color)

    end

    ix += w

    end

    #::::::::::

    font.color = color

    font.bold = bold

    font.italic = italic

    font.size = size

    font.name = name

    end

    end

    #==============

    class Color

    def Color.get(string)

    return Color.white if string == "white"

    return Color.black if string == "black"

    return Color.red if string == "red"

    return Color.green if string == "green"

    return Color.blue if string == "blue"

    return Color.yellow if string == "yellow"

    return Color.cyan if string == "cyan"

    return Color.magenta if string == "magenta"

    return Color.light_gray if string == "light_gray"

    return Color.gray if string == "gray"

    return Color.dark_gray if string == "dark_gray"

    return Color.pink if string == "pink"

    return Color.orange if string == "orange"

    return Color.white

    end

    #------------

    def Color.decode(hex)

    return Color.decode(hex[1..hex.length]) if hex[0] == 35

    hex.downcase!

    red = hex[0..1].hex

    green = hex[2..3].hex

    blue = hex[4..5].hex

    alpha = hex.length == 8 ? hex[6..7].hex : 255

    return Color.new(red, green, blue, alpha)

    end

    #------------

    def Color.white(alpha=255)

    return Color.new(255, 255, 255, alpha)

    end

    #-----------

    def Color.black(alpha=255)

    return Color.new(0, 0, 0, alpha)

    end

    #----------

    def Color.red(alpha=255)

    return Color.new(255, 0, 0, alpha)

    end

    #----------

    def Color.green(alpha=255)

    return Color.new(0, 255, 0, alpha)

    end

    #---------

    def Color.blue(alpha=255)

    return Color.new(0, 0, 255, alpha)

    end

    #----------

    def Color.yellow(alpha=255)

    return Color.new(255, 255, 0, alpha)

    end

    #----------

    def Color.cyan(alpha=255)

    return Color.new(0, 255, 255, alpha)

    end

    #----------

    def Color.magenta(alpha=255)

    return Color.new(255, 255, 0, alpha)

    end

    #----------

    def Color.light_gray(alpha=255)

    return Color.new(192, 192, 192, alpha)

    end

    #-----------

    def Color.gray(alpha=255)

    return Color.new(128, 128, 128, alpha)

    end

    #-----------

    def Color.dark_gray(alpha=255)

    return Color.new(64, 64, 64, alpha)

    end

    #-----------

    def Color.pink(alpha=255)

    return Color.new(255, 175, 175, alpha)

    end

    #-----------

    def Color.orange(alpha=255)

    return Color.new(255, 200, 0, alpha)

    end

    end

    #=====================

    class Window_Base < Window

    def Window_Base.text_color(n)

    case n

    when 0

    return Color.new(255, 255, 255, 255)

    when 1

    return Color.new(128, 128, 255, 255)

    when 2

    return Color.new(255, 128, 128, 255)

    when 3

    return Color.new(128, 255, 128, 255)

    when 4

    return Color.new(128, 255, 255, 255)

    when 5

    return Color.new(255, 128, 255, 255)

    when 6

    return Color.new(255, 255, 128, 255)

    when 7

    return Color.new(192, 192, 192, 255)

    else

    return Color.white

    end

    end

    end

     

     

     

     

     

     

     

    Mi rivolgo ai più esperti perchè non penso che lo possiate provare

    Quindi mi serve qualcuno che capisca subito il problema

     

     

    Allora mi da errore alla riga 173 --> @item_max = $game_system.questlog.count

    e mi dice che 'count' non è definito

     

     

    def initialize

    super(65, 92, 210, 360)

    @item_max = $game_system.questlog.count

    self.contents = Bitmap.new(width-32, @item_max > 0 ? @item_max*32 : 32)

    self.contents.font.name = $defaultfonttype

    self.contents.font.size = $defaultfontsize

    self.index = 0

    @column_max = 1

    refresh

    end

     

     

     

     

    Se però andiamo alla riga 109 lo definisce all'interno della class questlog

     

    def count

    return @quests.length

    end

     

    questo count praticamente gli serve per sapere il numero delle missioni, forse è sbagliato il .length

    ma se da errore xk dice che 'count' non è definito sarà xk è richiamato male con

    @item_max = $game_system.questlog.count

     

     

    Se riuscite a capire il problema ditemelo!

    Grx!

  14. Esiste un modo per dividere un'immagine grande di icone, nelle singole, senza doverle prelevare 1 ad 1?

    perchè io ho un'immagine che racchiude circa 12000 icone, però nn mi vojo spezzare la schiena x salvarle 1 ad 1

    se esiste un programmino..

    Ditemi voi!

  15. Allora quello che sto per dirvi è fattibilissimo ad eventi però ho un piccolo bug x uno script che quindi se qualcuno facesse un piccolo script sarebbe meglio..

    prendiamo un arma..es spada di bronzo..io vorrei uno script che quando richiamo lo script attraverso dei parametri assegnati, la stessa arma cambi il suo valore d'attacco, i bonus forza, int ecc.., casomai anche gli attributi.

    e questo anche x le armature,elmi ecc..

     

    Potrei farlo ad eventi cioè faccio un arma identica con attacco maggiore e poi tramite evento con "cambia equipaggiamento" gli sostituisco l'arma. però come ho detto prima il cambia equipaggiamento mi crea un piccolo difetto nel mio menu che ora nn sto a spiegare.

     

    grx lo stesso xD

  16. Lo screen purtroppo non me lo carica nn so perchè avevo gia provato,

    comunque io utilizzo solo la barra degli hp perchè alla fine a che ti serve sapere quanti mp a il nemico?

    è stupido!

    comunque lo script è stato creato da SephirothSpawn

    --QUI--

     

    Fra qualche giorno tornerò con lo script diario di viaggio di syaler perchè ho trovato 2 errori e li ho corretti

    Bye :Ok:

×
×
  • Create New...