Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [ASK]Bank Event

Topik sebelumnya Topik selanjutnya Go down 
[ASK]Bank Event Empty2010-07-26, 15:40
Post[ASK]Bank Event
#1
ibnumask 
Newbie
Newbie
ibnumask

Level 5
Posts : 77
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Mapper

[ASK]Bank Event Vide
Gimana caranya buat bank event

biar bisa simpan uang dan simpan barang.
[ASK]Bank Event Empty2010-07-26, 15:47
PostRe: [ASK]Bank Event
#2
TheoAllen 
♫ RMID Rebel ♫
♫ RMID Rebel ♫
TheoAllen

Kosong
Posts : 4935
Thanked : 63
Awards:




[ASK]Bank Event Vide
https://rmid.forumotion.net/tutorials-f13/bank-event-t782.htm?highlight=bank
https://rmid.forumotion.net/advance-event-system-f34/bank-system-t1285.htm?highlight=bank
moga membantu ;)
[ASK]Bank Event Empty2010-07-26, 16:06
PostRe: [ASK]Bank Event
#3
Guest 
Tamu
Anonymous


[ASK]Bank Event Vide
Linknya theo itu benar

sekarang pelajari

itu pada intinya main Variable gold ;)
[ASK]Bank Event Empty2010-07-29, 19:57
PostRe: [ASK]Bank Event
#4
ibnumask 
Newbie
Newbie
ibnumask

Level 5
Posts : 77
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Mapper

[ASK]Bank Event Vide
kalo nyimpan barang gimana ?
[ASK]Bank Event Empty2010-07-29, 20:13
PostRe: [ASK]Bank Event
#5
Guest 
Tamu
Anonymous


[ASK]Bank Event Vide
wah nyimpen barang musti pake script bang

nih skripnya

Code:
#===============================================================================
# Deriru's Simple Storage System v1.2
# by Deriru
#
#  What does this do?:
#  -It creates an storage system where you can store your items and gold, like
#  in a warehouse.
#
#  How to use:
#  -Customize the script according to the options below.
#  -Call the storage system with:
#    $scene = Scene_StorageSystem.new
#  -To unlock more spaces for your storage, use the following script:
#    $game_system.unlock_storages(amount)
#    Where amount is the max amount of slots that will be unlocked.
#  -To make an item non-storable, insert the NonStorageTag(see SETUP OPTIONS
#  BELOW), enclosed in [].
#  Example: [NoStore]
#  -To get the curreny name (for text display), add #{gVocab} inside.
#  Example:
#  Withdraw #{gVocab}
#  If the currency name is Yen then the result would be: Withdraw Yen
#  Version History:
#  v1.0:
#  -Initial Release
#
#  Credits for this script:
#  cmpsr2000 for his Shopoholic Script and the Storage_Slot class

#  Please credit me if used. Enjoy!
#===============================================================================
# SETUP OPTIONS
#===============================================================================
# SlotsAmount: Maximum amounts of storage slots.
# InitialFree: Initial amount of unlocked storage slots.
# NonStorageTag: Tag used for items that cannot be stored to the warehouse.
# DepositText: Menu text for depositing items.
# WithdrawText: Menu text for withdrawing items.
# EmptyText: Text for empty slots.
# LockedText: Text for locked slots.
# AmountText: Text when inputting amount of items.
# The others are self explanatory when you read them by name. If you don't get
# it, please look at the demo.
#===============================================================================
# SETUP BEGIN
#===============================================================================
$data_system = load_data("Data/System.rvdata")# DON'T TOUCH THIS!!!
gVocab = Vocab::gold # DON'T TOUCH THIS TOO!
SlotsAmount = 30
InitialFree = 10
NonStorageTag = "NoStore"
DepositText = "Deposit Item"
WithdrawText = "Withdraw Item"
GoldDepositText = "Deposit #{gVocab}"
GoldWithdrawText = "Withdraw #{gVocab}"
GoldInParty = "Gold in party: "
GoldInWarehouse = "Gold in storage: "
EmptyText = "Empty"
LockedText = "Locked"
AmountText = "Amount:"
MenuDepositHelp = "Deposit items."
MenuWithdrawHelp = "Withdraw deposited items."
StorageSelectHelp = "Select storage slot."
InventorySelectHelp = "Choose the item to be deposited."
AmountSelectHelp = "Left(-1), Right(+1), Up(+10), Down(-10)"
GoldDepositHelp = "Deposit #{gVocab}."
GoldWithdrawHelp = "Withdraw #{gVocab}."
GoldAmountHelp = "Insert amount of #{gVocab}."
ExitHelp = "Exit warehouse."
#===============================================================================
# SETUP END [DO NOT TOUCH THE PARTS BELOW IF YOU DON'T KNOW WHAT YOU'RE DOING!]
#===============================================================================

#===============================================================================
# ItemStorageSlot: Basic Item Slot for Storage System (thanks to cmpsr2000!)
#===============================================================================
class ItemStorageSlot
 
  attr_reader :locked
  attr_reader :amount
  attr_reader :item

  def initialize
    @item = nil
    @amount = 0
    @locked = true
  end

  def storeItem(item, amount)
    $game_party.lose_item(item, amount)
    @item = item
    @amount = amount
  end

  def takeItem(amt)
    $game_party.gain_item(@item, amt)
    @amount -= amt
    if @amount <= 0
      @item = nil
    end
  end

  def lock
    @locked = true
  end

  def unlock
    @locked = false
  end

end

#===============================================================================
# Game_System Modification: Adds the storage variables.
#===============================================================================
class Game_System
 
  attr_accessor :storage
  attr_accessor :stored_gold
 
  alias :initialize_deriru initialize
 
  def initialize
    initialize_deriru
    @stored_gold = Integer(0)
    @storage = []
    for i in 0..SlotsAmount - 1
      @storage.push(ItemStorageSlot.new)
    end
    for i in 0..InitialFree - 1
      @storage[i].unlock
    end
  end
 
  def unlock_storages(max_amt)
    for i in 0..max_amt - 1
      $game_system.storage[i].unlock
    end
  end
 
  def withdraw_money(amt)
    $game_party.gain_gold(amt)
    @stored_gold -= amt
    @stored_gold = 9999999 if @stored_gold > 9999999
  end
 
  def store_money(amt)
    $game_party.lose_gold(amt)
    @stored_gold += amt
    @stored_gold = 0 if @stored_gold < 0
  end
 
end

#===============================================================================
# Window_Storage: For the Storage Window in the Storage Scene.
#===============================================================================
class Window_Storage < Window_Selectable
 
  def initialize
    super(0,56,544,360)
    @column_max = 2
    self.index = 0
    update
    refresh
  end
 
  def refresh
    @data = []
    @data = $game_system.storage
    @item_max = @data.size
    create_contents
    for i in 0..@item_max - 1
      draw_storage(i)
    end
  end

  def draw_storage(index)
    slot = @data[index]
    disabled = @data[index].locked
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    unless disabled
      unless slot.item == nil
        draw_item(index)
      else
        self.contents.font.color.alpha = 255
        self.contents.draw_text(rect.x,rect.y,rect.width,WLH,EmptyText)
      end
    else
      self.contents.font.color.alpha = 128
      self.contents.draw_text(rect.x,rect.y,rect.width,WLH,LockedText)
    end
  end
 
  def draw_item(index)
    rect = item_rect(index)
    slot = @data[index]
    if slot != nil
      number = $game_system.storage[index].amount
      rect.width -= 4
      draw_item_name(slot.item, rect.x, rect.y, true)
      self.contents.font.size = 12
      self.contents.draw_text(rect.x + 12,rect.y + 12, 15, 15, number, 1)
      self.contents.font.size = 20
      rect.width += 4
    end
  end
 
 
end

#===============================================================================
# Window_ItemForStage: For the Item Window in the Storage Scene.
#===============================================================================
class Window_ItemForStorage < Window_Selectable

  def initialize(x, y, width, height)
    super(x, y, width, height)
    @column_max = 2
    self.index = 0
    refresh
  end

  def item
    return @data[self.index]
  end

  def include?(item)
    return false if item == nil
    return true
  end

  def enable?(item)
    return false if item.note.include?("[#{NonStorageTag}]")
    return true
  end

  def refresh
    @data = []
    for item in $game_party.items
      next unless include?(item)
      @data.push(item)
      if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
        self.index = @data.size - 1
      end
    end
    @data.push(nil) if include?(nil)
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    item = @data[index]
    if item != nil
      number = $game_party.item_number(item)
      enabled = enable?(item)
      rect.width -= 4
      draw_item_name(item, rect.x, rect.y, enabled)
      self.contents.font.size = 12
      self.contents.draw_text(rect.x + 12,rect.y + 12, 15, 15, number, 1)
      self.contents.font.size = 20
    end
  end

  def update_help
    @help_window.set_text(item == nil ? "" : item.description)
  end
end

#===============================================================================
# Window_ItemNumInput: Item Number Input Window
#===============================================================================
class Window_ItemNumInput < Window_Base
 
  attr_reader :qn
 
  def initialize
    @maxQn = 99
    @qn = 1
    super(200,60,100,100)
    refresh
    self.x = (Graphics.width - 100) / 2
    self.y = (Graphics.height - 100) / 2
  end

  def refresh
    self.contents.clear
    self.contents.draw_text(0,0,self.width - 32,WLH,AmountText, 1)
    self.contents.draw_text(0,WLH, self.width - 32, WLH, @qn.to_s, 1)
  end
 
  def set_max(number)
    @maxQn = number
    @maxQn = 99 if @maxQn > 99
    @maxQn = 1 if @maxQn < 1
    @qn = 1
  end
 
  def update
    refresh
    if Input.repeat?(Input::UP)
      Sound.play_cursor
      @qn += 10
      @qn = @maxQn if @qn > @maxQn
    elsif Input.repeat?(Input::DOWN)
      Sound.play_cursor
      @qn -= 10
      @qn = 0 if @qn < 0
    elsif Input.repeat?(Input::LEFT)
      Sound.play_cursor
      @qn -= 1
      @qn = 0 if @qn < 0
    elsif Input.repeat?(Input::RIGHT)
      Sound.play_cursor
      @qn += 1
      @qn = @maxQn if @qn > @maxQn
    end
  end

end
#===============================================================================
# Window_HelpStorage: A modified version of Window_Help
#===============================================================================
class Window_HelpStorage < Window_Base

  def initialize
    super(0, 0, Graphics.width - 140, WLH + 32)
  end

  def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
      @text = text
      @align = align
    end
  end
end

#===============================================================================
# Window_GoldAmt: Inputs the amount of gold
#===============================================================================
class Window_GoldAmt < Window_Command
 
  attr_reader :value
  attr_reader :commands
 
  def initialize
    super(176, ["0", "0", "0", "0", "0", "0", "0"], 7, 0, 0)
    self.x = (Graphics.width / 2) - 88
    self.y = (Graphics.height / 2) - 60
    self.height = 60
    @index = 6
  end
 
  def reset
    for i in 0...@commands.size
      @commands[i] = "0"
    end
    refresh
  end
 
  def update
    super
    value = @commands[@index].to_i
    if Input.repeat?(Input::UP)
      Sound.play_cursor
      @commands[@index] = (value < 9 ? value+1 : 9).to_s
      refresh
    elsif Input.repeat?(Input::DOWN)
      Sound.play_cursor
      @commands[@index] = (value > 0 ? value-1 : 0).to_s
      refresh
    end
  end
 
end

class Window_GoldOpposite < Window_Base
   
  def initialize
    super((Graphics.width / 2) - 100,(Graphics.height / 2), 200,60)
  end
 
  def refresh(i)
    self.contents.clear
    self.contents.draw_text(0,0,self.width - 32, self.height - 32, i == 2 ? GoldInParty + $game_party.gold.to_s : GoldInWarehouse + $game_system.stored_gold.to_s, 1)
  end
 
end
#===============================================================================
# Scene_StorageSystem: The Storage System Scene itself! xD
#===============================================================================
class Scene_StorageSystem < Scene_Base
 
  def initialize
    @storage_slots = Window_Storage.new
    @storage_slots.active = false
    @current_inv = Window_ItemForStorage.new(0,56,544,360)
    @current_inv.update
    @current_inv.refresh
    @current_inv.visible = false
    @current_inv.active = false
    @num_input = Window_ItemNumInput.new
    @num_input.visible = false
    @storage_help = Window_HelpStorage.new
    @storage_menu = Window_Command.new(140,[DepositText,WithdrawText,GoldDepositText,GoldWithdrawText,"Exit"])
    @storage_menu.height = 56
    @storage_menu.x = @storage_help.width
    @gold_amt = Window_GoldAmt.new
    @gold_amt.visible = false
    @gold_opp = Window_GoldOpposite.new
    @gold_opp.visible = false
  end
 
  def start
    create_menu_background
  end
 
  def terminate
    @storage_slots.dispose
    @storage_menu.dispose
    @current_inv.dispose
    @num_input.dispose
    @storage_help.dispose
    @gold_amt.dispose
    @gold_opp.dispose
    dispose_menu_background
  end
 
  def update
    if @num_input.visible
      num_input_input
    elsif @gold_amt.visible
      gold_amt_update
    elsif @current_inv.active
      current_inv_input
    elsif @storage_slots.active
      storage_slots_input
    elsif @storage_menu.active
      storage_menu_input
    end
    help_update
    update_menu_background
  end
 
  def switch_store_inv(store_slots,inv_slots)
    @storage_slots.active = store_slots
    @storage_slots.visible = store_slots
    @current_inv.active = inv_slots
    @current_inv.visible = inv_slots
  end
 
  def storage_menu_input
    @storage_menu.update
    if Input.trigger?(Input::C)
      if @storage_menu.index == 0 or @storage_menu.index == 1
        Sound.play_decision
        @storage_menu.active = false
        @storage_slots.active = true
      elsif @storage_menu.index == 2 or @storage_menu.index == 3
        Sound.play_decision
        @gold_opp.refresh(@storage_menu.index)
        @gold_opp.visible = true
        @gold_amt.visible = true
      elsif @storage_menu.index == 4
        Sound.play_cancel
        $scene = Scene_Map.new
      else
        Sound.play_buzzer
      end
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    end
  end
   
  def storage_slots_input
    @storage_slots.update
    if Input.trigger?(Input::C)
      if $game_system.storage[@storage_slots.index].locked
        Sound.play_buzzer
      elsif @storage_menu.index == 1
        unless $game_system.storage[@storage_slots.index].item == nil
          # CRAPPY CALCULATION STARTZ! AAAAGH!
          in_stock = $game_party.item_number($game_system.storage[@storage_slots.index].item)
          item_possible = (in_stock + $game_system.storage[@storage_slots.index].amount)
          if item_possible > 99
            item_possible -= 99
          elsif item_possible = 99
            item_possible = $game_system.storage[@storage_slots.index].amount
          else
            item_possible = 99 - item_possible
          end
          # CRAPPY CALCULATION ENDZ! HURRAH!
          if in_stock < 99
            @num_input.set_max(item_possible)
            @num_input.visible = true
            @storage_slots.active = false
          else
            Sound.play_buzzer
          end
        else
          Sound.play_buzzer
        end
      elsif @storage_menu.index == 0
        if $game_system.storage[@storage_slots.index].item == nil
          Sound.play_decision
          switch_store_inv(false,true)
        else
          Sound.play_buzzer
        end
      end
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      @storage_slots.active = false
      @storage_menu.active = true
    end
  end
 
  def current_inv_input
    @current_inv.update
    if Input.trigger?(Input::C)
      if $game_system.storage[@storage_slots.index].item == nil && @current_inv.item != nil && !@current_inv.item.note.include?("[#{NonStorageTag}]")
        @current_inv.active = false
        @num_input.visible = true
        @num_input.set_max($game_party.item_number(@current_inv.item))
      else
        Sound.play_buzzer
      end
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      switch_store_inv(true,false)
    end
  end
 
  def num_input_input
    @num_input.update
    if Input.trigger?(Input::C)
      if @storage_menu.index == 0
        $game_system.storage[@storage_slots.index].storeItem(@current_inv.item,@num_input.qn)
      elsif @storage_menu.index == 1
        $game_system.storage[@storage_slots.index].takeItem(@num_input.qn)
      end
      switch_store_inv(true,false)
      @storage_slots.index = 0
      @storage_slots.refresh
      @current_inv.refresh
      @num_input.visible = false
    elsif Input.trigger?(Input::B)
      if @storage_menu.index == 0
        @current_inv.active = true
      elsif @storage_menu.index == 1
        @storage_slots.active = true
      end
      @num_input.visible = false
    end
  end
 
  def help_update
    if @gold_amt.visible
      @storage_help.set_text(GoldAmountHelp)
    elsif @num_input.visible
      @storage_help.set_text(AmountSelectHelp)
    elsif @current_inv.active
      @storage_help.set_text(InventorySelectHelp)
    elsif @storage_slots.active
      @storage_help.set_text(StorageSelectHelp)
    elsif @storage_menu.active
      case @storage_menu.index
      when 0
        @storage_help.set_text(MenuDepositHelp)
      when 1
        @storage_help.set_text(MenuWithdrawHelp)
      when 2
        @storage_help.set_text(GoldDepositHelp)
      when 3
        @storage_help.set_text(GoldWithdrawHelp)
      when 4
        @storage_help.set_text(ExitHelp)
      end
    end
  end
 
  def gold_amt_update
    @gold_amt.update
    @gold_opp.update
    if Input.trigger?(Input::C)
      money_inp = @gold_amt.commands.to_s.to_i
      if @storage_menu.index == 2
        unless money_inp + $game_system.stored_gold.to_i > 9999999 and money_inp < $game_party.gold
          if money_inp <= $game_party.gold
            Sound.play_decision
            $game_system.store_money(money_inp)
            @gold_amt.reset
            @gold_amt.visible = false
            @gold_opp.refresh(@storage_menu.index)
            @gold_opp.visible = false
            @storage_menu.active = true
          else
            Sound.play_buzzer
          end
        else
          Sound.play_buzzer
        end
      elsif @storage_menu.index == 3
        unless money_inp + $game_party.gold > 9999999
          if money_inp <= $game_system.stored_gold
            Sound.play_decision
            $game_system.withdraw_money(money_inp)
            @gold_amt.reset
            @gold_amt.visible = false
            @gold_opp.refresh(@storage_menu.index)
            @gold_opp.visible = false
            @storage_menu.active = true
          else
            Sound.play_buzzer
          end
        else
          Sound.play_buzzer
        end
      end
    elsif Input.trigger?(Input::B)
      Sound.play_decision
      @gold_amt.reset
      @gold_amt.visible = false
      @gold_opp.refresh(@storage_menu.index)
      @gold_opp.visible = false
      @storage_menu.active = true
    end
  end
 
end
[ASK]Bank Event Empty2010-07-29, 20:17
PostRe: [ASK]Bank Event
#6
ibnumask 
Newbie
Newbie
ibnumask

Level 5
Posts : 77
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Mapper

[ASK]Bank Event Vide
terus buat eventnya kayak mana ?

cepetan ya
[ASK]Bank Event Empty2010-07-29, 20:45
PostRe: [ASK]Bank Event
#7
Guest 
Tamu
Anonymous


[ASK]Bank Event Vide
Situ KAlo di Kasi Scrip BACA DONK di sana kan ada HOW TO USE nya :swt:

$scene = Scene_StorageSystem.new

toh ..

itu pk di event > script
[ASK]Bank Event Empty2010-07-29, 22:40
PostRe: [ASK]Bank Event
#8
ygo_garde 
Novice
Novice
ygo_garde

Level 5
Posts : 109
Thanked : 1
Engine : RM2k
Skill : Beginner
Type : Developer

[ASK]Bank Event Vide
hahahaha...baca scriptnya dah gak sekuat dulu nih -_-
maklum deh dah lama ga pake bahasa pemrograman...
[ASK]Bank Event Empty2010-08-03, 07:55
PostRe: [ASK]Bank Event
#9
agus007 
Newbie
Newbie
agus007

Level 5
Posts : 38
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Mapper

[ASK]Bank Event Vide
permisi mw nanya...
kan aku udah coba tuh event bank untuk uangnya, kan ada pilihan Setor, Tarik saldo, lihat saldo, dan selesai...

[ASK]Bank Event Empty2010-08-03, 08:02
PostRe: [ASK]Bank Event
el_musketeer 
Advance
Advance
el_musketeer

Level 5
Posts : 540
Thanked : 1
Engine : RMVX
Skill : Intermediate
Type : Event Designer

[ASK]Bank Event Vide
Quote :
permisi mw nanya...
kan aku udah coba tuh event bank untuk uangnya, kan ada pilihan Setor, Tarik saldo, lihat saldo, dan selesai...

heran wa, pertanyaannya yang mana kalo gini? :swt:
[ASK]Bank Event Empty2010-08-03, 10:43
PostRe: [ASK]Bank Event
ygo_garde 
Novice
Novice
ygo_garde

Level 5
Posts : 109
Thanked : 1
Engine : RM2k
Skill : Beginner
Type : Developer

[ASK]Bank Event Vide
Sebenarnya itu bisa buat di luar scripting. Bikin di map event, pake variable, dan pake fork.
[ASK]Bank Event Empty2010-08-03, 11:37
PostRe: [ASK]Bank Event
Savoxit 
Si Rambut Perak
Savoxit

Level 5
Posts : 468
Thanked : 10
Engine : RMVX
Skill : Intermediate
Type : Artist
Awards:
[ASK]Bank Event Vide
Kalau mau bikin banking system pakek event, pertama harus bikin list/database dari semua barang terlebih dulu....habis itu main-main sama bariable........
[ASK]Bank Event Empty2010-08-03, 12:31
PostRe: [ASK]Bank Event
Kuro Ethernite 
The Creator
Kuro Ethernite

Level 5
Posts : 1631
Thanked : 24
Engine : RMVX Ace
Skill : Masterful
Type : Jack of All Trades
Awards:

[ASK]Bank Event Vide
Bukanny bank dah bnyak yg buat?? :swt:
Kalo dri aq => https://rmid.forumotion.net/tutorials-f13/bank-event-t782.htm?highlight=kuro+bank
Daydreamer => https://rmid.forumotion.net/advance-event-system-f34/bank-system-t1285.htm?highlight=kuro+bank
Savoxit (Lah, org ny d atas :swt:) => https://rmid.forumotion.net/advance-event-system-f34/savoxit-event-system-list-0-script-t2045.htm?highlight=savoxit

Soal storage item, Pochi dah ng jawab tuh :-

Spoiler:
[ASK]Bank Event Empty2010-08-04, 07:02
PostRe: [ASK]Bank Event
agus007 
Newbie
Newbie
agus007

Level 5
Posts : 38
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Mapper

[ASK]Bank Event Vide
oy maksudku salah room oy...

aku cuma mw nanya bank system nya Daydreamer => https://rmid.forumotion.net/advance-event-system-f34/bank-system-t1285.htm?highlight=kuro+bank kok klo pilih selesai g bisa keluar gitu???
[ASK]Bank Event Empty
PostRe: [ASK]Bank Event
Sponsored content 




[ASK]Bank Event Vide
 

[ASK]Bank Event

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Engines :: RMVX-