Jump to content
Rpg²S Forum
  • 0

[RISOLTO] Strano bug nel menù o_o


nihil-omen
 Share

Question

Salve ragazzi!

 

Come avevo già accennato sul topic del progetto, sto modificando il menù, che è fondamentalmente quasi completo, dovrò solo aggiungere un'altra voce e poi avrò finito ^_^

 

Il problema è che tra i comandi che ho messo ce ne è uno che non funziona :/

 

Dovrebbe far apparire una finestra che sovrasta tutte le altre, so come si fa perchè ne ho fatti altri due identici a questo e che funzionano a meraviglia, però questo non riesco proprio a farlo funzionare!

 

In pratica, fa apparire sì la finestra (che in realtà è un'immagine non è una finestra standard) ma non mi fa apparire le scritte (quindi mi viene da pensare che l'oggetto in questione @esp_window.visible sia false, nonostante gli dia il comando di settarlo su true :/)!

La finestra è programmata bene perchè se scambio il nome della sua classe con quella di una delle altre due (e quindi cambiando l'index nella @command_window), le scritte appaiono!

 

Vi posto il codice dell'update dei comandi vari, magari mi sapreste aiutare...

 

Ah un particolare, questo comando è attivo solo se la variabile[15] è maggiore di 1. Se non è così, non fa apparire la scritta e la command window ha un comando in meno.

 

Ecco a voi il codice ç_ç

 

def update_command	case @command_window.index	when 0	  @help_window.set_text("Equipaggia armi e abiti.")	  @arrow.x = 225	  @arrow.y = 160	when 1	  @help_window.set_text("Visualizza e usa gli oggetti.")	  @arrow.x = 225	  @arrow.y = 284	when 2	  if $game_variables[15] > 1		@help_window.set_text("Visualizza i poteri ESP appresi.")		@arrow.x = 225		@arrow.y = 362	  else		@help_window.set_text("Visualizza i talenti appresi.")		@arrow.x = 225		@arrow.y = 379	  end	when 3	  if $game_variables[15] > 1		@help_window.set_text("Visualizza i talenti appresi.")		@arrow.x = 225		@arrow.y = 379	  else		@help_window.set_text("Visualizza i documenti raccolti.")		@arrow.x = 225		@arrow.y = 396	  end	when 4	  if $game_variables[15] > 1		@help_window.set_text("Visualizza i documenti raccolti.")		@arrow.x = 225		@arrow.y = 396	  else		@help_window.set_text("Visualizza la mappa della location.")		@arrow.x = 225		@arrow.y = 413	  end	when 5	  if $game_variables[15] > 1		@help_window.set_text("Visualizza la mappa della location.")		@arrow.x = 225		@arrow.y = 413	  else		@help_window.set_text("Visualizza gli achievements sbloccati.")		@arrow.x = 225		@arrow.y = 430	  end  	when 6	  if $game_variables[15] > 1		@help_window.set_text("Visualizza gli achievements sbloccati.")		@arrow.x = 225		@arrow.y = 430	  else		@help_window.set_text("Permette di modificare le impostazioni e di uscire dal gioco.")		@arrow.x = 225		@arrow.y = 447	  end 	when 7	  @help_window.set_text("Permette di modificare le impostazioni e di uscire dal gioco.")		@arrow.x = 225		@arrow.y = 447	end	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  $scene = Scene_Map.new	  return	end	if Input.trigger?(Input::C)	  if $game_party.actors.size == 0 #and @command_window.index < 4		$game_system.se_play($data_system.buzzer_se)		return	  end	  case @command_window.index	  when 0		$game_system.se_play($data_system.decision_se)		@command_window.active = false		@right_window.active = true	  when 1		$game_system.se_play($data_system.decision_se)		@command_window.active = false		@item_window.active = true	  when 2		$game_system.se_play($data_system.decision_se)		@item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@equipped_esp_window.visible = false		if $game_variables[15] > 1		  @bgesp.visible = true		  @esp_window.visible = true		  @esp_window.active = true		else		  @bgw.visible = true		  @talent_window.visible = true		  @talent_window.active = true		end		@command_window.active = false 	  when 3		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  @bgw.visible = true		  @talent_window.visible = true		  @talent_window.active = true		  @item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@command_window.active = false		@equipped_esp_window.visible = false		else		  $scene = Scene_Questbook.new		end 	  when 4		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  $scene = Scene_Questbook.new		else		  $game_temp.common_event_id = (180)		  $scene = Scene_Map.new		end 	  when 5		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  $game_temp.common_event_id = (180)		  $scene = Scene_Map.new		else		  $achievements_page = 0		  @bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_0")		  @bgachi.visible = true		  @achievements_window.visible = true		  @achievements_window.active = true		  @item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@command_window.active = false		@equipped_esp_window.visible = false		end 	  when 6		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  $achievements_page = 0		  @bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_0")		  @bgachi.visible = true		  @achievements_window.visible = true		  @achievements_window.active = true		  @item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@command_window.active = false		@equipped_esp_window.visible = false		else		  $scene = Scene_Option.new		end	  when 7		$scene = Scene_Option.new	  end	  return	end  end     #--------------------------------	def update_talent	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @bgw.visible = false	  @talent_window.visible = false	  @talent_window.active = false	  @item_equip_window.visible = true	  @right_window.visible = true	  @item_window.visible = true	  @item_window1.visible = true	  @item_window2.visible = true	  @command_window.active = true	  @affinity_window.visible = true	  @partita_window.visible = true	  if $game_variables[15] > 1		@equipped_esp_window.visible = true	  end	  return	end  end  #----------------------------------	def update_achievements	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @bgachi.visible = false	  @achievements_window.visible = false	  @achievements_window.active = false	  @item_equip_window.visible = true	  @right_window.visible = true	  @item_window.visible = true	  @item_window1.visible = true	  @item_window2.visible = true	  @command_window.active = true	  @affinity_window.visible = true	  @partita_window.visible = true	  if $game_variables[15] > 1		@equipped_esp_window.visible = true	  end	  return	end	if Input.trigger?(Input::C)	  $game_system.se_play($data_system.decision_se)	  $achievements_page += 1	  if $achievements_page > 4		$achievements_page = 0	  end	  @bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_"+$achievements_page.to_s)	  @achievements_window.refresh	  return	end  end  #----------------------------------	def update_esp	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @bgesp.visible = false	  @esp_window.visible = false	  @esp_window.active = false	  @item_equip_window.visible = true	  @right_window.visible = true	  @item_window.visible = true	  @item_window1.visible = true	  @item_window2.visible = true	  @command_window.active = true	  @affinity_window.visible = true	  @partita_window.visible = true	  if $game_variables[15] > 1		@equipped_esp_window.visible = true	  end	  return	end  end

 

Qualche idea su quale potrebbe essere il problema? ç_ç

Heeeeeeeeeeeeeelp ç_ç

 

 

EDIT: ho fatto alcune prove, il visible viene settato su TRUE!!!!!

Quale può essere il problema allora?

Perchè funziona correttamente se scambio due classi? :S

Edited by nihil-omen

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Arg, mi si incrociano gli occhi >

 

Che intendi con "Perchè funziona correttamente se scambio due classi? :S "

Scambi cosa delle due classi?

 

 

Ho dato un'occhiata rapida, sembra giusto il codice, quindi l'errore secondo me non sta nella parte di codice che hai postato.

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 0

Volevo evitare di postare l'intero codice perchè è enorme (a causa della mia nubbezza) >_<

Però forse è meglio, a scanso di equivoci, postarlo tutto!

 

Per lo scambio di classi intendevo se scambio le righe 232 e 277. Quindi tutti i riferimenti di una classe vengono fatti all'altra :S

 

In tal caso, se seleziono il comando Achievements (che dopo lo scambio è colleggato alla finestra ESP) mi compare correttamente la finestra ESP, naturalmente però selezionando il comando ESP NON appare la finestra Achievements, ma soltanto l'immagine che gli fa da sfondo :S

 

#==============================================================================# ** Compact Menu#------------------------------------------------------------------------------#  Autore: The Sleeping Leonhart#  Versione: 1.1#  Data di rilascio: 2/06/2008#------------------------------------------------------------------------------#  Descrizione:#	Menu che permette l'uso di oggetti, magie ed equipaggiamento tutto nella#	stessa schermata#------------------------------------------------------------------------------#  Istruzioni:#	Editate le immagini per adattare il menu al vostro gusto.#	Le immagini dei membri del party vanno messe nella cartella Pictures#	e vanno chiamate come la grafica del loro Battler.#============================================================================== class Game_Actor < Game_Battler  def now_exp	return @exp - @exp_list[@level]  end  def next_exp	return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0  endend class Window_Base < Window  def draw_actor_exps(actor, x, y)	self.contents.font.color = system_color	self.contents.draw_text(x, y, 28, 32, "Exp")	self.contents.font.color = normal_color	if actor.now_exp != 0	  if actor.level != 99		if actor.now_exp != 0		text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00		text = text.round		  else		text = 0		end	end	else	  text = 0	end	self.contents.font.color = normal_color	self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%")  end  def draw_energia (x, y)	if $game_variables[15] >= 1  #$game_party.gold >= 1	  self.contents.font.color = system_color	  self.contents.draw_text(x, y, 110, 14, "Energia")	  self.contents.font.color = normal_color	  self.contents.draw_text(x + 56 + 25, y, 110, 14, $game_party.gold.to_s)	end	end  def draw_actor_parameter(actor, x, y, type)	case type	when 0	  parameter_name = $data_system.words.atk	  parameter_value = actor.atk	when 1	  parameter_name = $data_system.words.pdef	  parameter_value = actor.pdef	when 2	  parameter_name = $data_system.words.mdef	  parameter_value = actor.mdef	when 3	  parameter_name = $data_system.words.str  	  parameter_value = actor.str	when 4	  parameter_name = $data_system.words.dex	  parameter_value = actor.dex	when 5	  parameter_name = $data_system.words.agi	  parameter_value = actor.agi	when 6	  parameter_name = $data_system.words.int	  parameter_value = actor.int	when 7	  parameter_name = "Evasione"	  parameter_value = actor.eva	end	self.contents.font.color = system_color	self.contents.draw_text(x, y, 120, 32, parameter_name)	self.contents.font.color = normal_color	if type == 0	  if actor.skill_learn?(71)		danno_bonus = actor.level / 2.00	  elsif actor.skill_learn?(72)		danno_bonus = actor.level / 1.75	  elsif actor.skill_learn?(73)		danno_bonus = actor.level / 1.50	  elsif actor.skill_learn?(74)		danno_bonus = actor.level / 1.25	  elsif actor.skill_learn?(75)		danno_bonus = actor.level / 1.00	  end	  dmg_bonus = danno_bonus.to_i	  self.contents.draw_text(x + 85, y, 120, 32, dmg_bonus.to_s + "+" )	end	if type == 3	  case $game_party.actors[0].weapon_id	  when 1	  when 2	  when 3	  when 4	  when 5	  when 6		$game_variables[9] = $game_variables[126]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 7		$game_variables[9] = $game_variables[127]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 8		$game_variables[9] = $game_variables[128]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 9		$game_variables[9] = $game_variables[129]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 10		$game_variables[9] = $game_variables[130]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 11		$game_variables[9] = $game_variables[131]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 12		$game_variables[9] = $game_variables[132]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 13		$game_variables[9] = $game_variables[133]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 14		$game_variables[9] = $game_variables[134]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 15		$game_variables[9] = $game_variables[135]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 16		$game_variables[9] = $game_variables[136]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 17		$game_variables[9] = $game_variables[138]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 18		$game_variables[9] = $game_variables[139]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 19		$game_variables[9] = $game_variables[140]	self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	  when 20	  when 21	  when 22	  when 23	  when 24	  when 25		$game_variables[9] = $game_variables[876]		self.contents.draw_text(x + 85, y, 120, 32, $game_variables[9].to_s + "/" )	end	  if $game_party.actors[0].weapon_id == 20		variabile_lancio = $game_party.weapon_number(20) + 1		self.contents.draw_text(x + 88, y, 36, 32, variabile_lancio.to_s , 2)	  elsif $game_party.actors[0].weapon_id == 21		variabile_lancio = $game_party.weapon_number(21) + 1		self.contents.draw_text(x + 88, y, 36, 32, variabile_lancio.to_s , 2)		variabile_lancio = $game_party.weapon_number(22) + 1		self.contents.draw_text(x + 88, y, 36, 32, variabile_lancio.to_s , 2)	  elsif $game_party.actors[0].weapon_id == 23		variabile_lancio = $game_party.weapon_number(23) + 1		self.contents.draw_text(x + 88, y, 36, 32, variabile_lancio.to_s , 2)	  elsif $game_party.actors[0].weapon_id == 24		variabile_lancio = $game_party.weapon_number(24) + 1		self.contents.draw_text(x + 88, y, 36, 32, variabile_lancio.to_s , 2)	  else		self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s , 2)	  end	else	  self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s , 2)  end   endend   class Window_HpBars < Window	def initialize	  super(16, 60, 672, 672)	#================AGGIUNTE NIHIL==========================	  	  actor = $game_party.actors[0]	  x = 0	  y = 0	  draw_hp_bar(actor, x, y, 112, 3)	  y += 10	 # draw_sp_bar(actor, x, y, 112, 3)	 # draw_sp_bar(actor, x+4, y+2, 112, 3)	  y -= 11	 #===========FINE AGGIUNTE NIHIL==========================	 end   end    class Window_Talenti < Window_Base	def initialize	  super(32, 60, 672, 672)	  self.contents = Bitmap.new(width-32, height-32)	  self.opacity = 0	  self.contents.font.size = 14	  self.contents.font.name = "Arial"		#draw_backwindow(10, 84, 540, 300)		x = 0		y = 98 		for i in 1..20			mod_x = 0			demi_mod_y = (i - 1) * 15			mod_y = demi_mod_y		  if i > 10			mod_x = 0		  #  mox_y = demi_mod_y - 300		  end		  if $game_variables[825+i] > 0			getTalentName ($game_variables[825+i])			getTalentDesc ($game_variables[825+i])			if $nome_talento != " "			  draw_backwindow(x + mod_x, y + mod_y , 130, 14)			  self.contents.draw_text(x + mod_x+3, y + mod_y , 200, 14, $nome_talento)			  draw_backwindow(x + mod_x + 150, y + mod_y , 400, 14)			  self.contents.draw_text(x + mod_x + 153, y + mod_y , 400, 14, $desc_talento)			end		  end		end	end  end   class Window_Achievements < Window_Base#Window_Achievements < Window_Base	def initialize	  super(32, 60, 672, 672)	  self.contents = Bitmap.new(width-32, height-32)	  self.opacity = 0	  self.contents.font.size = 14	  self.contents.font.name = "Arial"	  refresh	end 	def refresh	  self.contents.clear 		#draw_backwindow(10, 84, 540, 300)		x = 3		y = 98		@pagina = $achievements_page		@inizio = (@pagina * 20)		@fine = ((@pagina + 1) * 20) - 1 		for i in @inizio..@fine			mod_x = 150			demi_mod_y = (i % 20) * 15			mod_y = demi_mod_y 			presente = false			codice = get_achi_id(i)			for achi in $achievements			  if codice == achi				presente = true			  end			end 			if presente == true			  draw_backwindow(0 , y + mod_y , 130, 14)			  self.contents.draw_text(x , y + mod_y , 200, 14, get_achi_name(i))			  draw_backwindow(x + mod_x, y + mod_y , 400, 14)			  self.contents.draw_text(x + mod_x, y + mod_y , 400, 14, get_achi_desc(i))			end  		end#for	end#refresh  end#class   class Window_ESP < Window_Base	def initialize	  super(32, 60, 672, 672)	  self.contents = Bitmap.new(width-32, height-32) 	  self.contents.font.size = 14	  self.contents.font.name = "Arial"		#draw_backwindow(10, 84, 540, 300)		x = 0		y = 98	  for pg in 1..4		if $game_switches[150+pg] == true 		  @pg = pg - 1		end	  end   	  num_icon = 0 		for num_esp in 0..($appresi_array_ESP[@pg].size-1) 		  if $appresi_array_ESP[@pg][num_esp] == 1 			num_icon += 1			mod_y = (num_icon - 1) * 15 			draw_backwindow(x, y + mod_y , 110, 14)			draw_backwindow(x + 120, y + mod_y , 20, 14)			draw_backwindow(x + 150, y + mod_y , 400, 14) 			self.contents.font.color = normal_color			self.contents.draw_text(x+5, y+ mod_y, 130, 14, $s_array_ESP[@pg][num_esp][0])			lvl = $l_array_ESP[@pg][num_esp][0]			prezzo = $array_ESP[@pg][num_esp][0][lvl]			self.contents.draw_text(x +125, y+ mod_y, 110, 14, prezzo.to_s)			esp_id = get_ESP_id($s_array_ESP[@pg][num_esp][0])			self.contents.draw_text(x +155, y+ mod_y, 400, 14, get_ESP_desc(esp_id) ) 		  end #if appreso 		end#FOR 	end  end    class Window_Affinity < Window_Base	def initialize	  super(50, 255, 164, 300) 	  self.contents = Bitmap.new(width-32, height-32)	  self.opacity = 0	  self.contents.font.size = 14	  self.contents.font.name = "Arial" 	  @data = []	  for i in 1...$data_skills.size		#if $game_party.item_number(i) > 0		  @data.push($data_skills[i])		#end	  end		#draw_backwindow(10, 84, 540, 300)	  refresh	end 	  def refresh		self.contents.clear		x = 0		y = 0		yp = [0,13,26,39,52,65,78,91,104,117,130,143,156,169]		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[0], 120, 15, "Vigore")		for a in 1..5		  if $game_party.actors[0].skill_learn?(40+a)		  self.contents.draw_text(x+60, y+yp[0], 120, 15, "lvl "+a.to_s)		  if a > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[1], 120, 15, @data[40+a-1].description)		  end		  end		end		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[2], 120, 15, "Vitalità")		for a in 1..5		  if $game_party.actors[0].skill_learn?(45+a)		  self.contents.draw_text(x+60, y+yp[2], 120, 15, "lvl "+a.to_s)		  if a > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[3], 120, 15, @data[45+a-1].description)		  end		  end		end		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[4], 120, 15, "Volontà")		for a in 1..5		  if $game_party.actors[0].skill_learn?(50+a)		  self.contents.draw_text(x+60, y+yp[4], 120, 15, "lvl "+a.to_s)		  if a > 1		  if $game_variables[15] > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[5], 120, 15, @data[50+a-1].description)		  end		  end		  end		end		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[6], 120, 15, "Destrezza")		for a in 1..5		  if $game_party.actors[0].skill_learn?(55+a)		  self.contents.draw_text(x+60, y+yp[6], 120, 15, "lvl "+a.to_s)		  if a > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[7], 120, 15, @data[55+a-1].description)		  end		  end		end		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[8], 120, 15, "Agilità")		for a in 1..5		  if $game_party.actors[0].skill_learn?(60+a)		  self.contents.draw_text(x+60, y+yp[8], 120, 15, "lvl "+a.to_s)		  if a > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[9], 120, 15, @data[60+a-1].description)		  end		  end		end		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[10], 120, 15, "Riflessi")		for a in 1..5		  if $game_party.actors[0].skill_learn?(65+a)		  self.contents.draw_text(x+60, y+yp[10], 120, 15, "lvl "+a.to_s)		  if a > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[11], 120, 15, @data[65+a-1].description)		  end		  end		end		self.contents.font.color = system_color		self.contents.draw_text(x, y+yp[12], 120, 15, "Potenza")		for a in 1..5		  if $game_party.actors[0].skill_learn?(70+a)		  self.contents.draw_text(x+60, y+yp[12], 120, 15, "lvl "+a.to_s)		  if a > 1			self.contents.font.color = normal_color		  self.contents.draw_text(x+20, y+yp[13], 120, 15, @data[70+a-1].description)		  end		  end		end	  end    end  	class Window_Dati < Window_Base	def initialize	  super(40, 186, 190, 164) 	  self.contents = Bitmap.new(width-32, height-32)	  self.opacity = 0	  self.contents.font.size = 14	  self.contents.font.name = "Arial"		#draw_backwindow(10, 84, 540, 300)	  refresh	end 	  def refresh		self.contents.clear		x = 10		y = 0		get_tempo		self.contents.draw_text(x, y, 120, 32, "Tempo di gioco:")		self.contents.draw_text(x + 86, y, 120, 32, @tempo)		get_round		self.contents.draw_text(x, y + 15, 120, 32, "Round: " + @round.to_s)	  end 	  def get_tempo		total_sec = Graphics.frame_count / Graphics.frame_rate		hour = (total_sec / 60) / 60		min = (total_sec / 60) % 60		sec = total_sec % 60		zeroh = ""		zerom = ""		zeros = ""		if hour < 10		  zeroh = "0"		end		if min < 10		  zerom = "0"		end		if sec < 10		  zeros = "0"		end		@tempo = zeroh+hour.to_s+":"+zerom+min.to_s+":"+zeros+sec.to_s		#@tempo = sprintf("%02d:%02d:%02d", hour, min, sec)	  end 	  def get_round		@round = $game_variables[297] +1	  end    end    class Window_EquipESP < Window_Base	def initialize	  super(360, 370, 164, 100) 	  self.contents = Bitmap.new(width-32, height-32)	  self.opacity = 0	  self.contents.font.size = 14	  self.contents.font.name = "Arial" 	  for pg in 1..4		if $game_switches[150+pg] == true 		  @pg = pg - 1		end	  end		#draw_backwindow(10, 84, 540, 300)	  refresh	end 	  def refresh		self.contents.clear		x = 10		y = 0	  self.contents.draw_text(x, y, 110, 14, "[A] "+get_ESP_name($game_variables[923]))	  self.contents.draw_text(x, y+20, 110, 14, "[S] "+get_ESP_name($game_variables[924]))	  self.contents.draw_text(x, y+40, 110, 14, "[D] "+get_ESP_name($game_variables[925]))	  if $game_variables[923] > 0		num_esp = get_ESP_personal_ID($game_variables[923])		costo = $array_ESP[@pg][num_esp][0][lvl]		self.contents.draw_text(x+100, y, 110, 14, " "+costo.to_s)	  end	  if $game_variables[924] > 0		num_esp = get_ESP_personal_ID($game_variables[924])		costo = $array_ESP[@pg][num_esp][0][lvl]		self.contents.draw_text(x+100, y+20, 110, 14, " "+costo.to_s)	  end	  if $game_variables[925] > 0		num_esp = get_ESP_personal_ID($game_variables[925])		costo = $array_ESP[@pg][num_esp][0][lvl]		self.contents.draw_text(x+100, y+40, 110, 14, " "+costo.to_s)	  end	  end	     end #end  #<<--- è quello grosso	#===========FINE AGGIUNTE NIHIL==========================   #  end#   end  class Window_MenuStatus < Window_Selectable  def initialize(actor)	super(220, 48, 480, 96+32)	self.contents = Bitmap.new(width - 32, height - 32)	self.opacity = 0	@actor = actor	refresh	self.active = false	self.index = -1  end  def refresh	self.contents.clear	@item_max = 1	x = 0	y = 0	actor = @actor	self.contents.font.size = 14	draw_actor_name(actor, x, y)	draw_actor_hp(actor, x + 92, y)	#92	draw_actor_sp(actor, x + 180, y)	#236	#DRAW_ESP	if $game_variables[15] >= 1	  self.contents.font.color = system_color	  self.contents.draw_text(x + 280, y, 48, 32, "ESP ")		  self.contents.font.color = $game_variables[16] == 0 ? knockout_color :		  $game_variables[16] <= $game_variables[15] / 4 ? crisis_color : normal_color			self.contents.draw_text(x + 315, y, 48, 32, $game_variables[16].to_s )		  self.contents.font.color = normal_color			self.contents.draw_text(x + 330, y, 48, 32, "/" + $game_variables[15].to_s)	end	draw_actor_state(actor, x, y + 16)	draw_actor_level(actor, x, y + 32)	draw_actor_tp(actor, x + 48, y + 32)	draw_actor_exps(actor, x, y + 48)	draw_energia (x, y + 72)	draw_actor_parameter(actor, x + 92, y + 16, 0)	draw_actor_parameter(actor, x + 92, y + 32, 1)	draw_actor_parameter(actor, x + 92, y + 48, 2)	draw_actor_parameter(actor, x + 92, y + 64, 6)	draw_actor_parameter(actor, x + 236, y + 16, 3)	draw_actor_parameter(actor, x + 236, y + 32, 4)	draw_actor_parameter(actor, x + 236, y + 48, 5)	draw_actor_parameter(actor, x + 236, y + 64, 7)	  x = 60	  y = 1	  draw_hp_bar(actor, x, y, 112, 3)	  x += 150	  draw_sp_bar(actor, x, y, 112, 3)  end  def update_cursor_rect	if @index < 0	  self.cursor_rect.empty	else	  self.cursor_rect.set(0, @index * 96, self.width - 32, 96)	end  endend# end  class Window_MenuItem < Window_Selectable  def initialize	super(287, 355-65, 278, 56+24)	@column_max = 10	refresh	self.index = 0	self.opacity = 0  end  def item	return @data[self.index]  end  def refresh	if self.contents != nil	  self.contents.dispose	  self.contents = nil	end	@data = []	for i in 1...$data_items.size	  if $game_party.item_number(i) > 0		@data.push($data_items[i])	  end	end   #			   ESEMPIO OOOOOOOOOOOOOOOOOOOOOOOOOOOO   # for i in 1...100   #   if $game_party.item_number(i) > 0   #	 @data.push($data_items[i])   #   end   # end   #			 if $game_party.item_number(389) > 0   #			 @data.push($data_items[389])   #			 end   # for i in 102...$data_items.size   #   if $game_party.item_number(i) > 0   #	 @data.push($data_items[i])   #   end   # end	@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)	  end	end  end  def draw_item(index)	item = @data[index]	case item	when RPG::Item	  number = $game_party.item_number(item.id)	when RPG::Weapon	  number = $game_party.weapon_number(item.id)	when RPG::Armor	  number = $game_party.armor_number(item.id)	end	if item.is_a?(RPG::Item) and	   $game_party.item_can_use?(item.id)	  self.contents.font.color = normal_color	else	  self.contents.font.color = crisis_color	end	x = index % 10 * 24	y = index / 10 * 24	rect = Rect.new(x, y, 24, 24)	self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))	self.contents.font.size = 14	bitmap = RPG::Cache.icon(item.icon_name)	opacity = self.contents.font.color == normal_color ? 255 : 128	self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)	  self.contents.font.color = Color.new(0, 0, 0)	self.contents.draw_text(x + 11 -11, y + 2+2, 24, 32, number.to_s)	self.contents.draw_text(x + 11 -11, y + 0+2, 24, 32, number.to_s)	self.contents.draw_text(x + 12 -11, y + 1+2, 24, 32, number.to_s)	self.contents.draw_text(x +  9 -11, y + 1+2, 24, 32, number.to_s)	  self.contents.font.color = normal_color	self.contents.draw_text(x + 11 -11, y + 1+2, 24, 32, number.to_s)  end  def update_help	@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)  end  def update_cursor_rect	if self.active	  if @index < 0		self.cursor_rect.empty		return	  end	  row = @index / @column_max	  if row < self.top_row		self.top_row = row	  end	  if row > self.top_row + 1		self.top_row = row - 1	  end	  cursor_width = self.width / @column_max - 32	  self.oy = (self.oy/32)*24	  x = @index % @column_max * 24	  y = @index / @column_max * 24 - (self.oy/24)*24	  self.cursor_rect.set(x, y, 24, 24)	 else	  self.cursor_rect.set(0, 0, 0, 0)	end  endend class Window_Target < Window_Selectable  def initialize	super(0, 0, $game_party.actors.size*48+32, 96)	self.contents = Bitmap.new(width - 32, height - 32)	self.z += 10	@column_max = @item_max = $game_party.actors.size	refresh  end  def refresh	self.contents.clear	for i in 0...$game_party.actors.size	  x = 48*i+24	  y = 52	  actor = $game_party.actors[i]	  draw_actor_graphic(actor, x, y)	end  end  def update_cursor_rect	if @index <= -2	  self.cursor_rect.set((@index + 10) * 48, 0, 48, 64)	elsif @index == -1	  self.cursor_rect.set(0, 0, @item_max * 48, 64)	else	  self.cursor_rect.set(@index * 48, 0, 48, 64)	end  endend class Window_MenuEquipped < Window_Selectable  def initialize(actor)	super(272, 158-8, 368, 96)	self.contents = Bitmap.new(width - 32, height - 32)	self.opacity = 0	self.active = false	self.index = 0	@actor = actor	refresh  end  def item	return @data[self.index]  end  def refresh	self.contents.clear	@data = []	@data.push($data_weapons[@actor.weapon_id])	@data.push($data_armors[@actor.armor3_id])	@item_max = @data.size	self.contents.font.color = normal_color	self.contents.font.size = 14		  self.contents.font.color = Color.new(0, 0, 0)	self.contents.draw_text(15, 0, 92, 32, $data_system.words.weapon)	self.contents.draw_text(17, 0, 92, 32, $data_system.words.weapon)	self.contents.draw_text(16, 1, 92, 32, $data_system.words.weapon)	self.contents.draw_text(16, -1, 92, 32, $data_system.words.weapon)	self.contents.draw_text(15, 26, 92, 32, $data_system.words.armor3)	self.contents.draw_text(17, 26, 92, 32, $data_system.words.armor3)	self.contents.draw_text(16, 25, 92, 32, $data_system.words.armor3)	self.contents.draw_text(16, 27, 92, 32, $data_system.words.armor3)	#self.contents.draw_text(75, 0, 92, 32, @data[0].to_s)	#draw_item_name(@data[0], 77, 0)	#draw_item_name(@data[0], 76, 1)	#draw_item_name(@data[0], 76, -1)	#draw_item_name(@data[1], 77, 26)	#draw_item_name(@data[1], 75, 26)	#draw_item_name(@data[1], 76, 25)	#draw_item_name(@data[1], 76, 27)	  self.contents.font.color = normal_color	self.contents.draw_text(16, 0, 92, 32, $data_system.words.weapon)	self.contents.draw_text(16, 26, 92, 32, $data_system.words.armor3)	draw_item_name(@data[0], 76, 0)	draw_item_name(@data[1], 76, 26)	#PROIETTILIIII	if $game_party.actors[0].weapon_id >= 6	  if $game_party.actors[0].weapon_id <= 8		proiettili = "B - 01 -Proiettili 9mm_"		numarm = $game_party.actors[0].weapon_id		typ = $game_variables[622 + numarm].to_s		bitmap = RPG::Cache.icon(proiettili+typ)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	  elsif $game_party.actors[0].weapon_id == 25		proiettili = "B - 01 -Proiettili 9mm_"		typ = $game_variables[877].to_s		bitmap = RPG::Cache.icon(proiettili+typ)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	  end	end	if $game_party.actors[0].weapon_id >= 9	  if $game_party.actors[0].weapon_id <= 11		proiettili = "B - 02 -Cartucce Calibro 12_"		numarm = $game_party.actors[0].weapon_id		typ = $game_variables[622 + numarm].to_s		bitmap = RPG::Cache.icon(proiettili+typ)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	  end	end	if $game_party.actors[0].weapon_id == 12		proiettili = "B - 04 -Proiettili Calibro 223_"		numarm = $game_party.actors[0].weapon_id		typ = $game_variables[622 + numarm].to_s		bitmap = RPG::Cache.icon(proiettili+typ)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	end	if $game_party.actors[0].weapon_id >= 13	  if $game_party.actors[0].weapon_id <= 14		proiettili = "B - 03 -Proiettili 5,56mm_"		numarm = $game_party.actors[0].weapon_id		typ = $game_variables[622 + numarm].to_s		bitmap = RPG::Cache.icon(proiettili+typ)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	  end	end	if $game_party.actors[0].weapon_id == 15		proiettili = "B - 05 -44 Magnum_"		numarm = $game_party.actors[0].weapon_id		typ = $game_variables[622 + numarm].to_s		bitmap = RPG::Cache.icon(proiettili+typ)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	end	if $game_party.actors[0].weapon_id == 16		if $game_variables[137] == 1			proiettili = "B - 06 -Proiettile d'Argento"		  elsif $game_variables[137] == 2			proiettili = "B - 07 -Proiettile d'Oro"		  elsif $game_variables[137] == 3			proiettili = "B - 08 -Proiettile al Fosforo"		end		bitmap = RPG::Cache.icon(proiettili)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	end	if $game_party.actors[0].weapon_id == 17			proiettili = "B - 09 -Munizioni Granate"		bitmap = RPG::Cache.icon(proiettili)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	end	if $game_party.actors[0].weapon_id == 18			proiettili = "B - 10 -Combustibile Lanciafiamme"		bitmap = RPG::Cache.icon(proiettili)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	end	if $game_party.actors[0].weapon_id == 19			proiettili = "B - 11 -Razzo"  		bitmap = RPG::Cache.icon(proiettili)		self.contents.blt(52, 0, bitmap, Rect.new(0, 0, 24, 24))	end   end  def update_help	@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)	#TROVA	@help_window.set_item_data(item)  end  def update_cursor_rect	if self.active	  self.cursor_rect.set(12, @index * 26+9, 244, 16)	else	  self.cursor_rect.set(0, 0, 0, 0)	end  endend class Window_MenuArmor < Window_Selectable  def initialize(actor)	super(287, 243-7, 272, 56)	@actor = actor	@column_max = 10	@row_max = 1	self.index = 0	self.opacity = 0	self.active = false	refresh  end  def item	return @data[self.index]  end  def refresh	if self.contents != nil	  self.contents.dispose	  self.contents = nil	end	@data = []	armor_set = $data_classes[@actor.class_id].armor_set	for i in 1...$data_armors.size	  if $game_party.armor_number(i) > 0 and armor_set.include?(i)		if $data_armors[i].kind == 2		  @data.push($data_armors[i])		end	  end	end	@data.push(nil) if @data.size == 0	 # MODIFICA by giver	@item_max = @data.size	self.contents = Bitmap.new(width - 32, row_max * 32)	for i in 0...@item_max # -1	 # MODIFICA by giver	  draw_item(i)	end  end  def draw_item(index)	item = @data[index]	case item	when RPG::Weapon	  number = $game_party.weapon_number(item.id)	when RPG::Armor	  number = $game_party.armor_number(item.id)	when nil	 # AGGIUNTA by giver	  return	end	x = index % 10 * 24	y = index / 10 * 24	rect = Rect.new(x, y, self.width / @column_max - 32, 32)	self.contents.font.size = 14	bitmap = RPG::Cache.icon(item.icon_name)	opacity = self.contents.font.color == normal_color ? 255 : 128	self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)	  self.contents.font.color = Color.new (0, 0, 0)	self.contents.draw_text(x+11,y+6,128,24, number.to_s)	self.contents.draw_text(x+13,y+6,128,24, number.to_s)	self.contents.draw_text(x+12,y+5,128,24, number.to_s)	self.contents.draw_text(x+12,y+7,128,24, number.to_s)	  self.contents.font.color = normal_color	self.contents.draw_text(x+12,y+6,128,24, number.to_s)  end  def update_help	@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)	# AGGIUNTA by giver	@help_window.set_item_data(self.item)  end  def update_cursor_rect	if self.active	  self.cursor_rect.set(@index % 10 * 24, 0, 24, 24)	  self.oy = index / 10 * 24	else	  self.cursor_rect.set(0, 0, 0, 0)	end  end  # AGGIUNTA by giver  def item?	return (self.item != nil)  endend class Window_MenuWeapon < Window_Selectable  def initialize(actor)	super(287, 243-24-7, 272, 56)	@actor = actor	@column_max = 10	@row_max = 1	self.index = 0	self.opacity = 0	self.active = false	refresh  end  def item	return @data[self.index]  end  def refresh	if self.contents != nil	  self.contents.dispose	  self.contents = nil	end	@data = []	weapon_set = $data_classes[@actor.class_id].weapon_set	for i in 1..6	  if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)		@data.push($data_weapons[i])	  end	end	i = 25	  if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)		@data.push($data_weapons[i])	  end	for i in 7..24	  if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)		@data.push($data_weapons[i])	  end	end	@data.push(nil) if @data.size == 0	 # MODIFICA by giver	@item_max = @data.size	self.contents = Bitmap.new(width - 32, row_max * 32)	for i in 0...@item_max # -1	 # MODIFICA by giver	  draw_item(i)	end  end  def draw_item(index)	item = @data[index]	case item	when RPG::Weapon	  #number = $game_party.weapon_number(item.id)	  ammo =  [1,1,1,1,1,$game_variables[126],$game_variables[127],	  $game_variables[128],$game_variables[129],$game_variables[130],	  $game_variables[131],$game_variables[132],$game_variables[133],	  $game_variables[134],$game_variables[135],$game_variables[136],	  $game_variables[138],$game_variables[139],$game_variables[140],	  $game_party.weapon_number(20),$game_party.weapon_number(21),	  $game_party.weapon_number(22),$game_party.weapon_number(23),	  $game_party.weapon_number(24),$game_variables[876]] #AGGIUNGI ARMA WEAPON	  number = ammo[item.id-1]	when RPG::Armor	  number = $game_party.armor_number(item.id)	when nil	# AGGIUNTA by giver	  return	end	x = index % 10 * 24	y = index / 10 * 24	rect = Rect.new(x, y, self.width / @column_max - 32, 32)	self.contents.font.size = 14	bitmap = RPG::Cache.icon(item.icon_name)	opacity = self.contents.font.color == normal_color ? 255 : 128	self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)	  self.contents.font.color = Color.new (0, 0, 0)	self.contents.draw_text(x+11,y+6,128,24, number.to_s)	self.contents.draw_text(x+13,y+6,128,24, number.to_s)	self.contents.draw_text(x+12,y+5,128,24, number.to_s)	self.contents.draw_text(x+12,y+7,128,24, number.to_s)	  self.contents.font.color = normal_color	self.contents.draw_text(x+12,y+6,128,24, number.to_s)  end  def update_help	@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)	# AGGIUNTA by giver	@help_window.set_item_data(self.item)  end  def update_cursor_rect	if self.active	  self.cursor_rect.set(@index % 10 * 24, 0, 24, 24)	  self.oy = index / 10 * 24	else	  self.cursor_rect.set(0, 0, 0, 0)	end  end  # AGGIUNTA by giver  def item?	return (self.item != nil)  endend class Scene_Menu  def initialize(menu_index = 0)	@menu_index = menu_index  end   def main	@actor_index = 0	@target = ""	@clock = 0	scene_window	Graphics.transition	loop do	  Graphics.update	  Input.update	  update	  if $scene != self		break	  end	end	Graphics.freeze	scene_dispose  end   def scene_window	@actor = $game_party.actors[@actor_index]	@map = Spriteset_Map.new	@bg = Sprite.new	if $game_variables[15] >= 1	  @bg.bitmap = Bitmap.new("Graphics/Pictures/MenuBG_ESP")	else	  @bg.bitmap = Bitmap.new("Graphics/Pictures/MenuBG")	end	@pg = Sprite.new	@pg.bitmap = Bitmap.new("Graphics/Pictures/"+@actor.battler_name)	@pg.y = 64	@pg.x = 100	@arrow = Sprite.new	@arrow.x = 264 -22	@arrow.y = 170 -5	@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow1") 	s1 = ""	if $game_variables[15] >= 1	  @command_window = Window_Command.new(160, [s1, s1, s1, s1, s1, s1, s1, s1])	else	  @command_window = Window_Command.new(160, [s1, s1, s1, s1, s1, s1, s1])	end	@command_window.index = @menu_index	@command_window.visible = false	if $game_party.actors.size == 0	  @command_window.disable_item(0)	  @command_window.disable_item(1)	  @command_window.disable_item(2)	  @command_window.disable_item(3)	  @command_window.disable_item(4)	  @command_window.disable_item(5)	  @command_window.disable_item(6)	  if $game_variables[15] >= 1	  @command_window.disable_item(7)	  end	  if $game_variables[295] == 0		if $game_variables[15] >= 1		  @command_window.disable_item(6)		else		  @command_window.disable_item(5)		end	  end	end 	$achievements_page = 0 	@help_window = Window_Help.new	@help_window.opacity = 0	@item_window = Window_MenuItem.new	@status_window = Window_MenuStatus.new(@actor)	@target_window = Window_Target.new	@right_window = Window_MenuEquipped.new(@actor)	@item_window1 = Window_MenuWeapon.new(@actor)	@item_window2 = Window_MenuArmor.new(@actor) 	@equipped_esp_window = Window_EquipESP.new	@affinity_window = Window_Affinity.new	@talent_window = Window_Talenti.new	@esp_window = Window_ESP.new	@achievements_window = Window_Achievements.new	$achievements_page = 0	@partita_window = Window_Dati.new 	@bgequipesp = Sprite.new	@bgequipesp.bitmap = Bitmap.new("Graphics/Pictures/EquipESP_Window")	if $game_variables[15] > 1	  @bgequipesp.visible = true	else	  @bgequipesp.visible = false	end	@bgw = Sprite.new	@bgw.bitmap = Bitmap.new("Graphics/Pictures/Talent_Window")	@bgw.visible = false	@bgesp = Sprite.new	@bgesp.bitmap = Bitmap.new("Graphics/Pictures/ESP_Window")	@bgesp.visible = false	@bgachi = Sprite.new	@bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_0")	@bgachi.visible = false 	@talent_window.visible = false	@talent_window.active = false	@esp_window.visible = false	@esp_window.active = false	@achievements_window.visible = false	@achievements_window.active = false	if $game_variables[15] < 1	  @equipped_esp_window.visible = false	end 	@item_window.help_window = @help_window	@right_window.help_window = @help_window	@item_window1.help_window = @help_window	@item_window2.help_window = @help_window	@item_window.active = false	@help_window.visible = false	@target_window.visible = false	@target_window.active = false  end   def scene_dispose	@command_window.dispose	@item_window.dispose	@item_window1.dispose	@item_window2.dispose 	@equipped_esp_window.dispose	@affinity_window.dispose	@talent_window.dispose	@esp_window.dispose	@achievements_window.dispose 	@partita_window.dispose	@status_window.dispose	@target_window.dispose	@right_window.dispose	@help_window.dispose	@map.dispose	@bg.dispose	@pg.dispose	@arrow.dispose	@bgw.dispose	@bgesp.dispose	@bgachi.dispose   end   def update	#aggiunte Nihil -----------------	if @clock <= 17	  @clock += 1	else	  @clock = 0	end	case @clock	  when 0		@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow1")	  when 3		@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow2")	  when 6		@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow3")	  when 9		@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow4")	  when 12		@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow5")	  when 15		@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow6")	end	#fine aggiunte Nihil-------------  	@partita_window.refresh	@command_window.update	@item_window.update	@item_window1.update	@item_window2.update	@status_window.update	@target_window.update	@right_window.update	@map.update	case @right_window.index	when 0	  @item_equip_window = @item_window1	when 1	  @item_equip_window = @item_window2	end 	if @command_window.active	  update_command	  return	end	if @item_window.active	  update_item	  return	end	if @right_window.active	  update_right	  return	end	if @item_equip_window.active	  update_equip_item	  return	end	if @target_window.active	  update_item_target if @target == "item"	  update_skill_target if @target == "skill"	  return	end	if @talent_window.active	  update_talent	  return	end	if @esp_window.active	  update_esp	  return	end	if @achievements_window.active	  update_achievements	  return	end  end   def update_command	case @command_window.index	when 0	  @help_window.set_text("Equipaggia armi e abiti.")	  @arrow.x = 225	  @arrow.y = 160	when 1	  @help_window.set_text("Visualizza e usa gli oggetti.")	  @arrow.x = 225	  @arrow.y = 284	when 2	  if $game_variables[15] > 1		@help_window.set_text("Visualizza i poteri ESP appresi.")		@arrow.x = 225		@arrow.y = 362	  else		@help_window.set_text("Visualizza i talenti appresi.")		@arrow.x = 225		@arrow.y = 379	  end	when 3	  if $game_variables[15] > 1		@help_window.set_text("Visualizza i talenti appresi.")		@arrow.x = 225		@arrow.y = 379	  else		@help_window.set_text("Visualizza i documenti raccolti.")		@arrow.x = 225		@arrow.y = 396	  end	when 4	  if $game_variables[15] > 1		@help_window.set_text("Visualizza i documenti raccolti.")		@arrow.x = 225		@arrow.y = 396	  else		@help_window.set_text("Visualizza la mappa della location.")		@arrow.x = 225		@arrow.y = 413	  end	when 5	  if $game_variables[15] > 1		@help_window.set_text("Visualizza la mappa della location.")		@arrow.x = 225		@arrow.y = 413	  else		@help_window.set_text("Visualizza gli achievements sbloccati.")		@arrow.x = 225		@arrow.y = 430	  end  	when 6	  if $game_variables[15] > 1		@help_window.set_text("Visualizza gli achievements sbloccati.")		@arrow.x = 225		@arrow.y = 430	  else		@help_window.set_text("Permette di modificare le impostazioni e di uscire dal gioco.")		@arrow.x = 225		@arrow.y = 447	  end 	when 7	  @help_window.set_text("Permette di modificare le impostazioni e di uscire dal gioco.")		@arrow.x = 225		@arrow.y = 447	end	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  $scene = Scene_Map.new	  return	end	if Input.trigger?(Input::C)	  if $game_party.actors.size == 0 #and @command_window.index < 4		$game_system.se_play($data_system.buzzer_se)		return	  end	  case @command_window.index	  when 0		$game_system.se_play($data_system.decision_se)		@command_window.active = false		@right_window.active = true	  when 1		$game_system.se_play($data_system.decision_se)		@command_window.active = false		@item_window.active = true	  when 2		$game_system.se_play($data_system.decision_se)		@item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@equipped_esp_window.visible = false		if $game_variables[15] > 1		  @bgesp.visible = true		  @esp_window.visible = true		  @esp_window.active = true		else		  @bgw.visible = true		  @talent_window.visible = true		  @talent_window.active = true		end		@command_window.active = false 	  when 3		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  @bgw.visible = true		  @talent_window.visible = true		  @talent_window.active = true		  @item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@command_window.active = false		@equipped_esp_window.visible = false		else		  $scene = Scene_Questbook.new		end 	  when 4		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  $scene = Scene_Questbook.new		else		  $game_temp.common_event_id = (180)		  $scene = Scene_Map.new		end 	  when 5		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  $game_temp.common_event_id = (180)		  $scene = Scene_Map.new		else		  $achievements_page = 0		  @bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_0")		  @bgachi.visible = true		  @achievements_window.visible = true		  @achievements_window.active = true		  @item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@command_window.active = false		@equipped_esp_window.visible = false		end 	  when 6		$game_system.se_play($data_system.decision_se)		if $game_variables[15] > 1		  $achievements_page = 0		  @bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_0")		  @bgachi.visible = true		  @achievements_window.visible = true		  @achievements_window.active = true		  @item_equip_window.visible = false		@right_window.visible = false		@item_window.visible = false		@item_window1.visible = false		@item_window2.visible = false		@affinity_window.visible = false		@partita_window.visible = false		@command_window.active = false		@equipped_esp_window.visible = false		else		  $scene = Scene_Option.new		end	  when 7		$scene = Scene_Option.new	  end	  return	end  end     #--------------------------------	def update_talent	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @bgw.visible = false	  @talent_window.visible = false	  @talent_window.active = false	  @item_equip_window.visible = true	  @right_window.visible = true	  @item_window.visible = true	  @item_window1.visible = true	  @item_window2.visible = true	  @command_window.active = true	  @affinity_window.visible = true	  @partita_window.visible = true	  if $game_variables[15] > 1		@equipped_esp_window.visible = true	  end	  return	end  end  #----------------------------------	def update_achievements	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @bgachi.visible = false	  @achievements_window.visible = false	  @achievements_window.active = false	  @item_equip_window.visible = true	  @right_window.visible = true	  @item_window.visible = true	  @item_window1.visible = true	  @item_window2.visible = true	  @command_window.active = true	  @affinity_window.visible = true	  @partita_window.visible = true	  if $game_variables[15] > 1		@equipped_esp_window.visible = true	  end	  return	end	if Input.trigger?(Input::C)	  $game_system.se_play($data_system.decision_se)	  $achievements_page += 1	  if $achievements_page > 4		$achievements_page = 0	  end	  @bgachi.bitmap = Bitmap.new("Graphics/Pictures/Achievements_Window_"+$achievements_page.to_s)	  @achievements_window.refresh	  return	end  end  #----------------------------------	def update_esp	if @bgesp.visible == true #and @esp_window.visible != true	  @esp_window.visible = true	end	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @bgesp.visible = false	  @esp_window.visible = false	  @esp_window.active = false	  @item_equip_window.visible = true	  @right_window.visible = true	  @item_window.visible = true	  @item_window1.visible = true	  @item_window2.visible = true	  @command_window.active = true	  @affinity_window.visible = true	  @partita_window.visible = true	  if $game_variables[15] > 1		@equipped_esp_window.visible = true	  end	  return	end  end  #----------------------------------   def update_item	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @item_window.active = false	  @item_window.help_window.visible = false	  @command_window.active = true	  return	end	if Input.trigger?(Input::C)	  @item = @item_window.item	  unless @item.is_a?(RPG::Item)		$game_system.se_play($data_system.buzzer_se)		return	  end	  unless $game_party.item_can_use?(@item.id)		$game_system.se_play($data_system.buzzer_se)		return	  end	  $game_system.se_play($data_system.decision_se)	  if @item.scope >= 3		@item_window.active = false		@target_window.x = 287		@target_window.y = 355		@target_window.visible = true		@target_window.active = true		@target = "item"		if @item.scope == 4 || @item.scope == 6		  @target_window.index = -1		else		  @target_window.index = 0		end	  else		if @item.common_event_id > 0		  $game_temp.common_event_id = @item.common_event_id		  $game_system.se_play(@item.menu_se)		  if @item.consumable			$game_party.lose_item(@item.id, 1)			@item_window.draw_item(@item_window.index)		  end		  $scene = Scene_Map.new		  return		end	  end	  return	end  end   def update_item_target	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  unless $game_party.item_can_use?(@item.id)		@item_window.refresh	  end	  @target = ""	  @item_window.active = true	  @target_window.visible = false	  @target_window.active = false	  return	end	if Input.trigger?(Input::C)	  if $game_party.item_number(@item.id) == 0		$game_system.se_play($data_system.buzzer_se)		return	  end	  if @target_window.index == -1		used = false		for i in $game_party.actors		  used |= i.item_effect(@item)		end	  end	  if @target_window.index >= 0		target = $game_party.actors[@target_window.index]		used = target.item_effect(@item)	  end	  if used		$game_system.se_play(@item.menu_se)		if @item.consumable		  $game_party.lose_item(@item.id, 1)		  @item_window.draw_item(@item_window.index)		end		@target_window.refresh		if $game_party.all_dead?		  $scene = Scene_Gameover.new		  return		end		if @item.common_event_id > 0		  $game_temp.common_event_id = @item.common_event_id		  $scene = Scene_Map.new		  return		end		@status_window.refresh	  end	  unless used		$game_system.se_play($data_system.buzzer_se)	  end	  return	end  end     def update_right	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @right_window.active = false	  @right_window.help_window.visible = false	  @command_window.active = true	  return	end	if Input.trigger?(Input::C)	  if @actor.equip_fix?(@right_window.index) or	  not @item_equip_window.item?	 # MODIFICA by giver		$game_system.se_play($data_system.buzzer_se)		return	  end	  $game_system.se_play($data_system.decision_se)	  @right_window.active = false	  @item_equip_window.active = true	  return	end  end   def update_equip_item	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  @right_window.active = true	  @item_equip_window.help_window.visible = false	  @item_equip_window.active = false	  return	end	if Input.trigger?(Input::C)	  $game_system.se_play($data_system.equip_se)	  type = 0	  type = 3 if @right_window.index == 1	  item = @item_equip_window.item	  unless item == nil	  @actor.equip(type, item.id)	  #@actor.equip(type, item == nil ? 0 : item.id)	  @right_window.active = true	  @item_equip_window.active = false	  $game_party.checkbulletequip	  @right_window.refresh	  @item_equip_window.refresh	  @status_window.refresh	  @partita_window.refresh	  #Controllo proiettili nuovi !!!	  $game_party.checkbulletequip	  #$game_party.actors[0].equip(1,74, false)	  #Aggiunte Nihil	  if $game_switches[11]		for actor in $game_party.actors		  $game_switches[716] = false		  tlnt = 11		  for i in 1..20			if $game_variables[825+i] == tlnt			  $game_switches[716] = true			end		  end		  if $game_switches[716] == true			actor.sp -= 50		  else			actor.sp -= 100		  end		end		$scene = Scene_Map.new	  end	  end	  #Fine Aggiunte Nihil 	  return	end  endend

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

  • 0

Potresti chiarire alcune cose ?

 

1) Mi pare di capire che la variabile 15 rappresenti l'energia per usare gli ESP, è corretto o rappresenta qualcos'altro ?

 

2) In alcuni punti fai accadere delle cose se quella variabile vale 1 o più, mentre altre cose vengono fatte solo se vale 2 o più. Perchè questa differenza ?

 

3) Ho notato che nel metodo (def) update_esp hai aggiunto del codice per cercare di fare apparire questa finestra. Quindi non ti appare neanche così ? Se è così, sai che significa, vero ?

 

 

P.S.: Hai notato che c'è un sacco di codice superfluo e/o ridondante ?

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 0

Allora ^^

 

1) La variabile 15 rappresenta i punti ESP MASSIMI ovvero il cap dei punti per usare i poteri ESP, ci sei andato molto vicino ;)

 

2)Tra 1 o più e 2 o più non c'è differenza, il valore minimo (quado è diverso da 0) è 10! La differenza nelle condizioni c'è perchè alcune finestre e voci devono apparire solo SE il valore degli ESP è maggiore di 0 (che nel gioco cambia nel momento in cui si apprende il primo ESP, in pratica serve a far apparire le finestre inerenti agli ESP solo quando si conoscono)

 

3)Sì l'ho aggiunto dopo poco prima di postare tutto il codice e non appare neanche così... E purtroppo no, non so cosa significa ç_ç Però so che se scambio le righe delle classi (231 con 276), come già detto, la finestra degli ESP, quando attivo quella degli Achievements, mi compare :S

 

E sì, lo so che c'è tantissimo codice ridondante e superfluo, ma sono ancora una mezza calzetta col ruby ç_ç E parecchio codice l'ho scritto mesi fa, quando ero ancora più mezza calzetta ç_ç

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

  • 0
3)Sì l'ho aggiunto dopo poco prima di postare tutto il codice e non appare neanche così... E purtroppo no, non so cosa significa ç_ç Però so che se scambio le righe delle classi (231 con 276), come già detto, la finestra degli ESP, quando attivo quella degli Achievements, mi compare :S

 

E sì, lo so che c'è tantissimo codice ridondante e superfluo, ma sono ancora una mezza calzetta col ruby ç_ç E parecchio codice l'ho scritto mesi fa, quando ero ancora più mezza calzetta ç_ç

Premetto che NON sto provando a scovare questo errore, anche perchè mi pare vengano usate troppe immagini e dati che dovrei approntare per conto mio se anche volessi provarci . . .

 

3) Ti dò un indizio un po' contorto: Ce l'hai presente ll codice che hai aggiunto in update_esp ? :sisi:

Cambia l'istruzione che verrebbe eseguita se @bgesp risulta visibile, facendo diventare invisibile @bgesp invece di rendere visibile quella finestra . . .

 

E' codice sporco come quello di questo script che crea problemi di questo genere, e se non riesci a risolverla, ti consiglio di "azzerare" almeno l'aggiunta di questo comando e rivederla daccapo . . .

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 0

Mi stai dicendo che l'immagine @bgesp COPRE le scritte? X°D

Oh LoL vado subito a provare!

 

Ma perchè allora con le altre finestre ciò non accade? :O

 

No aspè ho appena provato, anche facendo sparire @bgesp non appaiono le scritte :/

Quindi non vengono coperte dall'immagine ç____ç

 

Ma quindi consigli di rivedermi l'aggiunta del comando e basta, giusto? :|

 

 

EDIT:

Ho provato comunque a fare:

 

if @bgesp.visible == true #and @esp_window.visible != true

@achievements_window.visible = true

@bgesp.visible = false

end

 

in questo modo l'immagine sparisce ma appaiono le scritte degli achievements.

se invece faccio:

 

if @bgesp.visible == true #and @esp_window.visible != true

@esp_window.visible = true

@bgesp.visible = false

end

 

allora sparisce l'immagine ma non appare nessuna scritta!

 

ç_______ç

 

 

 

EDIT 2:

AHAHAHAHAHA sono un deficente X°D

 

Ho risolto XD

 

In pratica in un'altro script (situato più in basso di questo) avevo creato una classe Window_ESP, quindi in pratica il menù creava l'altra classe, non quella scritta in questo script, per questo funzionava quando scambiavo i nomi!

 

Madò che stupido...

 

Grazie comunque raga *_*

 

Giver, se poi hai qualche dritta su come ripulire un po' il codice, mi farà più che piacere leggerla ^____^

Edited by nihil-omen

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

  • 0
AHAHAHAHAHA sono un deficente X°D

 

Ho risolto XD

 

In pratica in un altro script (situato più in basso di questo) avevo creato una classe Window_ESP, quindi in pratica il menù creava l'altra classe, non quella scritta in questo script, per questo funzionava quando scambiavo i nomi!

NOOOOOOOOOOOOOOOOOOOOOOOO !

I migliori anni della mia vita spesi a tentare di risolvere un problema "irrisolvibile" . . .

Ma pagherai ! Ah, se pagherai !

D'ora in poi, quando proporrai un problema, la prima cosa che ti dirò, sarà: << Guarda se non hai lasciato in giro, per caso, una versione modificata degli elementi dello script da qualche parte PIU' IN BASSO nello script editor . . . >>

 

Sono profondamente deluso ! :unsure:

 

 

Mi stai dicendo che l'immagine @bgesp COPRE le scritte? X°D

A questo non avevo pensato, perchè IO so che le finestre, di base, hanno un valore di z pari a 100 e gli sprite pari 0, quindi, al massimo, può succedere il contrario . . .

No, voleva essere solo uno spunto per farti cominciare ad analizzare ciò che poteva risultare utile a trovare la soluzione . . .

Non dò la pappa pronta a nessuno, soprattutto se sono convinto che sia abbastanza in gamba da poterci arrivare da solo . . . :sisi:

E se fosse stato quello che dicevi, invece, ciò che ti avevo detto di fare, allora, sarebbe stato darti direttamente la soluzione al problema, mentre, come avevo detto, si trattava SOLO di un indizio . . .

 

 

Giver, se poi hai qualche dritta su come ripulire un po' il codice, mi farà più che piacere leggerla ^____^

Io avrei utilizzato sistemi completamente differenti sin dall'inizio, per quasi tutto quello che riguarda questa Scene, ma è meglio se continui a svilupparla come preferisci . . .

 

Puoi comunque migliorare lo script senza rivoluzionarlo, ad esempio mettendo le parti di codice che usi più volte nella scene, soprattutto se composto da tante righe, in metodi ad hoc, e chiamarli nel punto in cui ti serve, anche sfruttando il passaggio di parametri . . .

 

Es. Quando attivi un determinato comando che influisce sulla visibilità ed attivazione di finestre, potresti crearti un metodo nomedelcomando_attivazione(bool), che potrebbe apparire più o meno così

def com4_attivazione(bool)  @finestra1.active = !bool	 # la disattiva quando com4 viene attivato e la riattiva quando viene disattivato  @finestra2.visible = !bool	 # la nasconde quando com4 viene attivato e la rende visibile se com4 viene disattivato  @finestra3.visible = !bool	 # la nasconde quando com4 viene attivato e la rende visibile se com4 viene disattivato  @finestra4.visible = bool	 # la mostra quando com4 viene attivato e la rende invisibile se com4 viene disattivato  @finestra4.active = bool	 # la attiva quando com4 viene attivato e la disattiva se com4 viene disattivatoend

Il concetto mi sembra semplice, e puoi anche andare oltre, suddividendo le istruzioni di questi def in altri opportuni metodi . . .

Idem per il riposizionamento del cursore-freccia . . .

 

Altra cosa che puoi fare è eliminare certi blocchi di codice che a me sembra inutile, tipo questo . . .

	if $game_party.actors.size == 0	  @command_window.disable_item(0)	  @command_window.disable_item(1)	  @command_window.disable_item(2)	  @command_window.disable_item(3)	  @command_window.disable_item(4)	  @command_window.disable_item(5)	  @command_window.disable_item(6)	  if $game_variables[15] >= 1	  @command_window.disable_item(7)	  end	  if $game_variables[295] == 0		if $game_variables[15] >= 1		  @command_window.disable_item(6)		else		  @command_window.disable_item(5)		end	  end	end

Ora, se hai cambiato il codice di Window_Command, sono un distrattone e ti sto facendo l'esempio sbagliato . . .

Il metodo disable_command cambia il colore del TESTO che rappresenta il nome del comando da far apparire disabilitato, e non tiene memoria di quali sono stati disabilitati. Nient'altro.

Se non ho capito male, tu i nomi dei comandi non li scrivi, ma usi un background con sopra disegnati i nomi dei comandi, quindi quelle istruzioni non servono, teoricamente, a nulla . . .

 

Poi, ma non l'ho testato, mi è venuto in mente un sistema, abbastanza vicino al tuo stile, per eliminare le if interne al case/when quando si attiva un comando

Quindi, dentro il blocco che inizia con "if Input.trigger?(Input::C)" di update_command, inserisci questo codice

actual_index =@command_window.indexif (not $game_variables[15] > 1) and @window_command.index > 1  actual_index += 1end

Ovviamente il case/when successivo diventa

case actual_indexwhen 0  # codice invariatowhen 1  # codice invariatowhen 2  # SOLO codice per ESPwhen 3  # SOLO codice per Talentiwhen 4  # SOLO codice per Questbookwhen 5  # SOLO codice per chiamata common eventwhen 6  # SOLO codice Achievementswhen 7  # SOLO codice Optionsend

Teoricamente, potresti usare questo espediente anche nel settare il testo nella Help Window e posizionare la freccia, ma il codice mi pare abbia qualcosa di strano, probabilmente perchè non so come ti aspetti che funzioni il tutto . . .

 

 

Mi auguro che possa tornarti utile in qualche modo . . .

Edited by giver

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 0
NOOOOOOOOOOOOOOOOOOOOOOOO !

I migliori anni della mia vita spesi a tentare di risolvere un problema "irrisolvibile" . . .

Ma pagherai ! Ah, se pagherai !

D'ora in poi, quando proporrai un problema, la prima cosa che ti dirò, sarà: << Guarda se non hai lasciato in giro, per caso, una versione modificata degli elementi dello script da qualche parte PIU' IN BASSO nello script editor . . . >>

 

Sono profondamente deluso ! tongue.gif

 

Lasciamo stare, mi sono sentito un idiota XD

 

A questo non avevo pensato, perchè IO so che le finestre, di base, hanno un valore di z pari a 100 e gli sprite pari 0, quindi, al massimo, può succedere il contrario . . .

 

No in realtà a questo c'ero quasi arrivato, in passato soprattutto, quando avevo fatto la finestra dei Talenti, infatti sopra la picture mi apparivano tutte le scritte delle finestre che ora spariscono :/

Infatti mi sembrava strano potesse essere quello il problema XD

 

Es. Quando attivi un determinato comando che influisce sulla visibilità ed attivazione di finestre, potresti crearti un metodo nomedelcomando_attivazione(bool), che potrebbe apparire più o meno così

 

A questo ci pensavo oggi, penso che mi ci metterò questa sera XD

 

Ora, se hai cambiato il codice di Window_Command, sono un distrattone e ti sto facendo l'esempio sbagliato . . .

Il metodo disable_command cambia il colore del TESTO che rappresenta il nome del comando da far apparire disabilitato, e non tiene memoria di quali sono stati disabilitati. Nient'altro.

 

Ah boh questi li avevo semplicemente adattati al mio script, erano presenti nello script "Compact Menù" di Sleeping Leonhart :S

Quindi questi non lo disabilitano? Che amarezza :/

Provvederò a sistemare ù___ù

 

Poi, ma non l'ho testato, mi è venuto in mente un sistema, abbastanza vicino al tuo stile, per eliminare le if interne al case/when quando si attiva un comando

Quindi, dentro il blocco che inizia con "if Input.trigger?(Input::C)" di update_command, inserisci questo codice

 

Completamente vicino al mio stile X°D

Infatti lo utilizzerò ù___ù

 

Grazie mille *_____*

 

PS: per l'help window, preferisco non metterci mano, era così nel codice originale di Sleeping, probabilmente incasinerei tutto :/

Edited by nihil-omen

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

  • 0

Leggendo un'altra discussione, mi è venuto in mente che, per l'ultima questione, quella del case/when con comandi "opzionali", quella per cui ti avevo risposto così

 

Poi, ma non l'ho testato, mi è venuto in mente un sistema, abbastanza vicino al tuo stile, per eliminare le if interne al case/when quando si attiva un comando

Quindi, dentro il blocco che inizia con "if Input.trigger?(Input::C)" di update_command, inserisci questo codice

actual_index =@command_window.indexif (not $game_variables[15] > 1) and @window_command.index > 1  actual_index += 1end

Ovviamente il case/when successivo diventa

case actual_indexwhen 0  # codice invariatowhen 1  # codice invariatowhen 2  # SOLO codice per ESPwhen 3  # SOLO codice per Talentiwhen 4  # SOLO codice per Questbookwhen 5  # SOLO codice per chiamata common eventwhen 6  # SOLO codice Achievementswhen 7  # SOLO codice Optionsend

.

 

 

potresti risolvere in modo simile a quello indicato nel post

Scelta mosse di lotta, con calcio opzionale

dato che tu hai l'SDK, che permette appunto di conoscere il nome del comando selezionato, con def identico a quello usato da Valentino.

Quindi dovresti guardare solo la class Scene_Lotta del suo script . . .

Volevo già avvertirti di questa alternativa che avevi, ma poi mi è passata di mente, come prima mi era passato di mente che tu usassi l'SDK, mi dispiace . . .

Guardala comunque, perchè se intendi aggiungere altri comandi la cui presenza nella lista dipende da determinate condizioni, può davvero evitarti di impazzire per far quadrare il codice . . .

 

Poi, un'altra cosa che ti permette di fare l'SDK è quella di cambiare a Scene già avviata la lista dei comandi usando l'istruzione

@command_window.commands = ["cmd1", "cmd2", "cmd3", "cmd4", "cmdN"]

 

Visto che la usi ti conviene guardare bene il codice dell'SDK, che potrebbe semplificarti di parecchio lo sviluppo di certe cose . . .

Edited by giver

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 0

Wow! O_O

 

Fighissima 'sta cosa!

 

Grazie mille per la dritta! ;)

La terrò bene in mente ù_ù

 

Per ora conto di lasciare lo script così come è, che ormai dovrebbe essere completo, e quadra tutto, ma se in futuro ci rimetto le mani, apporterò questa modifica (davvero comoda, tra l'altro!)! *_*

 

Per quanto riguarda l'SDK, sì, più volte mi ero ripromesso di leggermelo tutto e cercare qualche aggiunta che potesse tornarmi utile, ma le 9000 e passa righe di codice mi fanno tremare ç_ç

Un giorno ci riuscirò però! è____é9

http://i30.tinypic.com/xehois.gif

} 2rA - web site {

E' disponibile il primo capitolo completo di 2rA!

} 2rA: Capitolo I {

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...