|
| [REQUEST]menghilangkan batas item | |
| | Pengirim | Message |
---|
Tamu Tamu
| Subyek: [REQUEST]menghilangkan batas item 2010-01-16, 18:01 | |
| hi para rmers yang baek hati, tolong aku dong, aku ingin script yang bisa membuat item kita yang di simpan lebih banyak, contoh: potion 120 <<< begitulah , kan biasanya maksimal item yang disimpan itu kan cuma 99 klo ga item yang udah maks masih bisa ditambah lagi contoh kita dah punya 99 potion dan kita masih bisa menyimpan potion lagi dan seterusnya , kalau ada yang tahu script inventory terbatas kasih tau ya ? , tolong aku ya ?<<< (tolong akuya) |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:11 | |
| Gak Pake Banyak Bacot Dah. Langsung Saya - Spoiler:
- Code:
-
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ #_/ ◆ Unlimit Parameters - KGC_LimitBreak ◆ VX ◆ #_/ ◇ Last update : 2008/01/09 #_/ ◆ Written by TOMY #_/ ◆ Translation by Touchfuzzy #_/ ◆ KGC Site: #_/ ◆ http://ytomy.sakura.ne.jp/ #_/----------------------------------------------------------------------------- #_/ Installation: Because this script overwrites many classes(given its nature) #_/ it must be inserted as at top of all other custom scripts. #_/============================================================================= #_/ This script allows you to go beyond the game's set limit of levels, stats #_/ various parameters of enemies, money in hand, and possessed items. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#==============================================================================# # ★ Customization ★ # #==============================================================================#
module KGC module LimitBreak # 0. Levels 1-99 are determined normally, all levels after 99 are determined # by the equation used in PARAMETER_CALC_EXP.
# 1. The stats listed in the database are only used as variables in the # following equations: # ax^2 + bx + c # a = What is set in the Database as the level 1 score of the # corresponding stat. # b = What is set in the Database as the level 2 score of the # corresponding stat. # c = What is set in the Database as the level 3 score of the # corresponding stat. # x = characters current level.
# 2. The stats listed in the database are only used as variables in the # following equations: # bx + c # b = What is set in the Database as the level 2 score of the # corresponding stat. # c = What is set in the Database as the level 3 score of the # corresponding stat. # x = characters current level.
PARAMETER_CALC_METHOD = 0
# The following is the equation used for level 100 up if you are using # PARAMETER_CALC_METHOD = 0. The following uses the difference between the # stat at level 98 and level 99 at level 100 and each level afterwords. PARAMETER_CALC_EXP = "(param[99] - param[98]) * (level - 99)"
# CHARACTER MAX LEVELS ACTOR_FINAL_LEVEL = [] # ← DO NOT REMOVE. # Put in the level max you wish for individual characters here # ACTOR_FINAL_LEVEL[actor ID] = max level # ↓ This sets the max level of Actor 1 to 999 ACTOR_FINAL_LEVEL[1] = 999
# This sets the max for any character who is not specifically set in the # above section. ACTOR_FINAL_LEVEL_DEFAULT = 999 # This sets the max amount of experience a character can earn. ACTOR_EXP_LIMIT = 99999999
# This sets the Max HP a character can gain. ACTOR_MAXHP_LIMIT = 99999 # This sets the Max MP a character can gain. ACTOR_MAXMP_LIMIT = 99999 # This sets the max a character gain in Attack, Defense, Spirit, and Agility. ACTOR_PARAMETER_LIMIT = 9999
# This sets the Max HP an enemy can have. ENEMY_MAXHP_LIMIT = 9999999 # This sets the Max MP an enemy can have. ENEMY_MAXMP_LIMIT = 9999999 # This sets the max an enemy can have in Attack, Defense, Spirit, and Agility ENEMY_PARAMETER_LIMIT = 9999
# Since you cannot put stats higher than the old maxes in the database this # allows you to increase the numbers written in the database. # Each as written as a percentage so if you wanted to multiply Max HP by 10 # then you would enter ENEMY_MAXHP_RATE = 1000 ENEMY_MAXHP_RATE = 100 # MaxHP ENEMY_MAXMP_RATE = 100 # MaxMP ENEMY_ATK_RATE = 100 # Attack ENEMY_DEF_RATE = 100 # Defense ENEMY_SPI_RATE = 100 # Spirit ENEMY_AGI_RATE = 100 # Agility
# This sets the Max gold a character can have. GOLD_LIMIT = 99999999
# This sets the Max number of items of the same kind a character can carry ITEM_NUMBER_LIMIT = 999
module_function
# The following lets you set specific stats of enemies individually.
def set_enemy_parameters # Examples # Enemy ID:10 Set MaxHP to 2000000 # $data_enemies[10].maxhp = 2000000 # Enemy ID:16 Set Attack to 5000 # $data_enemies[16].atk = 5000 # Enemy ID:20 Multiply current Defense by 2 # $data_enemies[20].def *= 2 end end end
#------------------------------------------------------------------------------#
$imported = {} if $imported == nil $imported["LimitBreak"] = true
module KGC::LimitBreak # Regular Expression Module. module Regexp # Base Item Module module BaseItem # Number Limit tag string NUMBER_LIMIT = /^<(?:NUMBER_LIMIT|numberlimit)[ ]*(\d+)>/i end end
module_function #-------------------------------------------------------------------------- # ○ Enemy's ability correction is applied. #-------------------------------------------------------------------------- def revise_enemy_parameters (1...$data_enemies.size).each { |i| enemy = $data_enemies[i] enemy.maxhp = enemy.maxhp * ENEMY_MAXHP_RATE / 100 enemy.maxmp = enemy.maxmp * ENEMY_MAXMP_RATE / 100 enemy.atk = enemy.atk * ENEMY_ATK_RATE / 100 enemy.def = enemy.def * ENEMY_DEF_RATE / 100 enemy.spi = enemy.spi * ENEMY_SPI_RATE / 100 enemy.agi = enemy.agi * ENEMY_AGI_RATE / 100 } end end
#============================================================================== # ■ RPG::BaseItem #==============================================================================
class RPG::BaseItem #-------------------------------------------------------------------------- # ○ Generate Cache: limit Break #-------------------------------------------------------------------------- def create_limit_break_cache @__number_limit = KGC::LimitBreak::ITEM_NUMBER_LIMIT
@note.split(/[\r\n]+/).each { |line| if line =~ KGC::LimitBreak::Regexp::BaseItem::NUMBER_LIMIT # 所持数上限 @__number_limit = $1.to_i end } end #-------------------------------------------------------------------------- # ○ 所持数上限取得 #-------------------------------------------------------------------------- def number_limit create_limit_break_cache if @__number_limit == nil return @__number_limit end end
#==================================End Class===================================#
#============================================================================== # ■ Game_Battler #==============================================================================
class Game_Battler #-------------------------------------------------------------------------- # ● MaxHP の制限値取得 #-------------------------------------------------------------------------- def maxhp_limit return KGC::LimitBreak::ENEMY_MAXHP_LIMIT end #-------------------------------------------------------------------------- # ○ MaxMP の制限値取得 #-------------------------------------------------------------------------- def maxmp_limit return KGC::LimitBreak::ENEMY_MAXMP_LIMIT end #-------------------------------------------------------------------------- # ● MaxMP の取得 #-------------------------------------------------------------------------- def maxmp return [[base_maxmp + @maxmp_plus, 0].max, maxmp_limit].min end #-------------------------------------------------------------------------- # ○ 各種パラメータの制限値取得 #-------------------------------------------------------------------------- def parameter_limit return KGC::LimitBreak::ENEMY_PARAMETER_LIMIT end #-------------------------------------------------------------------------- # ● 攻撃力の取得 #-------------------------------------------------------------------------- def atk n = [base_atk + @atk_plus, 1].max states.each { |state| n *= state.atk_rate / 100.0 } n = [[Integer(n), 1].max, parameter_limit].min return n end #-------------------------------------------------------------------------- # ● 防御力の取得 #-------------------------------------------------------------------------- def def n = [base_def + @def_plus, 1].max states.each { |state| n *= state.def_rate / 100.0 } n = [[Integer(n), 1].max, parameter_limit].min return n end #-------------------------------------------------------------------------- # ● 精神力の取得 #-------------------------------------------------------------------------- def spi n = [base_spi + @spi_plus, 1].max states.each { |state| n *= state.spi_rate / 100.0 } n = [[Integer(n), 1].max, parameter_limit].min return n end #-------------------------------------------------------------------------- # ● 敏捷性の取得 #-------------------------------------------------------------------------- def agi n = [base_agi + @agi_plus, 1].max states.each { |state| n *= state.agi_rate / 100.0 } n = [[Integer(n), 1].max, parameter_limit].min return n end #-------------------------------------------------------------------------- # ● MaxHP の設定 # new_maxhp : 新しい MaxHP #-------------------------------------------------------------------------- def maxhp=(new_maxhp) @maxhp_plus += new_maxhp - self.maxhp @maxhp_plus = [[@maxhp_plus, -maxhp_limit].max, maxhp_limit].min @hp = [@hp, self.maxhp].min end #-------------------------------------------------------------------------- # ● MaxMP の設定 # new_maxmp : 新しい MaxMP #-------------------------------------------------------------------------- def maxmp=(new_maxmp) @maxmp_plus += new_maxmp - self.maxmp @maxmp_plus = [[@maxmp_plus, -maxmp_limit].max, maxmp_limit].min @mp = [@mp, self.maxmp].min end #-------------------------------------------------------------------------- # ● 攻撃力の設定 # new_atk : 新しい攻撃力 #-------------------------------------------------------------------------- def atk=(new_atk) @atk_plus += new_atk - self.atk @atk_plus = [[@atk_plus, -parameter_limit].max, parameter_limit].min end #-------------------------------------------------------------------------- # ● 防御力の設定 # new_def : 新しい防御力 #-------------------------------------------------------------------------- def def=(new_def) @def_plus += new_def - self.def @def_plus = [[@def_plus, -parameter_limit].max, parameter_limit].min end #-------------------------------------------------------------------------- # ● 精神力の設定 # new_spi : 新しい精神力 #-------------------------------------------------------------------------- def spi=(new_spi) @spi_plus += new_spi - self.spi @spi_plus = [[@spi_plus, -parameter_limit].max, parameter_limit].min end #-------------------------------------------------------------------------- # ● 敏捷性の設定 # agi : 新しい敏捷性 #-------------------------------------------------------------------------- def agi=(new_agi) @agi_plus += new_agi - self.agi @agi_plus = [[@agi_plus, -parameter_limit].max, parameter_limit].min end end
#==================================End Class===================================#
#============================================================================== # ■ Game_Actor #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● 経験値計算 #-------------------------------------------------------------------------- def make_exp_list @exp_list = Array.new(final_level + 2) @exp_list[1] = @exp_list[final_level + 1] = 0 m = actor.exp_basis n = 0.75 + actor.exp_inflation / 200.0 (2..final_level).each { |i| @exp_list[i] = @exp_list[i-1] + Integer(m) m *= 1 + n n *= 0.9 } end #-------------------------------------------------------------------------- # ○ 最終レベルの取得 #-------------------------------------------------------------------------- def final_level n = KGC::LimitBreak::ACTOR_FINAL_LEVEL[self.id] return (n != nil ? n : KGC::LimitBreak::ACTOR_FINAL_LEVEL_DEFAULT) end #-------------------------------------------------------------------------- # ● MaxHP の制限値取得 #-------------------------------------------------------------------------- def maxhp_limit return KGC::LimitBreak::ACTOR_MAXHP_LIMIT end #-------------------------------------------------------------------------- # ○ MaxMP の制限値取得 #-------------------------------------------------------------------------- def maxmp_limit return KGC::LimitBreak::ACTOR_MAXMP_LIMIT end #-------------------------------------------------------------------------- # ○ 各種パラメータの制限値取得 #-------------------------------------------------------------------------- def parameter_limit return KGC::LimitBreak::ACTOR_PARAMETER_LIMIT end #-------------------------------------------------------------------------- # ○ 経験値の制限値取得 #-------------------------------------------------------------------------- def exp_limit return KGC::LimitBreak::ACTOR_EXP_LIMIT end #-------------------------------------------------------------------------- # ● 経験値の変更 # exp : 新しい経験値 # show : レベルアップ表示フラグ #-------------------------------------------------------------------------- def change_exp(exp, show) last_level = @level last_skills = skills @exp = [[exp, exp_limit].min, 0].max while @exp >= @exp_list[@level+1] && @exp_list[@level+1] > 0 level_up end while @exp < @exp_list[@level] level_down end @hp = [@hp, maxhp].min @mp = [@mp, maxmp].min if show && @level > last_level display_level_up(skills - last_skills) end end #-------------------------------------------------------------------------- # ● レベルの変更 # level : 新しいレベル # show : レベルアップ表示フラグ #-------------------------------------------------------------------------- def change_level(level, show) level = [[level, final_level].min, 1].max change_exp(@exp_list[level], show) end #-------------------------------------------------------------------------- # ○ 基本パラメータの取得 #-------------------------------------------------------------------------- def base_parameter(type) case KGC::LimitBreak::PARAMETER_CALC_METHOD when 0 # 数式定義 if @level >= 100 calc_text = KGC::LimitBreak::PARAMETER_CALC_EXP.dup calc_text.gsub!(/level/i) { "@level" } calc_text.gsub!(/param\[(\d+)\]/i) { "actor.parameters[type, #{$1.to_i}]" } return actor.parameters[type, 99] + eval(calc_text) end when 1 # 二次関数 a = actor.parameters[type, 1] b = actor.parameters[type, 2] c = actor.parameters[type, 3] return ((a * @level + b) * @level + c) when 2 # 一次関数 b = actor.parameters[type, 2] c = actor.parameters[type, 3] return (b * @level + c) end return actor.parameters[type, @level] end #-------------------------------------------------------------------------- # ● 基本 MaxHP の取得 #-------------------------------------------------------------------------- def base_maxhp return base_parameter(0) end #-------------------------------------------------------------------------- # ● 基本 MaxMP の取得 #-------------------------------------------------------------------------- def base_maxmp return base_parameter(1) end #-------------------------------------------------------------------------- # ● 基本攻撃力の取得 #-------------------------------------------------------------------------- def base_atk n = base_parameter(2) equips.compact.each { |item| n += item.atk } return n end #-------------------------------------------------------------------------- # ● 基本防御力の取得 #-------------------------------------------------------------------------- def base_def n = base_parameter(3) equips.compact.each { |item| n += item.def } return n end #-------------------------------------------------------------------------- # ● 基本精神力の取得 #-------------------------------------------------------------------------- def base_spi n = base_parameter(4) equips.compact.each { |item| n += item.spi } return n end #-------------------------------------------------------------------------- # ● 基本敏捷性の取得 #-------------------------------------------------------------------------- def base_agi n = base_parameter(5) equips.compact.each { |item| n += item.agi } return n end end
#==================================End Class===================================#
#============================================================================== # ■ Game_Party #==============================================================================
class Game_Party < Game_Unit #-------------------------------------------------------------------------- # ○ 所持金の制限値取得 #-------------------------------------------------------------------------- def gold_limit return KGC::LimitBreak::GOLD_LIMIT end #-------------------------------------------------------------------------- # ● ゴールドの増加 (減少) # n : 金額 #-------------------------------------------------------------------------- def gain_gold(n) @gold = [[@gold + n, 0].max, gold_limit].min end #-------------------------------------------------------------------------- # ● アイテムの増加 (減少) # item : アイテム # n : 個数 # include_equip : 装備品も含める #-------------------------------------------------------------------------- def gain_item(item, n, include_equip = false) number = item_number(item) case item when RPG::Item @items[item.id] = [[number + n, 0].max, item.number_limit].min when RPG::Weapon @weapons[item.id] = [[number + n, 0].max, item.number_limit].min when RPG::Armor @armors[item.id] = [[number + n, 0].max, item.number_limit].min end n += number if include_equip && n < 0 members.each { |actor| while n < 0 && actor.equips.include?(item) actor.discard_equip(item) n += 1 end } end end end
#==================================End Class===================================#
#============================================================================== # ■ Window_ShopBuy #==============================================================================
class Window_ShopBuy < Window_Selectable #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] number = $game_party.item_number(item) enabled = (item.price <= $game_party.gold && number < item.number_limit) rect = item_rect(index) self.contents.clear_rect(rect) draw_item_name(item, rect.x, rect.y, enabled) rect.width -= 4 self.contents.draw_text(rect, item.price, 2) end end
#==================================End Class===================================#
#============================================================================== # ■ Scene_Title #==============================================================================
class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # ● データベースのロード #-------------------------------------------------------------------------- alias load_database_KGC_LimitBreak load_database def load_database load_database_KGC_LimitBreak
set_enemy_parameters end #-------------------------------------------------------------------------- # ● 戦闘テスト用データベースのロード #-------------------------------------------------------------------------- alias load_bt_database_KGC_LimitBreak load_bt_database def load_bt_database load_bt_database_KGC_LimitBreak
set_enemy_parameters end #-------------------------------------------------------------------------- # ○ エネミーの能力値を設定 #-------------------------------------------------------------------------- def set_enemy_parameters KGC::LimitBreak.revise_enemy_parameters KGC::LimitBreak.set_enemy_parameters end end
#==================================End Class===================================#
#============================================================================== # ■ Scene_File #==============================================================================
class Scene_File < Scene_Base #-------------------------------------------------------------------------- # ● セーブデータの読み込み # file : 読み込み用ファイルオブジェクト (オープン済み) #-------------------------------------------------------------------------- alias read_save_data_KGC_LimitBreak read_save_data def read_save_data(file) read_save_data_KGC_LimitBreak(file)
(1...$data_actors.size).each { |i| actor = $game_actors[i] actor.make_exp_list # レベル上限チェック if actor.level > actor.final_level while actor.level > actor.final_level actor.level_down end # 減少した HP などを反映させるためのおまじない actor.change_level(actor.final_level, false) end } end end
#==================================End Class===================================#
#============================================================================== # ■ Scene_Shop #==============================================================================
class Scene_Shop < Scene_Base #-------------------------------------------------------------------------- # ● 購入アイテム選択の更新 #-------------------------------------------------------------------------- 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 || @item.price > $game_party.gold || number == @item.number_limit Sound.play_buzzer else Sound.play_decision max = (@item.price == 0 ? @item.number_limit : $game_party.gold / @item.price) max = [max, @item.number_limit - 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
#==================================End Class===================================#
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ #_/ The original untranslated version of this script can be found here: # http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/special_system&tech=limit_break #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Credit : KGC |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:16 | |
| ^ ^ ^ @decla: hubungannya ke item apaya ?, yang kucari itu sama seperti post yang awal, cuma itu |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:28 | |
| @akuya baca baik baik "# This sets the Max number of items of the same kind a character can carry ITEM_NUMBER_LIMIT = 999" |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:39 | |
| Bisa !!!, truss kk decla tau script limted inventory ? |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:49 | |
| @akuya
penjelasan dulu dunks.. maksutnya apa ? itemnya terbatas gitu ? kayak berat nya gitu ? |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:54 | |
| @decla: inventory ^ artinya tempat kita menyimpan barang, nah maksudnya pake batasan misalnya cuma 20 item, jika beli tas bisa nambah besarrnya inventory, jadi ini agar nyambung dengan script warehouse, karena jika inventory tanpa batas mak apa gunannya warehouse <<< gitukan ? |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 18:57 | |
| wkwkwkwkwkwk
ini dia
http://www.rpgrevolution.com/forums/index.php?showtopic=27906&hl=Battle+report
(kasi gue rep point dunkz) |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 19:25 | |
| Adakah limited inventory yang lain ?, soalnya aku ga ngerti script yang di kasih kk Decla maaf |
| | | HayzenTZ Novice
Posts : 131 Thanked : 4 Engine : RMVX
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 19:42 | |
| ... Bukannya kalo mau ngelimit inventory, script yg sebelumnya dipake bwt break limit inventory tinggal diganti aja angkanya? 999 ke 20? EDIT: O wait.. Salah baca. Sorry. Tp baca aja baik2 script yg dikasih tu. Masa bisa ga ngerti?
Terakhir diubah oleh HayzenTZ tanggal 2010-01-16, 19:47, total 1 kali diubah | |
| | | Tamu Tamu
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 19:45 | |
| @hayzen: yang mana kk hay ? |
| | | ibegu Advance
Posts : 451 Thanked : 14 Engine : RMVX Skill : Very Beginner Type : Composer
| Subyek: Re: [REQUEST]menghilangkan batas item 2010-01-16, 22:18 | |
| Pake scriptnya Decla sih juga bisa, kalo ga mau repot juga ada tinggal pake Event di page ke 3 ada tombol Script, nah buka tar isi kode ini - Spoiler:
KGC::LimitBreak::ITEM_NUMBER_LIMIT = X
X = batas maksimal yang kamu pengen. | |
| | | Sponsored content
| Subyek: Re: [REQUEST]menghilangkan batas item | |
| |
| | | | [REQUEST]menghilangkan batas item | |
|
Similar topics | |
|
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
| Latest topics | » [Web Novel] Gloria Infidelis by LightNightKnight 2016-11-17, 21:27
» [Announcement] Forum baru untuk RMID by TheoAllen 2016-08-25, 16:39
» Where I'm Wrong ? by ReydVires 2016-07-24, 16:10
» flakeheartnet's Resources part III by flakeheartnet 2016-07-08, 14:30
» Keira's Art Warehouse by KeiraBlaze 2016-06-28, 19:27
» Theo Core Time System + Bingung by Lockin 2016-06-27, 16:24
» Error Script, Maybe ? by Lockin 2016-06-27, 16:20
» Nusaimoe @ RMID Lounge by Jihad Bagas 2016-06-21, 05:02
» Call Random Battle by Lockin 2016-06-15, 17:04
» Flakeheartnet Resources Part II [come back gift] by flakeheartnet 2016-06-07, 15:51
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|