Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.



 
InícioPortalÚltimas imagensProcurarRegistarEntrar

 

 Vários Scripts online para rpg maker xp

Ir para baixo 
2 participantes
AutorMensagem
Syoran
Novato
Novato



Mensagens : 10
Data de inscrição : 07/12/2007

Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Vários Scripts online para rpg maker xp   Vários Scripts online para rpg maker xp Icon_minitimeSex Dez 07, 2007 12:36 pm

Abaixo alguns scripts online,bom uso Very Happy
Script 1:
Autor:
IcedMetal

Função:
Grava mensagens e outras informações que apareceram no chat.

Va na pasta do Netplay,então va em Scripts,entre em functions.lua e procure por esta linha:

Código:
--------------------------------
--            CHAT            --
--------------------------------
  if cmd == "<chat>" then
    do NP():SendToAll(data) end

Depois de achar coloque o seguinte codigo logo a abaixo dela:

Código:
data = string.gsub(data,"<chat>","")
data = string.gsub(data,"</chat>","")
file = io.open("ChatLog.txt", "a+")
file:write("["..user.ip.."] "..data.."\n")
file:close()

Depois de feito isso,deve ter ficado assim:

Código:
--------------------------------
--            CHAT            --
--------------------------------
  if cmd == "<chat>" then
    do NP():SendToAll(data) end
data = string.gsub(data,"<chat>","")
data = string.gsub(data,"</chat>","")
file = io.open("ChatLog.txt", "a+")
file:write("["..user.ip.."] "..data.."\n")
file:close()

As mensagens ficaram gravadas na pasta do netplay com o nome de "ChatLog.txt".
Pronto!! Agora todos que mandarem mensagens no seu game seram gravados =D. Seria util para poder banir players que ofenderem aos
outros, pois o ChatLog grava o ip da pessoa.
Ir para o topo Ir para baixo
Syoran
Novato
Novato



Mensagens : 10
Data de inscrição : 07/12/2007

Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Script para PVP   Vários Scripts online para rpg maker xp Icon_minitimeSex Dez 07, 2007 12:39 pm

Script 2:
cole acima de main e abaixo do Mr mos ABS.
Para desligar o pvp escreva no chamar scrip: $pvp = 0
e para ligar escreva: $pvp = 1

Autor:
Mr.Mo
Modificações:
LuRike

Função:
Versão melhorada do PVP do Mr.Mo ABS para jogos Online.

Código:
#============================================================================
# *  PVP modificado por LURIKE
#============================================================================
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.state("Mr.Mo's ABS") == true

  VICTORY = '002-Victory02'
                       
  EXP_GAIN = 50       
                       
  GOLD_GAIN = 0.10 
 
class MrMo_ABS
#--------------------------------------------------------------------------
# * Player Melee Attack
#--------------------------------------------------------------------------
  def player_melee
    return if $data_weapons[@actor.weapon_id] == nil
    return if attacked_monster?
    return if attacked_player?
  end
#--------------------------------------------------------------------------
# * Player Attacked a Monster?
#--------------------------------------------------------------------------
  def attacked_monster?
    #Get all enemies
    for e in @enemies.values
      #Skip NIL values or dead enemies
      next if e == nil or e.dead?
      #Skip the enemy if its not close by or not facing
      next if !in_direction?($game_player, e.event) or !in_range?($game_player, e.event, 1)
      #Attack the enemy
      e.attack_effect(@actor)
      #Get Animation
      a = $data_weapons[@actor.weapon_id].animation2_id
      #Hit enemy if the attack succeeds
      hit_enemy(e, @actor, a) if e.damage != "Miss" and e.damage != 0
      #Animate the player
      m = MELEE_CUSTOM[@actor.weapon_id]
      if m != nil and m[0] != nil
        @button_mash = m[0]*10
      else
        @button_mash = MASH_TIME*10
      end
      if MELEE_CUSTOM[@actor.weapon_id] != nil and MELEE_CUSTOM[@actor.weapon_id][2] == nil
        animate($game_player, $game_player.character_name+"_melee") if @player_ani
      elsif MELEE_CUSTOM[@actor.weapon_id] != nil
        m = MELEE_CUSTOM[@actor.weapon_id][2]
        animate($game_player, $game_player.character_name+m.to_s) if @player_ani
      end
      #Return if the enemy is dead
      return true if enemy_dead?(e,@actor)
      return true if !e.hate_group.include?(0)
      #Set the new target for the enemy
      e.attacking = $game_player
      #The enemy is now in battle
      e.in_battle = true
      #Setup movement
      setup_movement(e)
    end
    return false
  end
#--------------------------------------------------------------------------
# * Player Attacked a Player?
#--------------------------------------------------------------------------
  def attacked_player?
    if $pvp >= 1
    #Get all enemies
    for pl in Network::Main.mapplayers.values
      #Skip NIL values or dead enemies
      next if pl == nil or pl.hp == 0 or pl.map_id != $game_map.map_id
      #Skip the enemy if its not close by or not facing
      next if !in_direction?($game_player, pl) or !in_range?($game_player, pl, 1)
      #Attack the player
      damage = pl.attack_effect
      #Get Animation
      a = $data_weapons[@actor.weapon_id].animation2_id
      #Store the player's net id
      netid = pl.netid
      #Send the demage and aniamtion
      Network::Main.socket.send("<attack_id>#{netid}\n") if damage != "Miss" and damage != 0
      Network::Main.socket.send("<attack_effect>dam=#{damage}; ani=#{a} id=#{Network::Main.id}</attack_effect>\n") if damage != "Miss" and damage != 0
      pl.show_demage(damage,false) if damage != "Miss" and damage != 0
      #Hit enemy if the attack succeeds
      hit_enemy(pl, @actor, a) if damage != "Miss" and damage != 0
      #Animate the player
      m = MELEE_CUSTOM[@actor.weapon_id]
      if m != nil and m[0] != nil
        @button_mash = m[0]*10
      else
        @button_mash = MASH_TIME*10
      end
      if MELEE_CUSTOM[@actor.weapon_id] != nil and MELEE_CUSTOM[@actor.weapon_id][2] == nil
        animate($game_player, $game_player.character_name+"_melee") if @player_ani
      elsif MELEE_CUSTOM[@actor.weapon_id] != nil
        m = MELEE_CUSTOM[@actor.weapon_id][2]
        animate($game_player, $game_player.character_name+m.to_s) if @player_ani
      end
      netplayer_killed(pl) if pl.hp <= 0
      return true
    end
    return false
  end
  end
#--------------------------------------------------------------------------
# * Player Skill Attack
#--------------------------------------------------------------------------
  def player_skill(id)
    #Get Skill
    skill = $data_skills[id]
    #Return if the skill doesn't exist
    return if skill == nil
    #Return if the actor doesn't have the skill
    return if !@actor.skills.include?(skill.id)
    #Return if the actor can't use the skill
    return if !@actor.can_use_skill?(skill)
    #Animate
    if SKILL_CUSTOM.has_key?(id)
      l = SKILL_CUSTOM[id]
      animate($game_player, $game_player.character_name+l[2].to_s) if @player_ani
    else
      animate($game_player, $game_player.character_name) if @player_ani
    end
    #Get the skill scope
    case skill.scope
    when 1 #Enemy
      #If the skill is ranged
      if RANGE_SKILLS.has_key?(skill.id)
        #Add to range
        @range.push(Game_Ranged_Skill.new($game_player, @actor, skill))
        #Take off SP
        @actor.sp -= skill.sp_cost
        w = RANGE_SKILLS[id]
        #Add mash time
        @button_mash = (w[3] == nil ? MASH_TIME*10 : w[3]*10)
        return
      end
      if SKILL_CUSTOM[id] != nil
        @button_mash = (SKILL_CUSTOM[id] == nil ? MASH_TIME*10 : SKILL_CUSTOM[id] != nil and SKILL_CUSTOM[id][0] != nil ? SKILL_CUSTOM[id][0]*10 : MASH_TIME*10)
      else
        @button_mash = MASH_TIME*10
      end
      #If the skill is not ranged
      enemies = []
      #Get all enemies
      for enemy in @enemies.values
        next if enemy == nil
        enemies.push(enemy)
      end
      #Get all players
      for player in Network::Main.mapplayers.values
        next if player == nil
        enemies.push(player)
      end
      #Order them from closest to the farthest
      enemies.sort! {|a,b|
      get_range(a.event,b.event) - get_range(b.event,a.event) }
      return if enemies[0] == nil
      #Attack the closest one
      enemies[0].effect_skill(@actor, skill)
      if enemies[0].is_a?(Game_NetPlayer)
        damage = enemies[0].damage
        pl = enemies[0]
        a = skill.animation2_id
        #Store the player's net id
        netid = pl.netid
        #Send the demage and aniamtion
        Network::Main.socket.send("<attack_id>#{netid}\n") if damage != "Miss" and damage != 0
        Network::Main.socket.send("<attack_effect>dam=#{damage}; ani=#{a} id=#{Network::Main.id}</attack_effect>\n") if damage != "Miss" and damage != 0
        pl.show_demage(damage,false) if damage != "Miss" and damage != 0
      end
      #Take off SP
      @actor.sp -= skill.sp_cost
      #Show Animetion on enemy
      hit_enemy(enemies[0], @actor, skill.animation2_id) if enemies[0].damage != "Miss" and enemies[0].damage != 0
      return if enemies[0].is_a?(Game_NetPlayer)
      #Return if enemy is dead
      return if enemy_dead?(enemies[0],@actor)
      return if !enemy.hate_group.include?(0)
      #If its alive, put it in battle
      enemies[0].in_battle = true
      #Make it attack the player
      enemies[0].attacking = $game_player
      #Setup movement
      setup_movement(enemies[0])
      return
    when 2 #All Emenies
      #Play the animation on player
      $game_player.animation_id = skill.animation2_id
      #Take off SP
      @actor.sp -= skill.sp_cost
      enemies = get_all_range
      #Get all enemies
      for e in enemies.values
        #Skip NIL values
        next if e == nil
        #Attack enemy
        e.effect_skill(@actor, skill)
        #Show Animetion on enemy
        hit_enemy(e, @actor, 0) if enemy.damage != "Miss" and enemy.damage != 0
        #Skip this enemy if its dead
        next if enemy_dead?(e,@actor)
        next if !e.hate_group.include?(0)
        #If its alive, put it in battle
        enemy.in_battle = true
        #Make it attack the player
        enemy.attacking = $game_player
        #Setup movement
        setup_movement(e)
      end
      return
    when 3..4, 7 #User
      #Use the skill on the player
      actor.effect_skill(@actor, skill)
      #Take off SP
      @actor.sp -= skill.sp_cost
      #Play animation
      $game_player.animation_id = skill.animation2_id
      return
    end
  end
 
#--------------------------------------------------------------------------
# * Get ALL Range(Element, Range)
#--------------------------------------------------------------------------
  def get_all_range(element, range)
    objects = []
    for e in @enemies.values
      next if e == nil
      objects.push(e) if in_range?(element, e.event, range)
    end
    for player in Network::Main.mapplayers.values
      next if player == nil
      objects.push(player) if in_range?(element, player, range)
    end
    return objects
  end
end

#============================================================================
# * Game Ranged Skill
#============================================================================
class Game_Ranged_Skill < Range_Base
 
  def check_event_trigger_touch(x, y)
    return if @stop
    hit_player if x == $game_player.x and y == $game_player.y
    for event in $game_map.events.values
      if event.x == x and event.y == y
        if event.character_name == ""
          force_movement
        else
          hit_event(event.id)
        end
      end
    end
    return if @parent.is_a?(Game_Event)
    #Check netplayer hit
    for player in Network::Main.mapplayers.values
      next if player == nil
      next if player.x != x or player.y != y
      if $pvp >= 1
      hit_netplayer(player)
      end
    end
  end

  def hit_netplayer(player)
    @stop = true
    #Get Actor
    actor = player
    #Get Enemy
    enemy = @actor
    #Attack Actor
    damage = actor.effect_skill(enemy, @skill)
    damage = player.damage
    #Store the player's net id
    netid = player.netid
    a = @skill.animation2_id
    player.jump(0,0) if damage != "Miss" and damage != 0
    #Send the demage and aniamtion
    Network::Main.socket.send("<attack_id>#{netid}\n") if damage != "Miss" and damage != 0
    Network::Main.socket.send("<attack_effect>dam=#{damage}; ani=#{a} id=#{Network::Main.id}</attack_effect>\n") if damage != "Miss" and damage != 0
    #Show animation on player
    player.animation_id = @skill.animation2_id if actor.damage != "Miss" and actor.damage != 0
    #Check if enemy is dead
    player.show_demage(player.damage,false) if damage != "Miss" and damage != 0
  end 
end

#============================================================================
# * Game Ranged Weapons
#============================================================================
class Game_Ranged_Weapon < Range_Base

  def check_event_trigger_touch(x, y)
    return if @stop
    hit_player if x == $game_player.x and y == $game_player.y
    for event in $game_map.events.values
      if event.x == x and event.y == y
        if event.character_name == ""
          force_movement
        else
          hit_event(event.id)
        end
      end
    end
    return if @parent.is_a?(Game_Event)
    #Check netplayer hit
    for player in Network::Main.mapplayers.values
      next if player == nil
      next if player.x != x or player.y != y
      if $pvp >= 1
      hit_netplayer(player)
      end
    end
  end

  def hit_netplayer(player)
    @stop = true
    #Get Actor
    player = player
    #Get Actor
    actor = player
    #Get Enemy
    enemy = @actor
    #Attack Actor
    damage = player.attack_effect(enemy)
    damage = player.damage
    #Store the player's net id
    netid = player.netid
    a = RANGE_WEAPONS[@actor.weapon_id]
    player.jump(0,0) if damage != "Miss" and damage != 0
    #Send the demage and aniamtion
    Network::Main.socket.send("<attack_id>#{netid}\n") if damage != "Miss" and damage != 0
    Network::Main.socket.send("<attack_effect>dam=#{damage}; ani=#{a} id=#{Network::Main.id}</attack_effect>\n") if damage != "Miss" and damage != 0
    #Show animation on player
    player.animation_id = $data_weapons[@actor.weapon_id].animation2_id if actor.damage != "Miss" and actor.damage != 0
    #Check if enemy is dead
    player.show_demage(player.damage,false) if damage != "Miss" and damage != 0
    netplayer_killed(player) if player.hp <= 0
  end 
end

#--------------------------------------------------------------------------
# * Netplayer Killed
#--------------------------------------------------------------------------
  def netplayer_killed(player)
    $game_player.show_demage("#{player.username} Killed",false)
    Audio.me_play("Audio/ME/" + VICTORY, 80, 100)
    actor = $game_party.actors[0]
    if actor.cant_get_exp? == false
      last_level = actor.level
      exp = player.level * EXP_GAIN
      actor.exp += player.level * EXP_GAIN
      $game_player.show_demage("Gained #{exp} Exp.",false)
      if actor.level > last_level
        $game_player.show_demage("Level Up!",false)
        actor.hp = actor.maxhp
        actor.sp = actor.maxsp
      end
    end
    return if GOLD_GAIN <= 0
    return if player.gold <= 0
    gold = player.gold*GOLD_GAIN
    $game_party.gain_gold(gold.to_i)
  end
 
#--------------------------------------------------------------------------
# * SDK End
#--------------------------------------------------------------------------
end
Ir para o topo Ir para baixo
Syoran
Novato
Novato



Mensagens : 10
Data de inscrição : 07/12/2007

Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Scripts de atalhos de teclas   Vários Scripts online para rpg maker xp Icon_minitimeSex Dez 07, 2007 12:48 pm

OBS: Você só poderá escolher só 1 script para colocar no seu jogo, se você pegar 2 ou mas scripts, irá dar erro no jogo (pelo menos aqui deu).
Eu não acrédito que estes scripts seja ão útil assim, mas pelo pra mim serviu, espero que vocês gostem!
Escolhar um Script abaixo:

Scripts:

1°):Tecla pro Menu.
Descrissão:Serve para quando aperta a tecla "ESPAÇO" ira direto pro menu, sem pressisar de aperta ESC para ir ao menu.
Script:

Código:
#==============================================================================
# ** Tecla pro Menu
#==============================================================================
# Por: Dk Nando 15
# Versão: 1.0
# Data: 29/10/2007
#------------------------------------------------------------------------------
class Scene_Map
  alias quests_update update
  def update
    if Input.trigger?(Input::C)
      $scene = Scene_Menu.new
      return
    end
    quests_update
  end
end

2°):Tecla pra Escolhar.
Descrissão:Serve para quando aperta a tecla "Shift" ira direto pra tela de opções de "Ir para o Titulo" "Sair" "Cancelar", sem pressisar de ir até o menu.
Script:

Código:
#==============================================================================
# ** Tecla pra Escolhar
#==============================================================================
# Por: Dk Nando 15
# Versão: 1.0
# Data: 29/10/2007
#------------------------------------------------------------------------------
class Scene_Map
  alias quests_update update
  def update
    if Input.trigger?(Input::A)
      $scene = Scene_End.new
      return
    end
    quests_update
  end
end

3°):Tecla para Titulo.
Descrissão:Serve para quando aperta a tecla "Shift" ira direto pra o titulo sem pressisar de ir até o menu.
Script:

Código:
#==============================================================================
# ** Tecla para Titulo
#==============================================================================
# Por: Dk Nando 15
# Versão: 1.0
# Data: 29/10/2007
#------------------------------------------------------------------------------
class Scene_Map
  alias quests_update update
  def update
    if Input.trigger?(Input::A)
      $scene = Scene_Title.new
      return
    end
    quests_update
  end
end

4°):Tecla para Salvar.
Descrissão:Serve para quando aperta a tecla "ESPAÇO" ira direto para a tela de salve sem pressisar de ir até o menu.
Script:

Código:
#==============================================================================
# ** Tecla para Salvar
#==============================================================================
# Por: Dk Nando 15
# Versão: 1.0
# Data: 29/10/2007
#------------------------------------------------------------------------------
class Scene_Map
  alias quests_update update
  def update
    if Input.trigger?(Input::C)
      $scene = Scene_Save.new
      return
    end
    quests_update
  end
end

5°):Tecla para Sair.
Descrissão:Serve para quando aperta a tecla "Shift" ira automaicamente sair do jogo sem pressisar de ir até o menu.
Script:

Código:
#==============================================================================
# ** Tecla para Sair
#==============================================================================
# Por: Dk Nando 15
# Versão: 1.0
# Data: 29/10/2007
#------------------------------------------------------------------------------
class Scene_Map
  alias quests_update update
  def update
    if Input.trigger?(Input::A)
      $scene = nil
      return
    end
    quests_update
  end
end

Observação Geral: Todos os script servem para jogos on-line e offline (^^pelo menos aqui pegou^^)!!!
Ir para o topo Ir para baixo
Syoran
Novato
Novato



Mensagens : 10
Data de inscrição : 07/12/2007

Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Script de distribuição de pontos parte 1   Vários Scripts online para rpg maker xp Icon_minitimeSex Dez 07, 2007 1:06 pm

Script 4:
Esse é um script que permite que você escolha em que o seu personagem vai melhorar.

Primeiro coloque esse script acimo do main e abaixo do Mr Mo ABS,e nomeie como Custom_colors:

Código:
class Window_Base
  def cc(n) #for the sake of simplicity and laziness, I'll use cc for method name
    case n   
#------ Vibrant
    when 0 #black
      return Color.new(0,0,0,255)
    when 1 #red
      return Color.new(255,0,0,255)
    when 2 #green
      return Color.new(0,255,0,255)
    when 3 #blue
      return Color.new(0,0,255,255)
    when 4 #hot orange
      return Color.new(255,90,0,255)
    when 5 #orange
      return Color.new(255,162,0,255)
    when 6 #yellow
      return Color.new(255,222,0,255)
    when 7 #lime
      return Color.new(198,255,0,255)
    when 8 #light green
      return Color.new(100,255,0,255)
    when 9 #cool blue
      return Color.new(0,255,255,255)
    when 10 #sky blue
      return Color.new(0,168,255,255)
    when 11 #purple
      return Color.new(174,0,255,255)
    when 12 #pink
      return Color.new(255,0,255,255)
    when 13 #hot pink !!!
      return Color.new(255,0,114,255)
     
#------ Pastel
    when 14 #pastel red
      return Color.new(235,145,145,255)
    when 15 #pastel orange
      return Color.new(235,208,145,255)
    when 16 #pastel yellow
      return Color.new(235,232,145,255)
    when 17 #pastel lime green
      return Color.new(204,235,145,255)
    when 18 #pastel green
      return Color.new(145,235,145,255)
    when 19 #pastel blue
      return Color.new(145,183,235,255)
    when 20 #pastel purple
      return Color.new(183,145,235,255)
    when 21 #pastel hot pink
      return Color.new(235,145,181,255)
    when 99 #white
      return Color.new(255,255,255,255)
    end
  end
end

   
Ir para o topo Ir para baixo
Syoran
Novato
Novato



Mensagens : 10
Data de inscrição : 07/12/2007

Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Script de distribuição de pontos part 2   Vários Scripts online para rpg maker xp Icon_minitimeSex Dez 07, 2007 1:07 pm

Em seguida,crie uma claase acima do main e abaixo do script acima nomeando como levelupbypoints:

Código:
#------------------------------------------------------------------------------#
# MMORPG Leveling System V1.1
# Author: Lettuce
# Last update: 23 Dec 2006
# Fixed and Added:
#      bar used HP information - Fixed
#      [Extra effect] Stats can now effect the HP and SP - Added
#      Help windows shows the extra effect - Added
#       
# Features: Allow your charactor to use points to increase their stats
#          Can add points through events
#          Can be used as a bonus points in addition to the default level system
#          Points are NOT shared between the actors in the party
#          Very customizable
#          (...that's not alot of feature >_>")
# Instructions:
# - You should change the values in the Config section (just below here) to fit
#  your needs
#    FONTFACE and FONTSIZE is pretty obvious
#    STAT_CAP = The maximum value for str,agi,dex and int that your game allows
#    STAT_CAP2 = same as STAT_CAP but this is for pdef, mdef, atk and eva
#    Y_OFFSET and X_OFFSET = change value to change the layout (I would leave
#                            it as it is though)
#    INCREASE_BY = this determines how many points (agi,dex etc) will go up
#                  for each of the points)
#*** $actors_points = this array is for storing the points for each actor, not
#                      just the ones in your party, but ALL of your actors, so
#                      if you have 5 actors in the game, there should be 5 zero's
#
# - Press L and R to change between actors
#
#  *******Warning! Once you add the points to a stat, it's PERMANENT!*******
#
#** Add points to actors by using call script and use this:
#    $actors_points[actorID] += AmountOfPoints
# (replace actorID with the actual ID of the actor,and replace AmountOfPoints
# with a number <3
#
#** If you want to add points when your actor levels, go to Scene_Battle 2 and
#  find:      if actor.level > last_level
#  and paste this just under it: $actors_points[actorID] += AmountOfPoints * (actor.level - last_level)
#  (don't forget to change the value ^.^)
#
# most of the stuff are pretty obvious of what it does, so if you are not happy
# about the position/colour etc of things, just change the value there <3
#
#Credits: Dubealex - for his pwnage tutorials
#        Leon - I got the layout idea from him <3
#        Samamanjaro - for pointing out a bug
#------------------------------------------------------------------------------#



#----- Config.
FONTFACE = "Tahoma"  #font used in all the windows
FONTSIZE = 22        #font size
STAT_CAP = 300      #Maximum value for str,agi,dex and int
STAT_CAP2 = 1000    #Maximum value for pdef mdef atk and eva
Y_OFFSET = 10        #incase you want to move some stuff down ^^
X_OFFSET = -80      #incase you want to move stuff across~
INCREASE_BY = 1      #when you spend 1 points, how much do that stat go up

STR_INCREASES = [0,0]  #1 point in STR will increase(in %) hp and sp
DEX_INCREASES = [0,0]  #for example when STR_INCREASES = [10,5]
AGI_INCREASES = [0,0]  #it increases 10% hp and 5% sp for every points you spend in STR
INT_INCREASES = [0,0]  #same goes for the other 3 :D

#--- Don't change this line =[] ---
$actors_points = [0,0,0,0,0,0,0,0,0,0] #this thing here stores the points for actors


#----- Status block 1, displays actors info
class Status_Window_1 < Window_Base
  def initialize
    super(0,0,400,480)
    self.contents = Bitmap.new(width-32,height-32)
    self.contents.font.name = FONTFACE
    self.contents.font.size = FONTSIZE
    update(0)
  end
 
 
  def update(actor_index)   
    self.contents.clear
   
    if actor_index == nil
      actor_index = 0
    end
   
    actor = $game_party.actors[actor_index]
    self.contents.draw_text(0,0,200,32,"Name: " + actor.name.to_s)
    self.contents.draw_text(0,32,100,32,"Level: " + actor.level.to_s)
    self.contents.draw_text(200,32,200,32,"Class: " + actor.class_name.to_s)
    draw_actor_graphic(actor,32,128)
   
    self.contents.draw_text(96, 64, 200, 32, "HP: " + actor.hp.to_s + "/" + actor.maxhp.to_s)
    draw_bar(96,88,200,5,actor.hp,actor.maxhp,14,99)
   
    self.contents.draw_text(96, 96, 200, 32, "SP: " + actor.sp.to_s + "/" + actor.maxsp.to_s)
    draw_bar(96,120,200,5,actor.sp,actor.maxsp,19,99)
   
    self.contents.draw_text(96, 128, 200, 32, "EXP: " + actor.exp_gained.to_s + "/" + actor.exp_needed.to_s)
    draw_bar(96,152,200,5,actor.exp_gained,actor.exp_needed,16,99)
   
    self.contents.draw_text(96 + X_OFFSET, 160 + Y_OFFSET, 200, 32, "STR: " + actor.str.to_s + "/" + STAT_CAP.to_s)
    draw_bar(96 + X_OFFSET,184 + Y_OFFSET,200,5,actor.str,STAT_CAP,21,99)
   
    self.contents.draw_text(96 + X_OFFSET, 192 + Y_OFFSET, 200, 32, "DEX: " + actor.dex.to_s + "/" + STAT_CAP.to_s)
    draw_bar(96 + X_OFFSET,216 + Y_OFFSET,200,5,actor.dex,STAT_CAP,18,99)
   
    self.contents.draw_text(96 + X_OFFSET, 224 + Y_OFFSET, 200, 32, "AGI: " + actor.agi.to_s + "/" + STAT_CAP.to_s)
    draw_bar(96 + X_OFFSET,248 + Y_OFFSET,200,5,actor.agi,STAT_CAP,15,99)
   
    self.contents.draw_text(96 + X_OFFSET, 256 + Y_OFFSET, 200, 32, "INT: " + actor.int.to_s + "/" + STAT_CAP.to_s)
    draw_bar(96 + X_OFFSET,280 + Y_OFFSET,200,5,actor.int,STAT_CAP,10,99)
   
   
   
   
    self.contents.draw_text(96 + X_OFFSET, 300 + Y_OFFSET, 200, 32, "ATK: " + actor.atk.to_s + "/" + STAT_CAP2.to_s)
    draw_bar(96 + X_OFFSET,324 + Y_OFFSET,200,5,actor.atk,STAT_CAP2,21,99)
   
    #self.contents.draw_text(96 + X_OFFSET, 332 + Y_OFFSET, 200, 32, "EVA: " + actor.eva.to_s + "/" + STAT_CAP2.to_s)
    #draw_bar(96 + X_OFFSET,356 + Y_OFFSET,200,5,actor.eva,STAT_CAP2,18,99)
   
    self.contents.draw_text(96 + X_OFFSET, 332 + Y_OFFSET, 200, 32, "PDEF: " + actor.pdef.to_s + "/" + STAT_CAP2.to_s)
    draw_bar(96 + X_OFFSET,356 + Y_OFFSET,200,5,actor.mdef,STAT_CAP2,15,99)
   
    self.contents.draw_text(96 + X_OFFSET, 364 + Y_OFFSET, 200, 32, "MDEF: " + actor.mdef.to_s + "/" + STAT_CAP2.to_s)
    draw_bar(96 + X_OFFSET,388 + Y_OFFSET,200,5,actor.pdef,STAT_CAP2,10,99)
   
    self.contents.font.color = cc(1)
    self.contents.draw_text(45 , 406 + Y_OFFSET, 400, 32, "**Stats changes are permanent**")
    self.contents.font.color = cc(99)
   
  end
 
end   

#------ Status block 2 , displays points

class Status_Window_2 < Window_Base
 
  def initialize
    super(0,0,240,75)
    self.contents = Bitmap.new(width-32,height-32)
    self.contents.font.name = FONTFACE
    self.contents.font.size = FONTSIZE - 4
  end
 
  def update(actor_id)
    actor = $game_party.actors[actor_id].id - 1
    if actor_id == nil
      actor = 0
    end
    self.contents.clear
    self.contents.draw_text(0,0,100,32, "Points left: " + $actors_points[actor].to_s)
  end
 
end


#------ Status block 3, help box =D

class Status_Window_3 < Window_Base
 
  def initialize
    super(0,0,240,180)
    self.contents = Bitmap.new(width-32,height-32)
    self.contents.font.name = FONTFACE
    self.contents.font.size = FONTSIZE - 4
  end
 
  def update(text_set)
    self.contents.clear
    case text_set
    when 0
      self.contents.draw_text(0,0,210,32,"Increase STR by " + INCREASE_BY.to_s + " point(s)")
      self.contents.draw_text(0,22,210,32,"Increase HP by " + STR_INCREASES[0].to_s + " %")
      self.contents.draw_text(0,44,210,32,"Increase SP by " + STR_INCREASES[1].to_s + " %")
    when 1
      self.contents.draw_text(0,0,210,32,"Increase DEX by " + INCREASE_BY.to_s + " point(s)")
      self.contents.draw_text(0,22,210,32,"Increase HP by " + DEX_INCREASES[0].to_s + " %")
      self.contents.draw_text(0,44,210,32,"Increase SP by " + DEX_INCREASES[1].to_s + " %")
    when 2
      self.contents.draw_text(0,0,210,32,"Increase AGI by " + INCREASE_BY.to_s + " point(s)")
      self.contents.draw_text(0,22,210,32,"Increase HP by " + AGI_INCREASES[0].to_s + " %")
      self.contents.draw_text(0,44,210,32,"Increase SP by " + AGI_INCREASES[1].to_s + " %")
    when 3
      self.contents.draw_text(0,0,210,32,"Increase INT by " + INCREASE_BY.to_s + " point(s)")
      self.contents.draw_text(0,22,210,32,"Increase HP by " + INT_INCREASES[0].to_s + " %")
      self.contents.draw_text(0,44,210,32,"Increase SP by " + INT_INCREASES[1].to_s + " %")
    end
  end
 
end



#------ Stats Upgrading SCENE ------
#...Here comes the complicated bit!!!

class Scene_Stats_Upgrade
  @@actor = 0
 
  def initialize(menu_index = 0)
    @menu_index = menu_index     
  end
 
 
  def main
   
    @window_1 = Status_Window_1.new
    @window_1.update(@@actor) #Begins with actor 1
   
    @window_2 = Status_Window_2.new
    @window_2.x = 400
    @window_2.y = 225
    @window_2.update(@@actor)
   
    @window_3 = Status_Window_3.new
    @window_3.x = 400
    @window_3.y = 300
   
   
    s1 = "Add " + INCREASE_BY.to_s + " point(s) to STR"
    s2 = "Add " + INCREASE_BY.to_s + " point(s) to DEX"
    s3 = "Add " + INCREASE_BY.to_s + " point(s) to AGI"
    s4 = "Add " + INCREASE_BY.to_s + " point(s) to INT"
   
    @window_4 = Window_Command.new(240, [s1,s2,s3,s4]) #Remember, 200 is the Width
    @window_4.y = 0 #Set a position for the menu other than 0:0
    @window_4.x = 400
    @window_4.height=225 #Force a new height for the menu window
    @window_4.index = @menu_index
   
   
    #update yerself bish!
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update #update yerself bish!
      if $scene != self
          break
      end
    end


    Graphics.freeze
    @window_1.dispose
    @window_2.dispose
    @window_3.dispose
    @window_4.dispose
   
  end
   
  def update
 
  @window_4.update
 
  case @window_4.index
  when 0
    @window_3.update(0)
  when 1
    @window_3.update(1)
  when 2
    @window_3.update(2)
  when 3
    @window_3.update(3)
  end 
 
#------ This bit is for navigation~
 
  if Input.trigger?(Input::C)
    r_actor = $game_party.actors[@@actor].id - 1
  case @window_4.index
  when 0
    if $actors_points[r_actor] <= 0 || $game_party.actors[@@actor].str == STAT_CAP
      $game_system.se_play($data_system.cancel_se)
      else
    $game_party.actors[@@actor].str += INCREASE_BY
    @m_hp = $game_party.actors[@@actor].maxhp * (STR_INCREASES[0]/100.to_f)
    @m_sp = $game_party.actors[@@actor].maxsp * (STR_INCREASES[1]/100.to_f)
    $game_party.actors[@@actor].maxhp += @m_hp
    $game_party.actors[@@actor].maxsp += @m_sp
    $actors_points[r_actor] -= 1
    @window_1.update(@@actor)
    @window_2.update(@@actor)
    end
   
  when 1
    if $actors_points[r_actor] <= 0 || $game_party.actors[@@actor].dex == STAT_CAP
      $game_system.se_play($data_system.cancel_se)
      else
    $game_party.actors[@@actor].dex += INCREASE_BY
    @m_hp = $game_party.actors[@@actor].maxhp * (DEX_INCREASES[0]/100.to_f)
    @m_sp = $game_party.actors[@@actor].maxsp * (DEX_INCREASES[1]/100.to_f)
    $game_party.actors[@@actor].maxhp += @m_hp
    $game_party.actors[@@actor].maxsp += @m_sp
    $actors_points[r_actor] -= 1
    @window_1.update(@@actor)
    @window_2.update(@@actor)
    end
  when 2
    if $actors_points[r_actor] <= 0 || $game_party.actors[@@actor].agi == STAT_CAP     
      $game_system.se_play($data_system.cancel_se)
      else
    $game_party.actors[@@actor].agi += INCREASE_BY
    @m_hp = $game_party.actors[@@actor].maxhp * (AGI_INCREASES[0]/100.to_f)
    @m_sp = $game_party.actors[@@actor].maxsp * (AGI_INCREASES[1]/100.to_f)
    $game_party.actors[@@actor].maxhp += @m_hp
    $game_party.actors[@@actor].maxsp += @m_sp
    $actors_points[r_actor] -= 1
    @window_1.update(@@actor)
    @window_2.update(@@actor)
    end
  when 3
    if $actors_points[r_actor] <= 0 || $game_party.actors[@@actor].int == STAT_CAP
      $game_system.se_play($data_system.cancel_se)
      else
    $game_party.actors[@@actor].int += INCREASE_BY
    @m_hp = $game_party.actors[@@actor].maxhp * (INT_INCREASES[0]/100.to_f)
    @m_sp = $game_party.actors[@@actor].maxsp * (INT_INCREASES[1]/100.to_f)
    $game_party.actors[@@actor].maxhp += @m_hp
    $game_party.actors[@@actor].maxsp += @m_sp
    $actors_points[r_actor] -= 1
    @window_1.update(@@actor)
    @window_2.update(@@actor)
    end
  end 
end
 
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Map.new
    $game_map.autoplay
  end
 
  if Input.trigger?(Input::R)
    if @@actor == 3
      @@actor = 0
    else
      @@actor += 1
    end
         
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Stats_Upgrade.new
  end

  if Input.trigger?(Input::L)
    if @@actor == 0
      @@actor = 3
    else
      @@actor -= 1
    end
         
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Stats_Upgrade.new
  end
 end
end

   
   
#------ Goodness me, that bit is over :D!
   

#------ This is for drawing bars
class Window_Base < Window
 
  def draw_bar(x,y,width,height,min_value,max_value,color,back_color)
    rect = Rect.new(x,y,width,height)
    self.contents.fill_rect(rect,cc(back_color.to_f))
       
    rect = Rect.new(x + 1, y + 1, (width - 2) * (min_value / max_value.to_f), height-2)
    self.contents.fill_rect(rect,cc(color.to_f))
  end
 
end

#------ For calculating exp
class Game_Actor < Game_Battler
    def exp_gained
          return @exp - @exp_list[@level]
    end
       
    def exp_needed
          return @exp_list[@level + 1] - @exp_list[@level]
    end
     
end
   

#------ This bit deals with saving and loading 
class Scene_Save
 
  alias lolipop write_save_data
 
  def write_data(file)
    lolipop(file)
    Marshal.dump($actors_points, file)
  end
end


class Scene_Load
 
  alias candycane read_save_data
 
  def load_data(file)
    candycane(file)
    $actors_points = Marshal.load(file)
  end
 
end

   
   
   
   
   
 

Instruções:

Ao aumentar o level,o player ganhará uma quantidade de pontos,mas você pode dar pontos também,para isso faça o seguinte:
Crie um evento e coloque chamar script com o seguinte script $actors_points[0]+= N sendo N o valor de pointos que o player vai ganhar.
EXEMPLO:$actors_points[0]+= 10 ,o player vai ganhar 10 pontos

Para entrar no menu de pontos,use o chmar script com o seguinte código:
$scene = Scene_Stats_Upgrade.new

Por enquanto é só ^^
Ir para o topo Ir para baixo
Sefirot22
Membro
Membro
Sefirot22


Mensagens : 35
Data de inscrição : 08/02/2008

Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Re: Vários Scripts online para rpg maker xp   Vários Scripts online para rpg maker xp Icon_minitimeSex Fev 08, 2008 3:59 pm

bom tutorial meu
Ir para o topo Ir para baixo
Conteúdo patrocinado





Vários Scripts online para rpg maker xp Empty
MensagemAssunto: Re: Vários Scripts online para rpg maker xp   Vários Scripts online para rpg maker xp Icon_minitime

Ir para o topo Ir para baixo
 
Vários Scripts online para rpg maker xp
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» [Disponibilizando] + Scripts Online
» Scripts de sistemas de batalhas
» [Tutorial ]Retirando o SDK de alguns scripts
» RPG Maker 3D

Permissões neste sub-fórumNão podes responder a tópicos
 :: RMXP Online :: Scripts RMXP Online-
Ir para: