Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
Script per una mossa da Tank

    Bartowski
  • Nuovo Arrivato

  • Utenti
  • Rens: 8
  • 0
  • Stelletta
  • 28 messaggi
  • Sesso:Maschio
  • Provenienza:Burbank

#1 Inviato 10 July 2012 - 17:43 PM

Salve,
Stavo cercando uno script o una demo(preferibilmente) che permetta a uno degli eroi di effettuare una mossa in grado di ricevere danni al posto di un alleato colpito parandoglisi davanti,uso il tankentai.
Grazie mille in anticipo

    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58422 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#2 Inviato 10 July 2012 - 18:58 PM

Se ti riferisci ad uno script particolare linkalo e se il topic dello script esiste posta lì (ora continua qui). Saranno più disposti ad aiutarti se non devono andarsi a cercare pure quello che usi! ^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Bartowski
  • Nuovo Arrivato

  • Utenti
  • Rens: 8
  • 0
  • Stelletta
  • 28 messaggi
  • Sesso:Maschio
  • Provenienza:Burbank

#3 Inviato 10 July 2012 - 19:33 PM

Avevo trovato questo script,ma non ha l'animazione che cercavo io(vale a dire che non si posiziona davanti)e non so come farlo partire.a non ha l'animazione che cercavo io(vale a dire che non si posiziona davanti)e non so come farlo partire.
Sito= http://www.rpgmakerv...showtopic=48699
#						 Protect Skill v 1.2.3
#						   by Kal
#
#						 ===== How to use =====
#
# Make a state that has the magic word in it's note box. When that state
# is inflicted on an ally, the person who inflicted the state (by casting
# a spell that adds the state, for example) will receive all the damage
# that is done to the ally.
#
#				  ===== What battle system is this for? =====
#		
# The script was designed for the default battle system but it's also works
# with Tankentai (and ATB). However, there is no animation support for
# Tankentai at the moment (i.e. protector jumping in front of protectee) and
# the damage numbers need to be fixed.
#
#						 ===== Version history =====
#
# 1.0 - Finished script
#
# 1.1   - Added message text configuration in the config module.
#	   - Status effect will be removed immediately after the protector dies
#	   - Fixed a bug where a dead protector would still protect under certain
#		 circumstances.
#	   - Fixed a bug where the protect message got drawn when it shouldn't.
#
# 1.2   - Added ability to increase/decrease the amount of damage a protector
#		 takes when protecting.
#
# 1.2.1 - Fixed using items on protector bug with Tankentai + ATB.
#
# 1.2.2 - Fixed a bug where you could not cast the state again after a battle.
#
# 1.2.3 - Fixed a bug with Tankentai + ATB where the protect state would not
#		 be removed when the protector died.
module ProtectConfig
  MAGIC_WORD		   = "Protect"
  # Add this word in the "Note" box for any status in order to enable protect
  # for that status.
  PROTECT_PHYSICAL	 = true
  PROTECT_SKILLS	   = true
  # Set these to true/false to enable/disable protection from physical damage
  # and protection from skills damage.
  PROTECT_LIMIT		= 1
  # This is the number of allies one character can protect at the same time.
  DAMAGE_EFFECT		= 100
  # This is a percentage of damage the protector will take when protecting
  # an ally. For example, if this value is set to 50, the protector will take
  # half damage when protecting an ally.
  MP_DAMAGE_EFFECT	 = false
  # Should DAMAGE_EFFECT apply to MP damage?
  MESSAGE = lambda do |context|
	eval "protector.name + ' protected ' + target.name + '!'", context
	# Edit this line to change the message that is displayed when an actor
	# protects an ally. protector.name is the protector's name and
	# target.name is the protected ally's name. Any text you want to add
	# needs to be in single quote strings, as above.
	# Note: not working for Tankentai at the moment.
  end
end
class RPG::State
  attr_accessor :skill_user

  def protect?
	set_protect if @protect.nil?
	@protect
  end

  def set_protect
	if @note.downcase =~ /#{ProtectConfig::MAGIC_WORD.downcase}/
	  @protect = true
	else
	  @protect = false
	end
  end
end
class Scene_Battle
  unless $@
	alias :kal_old_display_action_effects :display_action_effects
	alias :kal_old_process_action :process_action
  end
  # NOTE: not being called at all with Tankentai and ATB. Fix?
  def display_action_effects(target, obj = nil)
	# If this is a physical attack (obj == nil) and PROTECT_PHYSICAL is false
	if !ProtectConfig::PROTECT_PHYSICAL and obj.nil?
	  kal_old_display_action_effects(target, obj) # call original method and return
	  return
	# If this is a skills attack and PROTECT_SKILLS is false
	elsif !ProtectConfig::PROTECT_SKILLS and obj
	  kal_old_display_action_effects(target, obj) # call original method and return
	  return
	end
  
	if target.protect?
	  protector = target.states.find { |state| state.protect? }.skill_user
	  protector.display_protect = true unless protector.dead?
	  if protector != @active_battler and protector.display_protect
		protector.display_protect = false if protector.dead?
		text = ProtectConfig::MESSAGE.call(binding)
		@message_window.add_instant_text(text)
		wait(30)
		kal_old_display_action_effects(protector)
		return
	  end
	end
  
	kal_old_display_action_effects(target, obj)
  end
  # Check if any protector is dead after an action has been processed.
  # If dead remove the state.
  def process_action
	kal_old_process_action
	$game_party.members.each do |member|
	  member.states.each do |state|
		if state.protect?
		  if state.skill_user.dead?
			state.skill_user.protected_allies = 0
			member.remove_state(state.id)
			@status_window.refresh
		  end
		end
	  end
	end
  end
end
class Game_Battler
  attr_accessor :protected_allies, :display_protect, :protecting

  unless $@
	alias :kal_old_initialize :initialize
	alias :kal_old_make_attack_damage_value :make_attack_damage_value
	alias :kal_old_add_state :add_state
	alias :kal_old_skill_effect :skill_effect
	alias :kal_old_make_obj_damage_value :make_obj_damage_value
  end

  def initialize
	@protected_allies = 0
	@display_protect = true
	@protecting = false
	kal_old_initialize
  end

  def make_attack_damage_value(attacker, effect = nil)
	kal_old_make_attack_damage_value(attacker)
	if ProtectConfig::PROTECT_PHYSICAL
	  states.each do |state|
		if state.protect? and !state.skill_user.dead?
		  @hp_damage = 0
		  state.skill_user.protecting = true
		  state.skill_user.attack_effect(attacker)
		end
	  end
	  if @protecting
		@hp_damage *= (ProtectConfig::DAMAGE_EFFECT / 100)
		@protecting = false
	  end
	end
  end

  def make_obj_damage_value(user, obj)
	kal_old_make_obj_damage_value(user, obj)
	if ProtectConfig::PROTECT_SKILLS and !$game_party.members.include?(user)
	  states.each do |state|
		if state.protect? and !state.skill_user.dead?
		  @hp_damage = 0
		  @mp_damage = 0
		  state.skill_user.protecting = true
		  state.skill_user.skill_effect(user, obj)
		end
	  end
	  if @protecting
		@hp_damage *= (ProtectConfig::DAMAGE_EFFECT / 100)
		@mp_damage *= (ProtectConfig::DAMAGE_EFFECT / 100) if ProtectConfig::MP_DAMAGE_EFFECT
		@protecting = false
	  end
	end
  end
  def add_state(state_id)
	state = $data_states[state_id]
	if state.protect?
	  state.skill_user = @skill_user
	  @skill_user.protected_allies += 1
	end
	kal_old_add_state(state_id)
  end

  def skill_effect(user, skill)
	@skill_user = user
	kal_old_skill_effect(user, skill)
  end

  def protect?
	states.any? {|state| state.protect?}
  end
end
class Game_Actor
  alias :kal_old_state_resist? :state_resist? unless $@
  def state_resist?(state_id)
	# Prevent castng protect on self
	if @skill_user == self and $data_states[state_id].protect?
	  return true
	#  Prevent casting protect on a char that is already protected
	elsif protect? and $data_states[state_id].protect?
	  return true
	# Prevent casting protect if the protect limit is reached
	elsif @skill_user.protected_allies >= ProtectConfig::PROTECT_LIMIT
	  return true
	end
	kal_old_state_resist?(state_id)
  end
end
class Game_Party
  alias :kal_old_remove_states_battle :remove_states_battle unless $@

  def remove_states_battle
	kal_old_remove_states_battle
	members.each do |actor|
	  actor.protected_allies = 0
	end
  end
end

Modificato da Bartowski, 10 July 2012 - 20:06 PM.


    NoxChibi
  • Utente occasionale

  • Utenti
  • Rens: 0
  • 0
  • StellettaStelletta
  • 164 messaggi
  • Sesso:Maschio
  • Provenienza:NAPOLI
  • Abilità:Novizio

#4 Inviato 17 July 2012 - 21:33 PM

Mmm penso che devi vedere se in qualche stringa dove indica dove posizionarti e' editabile...




  • Feed RSS