RPGMakerID
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Komunitas RPG Maker Indonesia
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  Login  
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.

 

 jumlah barang di inventory

Go down 
2 posters
PengirimMessage
celes
Novice
Novice
celes


Level 5
Posts : 202
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Artist

jumlah barang di inventory Empty
PostSubyek: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-15, 19:10

saya coba max 99

klo mau biar 9999 bs g?
Kembali Ke Atas Go down
bungatepijalan
Moe Princess
bungatepijalan


Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer

Trophies
Awards:
jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-15, 19:29

Try this... just insert above Main :v
Code:
#==============================================================================
# ** Scene_Shop
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================

class Scene_Shop < Scene_Base
  #--------------------------------------------------------------------------
  # * Update Buy Item Selection
  #--------------------------------------------------------------------------
  def update_buy_selection
    @status_window.item = @buy_window.item
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      @help_window.set_text("")
      return
    end
    if Input.trigger?(Input::C)
      @item = @buy_window.item
      number = $game_party.item_number(@item)
      if @item == nil or @item.price > $game_party.gold or number == 9999
        Sound.play_buzzer
      else
        Sound.play_decision
        max = @item.price == 0 ? 9999 : $game_party.gold / @item.price
        max = [max, 9999 - number].min
        @buy_window.active = false
        @buy_window.visible = false
        @number_window.set(@item, max, @item.price)
        @number_window.active = true
        @number_window.visible = true
      end
    end
  end
end
This is only when in Shop processing. Wait for the next.... :v

~ Salam Ngacay dari Alissa Liu :ngacay2: ~
Kembali Ke Atas Go down
http://miyuki-maker.blogspot.co.id/
celes
Novice
Novice
celes


Level 5
Posts : 202
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Artist

jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-15, 19:53

buat barang di invent misalnya antidote mau sampe x9999 jg pke itu?

brb coba dl

edit: masih g bs msh mentok 99
Kembali Ke Atas Go down
bungatepijalan
Moe Princess
bungatepijalan


Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer

Trophies
Awards:
jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-16, 10:43

I found it! :v
try this, and I've successfully tested it... :v
Code:
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold
# and items. The instance of this class is referenced by $game_party.
#==============================================================================

class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # * Gain Items (or lose)
  #    item          : Item
  #    n            : Number
  #    include_equip : Include equipped items
  #--------------------------------------------------------------------------
  def gain_item(item, n, include_equip = false)
    number = item_number(item)
    case item
    when RPG::Item
      @items[item.id] = [[number + n, 0].max, 9999].min
    when RPG::Weapon
      @weapons[item.id] = [[number + n, 0].max, 9999].min
    when RPG::Armor
      @armors[item.id] = [[number + n, 0].max, 9999].min
    end
    n += number
    if include_equip and n < 0
      for actor in members
        while n < 0 and actor.equips.include?(item)
          actor.discard_equip(item)
          n += 1
        end
      end
    end
  end
end

~ Salam Ngacay dari Alissa Liu :ngacay2: ~
Kembali Ke Atas Go down
http://miyuki-maker.blogspot.co.id/
celes
Novice
Novice
celes


Level 5
Posts : 202
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Artist

jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-16, 21:56

taruh di mana cc script na
Kembali Ke Atas Go down
bungatepijalan
Moe Princess
bungatepijalan


Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer

Trophies
Awards:
jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-16, 22:04

Lha, masih ga tau juga? :o
Seperti sebelumnya lah, diatas Main :v

Spoiler:

~ Salam Ngacay dari Alissa Liu :ngacay2: ~
Kembali Ke Atas Go down
http://miyuki-maker.blogspot.co.id/
celes
Novice
Novice
celes


Level 5
Posts : 202
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Artist

jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-16, 23:00

mksd nya d atas main
1. bikin script baru d atas main terus d isi pake script td
atau
2. d copas ke dalam script main? d taruh posisi atas
Kembali Ke Atas Go down
bungatepijalan
Moe Princess
bungatepijalan


Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer

Trophies
Awards:
jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-16, 23:06

nomer 1 lah :swt:
masi ora ngertos juga? :swt:
Spoiler:

~ Salam Ngacay dari Alissa Liu :ngacay2: ~
Kembali Ke Atas Go down
http://miyuki-maker.blogspot.co.id/
celes
Novice
Novice
celes


Level 5
Posts : 202
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Artist

jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty2011-07-16, 23:29

wah bntr d coba dl

edit: dah success

tq

solved
Kembali Ke Atas Go down
Sponsored content





jumlah barang di inventory Empty
PostSubyek: Re: jumlah barang di inventory   jumlah barang di inventory Empty

Kembali Ke Atas Go down
 
jumlah barang di inventory
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» event jumlah barang
» Bisa nambah barang" di map?
» [ASK] tentang inventory, dan penyimpanan
» (ask) membuat barang punya batas waktu
» [Xp/Vx] DRG Inventory System

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