RM-Land : le forum
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.



Bienvenue sur RM-Land : Le forum !
Après votre inscription, vous aurez accès à tout le forum : Partage de ressources, de scripts, résolution de vos problèmes, présentations de projets et montage de teams.
 
AccueilLe sitePortailDernières imagesRechercherS'enregistrerConnexion
Le Deal du moment : -39%
Ordinateur portable ASUS Chromebook Vibe CX34 Flip
Voir le deal
399 €

 

 CheatCode Script

Aller en bas 
AuteurMessage
Shikamaru
Designer
Designer
Shikamaru


Nombre de messages : 1560
Age : 31
Localisation : Tunisie > Mon ordinateur > RM LAND
Date d'inscription : 31/12/2007

CheatCode Script Empty
MessageSujet: CheatCode Script   CheatCode Script Icon_minitimeSam 17 Mai - 14:11

On commence par l'auteur :
"BudsieBuds"

Le script permet, bin de tricher...
Vous entrez le code, et vous avez la récompense ^^
Tout est très facile d'utilisation.

Ressource obligatoire (mais modifiable) :
CheatCode Script Cheat

Le script :
Code:
#==============================================================================
# ** Cheats Input Script - v1.3 - by BudsieBuds
#------------------------------------------------------------------------------
#  NOTE: Start editing at line 68 and stop editing at '# STOP EDITING \\'.
#==============================================================================


#==============================================================================
# ** Scene_Cheats
#------------------------------------------------------------------------------
#  by BudsieBuds
#==============================================================================

class Scene_Cheats
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make windows
    @edit_window = Window_CheatsEdit.new
    @input_window = Window_CheatsInput.new
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @edit_window.dispose
    @input_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @edit_window.update
    @input_window.update
    # If B button was pressed
    if Input.repeat?(Input::B)
      # If cursor position is at 0
      if @edit_window.index == 0
        return
      end
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Delete text
      @edit_window.back
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If cursor position is at [OK]
      if @input_window.character == nil
        @cheat_word = @edit_window.cheat.downcase

# START EDITING //
=begin
===============================================================================

  Check the "How to make a cheat?" document for a tutorial
  and a lot of example code.

  Notes:
    * The first cheat has to start with 'if'.
    * The cheats coming after the first one start with 'elsif'.

===============================================================================
=end

  #--------------------------------------------------------------------------
  # * Cheats
  #--------------------------------------------------------------------------
  if @cheat_word == "iamrich"
    $game_party.gain_gold(500)
    $game_temp.message_text = "You received 500 gold!"
    $game_system.se_play($data_system.decision_se)

  elsif @cheat_word == "iamarealfighter"
    $game_party.gain_weapon(1, 1)
    $game_party.gain_armor(21, 3)
    $game_temp.message_text = "You received one Bronze Sword and three Bronze\nShields!"
    $game_system.se_play($data_system.decision_se)

  elsif @cheat_word == "iloveitems"
    for i in 1...$data_items.size
      $game_party.gain_item(i, 10)
      $game_temp.message_text = "You received every item 10 times!"
      $game_system.se_play($data_system.decision_se)
    end

  elsif @cheat_word == "somehelpplease"
    $game_party.add_actor(2)
    $game_temp.message_text = $game_actors[2].name + " joined you!"
    $game_system.se_play($data_system.decision_se)

# STOP EDITING \\

          else
            # Play buzzer SE
            $game_system.se_play($data_system.buzzer_se)
          end
        # Switch to map screen
        $scene = Scene_Map.new
        return
      end
      # If text character is empty
      if @input_window.character == ""
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Add text character
      @edit_window.add(@input_window.character)
      return
    end
  end
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  by BudsieBuds
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw Graphic
  #    icon  : icon
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_icon_graphic(icon, x, y)
    bitmap = RPG::Cache.icon(icon)
    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
end


#==============================================================================
# ** Window_CheatsEdit
#------------------------------------------------------------------------------
#  by BudsieBuds
#==============================================================================

class Window_CheatsEdit < Window_Base
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader  :cheat                    # cheat
  attr_reader  :index                    # cursor position
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 640, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    @max_char = 17
    @index = 0
    @cheat = ""
    refresh
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # * Add Character
  #    character : text character to be added
  #--------------------------------------------------------------------------
  def add(character)
    if @index < @max_char and character != ""
      @cheat += character
      @index += 1
      refresh
      update_cursor_rect
    end
  end
  #--------------------------------------------------------------------------
  # * Delete Character
  #--------------------------------------------------------------------------
  def back
    if @index > 0
      # Delete 1 text character
      name_array = @cheat.split(//)
      @cheat = ""
      for i in 0...name_array.size-1
        @cheat += name_array[i]
      end
      @index -= 1
      refresh
      update_cursor_rect
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # Draw cheat
    name_array = @cheat.split(//)
    for i in 0...@max_char
      c = name_array[i]
      if c == nil
        c = "_"
      end
      x = (i + 1) * 32
      self.contents.draw_text(x, 32, 28, 32, c, 1)
    end
    # Draw graphic
    draw_icon_graphic("cheat", 16, 60)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    x = (@index + 1) * 32
    self.cursor_rect.set(x, 32, 28, 32)
  end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
  def update
    super
    update_cursor_rect
  end
end


#==============================================================================
# ** Window_CheatsInput
#------------------------------------------------------------------------------
#  by BudsieBuds
#==============================================================================

class Window_CheatsInput < Window_Base
  CHARACTER_TABLE =
  [
    "A","B","C","D","E",
    "K","L","M","N","O",
    "U","V","W","X","Y",
    " "," "," "," "," ",
    "a","b","c","d","e",
    "k","l","m","n","o",
    "u","v","w","x","y",
    " "," "," "," "," ",
    "1","2","3","4","5",
    "F","G","H","I","J",
    "P","Q","R","S","T",
    "Z"," "," "," "," ",
    " "," "," "," "," ",
    "f","g","h","i","j",
    "p","q","r","s","t",
    "z"," "," "," "," ",
    " "," "," "," "," ",
    "6","7","8","9","0",
  ]
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 440, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @index = 0
    refresh
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # * Text Character Acquisition
  #--------------------------------------------------------------------------
  def character
    return CHARACTER_TABLE[@index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...90
      x = 40 + i / 5 / 9 * 160 + i % 5 * 32
      y = i / 5 % 9 * 32
      self.contents.draw_text(x, y, 32, 32, CHARACTER_TABLE[i], 1)
    end
    self.contents.draw_text(328, 9 * 32, 48, 32, "OK", 1)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # If cursor is positioned on [OK]
    if @index >= 90
      self.cursor_rect.set(328, 9 * 32, 48, 32)
    # If cursor is positioned on anything other than [OK]
    else
      x = 40 + @index / 5 / 9 * 160 + @index % 5 * 32
      y = @index / 5 % 9 * 32
      self.cursor_rect.set(x, y, 32, 32)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # If cursor is positioned on [OK]
    if @index >= 90
      # Cursor down
      if Input.trigger?(Input::DOWN)
        $game_system.se_play($data_system.cursor_se)
        @index -= 90
      end
      # Cursor up
      if Input.repeat?(Input::UP)
        $game_system.se_play($data_system.cursor_se)
        @index -= 90 - 40
      end
    # If cursor is positioned on anything other than [OK]
    else
      # If right directional button is pushed
      if Input.repeat?(Input::RIGHT)
        # If directional button pressed down is not a repeat, or
        # cursor is not positioned on the right edge
        if Input.trigger?(Input::RIGHT) or
          @index / 45 < 3 or @index % 5 < 4
          # Move cursor to right
          $game_system.se_play($data_system.cursor_se)
          if @index % 5 < 4
            @index += 1
          else
            @index += 45 - 4
          end
          if @index >= 90
            @index -= 90
          end
        end
      end
      # If left directional button is pushed
      if Input.repeat?(Input::LEFT)
        # If directional button pressed down is not a repeat, or
        # cursor is not positioned on the left edge
        if Input.trigger?(Input::LEFT) or
          @index / 45 > 0 or @index % 5 > 0
          # Move cursor to left
          $game_system.se_play($data_system.cursor_se)
          if @index % 5 > 0
            @index -= 1
          else
            @index -= 45 - 4
          end
          if @index < 0
            @index += 90
          end
        end
      end
      # If down directional button is pushed
      if Input.repeat?(Input::DOWN)
        # Move cursor down
        $game_system.se_play($data_system.cursor_se)
        if @index % 45 < 40
          @index += 5
        else
          @index += 90 - 40
        end
      end
      # If up directional button is pushed
      if Input.repeat?(Input::UP)
        # If directional button pressed down is not a repeat, or
        # cursor is not positioned on the upper edge
        if Input.trigger?(Input::UP) or @index % 45 >= 5
          # Move cursor up
          $game_system.se_play($data_system.cursor_se)
          if @index % 45 >= 5
            @index -= 5
          else
            @index += 90
          end
        end
      end
      # If L or R button was pressed
      if Input.repeat?(Input::L) or Input.repeat?(Input::R)
        # Move capital / small
        $game_system.se_play($data_system.cursor_se)
        if @index < 45
          @index += 45
        else
          @index -= 45
        end
      end
    end
    update_cursor_rect
  end
end

Un screen ?
CheatCode Script Screenshot

Pour faire un code, rien de plus simple :
La partie éditable demarre à la ligne 84, jusque "# STOP EDITING \\"
NE TOUCHEZ A RIEN D'AUTRE !!!

Le premier code commence par "if", les suivants par "elsif".
Le code se décompose en trois parties :
* le code
* une phrase
* un son

Pour le code, il peut être de n'importe quel forme, de l'argent, des objets, etc...
La phrase, copiez un des exemples ^^
Et le son, idem.

Exemple de code :
Code:
  if @cheat_word == "iamrich"
    $game_party.gain_gold(500)
    $game_temp.message_text = "You received 500 gold!"
    $game_system.se_play($data_system.decision_se)

  elsif @cheat_word == "iamarealfighter"
    $game_party.gain_weapon(1, 1)
    $game_party.gain_armor(21, 3)
    $game_temp.message_text = "You received one Bronze Sword and three Bronze\nShields!"
    $game_system.se_play($data_system.decision_se)

  elsif @cheat_word == "iloveitems"
    for i in 1...$data_items.size
      $game_party.gain_item(i, 10)
      $game_temp.message_text = "You received every item 10 times!"
      $game_system.se_play($data_system.decision_se)
    end

  elsif @cheat_word == "somehelpplease"
    $game_party.add_actor(2)
    $game_temp.message_text = $game_actors[2].name + " joined you!"
    $game_system.se_play($data_system.decision_se)

  elsif @cheat_word == "vivedarkleo"
    $game_party.gain_gold(999)
    $game_party.gain_weapon(2, 69)
    $game_party.gain_armor(9, 9)
    $game_actors[1].hp = $game_actors[1].maxhp
    $game_temp.message_text = "Ispice de lèche-c** !\n mais bon, je t'aime bien ^^"
    $game_system.se_play($data_system.decision_se)
Dans le dernier exemple, le joueur va gagner 999Or, gagner 69fois l'épée n°2, 9fois l'armure n°9, et les PV du héros 1 serons mis au max.

J'espere que vous comprendrez et apprécierez ce script !
Revenir en haut Aller en bas
Invité
Invité




CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeDim 18 Mai - 15:53

Super script.Mais,il y as tu une façon pour que tu gagne un chara en bonus?Et,où ont met le petit mot cheat(la ressource)
Revenir en haut Aller en bas
Shikamaru
Designer
Designer
Shikamaru


Nombre de messages : 1560
Age : 31
Localisation : Tunisie > Mon ordinateur > RM LAND
Date d'inscription : 31/12/2007

CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeDim 18 Mai - 20:18

Dans Pictures , on le met ^^

Pour gagner un chara on dois contacter un scripteur ^^...
Revenir en haut Aller en bas
Invité
Invité




CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeDim 18 Mai - 21:30

OMais,ou ont trouve les lettres pour entré la phrase
Revenir en haut Aller en bas
Shikamaru
Designer
Designer
Shikamaru


Nombre de messages : 1560
Age : 31
Localisation : Tunisie > Mon ordinateur > RM LAND
Date d'inscription : 31/12/2007

CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeDim 18 Mai - 21:53

Pour faire un code, rien de plus simple :
La partie éditable demarre à la ligne 84, jusque "# STOP EDITING \\"
NE TOUCHEZ A RIEN D'AUTRE !!!

Le premier code commence par "if", les suivants par "elsif".
Le code se décompose en trois parties :
* le code
* une phrase
* un son

Pour le code, il peut être de n'importe quel forme, de l'argent, des objets, etc...
La phrase, copiez un des exemples ^^
Et le son, idem.
Revenir en haut Aller en bas
Invité
Invité




CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeDim 18 Mai - 23:18

oui,mais ou ont entre la phrase dans le menue
Revenir en haut Aller en bas
Invité
Invité




CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeMar 20 Mai - 15:50

euh...ca t'arrive de lire tinic, shikamaru vient juste de t'expliquer...
Revenir en haut Aller en bas
Invité
Invité




CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeMer 21 Mai - 0:50

Non,je sais tout çca,mais je veut dire,en jeu,tu ouvre le menue et il y a nul part l,endroit pour tricher
Revenir en haut Aller en bas
Invité
Invité




CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitimeMer 21 Mai - 1:21

je crois que c'est dans ¨taper un message¨mais je suis pas sur ^^
Revenir en haut Aller en bas
Contenu sponsorisé





CheatCode Script Empty
MessageSujet: Re: CheatCode Script   CheatCode Script Icon_minitime

Revenir en haut Aller en bas
 
CheatCode Script
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» [Demande] Script pour un A-rpg
» un bon script
» Script
» [Demande] Demande d'un script
» [Demande] script capital

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RM-Land : le forum :: Quartier des makers :: Bibliothèque-
Sauter vers: