Sign in to follow this  
Followers 0
Fegarur

Subir de Nivel Estilo Diablo

15 posts in this topic

Descripción:
Con este script, cuando subas de nivel no tendrás que pulsar nada para pasar de la batalla al mapa. Podrás otorgar diferentes puntos a cada atributo de tus personajes. Modifica ligeramente la pantalla de Estado.

Screen:
[spoiler]user posted image[/spoiler]

Script:[SPOILER]
CODE
#----------------------------------------------------------
# Level Up Point Spend System
# by Stefo
# LV up Point spend system
# If you like this thing and want to use it in your RPG then
# put me in your credits
#----------------------------------------------------------

#Current Spend per level when you start game

$SPLCH1 =  0
$SPLCH2 =  0
$SPLCH3 =  0
$SPLCH4 =  0

$SPLADD = 25
#This is how much you add points to abilities of selected hero
$STRBY = 1
$AGIBY = 1
$DEXBY = 1
$INTBY = 1
$HPBY = 10
$SPBY = 10

#¡NO CAMBIAR ESTO!
$Stradd = 1
$agiadd = 1
$dexadd = 1
$intadd = 1
$hpadd = 1
$spadd = 1


$getokay = 0

$stStrR = 1
$stAgiR = 1
$stDexR = 1
$stIntR = 1
$sthpR = 1
$stspR = 1

$actor1gotlv = 0
$actor2gotlv = 0
$actor3gotlv = 0
$actor4gotlv = 0

 #------------------------------------------------------------------------------------------
 # Scene_Battle
 # This is put here to make that you don't have to press 'C' button.
 #-------------------------------------------------------------------------------------------

class Scene_Battle
 def update_phase5
 
   if @phase5_wait_count > 0
     @phase5_wait_count -= 1
     if @phase5_wait_count == 0
       @result_window.visible = true
       $game_temp.battle_main_phase = false
       @status_window.refresh
     end
     return
   end
sleep(3)
     battle_end(0)
 end
end


class Act_Get_Spp
 
def initialize(dtd)
  if !$BTEST
 actor = $game_actors[dtd]
   if dtd != 0
   GET_IT(dtd)
 end
 end
end
 
def GET_IT(actids)
actor = $game_actors[actids]
$stStrR = actor.str.to_i
$stIntR = actor.int.to_i
$stDexR = actor.dex.to_i
$stAgiR = actor.agi.to_i
$sthpR = actor.maxhp.to_i
$stspR =  actor.maxsp.to_i
  end
end

class Act_Set_Spp
 
 def initialize(cactnum)
   if !$BTEST
   actor = $game_actors[cactnum]
   if cactnum != 0
   SET_IT(cactnum)
 end
 end
 end
 
 def SET_IT(actids)
actor = $game_actors[actids]
actor.str = $stStrR
actor.int = $stIntR
actor.dex = $stDexR
actor.agi = $stAgiR
actor.maxhp = $sthpR
actor.maxsp = $stspR
actor.recover_all
end
end

class Acts_Set_Spp_Added
 
 def initialize(currentActornum)
   if !$BTEST
   actor = $game_actors[currentActornum]
   if currentActornum != 0
   SET_IT(actor)
 end
 end
 end
 
 def ADD_IT
$ACTORD.str = $Stradd
$ACTORD.int = $intadd
$ACTORD.dex = $dexadd
$ACTORD.agi = $agiadd
$ACTORD.maxhp = $hpadd
$ACTORD.maxsp = $spadd
$ACTORD.recover_all
end
end

class Scene_Title

  def command_new_game

   # Play decision sound effect
   $game_system.se_play($data_system.decision_se)

   # Stop Title BGM
   Audio.bgm_stop

   # Initialize new game
   Graphics.frame_count = 0

   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   $acst = Act_Set_Spp.new(0)
   $acgt = Act_Get_Spp.new(0)
   $acstadd = Acts_Set_Spp_Added.new(0)

   # Set up hero party
   $game_party.setup_starting_members

   # Set up opening map
   $game_map.setup($data_system.start_map_id)

   # Set up hero party's beginning location
   $game_player.moveto($data_system.start_x, $data_system.start_y)

   # Set up lead character's map sprite graphic
   $game_player.refresh

   # Refresh the map
   $game_map.autoplay
   $game_map.update
   $scene = Scene_Map.new
 end
 
   def battle_test
   
   # Load information from database into memory
   $data_actors        = load_data("Data/BT_Actors.rxdata")
   $data_classes       = load_data("Data/BT_Classes.rxdata")
   $data_skills        = load_data("Data/BT_Skills.rxdata")
   $data_items         = load_data("Data/BT_Items.rxdata")
   $data_weapons       = load_data("Data/BT_Weapons.rxdata")
   $data_armors        = load_data("Data/BT_Armors.rxdata")
   $data_enemies       = load_data("Data/BT_Enemies.rxdata")
   $data_troops        = load_data("Data/BT_Troops.rxdata")
   $data_states        = load_data("Data/BT_States.rxdata")
   $data_animations    = load_data("Data/BT_Animations.rxdata")
   $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
   $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
   $data_system        = load_data("Data/BT_System.rxdata")
   $acst = Act_Set_Spp.new(0)
   $acgt = Act_Get_Spp.new(0)
   $acstadd = Acts_Set_Spp_Added.new(0)
   Graphics.frame_count = 0

   # Initialize global classes
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new

   # Set up battle
   $game_party.setup_battle_test_members
   $game_temp.battle_troop_id = $data_system.test_troop_id
   $game_temp.battle_can_escape = true
   $game_map.battleback_name = $data_system.battleback_name

   # Set up music and sound
   $game_system.se_play($data_system.battle_start_se)
   $game_system.bgm_play($game_system.battle_bgm)

   $scene = Scene_Battle.new
 end
end
 
#--------------------------------------------------------------------------------------------
# This is edited because when you go to new level
# you automatically gain hp,sp,agility etc.
# so it's set that you don't get automatically that attributes
#--------------------------------------------------------------------------------------------
class Game_Actor
 
 def exp=(exp)
   @exp = [[exp, 9999999].min, 0].max
   while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
     $acgt.GET_IT(@actor_id)
     @level += 1
     $acst.SET_IT(@actor_id)
   case @actor_id
  when 1
    $actor1gotlv = 1
          @ADSP = $SPLCH1.to_i
    @ADSP += $SPLADD.to_i
    $SPLCH1 = @ADSP.to_i
   when 2
     $actor2gotlv = 1
                @ADSP = $SPLCH2.to_i
    @ADSP += $SPLADD.to_i
    $SPLCH2 = @ADSP.to_i
   when 3
       $actor3gotlv = 1
                  @ADSP = $SPLCH3.to_i
    @ADSP += $SPLADD.to_i
    $SPLCH3 = @ADSP.to_i
   when 4
       $actor4gotlv = 1
   @ADSP = $SPLCH4.to_i
    @ADSP += $SPLADD.to_i
    $SPLCH4 = @ADSP.to_i
   end
     for j in $data_classes[@class_id].learnings
       if j.level == @level
         learn_skill(j.skill_id)
       end
     end
   end
   while @exp < @exp_list[@level]
     @level -= 1
   end
   @hp = [@hp, self.maxhp].min
   @sp = [@sp, self.maxsp].min
 end
#-------------------------------------------------------------------------------
   def level=(level)
 $acgt.GET_IT(@actor_id)
   level = [[level, $data_actors[@actor_id].final_level].min, 1].max
   $acst.SET_IT(@actor_id)

 $acst.SET_IT(@actor_id)
  self.exp = @exp_list[level]
  $acst.SET_IT(@actor_id)
  case @actor_id
  when 1
    $actor1gotlv = 1
    $SPLCH1 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
   when 2
     $actor2gotlv = 1
     $SPLCH2 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
   when 3
       $actor3gotlv = 1
       $SPLCH3 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
   when 4
       $actor4gotlv = 1
       $SPLCH4 +=  ([[level, $data_actors[@actor_id].final_level].min, 1].max - [[level, $data_actors[@actor_id].final_level].min, 1].max) + $SPLADD.to_i
   end
 
 end
end

#-----------------------------------------------------------------------------------------
# This is edited because you need extra things to save
# in this script
#------------------------------------------------------------------------------------------
class Scene_Save
      def write_save_data(file)

   characters = []
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     characters.push([actor.character_name, actor.character_hue])
   end

   Marshal.dump(characters, file)
   Marshal.dump(Graphics.frame_count, file)

   $game_system.save_count += 1
   $game_system.magic_number = $data_system.magic_number

   Marshal.dump($game_system, file)
   Marshal.dump($game_switches, file)
   Marshal.dump($game_variables, file)
   Marshal.dump($game_self_switches, file)
   Marshal.dump($game_screen, file)
   Marshal.dump($game_actors, file)
   Marshal.dump($game_party, file)
   Marshal.dump($game_troop, file)
   Marshal.dump($game_map, file)
   Marshal.dump($game_player, file)
   Marshal.dump ($SPLCH1,file)
   Marshal.dump ($SPLCH2,file)
   Marshal.dump ($SPLCH3,file)
   Marshal.dump ($SPLCH4,file)
   Marshal.dump ($actor1gotlv ,file)
   Marshal.dump ($actor2gotlv ,file)
   Marshal.dump ($actor3gotlv ,file)
   Marshal.dump ($actor4gotlv ,file)
   Marshal.dump($acst,file)
   Marshal.dump($acgt,file)
 end
end

#-------------------------------------------------------------------------------------------
# This is edited because you need extra things to load
# in this script
#-------------------------------------------------------------------------------------------
class Scene_Load
   def read_save_data(file)

   characters = Marshal.load(file)
   Graphics.frame_count = Marshal.load(file)

   $game_system        = Marshal.load(file)
   $game_switches      = Marshal.load(file)
   $game_variables     = Marshal.load(file)
   $game_self_switches = Marshal.load(file)
   $game_screen        = Marshal.load(file)
   $game_actors        = Marshal.load(file)
   $game_party         = Marshal.load(file)
   $game_troop         = Marshal.load(file)
   $game_map           = Marshal.load(file)
   $game_player        = Marshal.load(file)
   $SPLCH1               = Marshal.load (file)
   $SPLCH2               = Marshal.load (file)
   $SPLCH3               = Marshal.load (file)
   $SPLCH4               = Marshal.load (file)
   $actor1gotlv            = Marshal.load (file)
   $actor2gotlv            = Marshal.load (file)
   $actor3gotlv            = Marshal.load (file)
   $actor4gotlv            = Marshal.load (file)
   $acst                       = Marshal.load(file)
   $acgt                        = Marshal.load(file)
   $acstadd                  = Marshal.load(file)
   if $game_system.magic_number != $data_system.magic_number
     $game_map.setup($game_map.map_id)
     $game_player.center($game_player.x, $game_player.y)
   end

   $game_party.refresh
 end
end
 
#---------------------------------------------------------------------
# A location shower ( without background window)
# You can show it by calling a script in event
# If you don't know how to do it then check mine!
#---------------------------------------------------------------------
class Window_LocationShow < Window_Base

 def initialize
   super(600, -10, 640, 64)
   $map_infos            = load_data("Data/MapInfos.rxdata")
   for key in $map_infos.keys
     if key = $game_map.map_id
     @mapnm =  $map_infos[key].name
     end
   end
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = 30
   self.x = x - contents.text_size(@mapnm).width
   self.width = width -  contents.text_size(@mapnm).width / 2
   self.opacity = 0
   refresh
 end

 def refresh
   self.contents.clear
       self.contents.font.color = Color.new(0,0,0)
   kl = contents.text_size(@mapnm).width
   self.contents.draw_text(2, 2, kl, 32,@mapnm , 2)
       self.contents.font.color = normal_color
   kl = contents.text_size(@mapnm).width
   self.contents.draw_text(0, 0, kl, 32,@mapnm , 2)
 end
 
end

class Window_Base < Window
 
   def draw_actor_battler(actor, x, y)
   bitmap = RPG::Cache.battler(actor.battler_name,actor.battler_hue)
   cw =bitmap.width
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw,ch)
   self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
 end
 
 
 def drawSPaddparam(actor, x, y, type,get)
       if $getokay != 0    
$Stradd = $ACTORD.str.to_i
$agiadd = $ACTORD.agi.to_i
$dexadd = $ACTORD.dex.to_i
$intadd =   $ACTORD.int.to_i
$hpadd =  $ACTORD.maxhp.to_i
$spadd =  $ACTORD.maxsp.to_i
$getokay = 0
return
end
   @typ = type
case @typ
   when 0
     param_name = "Máx. " + $data_system.words.hp
     param_value = $hpadd.to_i
               self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
   self.contents.font.color = normal_color
   cx = contents.text_size(param_value.to_s).width
   self.contents.draw_text((x + cx) + 50, y, 70, 32, param_value.to_s, 2)
   when 1
     param_name =  "Máx. " +  $data_system.words.sp
     param_value = $spadd.to_i
               self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
       self.contents.font.color = normal_color
  cx = contents.text_size(param_value.to_s).width
   self.contents.draw_text((x + cx) + 50, y, 70, 32, param_value.to_s, 2)
   when 2
     param_name = $data_system.words.str
     param_value = $Stradd.to_i
               self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
   when 3
     param_name = $data_system.words.dex
     param_value = $dexadd.to_i
               self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
   self.contents.font.color = normal_color

   self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
   when 4
     param_name = $data_system.words.agi
     param_value = $agiadd.to_i
               self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
   when 5
     param_name = $data_system.words.int
     param_value = $intadd.to_i
         self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 120, y, 36, 32, param_value.to_s, 2)
end
end

def drawSPADD(x,y)
actors = $ACTORIND

case actors
when 0
   param_name = "Quedan"
   self.contents.draw_text(x + 120, y, 36, 32, $SPLCH1.to_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
when 1
   param_name = "Quedan"
   self.contents.draw_text(x + 120, y, 36, 32, $SPLCH2.to_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
when 2
   param_name = "Quedan"
    self.contents.draw_text(x + 120, y, 36, 32, $SPLCH3.to_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
when 3
   param_name = "Quedan"
   self.contents.draw_text(x + 120, y, 36, 32, $SPLCH4.to_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 120, 32, param_name + ":")
 end
end

def retclear
   if $getokay != 0    
$Stradd = $ACTORD.str.to_i
$agiadd = $ACTORD.agi.to_i
$dexadd = $ACTORD.dex.to_i
$intadd =   $ACTORD.int.to_i
$hpadd =  $ACTORD.maxhp.to_i
$spadd =  $ACTORD.maxsp.to_i
$getokay = 0
end
end
end
#--------------------------------------------------------------------------------------------
# The edited show actor status window
#--------------------------------------------------------------------------------------------
class Window_Status < Window_Base
 
  def refresh
   self.contents.clear
   draw_actor_battler(@actor,55, 250)
   draw_actor_name(@actor, 4, 0)
   self.contents.draw_text(154,-10,50,50,"Tipo:")
   draw_actor_class(@actor, 4 + 204, 0)
   draw_actor_level(@actor, 116, 32)
   draw_actor_state(@actor,116, 64)
   draw_actor_hp(@actor, 116, 112, 172)
   draw_actor_sp(@actor, 116, 144, 172)
   draw_actor_parameter(@actor, 116, 192, 0)
   draw_actor_parameter(@actor, 116, 224, 1)
   draw_actor_parameter(@actor, 116, 256, 2)
   draw_actor_parameter(@actor, 116, 304, 3)
   draw_actor_parameter(@actor, 116, 336, 4)
   draw_actor_parameter(@actor, 116, 368, 5)
   draw_actor_parameter(@actor, 116, 400, 6)
   self.contents.font.color = system_color
   self.contents.draw_text(320, 48, 80, 32, "EXP:")
   self.contents.draw_text(320, 80, 80, 32, "Siguiente:")
   self.contents.font.color = normal_color
   self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
   self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(320, 160, 96, 32, "Equipamiento")
   self.contents.draw_text(320, 208, 96, 32,$data_system.words.weapon + ":")
   self.contents.draw_text(320, 256, 96, 32, $data_system.words.armor1 + ":")
   self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor2 + ":")
   self.contents.draw_text(320, 352, 96, 32, $data_system.words.armor3 + ":")
   self.contents.draw_text(320, 400, 96, 32, $data_system.words.armor4 + ":")
   draw_item_name($data_weapons[@actor.weapon_id], 400 + 16, 208)
   draw_item_name($data_armors[@actor.armor1_id], 400 + 16, 256)
   draw_item_name($data_armors[@actor.armor2_id], 400 + 16, 304)
   draw_item_name($data_armors[@actor.armor3_id], 400 + 16, 352)
   draw_item_name($data_armors[@actor.armor4_id], 400 + 16, 400)
 end
 
 def dummy
   self.contents.font.color = system_color
   self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
   self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
   self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
   self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
   self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
   draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
   draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
   draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
   draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
   draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
 end

end

class Scene_Status
 
 
    def checkfora(actorindex)
case actorindex
when 0
 if $actor1gotlv != 0
   showlvupwin(actorindex)
 end
when 1
 if $actor2gotlv != 0
   showlvupwin(actorindex)
 end
when 2
 if $actor3gotlv != 0
   showlvupwin(actorindex)
 end
when 3
 if $actor4gotlv != 0
   showlvupwin(actorindex)
 end
end

end
 
 def showlvupwin(acts)
   @brek = 0
     sleep(0.1)
   Graphics.freeze
   Graphics.transition(40)
       sleep(0.1)
   Graphics.update
       sleep(0.1)
   @title = Window_Help.new
   @title.set_text("¡Has subido de Nivel! ¿Mejoras ahora?", 0)
   @title.y = 100
   @title.z = 99998
   s1 = "¡Mejora!"
   s2 = "Salir"
   @lvupwin = Window_Command.new(192, [s1, s2])
   @lvupwin.x = 220
   @lvupwin.y = 200
   @lvupwin.z = 99998
   @lvupwin.back_opacity = 255

   loop do
     Graphics.update
     Input.update
     updat(acts)
     if @brek != 0

       break
     end
   end
           @lvupwin.dispose
       @title.dispose    
 end

 def updat(act)

   @lvupwin.update

   if Input.trigger?(Input::C)

     case @lvupwin.index
     when 0
   @brek = 1

   $scene = Scene_Spend.new
   Graphics.transition
     when 1
       @brek = 1
     end

   end

 end
 
   def main

   @actor = $game_party.actors[@actor_index]
   @status_window = Window_Status.new(@actor)
   Graphics.transition
    $ACTORD = @actor
    $ACTORIND = @actor_index
     checkfora(@actor_index)
   loop do
$ACTORD = @actor
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end  
   end

   Graphics.freeze
   @status_window.dispose
 end
 
 end
class Window_NewHelp < Window_Base
 
 def initialize(text,x,y)
   super(0, 0, 200, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   refresh(text)
 end
 
def refresh(text)
     self.contents.clear
     self.contents.font.color = normal_color
     self.contents.draw_text(4, 0, self.width - 40, 32, text)
   end
 end
 
#-----------------------------------------------------------------------------------------
# Finally the main thing!
#-----------------------------------------------------------------------------------------
class Window_ActorSpp < Window_Base
 
 def initialize(actor,x,y,width,height)
   super(x, y, width, height)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   @actor = $ACTORD
   refresh
 end
 
def refresh
     self.contents.clear
   draw_actor_battler($ACTORD, 220, 200)
   draw_actor_name($ACTORD, 150, 210)
   draw_actor_level($ACTORD, 150, 230)
   drawSPaddparam($ACTORD,150,250,0,0)
   drawSPaddparam($ACTORD,150,270,1,0)
   drawSPaddparam($ACTORD,150,290,2,0)
   drawSPaddparam($ACTORD,150,310,3,0)
   drawSPaddparam($ACTORD,150,330,4,0)
   drawSPaddparam($ACTORD,150,350,5,0)
   drawSPADD(150,400)
 end
end

class Scene_Spend

 
 def main
 @sprite = Spriteset_Map.new
   actsr = $ACTORD
 @kill_it = 0
 @clerSP = 1
   @help_text = Window_NewHelp.new("Elige atributo:",0,0)
   @help_text.x = 0
   @help_text.y = 0
   @help_text.width = 200
   @help_text.z = 99999999
   @help_text.height = 64
   @help_text.opacity = 160
   @acSpend = Window_ActorSpp.new(actsr,200,0,440,480)
@acSpend.opacity = 160
   @acSpend.z = 999999
   $getokay = 1
   @acSpend.refresh
   s1 = $data_system.words.hp
   s2 = $data_system.words.sp
   s3 = $data_system.words.str
   s4 = $data_system.words.dex
   s5 = $data_system.words.agi
   s6 = $data_system.words.int
   s7 = "OK"
   s8 = "Limpiar todo"
   @AttrSel = Window_Command.new(200, [s1, s2,s3,s4,s5,s6,s7,s8])
   @AttrSel.y = 64
   @AttrSel.height = 416
   @AttrSel.z = 999999
   @AttrSel.opacity = 160
   Graphics.transition
   @clerSP = 1
   
   
loop do
     Graphics.update
     Input.update
     @acSpend.refresh
     updateATTRSEL
     if @kill_it != 0
       break
     end
   end
Graphics.freeze
@AttrSel.dispose
@acSpend.dispose
@help_text.dispose
@sprite.dispose
Graphics.transition
$acstadd.ADD_IT
$scene = Scene_Map.new

actsr  = $ACTORIND
case actsr
when 0
 if $actor1gotlv != 0
   $actor1gotlv = 0
 end
when 1
 if $actor2gotlv != 0
   $actor2gotlv = 0
 end
when 2
   if $actor3gotlv != 0
   $actor3gotlv = 0
 end
when 3
   if $actor4gotlv != 0
   $actor4gotlv = 0
 end
end
end

 
def updateATTRSEL
   @AttrSel.update
   
   csa = $ACTORIND
   if @clerSP != 0
     @clerSP = 0
case csa
when 0
     $SPLRET = $SPLCH1.to_i
when 1
     $SPLRET = $SPLCH2.to_i
when 2
     $SPLRET = $SPLCH3.to_i
when 3
     $SPLRET = $SPLCH4.to_i
   end
   end
   
   
if Input.repeat?(Input::C)
 case @AttrSel.index
 when 0
   acselt = $ACTORIND
case acselt
when 0
   unless $SPLCH1 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $hpadd = $hpadd + $HPBY
   @acSpend.refresh
   @ackill = $SPLCH1
   @ackill -= 1
   $SPLCH1 = @ackill
           unless $SPLCH1 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
   
when 1
   unless $SPLCH2 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   
   $hpadd = $hpadd + $HPBY
   @acSpend.refresh
       @ackill = $SPLCH2
   @ackill -= 1
   $SPLCH2 = @ackill
   
           unless $SPLCH2 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 2
   unless $SPLCH3 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $hpadd = $hpadd + $HPBY
   @acSpend.refresh
       @ackill = $SPLCH3
   @ackill -= 1
   $SPLCH3 = @ackill
           unless $SPLCH3 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 3
   unless $SPLCH4 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
     $hpadd = $hpadd + $HPBY
   @acSpend.refresh
       @ackill = $SPLCH4
   @ackill -= 1
   $SPLCH4 = @ackill
           unless $SPLCH4 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
end
   
 when 1

   
   acselt = $ACTORIND
case acselt
when 0
   unless $SPLCH1 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $spadd = $spadd + $SPBY
   @acSpend.refresh
   @ackill = $SPLCH1
   @ackill -= 1
   $SPLCH1 = @ackill
           unless $SPLCH1 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 1
   unless $SPLCH2 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   
   $spadd = $spadd + $SPBY
   @acSpend.refresh
       @ackill = $SPLCH2
   @ackill -= 1
   $SPLCH2 = @ackill
   
           unless $SPLCH2 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 2
   unless $SPLCH3 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $spadd = $spadd + $SPBY
   @acSpend.refresh
       @ackill = $SPLCH3
   @ackill -= 1
   $SPLCH3 = @ackill
           unless $SPLCH3 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 3
   unless $SPLCH4 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $spadd = $spadd + $SPBY
   @acSpend.refresh
       @ackill = $SPLCH4
   @ackill -= 1
   $SPLCH4 = @ackill
           unless $SPLCH4 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
 end
   
 when 2

   
   acselt = $ACTORIND
case acselt
when 0
   unless $SPLCH1 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $Stradd = $Stradd + $STRBY
   @acSpend.refresh
   @ackill = $SPLCH1
   @ackill -= 1
   $SPLCH1 = @ackill
           unless $SPLCH1 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 1
   unless $SPLCH2 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   
   $Stradd = $Stradd + $STRBY
   @acSpend.refresh
       @ackill = $SPLCH2
   @ackill -= 1
   $SPLCH2 = @ackill
   
           unless $SPLCH2 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 2
   unless $SPLCH3 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $Stradd = $Stradd + $STRBY
   @acSpend.refresh
       @ackill = $SPLCH3
   @ackill -= 1
   $SPLCH3 = @ackill
           unless $SPLCH3 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 3
   unless $SPLCH4 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $Stradd = $Stradd + $STRBY
   @acSpend.refresh
       @ackill = $SPLCH4
   @ackill -= 1
   $SPLCH4 = @ackill
           unless $SPLCH4 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
 end
 
 when 3
   

   
  acselt = $ACTORIND
case acselt
when 0
   unless $SPLCH1 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $dexadd = $dexadd + $DEXBY
   @acSpend.refresh
   @ackill = $SPLCH1
   @ackill -= 1
   $SPLCH1 = @ackill
           unless $SPLCH1 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 1
   unless $SPLCH2 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   
   $dexadd = $dexadd + $DEXBY
   @acSpend.refresh
       @ackill = $SPLCH2
   @ackill -= 1
   $SPLCH2 = @ackill
   
           unless $SPLCH2 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 2
   unless $SPLCH3 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $dexadd = $dexadd + $DEXBY
   @acSpend.refresh
       @ackill = $SPLCH3
   @ackill -= 1
   $SPLCH3 = @ackill
           unless $SPLCH3 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 3
   unless $SPLCH4 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $dexadd = $dexadd + $DEXBY
   @acSpend.refresh
       @ackill = $SPLCH4
   @ackill -= 1
   $SPLCH4 = @ackill
           unless $SPLCH4 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
     end
     
 when 4

 
  acselt = $ACTORIND
case acselt
when 0
   unless $SPLCH1 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $agiadd = $agiadd + $AGIBY
   @acSpend.refresh
   @ackill = $SPLCH1
   @ackill -= 1
   $SPLCH1 = @ackill
           unless $SPLCH1 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 1
   unless $SPLCH2 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   
   $agiadd = $agiadd + $AGIBY
   @acSpend.refresh
       @ackill = $SPLCH2
   @ackill -= 1
   $SPLCH2 = @ackill
   
           unless $SPLCH2 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 2
   unless $SPLCH3 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
   $agiadd = $agiadd + $AGIBY
   @acSpend.refresh
       @ackill = $SPLCH3
   @ackill -= 1
   $SPLCH3 = @ackill
           unless $SPLCH3 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 3
   unless $SPLCH4 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   $agiadd = $agiadd + $AGIBY
   @acSpend.refresh
       @ackill = $SPLCH4
   @ackill -= 1
   $SPLCH4 = @ackill
           unless $SPLCH4 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
     end
     
 when 5

  acselt = $ACTORIND
case acselt
when 0
   unless $SPLCH1 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
  $intadd = $intadd + $INTBY
   @acSpend.refresh
   @ackill = $SPLCH1
   @ackill -= 1
   $SPLCH1 = @ackill
           unless $SPLCH1 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 1
   unless $SPLCH2 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   
  $intadd = $intadd + $INTBY
   @acSpend.refresh
       @ackill = $SPLCH2
   @ackill -= 1
   $SPLCH2 = @ackill
   
           unless $SPLCH2 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 2
   unless $SPLCH3 > 0
     $game_system.se_play($data_system.buzzer_se)
     @AttrSel.disable_item(0)
     return
   end
  $intadd = $intadd + $INTBY
   @acSpend.refresh
       @ackill = $SPLCH3
   @ackill -= 1
   $SPLCH3 = @ackill
           unless $SPLCH3 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
when 3
   unless $SPLCH4 > 0
     $game_system.se_play($data_system.buzzer_se)
     return
   end
  $intadd = $intadd + $INTBY
   @acSpend.refresh
       @ackill = $SPLCH4
   @ackill -= 1
   $SPLCH4 = @ackill
           unless $SPLCH4 > 0
     @AttrSel.disable_item(0)
     @AttrSel.disable_item(1)
     @AttrSel.disable_item(2)
     @AttrSel.disable_item(3)
     @AttrSel.disable_item(4)
     @AttrSel.disable_item(5)
     return
   end
     end
     
 when 6
@kill_it = 1
 when 7
   clear
 end
end
end
end


def clear
   $getokay = 1
   @acSpend.refresh
     @AttrSel.enable_item(0)
     @AttrSel.enable_item(1)
     @AttrSel.enable_item(2)
     @AttrSel.enable_item(3)
     @AttrSel.enable_item(4)
     @AttrSel.enable_item(5)
amp = $ACTORIND
case amp
when 0
$SPLCH1 = $SPLRET
when 1
$SPLCH2 = $SPLRET
when 2
$SPLCH3 = $SPLRET
when 3
$SPLCH4 = $SPLRET
return
end
end

class Window_Command < Window_Selectable
 
   def enable_item(index)
   draw_item(index, normal_color)
 end
end

#THIS IS ALL!!
[/SPOILER] Edited by Fegarur
0

Share this post


Link to post
Share on other sites
Instrucciones:
user posted image Coloca el script sobre Main.
user posted image Para subir los atributos, hay que ir a la pantalla de Estado, en el menú.
user posted image Puedes cambiar la traducción a tu gusto.
user posted image Edita el principio del script según las indicaciones que vienen. Ejemplo:
QUOTE
#This is how much you add points to abilities of selected hero
$STRBY = 1
$AGIBY = 1
$DEXBY = 1
$INTBY = 1
$HPBY = 10
$SPBY = 10

Significa que cada vez que subas el parámetro HP y SP subirá de 10 en 10, y todos los demás subirán de 1 en 1.

Crédito:
Script creado por: Stefo

PD: Lo siento, parece que no cabía todo en un sólo post.
Saludos. icon13.gif Edited by Fegarur
0

Share this post


Link to post
Share on other sites
ola!!!
necesito que me ayudes,el script no me sirve,me da erro en la linea 700,si cambio fontice x un numero no me da el error pero solo se me ven los nombres de los atributos a la izkierda y el dibujo del personaje,xk es?

PD:el fonde de cabio de atributos se me ve transparente,eso es normal?

salu2
0

Share this post


Link to post
Share on other sites
Cambia tu Main por este:[SPOILER]
CODE
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
#  After defining each class, actual processing begins here.
#==============================================================================

begin
 # Fuente que usará el juego
 $fontface = $defaultfonttype = "Arial"
 # Tamaño de la fuente
 $fontsize = $defaultfontsize = 25
 # Prepare for transition
 Graphics.freeze
 # Make scene object (title screen)
 $scene = Scene_Title.new
 # Call main method as long as $scene is effective
 while $scene != nil
   $scene.main
 end
 # Fade out
 Graphics.transition(20)
rescue Errno::ENOENT
 # Supplement Errno::ENOENT exception
 # If unable to open file, display message and end
 filename = $!.message.sub("No se encontó el archivo o directorio - ", "")
 print("Error RGSS: #{filename}")
end
[/SPOILER]
Por supuesto, pon el tamaño y tipo de letra que tú quieras. Con eso ya funcionará.

Y sí, es normal que sea transaparente, mira la screen. icon13.gif Edited by Fegarur
0

Share this post


Link to post
Share on other sites
Es posible hacer que la ventana salga automaticamente al subir el nivel ?
o para k subiera desde un NPC donde se modificaria ?
0

Share this post


Link to post
Share on other sites
ola!
tengo dos dudillas sobre este script
la primera:se pueden cambiar las coordenadas del menu en el k salen los atributos y todo eso?
esk yo e cambido mi menu y me sale los atribitos encima del personaje
la 2º:
x cada nivel k subes te dan 25 "puntos",
se k por cada punto que te dne puedes elegir 1 punto de vida,de fuersa y to y eso donde lo puedes camiar?
salu2
0

Share this post


Link to post
Share on other sites
1.- Sí se puede, cambia los valores hasta que quede a tu gusto.
2.- No termino de entenderte... si quieres cambiar el número total de puntos busca esto $SPLADD = 25 y cambia el 25 por los puntos que quieras.
0

Share this post


Link to post
Share on other sites
Muy buenas, tengo un problemilla, en la linea 669 me da error y no se como arreglarlo, os pego la parte q da el conflicto a ver si podeis ayudarme plz:

class Window_NewHelp < Window_Base

def initialize(text,x,y)
super(0, 0, 200, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize <----aqui (no inplict comversion from nil to interger)
refresh(text)
end


gracias.
0

Share this post


Link to post
Share on other sites
QUOTE(Densuke86 @ Mar 17 2008, 11:48 AM)
Muy buenas, tengo un problemilla, en la linea 669 me da error y no se como arreglarlo, os pego la parte q da el conflicto a ver si podeis ayudarme plz:

class Window_NewHelp < Window_Base

def initialize(text,x,y)
  super(0, 0, 200, 64)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.contents.font.name = $fontface
  self.contents.font.size = $fontsize <----aqui (no inplict comversion from nil to interger)
  refresh(text)
end
gracias.
[right][snapback]54049[/snapback][/right]


def initialize(text,x,y)
super(0, 0, 200, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize = 18 #tamaño de fuente
refresh(text)
end
0

Share this post


Link to post
Share on other sites
Hola, me parece muy interesante este scrip, pero se me presenta un error cargar una partida, es el siguiente:


CODE
Error de Script Puntos en la linea 366 de tipo "EOFError"

End of file reached



0

Share this post


Link to post
Share on other sites
Pues no sé. Cópialo como está ahora por si el problema era de codificación.
0

Share this post


Link to post
Share on other sites
Habría alguna posibilidad de que este script sirviera o se pudiera modificar para VX?¿ Me interesa bastante tenerlo y sería genial poder utilizar. Gracias de ante mano.
- - - - - - - - -
He indagado un poco y es cierto que se podría, el primer problema que da es el sonido, he borrado esa parte (no sé si sería importante pero he considerado que no) y me ha dado error en la linea 640, eso ya no sé solucionarlo, pero he conseguido poder jugar y que solo de error al entrar en "estado". Si hay algún artista de scrips porfavor si lo modifica me haria feliz, gracias ^^ xD
0

Share this post


Link to post
Share on other sites
a mi me tira error en la linea 790 de ADD_IT
- - - - - - - - -
hola!.... Alguien qe me ayude plz! T_T llorar.gif auxilio.gif
0

Share this post


Link to post
Share on other sites
Compañeros, no soy moderador ni nada, pero porfavor no hagan doble post...

xD.png a mi me lo han dicho asi....

Porfavor, no hagan doble post, esperen a que les respondan,
Respecto a tu pregunta Hassenhoff, no puedo ayudrte, pero no impacientes...

Seguro alguie podra ayudarte, solo calma

icon13.gif
0

Share this post


Link to post
Share on other sites
cabreado.gif Este script no sirve para nada >_<!!!
Por mas que lo intento arreglar sige fallando!
Quando no es en una linea es en otra!
cabreado.gif
Voi a eliminarlo...
Me a jodido porque e cambiado el main i todo de mi proyecto y encima uso el script de scene intro i e tenido problemas con el... >_<
NO LO RECOMIENDO A NADIE
Solo trae problemas icon4.gif icon4.gif icon4.gif

Siento tener que decir eso pero es que el script me saco de quizio con tanto error dry.gif
0

Share this post


Link to post
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
Sign in to follow this  
Followers 0