Posts : 202 Thanked : 0Engine : RMVX Skill : Beginner Type : Artist
Subyek: jumlah barang di inventory 2011-07-15, 19:10
saya coba max 99
klo mau biar 9999 bs g?
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30Engine : Multi-Engine User Skill : Intermediate Type : Developer Trophies
Awards:
Subyek: Re: jumlah barang di inventory 2011-07-15, 19:29
Try this... just insert above Main
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....
~ Salam Ngacay dari Alissa Liu ~
celes Novice
Posts : 202 Thanked : 0Engine : RMVX Skill : Beginner Type : Artist
Subyek: Re: jumlah barang di inventory 2011-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
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30Engine : Multi-Engine User Skill : Intermediate Type : Developer Trophies
Awards:
Subyek: Re: jumlah barang di inventory 2011-07-16, 10:43
I found it! try this, and I've successfully tested it...
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 ~
celes Novice
Posts : 202 Thanked : 0Engine : RMVX Skill : Beginner Type : Artist
Subyek: Re: jumlah barang di inventory 2011-07-16, 21:56
taruh di mana cc script na
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30Engine : Multi-Engine User Skill : Intermediate Type : Developer Trophies
Awards:
Subyek: Re: jumlah barang di inventory 2011-07-16, 22:04
Lha, masih ga tau juga? Seperti sebelumnya lah, diatas Main
Spoiler:
Even there are too many appeals, I'm still willing to serve you
~ Salam Ngacay dari Alissa Liu ~
celes Novice
Posts : 202 Thanked : 0Engine : RMVX Skill : Beginner Type : Artist
Subyek: Re: jumlah barang di inventory 2011-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
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30Engine : Multi-Engine User Skill : Intermediate Type : Developer Trophies
Awards:
Subyek: Re: jumlah barang di inventory 2011-07-16, 23:06
nomer 1 lah masi ora ngertos juga?
Spoiler:
tapi gapapa denk, yg penting nambah post
~ Salam Ngacay dari Alissa Liu ~
celes Novice
Posts : 202 Thanked : 0Engine : RMVX Skill : Beginner Type : Artist
Subyek: Re: jumlah barang di inventory 2011-07-16, 23:29