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.
|
|
| script masih bermasalah...! | |
| 2013-01-11, 14:48 | script masih bermasalah...! |
---|
m46nifico Newbie
Posts : 9 Thanked : 1 Engine : RMVX Skill : Very Beginner Type : Artist
| Friends, gue punya script yang udeh gue cari-cari, cuman script-nye masih bermasalah meskipun udeh beberape orang yang bantuin... Ini masalahnye: 1. Script ini bikin tiap action yang dilakuin ame character di game-nye, make sejumlah item (attack, make 3 ammo; skill make 7 ammo), nah kalo script-nye buat attack dah normal, cuman kalo dipake buat skill muncul tulisan Script 'Ammo Requirements - VX' line 233: TypeError occurred. cannot convert Array into IntegerIni script-nye yang gue pake: edited_script Nah, kalo script aslinye: original_script Please, dibutuhin secepatnye... Thanks. |
| | | 2013-01-11, 17:23 | Re: script masih bermasalah...! |
---|
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Awards:
| Line 233 : - Code:
-
gather_ammo_item = $data_items[TysAmmoRequirements::Skill_ammo_id[id]] Coba deh telusuri ke Skill_ammo_id. - Code:
-
Skill_ammo_id = { 100 => [22], 101 => [23] } Mestinya jadi gini : - Code:
-
Skill_ammo_id = { 100 => 22, 101 => 23 } |
| | | 2013-01-11, 18:59 | Re: script masih bermasalah...! |
---|
ashm Veteran
Posts : 1131 Thanked : 8 Engine : RMVX Ace Skill : Intermediate Type : Event Designer
Awards:
| Oh, ia ammo requirement itu kalo ane mah gak dipake. Karena sering gak kompatible ama tankentai atb. Nih script mas Yeki. Work and tested and local made - Spoiler:
#=============================================================================== # Yeki Skill Requirement System #=============================================================================== # Author : Yeki # Created : 15/10/2012 # Version : 2.10 # Engine : RMVX #------------------------------------------------------------------------------- # Contact : rmid.forumotion.net # Username: yeki #=============================================================================== # Script ini berguna untuk memberi persyaratan untuk penggunaan skill. #=============================================================================== # License #------------------------------------------------------------------------------- # Script ini dapat digunakan secara gratis selama credits disertakan nama saya # dan tidak untuk penggunaan game komersil. #=============================================================================== # Changelog #------------------------------------------------------------------------------- # 16/10/2012 : # - fixed skill still can be use # - Hiding problem # - Error in Battle # - require weapon in item party # - require armor # - require MP and MP % # - require HP and HP % # - Improve Hiding System # - Consume Requirement #=============================================================================== # Compatibility #------------------------------------------------------------------------------- # Overwrite : # - Window_Skill.refresh # # Aliasing : # - Game_Actor.skill_can_use? # - Game_Battler.calc_mp_cost # - Window_skill.initialize # - Scene_Skill.initialize # - Scene_Battle.start_skill_selection # - Scene_Battle.execute_action_skill #=============================================================================== # Cara Penggunaan #------------------------------------------------------------------------------- # Letakkan Script ini dibawah Materials #------------------------------------------------------------------------------- # Note Tag # # Letakkan perintah ini pada note skill. # # <ysrs>exp</ysrs> dimana exp : # # equip weapon: id atau equip armor: id # skill dapat digunakan bila actor menggunakan weapon/armor dengan id # sebagai urutan pada weapon / armor database # # weapon: id atau weapon: id,id # skill dapat digunakan bila memiliki senjata dengan id sebagai urutan # pada weapon database. # # armor: id atau armor: id,id # skill dapat digunakan bila memiliki armor dengan id sebagai urutan # pada armor database. # # item id : n atau item id,id: n # skill dapat digunakan bila memiliki item id sebagai urutan pada item database # sejumlah n. # # hcost: n atau hcost: n% # skill dapat digunakan bila actor memiliki hp sejumlah n atau actor memiliki # n% dari maximum hp. # # mcost: n atau mcost: n% # skill dapat digunakan bila actor memiliki mp sejumlah n atau actor memiliki # n% dari maximum mp. # # param id : n atau param id,id : n # skill dapat digunakan bila actor memiliki parameter id setidaknya sejumlah n. # id pada parameter adalah : # 0 : maxhp # 1 : maxmp # 2 : atk # 3 : def # 4 : spi # 5 : agi # 6 : cri # 7 : hit # 8 : eva # # char: id atau char: id,id # skill dapat digunakan bila terdapat actor dengan id pada urutan pada actor # database pada party. # # state: id atau state: id,id # skill dapat digunakan bila actor terkena state id pada urutan state database. # # switch: id atau switch: id,id # skill dapat digunakan bila switch dengan id sebagai urutan switch di setting # ON / true. # # var id: n atau var id,id: n # skill dapat digunakan bila variable dengan urutan id sesuai dengan n. # n bisa dimasukkan secara angka("integer") maupun kalimat("string"). #=============================================================================== module Yeki module SRS #=============================================================================== # Pengaturan #------------------------------------------------------------------------------- # Hide: # 0 => tidak di hide # 1 => skill akan di hide saat diluar battle # 2 => skill akan di hide saat didalam battle # 3 => skill akan di hide saat diluar dan didalam battle # # Consume : # true => Weapon, Armor, Item yang dimiliki party akan berkurang # => HP dan MP akan berkurang # => State tertentu akan menghilang # => Switch tertentu akan off # => Nilai Variable akan berkurang #=============================================================================== Hide = 2 Consume = true #------------------------------------------------------------------------------- #=============================================================================== Reg_o = /<ysrs>/i Reg_c = /<\/ysrs>/i Equip = /(?:equip)\s*(weapon|armor)\s*:\s*(\d+)/i Weapon = /(?:weapon)\s*(\d+(?:\s*,\s*\d+)*)\s*:\s*(\d+)/i Armor = /(?:armor)\s*(\d+(?:\s*,\s*\d+)*)\s*:\s*(\d+)/i Item = /item\s*(\d+(?:\s*,\s*\d+)*)\s*:\s*(\d+)/i Parameter = /param\s*(\d+(?:\s*,\s*\d+)*)\s*:\s*(\d+)/i Character = /(?:char)\s*:\s*(\d+(?:\s*,\s*\d+)*)/i State = /(?:state)\s*:\s*(\d+(?:\s*,\s*\d+)*)/i Switch = /(?:switch)\s*:\s*(\d+(?:\s*,\s*\d+)*)/i Variable = /(?:var)\s*(\d+(?:\s*,\s*\d+)*)\s*:\s*(\d+)/i Mcost = /(?:mcost)\s*:\s*(\d+)(%)*/i Hcost = /(?:hcost)\s*:\s*(\d+)(%)*/i end end #=============================================================================== # SCRIPT START #------------------------------------------------------------------------------- # Mengganti atau menghapus syntax dibawah ini adalah tanggung jawab anda sendiri #=============================================================================== class RPG::Skill < RPG::UsableItem def scan_srs command = Yeki::SRS @ysrs = false @sre = $data_weapons[0] @srw = [0] * $data_weapons.size @sra = [0] * $data_armors.size @sri = [0] * $data_items.size @srp = [0] * 9 @src = [] @srs = [] @switch = [] @var = [] @mcost = 0 @mcost_per = 0 @hcost = 0 @hcost_per = 0 self.note.split(/\r\n/).each {|line| case line when command::Reg_o @ysrs = true when command::Reg_c @ysrs = false when command::Equip id = $2.to_i if @ysrs @sre = $data_weapons[id] if $1 == "weapon" @sre = $data_armors[id] if $1 != "weapon" end when command::Weapon num = $2.to_i $1.scan(/\d+/).each {|id|@srw[id.to_i] = num} if @ysrs when command::Armor num = $2.to_i $1.scan(/\d+/).each {|id|@sra[id.to_i] = num} if @ysrs when command::Item num = $2.to_i $1.scan(/\d+/).each {|id|@sri[id.to_i] = num} if @ysrs when command::Parameter num = $2.to_i $1.scan(/\d+/).each {|id|@srp[num]= id.to_i} if @ysrs when command::Character $1.scan(/\d+/).each {|id|@src.push id.to_i} if @ysrs when command::State $1.scan(/\d+/).each {|id|@srs.push id.to_i} if @ysrs when command::Switch $1.scan(/\d+/).each {|id| @switch.push id.to_i} if @ysrs when command::Variable res = $2 $1.scan(/\d+/i).each {|id| if @ysrs @var[id.to_i] = res.to_i if res.is_a?(Integer) @var[id.to_i] = res if res.is_a?(String) end} when command::Mcost if @ysrs @mcost_per = ($1.to_i).to_f / 100 if $2 == "%" @mcost = $1.to_i if $2 != "%" end when command::Hcost if @ysrs @hcost_per = ($1.to_i).to_f / 100 if $2 == "%" @mcost = $1.to_i if $2 != "%" end end} end def sre scan_srs if @sre.nil? return @sre end def srw scan_srs if @srw.nil? return @srw end def sra scan_srs if @sra.nil? return @sra end def sri scan_srs if @sri.nil? return @sri end def srp scan_srs if @srp.nil? return @srp end def src scan_srs if @src.nil? return @src end def srs scan_srs if @srs.nil? return @srs end def switch scan_srs if @switch.nil? return @switch end def variable scan_srs if @var.nil? return @var end def mcost scan_srs if @mcost.nil? return @mcost end def mcost_per scan_srs if @mcost_per.nil? return @mcost_per end def hcost scan_srs if @hcost.nil? return @hcost end def hcost_per scan_srs if @hcost_per.nil? return @hcost_per end end #------------------------------------------------------------------------------- class Game_Actor < Game_Battler def equip?(item) equips.include?(item.sre) end def weapon?(item) item.srw.each_index {|id| return false unless ($game_party.item_number($data_weapons[id]) >= item.srw[id])} return true end def armor?(item) item.sra.each {|id| return false unless ($game_party.item_number($data_armors[id]) >= item.sra[id])} return true end def ystate?(item) return true if item.srs.empty? item.srs.each {|id| return false if !states.include?($data_states[id])} return true end def yitem?(item) item.sri.each_index{|id| return false if !($game_party.item_number($data_items[id]) >= item.sri[id])} return true end def param?(item) return false if maxhp < item.srp[0] return false if maxmp < item.srp[1] return false if atk < item.srp[2] return false if self.def < item.srp[3] return false if spi < item.srp[4] return false if agi < item.srp[5] return false if cri < item.srp[6] return false if hit < item.srp[7] return false if eva < item.srp[8] return true end def character?(item) return true if item.src.empty? item.src.each {|id| return false if !$game_party.members.include?($game_actors[id])} return true end def switch?(item) return true if item.switch.empty? item.switch.each{|id| return false if !$game_switches[id]} return true end def variable?(item) item.variable.each_index {|id| return false if $game_variables[id] != item.variable[id] } return true end def hp?(item) return false unless self.hp >= item.hcost return true end def show(item) enable1 = weapon?(item) && armor?(item) && switch?(item) && variable?(item) && equip?(item) enable2 = yitem?(item) && param?(item) && character?(item) && ystate?(item) && hp?(item) enable3 = enable1 && enable2 end alias :yeki_srs_scu :skill_can_use? def skill_can_use?(skill) return false unless show(skill) yeki_srs_scu(skill) end def skill_cost(skill) wcost(skill) acost(skill) icost(skill) hcost(skill) scost(skill) swcost(skill) vcost(skill) end def wcost(skill) for id in 0..skill.srw.size - 1 $game_party.lose_item($data_weapons[id],skill.srw[id]) end end def acost(skill) for id in 0..skill.sra.size - 1 $game_party.lose_item($data_armors[id],skill.sra[id]) end end def icost(skill) for id in 0..skill.sri.size - 1 $game_party.lose_item($data_items[id],skill.sri[id]) end end def hcost(skill) self.hp -= calc_hp_cost(skill) end def scost(skill) skill.srs.each {|id| remove_state(id)} end def swcost(skill) skill.switch.each {|id| $game_switches[id] = false } end def vcost(skill) skill.variable.each_index{|id| $game_variables[id] -= 1 if $game_variables[id].is_a?(Integer)} end end #------------------------------------------------------------------------------- class Game_Battler alias yeki_srs_cmc calc_mp_cost def calc_mp_cost(skill) res = yeki_srs_cmc(skill) + skill.mcost + maxmp * skill.mcost_per return res end def calc_hp_cost(skill) res = skill.hcost + (maxhp * skill.hcost_per).to_i return res end end #------------------------------------------------------------------------------- class Window_Skill < Window_Selectable attr_reader :hiding alias :yeki_srs_initialize :initialize def initialize(x,y,w,h,actor) @hiding = false yeki_srs_initialize(x,y,w,h,actor) end def hiding=(hiding) @hiding = hiding refresh end def refresh @data = [] for skill in @actor.skills if @hiding @data.push(skill) if @actor.skill_can_use?(skill) else @data.push(skill) end if skill.id == @actor.last_skill_id self.index = @data.size - 1 end end @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end end #------------------------------------------------------------------------------- class Scene_Skill < Scene_Base alias :yeki_srs_start :start def start yeki_srs_start determine_hiding end def determine_hiding case Yeki::SRS::Hide when 0 @skill_window.hiding = false when 1 @skill_window.hiding = true when 2 @skill_window.hiding = false when 3 @skill_window.hiding = true end end alias :yeki_srs_usn :use_skill_nontarget def use_skill_nontarget @actor.skill_cost(@skill) yeki_srs_usn if Yeki::SRS::Consume end end #------------------------------------------------------------------------------- class Scene_Battle < Scene_Base alias :yeki_srs_sss :start_skill_selection def start_skill_selection yeki_srs_sss determine_hiding end def determine_hiding case Yeki::SRS::Hide when 0 @skill_window.hiding = false when 1 @skill_window.hiding = false when 2 @skill_window.hiding = true when 3 @skill_window.hiding = true end end alias :yeki_srs_eas :execute_action_skill def execute_action_skill yeki_srs_eas if Yeki::SRS::Consume skill = @active_battler.action.skill @active_battler.skill_cost(skill) if @active_battler.actor? end end end
#=============================================================================== # SCRIPT END #===============================================================================
Lupa link aslinya (males nyari) Mas momod, tolong pindahin ke RGSS2 support ya. |
| | | | Re: script masih bermasalah...! |
---|
Sponsored content
| | | | | script masih bermasalah...! | |
|
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|