Vai al contenuto


Toggle Chat RM - Chat Apri la Chat in un popup

E' severamente vietato richiedere supporto su RPG Maker in chat!
@  Melosx : (25 May 2012 - 08:30 PM) Buonasera a tutti
@  Hashmin : (25 May 2012 - 02:15 PM) ciao a tt!
@  Pech93 : (24 May 2012 - 01:55 PM) ho aggiunto delle composizioni originali!!! Chi le vuole ascoltare e dare qualche commento costruttivo?
@  MihaChan : (23 May 2012 - 09:19 PM) a parte i denti -che stanno decidendo di darmi noia in questi giorni-, tutto okay~
@  Melosx : (23 May 2012 - 09:18 PM) bene ^.^ ... Tu??
@  MihaChan : (23 May 2012 - 09:17 PM) come va? xD
@  MihaChan : (23 May 2012 - 09:16 PM) okay
@  MihaChan : (23 May 2012 - 09:16 PM) ah
@  Melosx : (23 May 2012 - 09:14 PM) ciao miha... ai dont spic inglisc
@  MihaChan : (23 May 2012 - 09:12 PM) how'sa goin'?
@  MihaChan : (23 May 2012 - 09:12 PM) ciao Mel!
@  Melosx : (23 May 2012 - 09:07 PM) ciao
@  MihaChan : (23 May 2012 - 09:06 PM) salve D:
@  Pech93 : (23 May 2012 - 08:05 PM) MIk?
@  Melosx : (23 May 2012 - 07:51 PM) VIENI SU MSN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@  Melosx : (23 May 2012 - 07:51 PM) MIIIIIIIIIIIIIIIIIIIKKKKKKKKKKKK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@  Melosx : (23 May 2012 - 07:46 PM) *iù
@  Melosx : (23 May 2012 - 07:38 PM) iu spin mi rai rau bebi rai rau laic a record bebi rau rau rau rau
@  Melosx : (23 May 2012 - 07:37 PM) lalalallalallalallallllllllllalalalallaaaaaaaaaaaaaaaaaaaaaa!!!!!!!!!!!!!!!!!!
@  Melosx : (23 May 2012 - 07:37 PM) lalalalala

Script


  • Per cortesia connettiti per rispondere
2 risposte a questa discussione

#1 OFFLINE   texdade

texdade

    RM Utente

  • Utenti RM
  • StellettaStelletta
  • 12 Messaggi:

Inviato 19 September 2011 - 01:35 PM

Avrei bisogno di due script: Uno (il piu' importante) per fare una specie di banca dove il pg possa mettere soldi e poi riprenderseli, l' altro, se possibile, sarebbe il fabbro, che fa in modo che quando il pg va da lui spende una somma per potenziare l' attacco dell' arma o la difesa di un' armatura... grzie in anticipo!!!! :D :D :D :D :D

#2 OFFLINE   Juunanagou

Juunanagou

    Recensori

  • Recensori
  • 553 Messaggi:
  • Progetto XP:
    Vampire Chronicle
  • Tool:
    Rpg Maker XP

Inviato 19 September 2011 - 04:54 PM

Allora ho trovato qualcosa ma su un sito nordico XD Però lo script è in inglese:

#-------------------------------------------------------------------------------
#                                                                  page 5 of 12
#                                Shopoholic v 2.0
#                                code by cmpsr2000 
#                  available exclusively @ rpgrevolution.com/forums
#                              Released June 25, 2008
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# This class implements bank inventories and provides access to true interest
# calculations. The instance of this class is $game_banking
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# 
# IMPORTANT CUSOMIZATION INFORMATION:
#   To call a bank, use the script call: 
#     $scene = Scene_Bank.new(bankID, rates, slotCost, loanMax, hasVault)
#       bankID:     The ID of the bank to be shown. (you can show the same bank
#                   In various events throughout your game, just as you can with
#                   shops. This way, you can have 1 bank for your entire game
#                   if you chose)
#       rates:      An array of interest rates: [savings, checking, loan]
#                     savings:  interest rate for savings accounts at this
#                               instance of this bank.
#                     checking: interest rate for checking accounts at this
#                               instance of this bank.
#                     loan:     interest rate for checking accounts at this
#                               instance of this bank.
#                     NOTE: If you have more than one event per bankID you can
#                     set different interest rates at each one! (sort of like
#                     branches of a real bank)
#       slotCost:   Cost for each new Saftey Deposit Box in the vault
#       loanMax:    The max amount the bank will issue in a single loan. This 
#                   overrides the global setting for max loan if it is lower.
#       hasVault    Boolean indicating whether or not this instance of this bank
#                   has a vault. Again if you have multiple events for a bankID
#                   Then you can enable the vault in some while disabling it in
#                   others and the players items will persist.
#-------------------------------------------------------------------------------
class Game_Banking
  
  attr_accessor :bankAccounts
  attr_accessor :bankVaults
  attr_reader   :interestTerm
  attr_reader   :loanMax
  #-----------------------------------------------------------------------------
  # Creates the $game_banking object
  #-----------------------------------------------------------------------------
  def initialize
    @lastInterestTime = 0

    #---------------------------------------------------------------------------
    # How many minutes must pass before the bank compounds interest.
    #---------------------------------------------------------------------------
    @interestTerm = 2
    #---------------------------------------------------------------------------
    # You can set a universal maximum for all loans here.
    #---------------------------------------------------------------------------
    @loanMax = 100000
    #---------------------------------------------------------------------------
    # All banks are created allowing the same account types. if you want to
    # disable an account type for your game, chage it's value below to false
    #---------------------------------------------------------------------------
    @allowSavings   = true
    @allowChecking  = true
    @allowLoans     = true
    #---------------------------------------------------------------------------
    # Number of saftey deposit boxes in the vault. (multiples of 8 look best)
    #---------------------------------------------------------------------------
    @maxSlots = 64
    #---------------------------------------------------------------------------
    # Number of starting "free" slots per bank.
    #---------------------------------------------------------------------------
    @freeSlots = 4
    
    initBanks
  end
  #-----------------------------------------------------------------------------
  # Sets up the banks' accounts and their vaults
  #-----------------------------------------------------------------------------
  def initBanks
    #---------------------------------------------------------------------------
    # IMPORTANT:
    #   You will get an error when managing accounts and vaults if you try to 
    #   pass a bankID that is higher than the number of @totalBanks - 1. Set 
    #   this to the number of *different* banks in your game, or HIGHER! Setting
    #   higher will waste memory, but you can always count up the number of 
    #   banks you have before shipping your finished game and change it back to
    #   the correct number!
    #   Note, if you want one "central" bank, just use the same bankID in each
    #   bank event.
    #---------------------------------------------------------------------------
    @totalBanks = 1
    
    @bankVaults   = []
    @bankAccounts = []
    for x in 0..@totalBanks - 1
      @bankVaults  [x] = []
      @bankAccounts[x] = []
      @bankAccounts[x].push(Account.new(0)) if @allowSavings
      @bankAccounts[x].push(Account.new(1)) if @allowChecking
      @maxSlots.times {@bankVaults[x].push(Storage_Slot.new)}
      for y in 0..@freeSlots - 1
        @bankVaults[x][y].unlock
      end
    end
  end
  #-----------------------------------------------------------------------------
  # Sets interest rates for each of the bank's accounts.
  #   bankID:   The ID of the bank that needs to have interest rates set
  #   rates:    An array of interest rates: [savings, checking, loan]
  #-----------------------------------------------------------------------------
  def setRates(bankID, rates)
    for account in @bankAccounts[bankID]
      account.interestRate = rates[account.type]
    end
  end
  #-----------------------------------------------------------------------------
  # Calculates interest on a bank's accounts.
  #   bankID:   The ID number of the bank whose interest needs to be calculated
  #-----------------------------------------------------------------------------
  def calcInterest(bankID)
    timesToCompound = 0
    now = Graphics.frame_count / Graphics.frame_rate
    while @lastInterestTime < now - (@interestTerm * 60)
      @lastInterestTime += @interestTerm * 60
      timesToCompound += 1
    end
    for x in 1..timesToCompound
      for account in @bankAccounts[bankID]
        account.compound
      end
    end
  end
  #-----------------------------------------------------------------------------
  # Creates a loan and adds it to the player's accounts at that bank.
  #   bankID:     The id number of the bank to add the loan to.
  #   rates:      An interest rates array: [savings, checking, loan]
  #   amount:     The amount of the loan
  #-----------------------------------------------------------------------------
  def makeLoan(bankID, rates, amount)
    loan = Account.new(2)
    loan.balance = amount
    loan.interestRate = rates[2]
    @bankAccounts[bankID].push(loan)
  end
  #-----------------------------------------------------------------------------
  # Returns the number of closed slots in a bank's vault
  #   bankID:   The ID number of the bank whose slots need to be checked
  #   RETURNS: Integer (Fixnum)
  #-----------------------------------------------------------------------------
  def closedVaultSlots(bankID)
    closedSlots = 0
    for slot in @bankVaults[bankID]
      closedSlots += 1 if slot.locked
    end
    return closedSlots
  end
end

Le istruzioni sono all'interno dello script. Prova e fammi sapere come va °>°
14° screen contest:Immagine inseritaSe vi serve un mapper nel team sentitevi liberi di contattarmi, trovate alcune mie mappe nel mio shop.

#3 OFFLINE   Ally

Ally

    Fondatori

  • Amministratori
  • 5558 Messaggi:
  • Localitàrpgmkr
  • Ruolo:
    Scripter
  • Progetto VX:
    Essence
  • Tool:
    RM2k/2k3

Inviato 22 September 2011 - 02:25 PM

Sposto in richieste script e grazie Juu =)
Immagine inserita
Spoiler




1 utente(i) stanno leggendo questa discussione

0 utenti, 1 ospiti, 0 utenti anonimi