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 | 
 

 [VX] Alissa Item Requirements System

Topik sebelumnya Topik selanjutnya Go down 
[VX] Alissa Item Requirements System Empty2011-10-31, 16:54
Post[VX] Alissa Item Requirements System
#1
bungatepijalan 
Moe Princess
bungatepijalan

Level 5
Posts : 1487
Thanked : 30
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer
Awards:
[VX] Alissa Item Requirements System Vide
Alissa Item Requirements System
Version: 1.0
Type: Item System Add-on


Pengenalan

This script adds item requirements criteria to item usages (like recipes). Each required items can be set whether it will be used up on item consumption.

NB: Script ini termasuk yang digunakan dalam game The Mystery House



Petunjuk & Pemasangan

Cukup pasang di atas slot 'Main'.
Untuk menambah list requirement, tambahkan pada module ItemReqs dgn code seperti contoh ini:
Code:
  ItemID[0] = 2
  ItemReqsID[0] = [2]
  ItemReqsQTY[0] = [1]
  ItemReqsIsUsedUp[0] = [true]
  CustomCriteria[0] = "true"


Screenshot
Spoiler:



Demo

Link: http://www.media*fire.com/?ym2r0bzyfd741hq


Script

Code:
#==============================================================================
# Alissa Item Requirements System
#==============================================================================
# Information:
#  This script adds item requirements criteria to item usages (like recipes).
#  Each required items can be set whether it will be used up on item
#  consumption.
#
# Installation:
#  Just place above Main.
#
# Credits
#  Alissa Liu
#
#==============================================================================

#---------------------------------------------------------------------------
# ** ItemReqs Module
#---------------------------------------------------------------------------
module ItemReqs
  ItemID = []            # Requiring item ID
  ItemReqsID = []        # Array of required items ID
  ItemReqsQTY = []        # Array of number of required items
  ItemReqsIsUsedUp = []  # Required items used up?
  CustomCriteria = []    # Script code strings for condition evaluation
                          # (returns boolean value)
 
  # Add as many as you want (this list is just for sample)
  ItemID[0] = 22
  ItemReqsID[0] = [21]
  ItemReqsQTY[0] = [1]
  ItemReqsIsUsedUp[0] = [true]
  CustomCriteria[0] = "true"
 
  ItemID[1] = 23
  ItemReqsID[1] = [21]
  ItemReqsQTY[1] = [1]
  ItemReqsIsUsedUp[1] = [true]
  CustomCriteria[1] = "true"
end

#==============================================================================
# ** 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
  #--------------------------------------------------------------------------
  # * Consume Items
  #    item : item
  #    If the specified object is a consumable item, the number in investory
  #    will be reduced by 1.
  #--------------------------------------------------------------------------
  def consume_item(item)
    if item.is_a?(RPG::Item) and item.consumable
      lose_item(item, 1)
    end
    i=0
    while i<ItemReqs::ItemID.length
      case item
        when RPG::Item
        if ItemReqs::ItemID[i]==item.id
          break
        end
      end
      i+=1
    end
    if i<ItemReqs::ItemID.length && ItemReqs::ItemReqsID[i].length>0
      for j in 0..ItemReqs::ItemReqsID[i].length-1
        if ItemReqs::ItemReqsIsUsedUp[i][j]
          lose_item($data_items[ItemReqs::ItemReqsID[i][j]], ItemReqs::ItemReqsQTY[i][j])
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Determine if Item is Usable
  #    item : item
  #--------------------------------------------------------------------------
  def item_can_use?(item)
    return false unless item.is_a?(RPG::Item)
    return false if item_number(item) == 0
    fulfilled = true
    i=0
    while i<ItemReqs::ItemID.length
      if item.is_a?(RPG::Item)
        if ItemReqs::ItemID[i]==item.id
          break
        end
      end
      i+=1
    end
    if i<ItemReqs::ItemID.length
      if ItemReqs::ItemReqsID[i].length>0
        for j in 0..ItemReqs::ItemReqsID[i].length-1
          fulfilled = (fulfilled && $game_party.item_number($data_items[ItemReqs::ItemReqsID[i][j]])>=ItemReqs::ItemReqsQTY[i][j])
        end
      end
      fulfilled = (fulfilled && eval(ItemReqs::CustomCriteria[i]))
    end
    return false if not fulfilled
    if $game_temp.in_battle
      return item.battle_ok?
    else
      return item.menu_ok?
    end
  end
end

#==============================================================================
# ** Window_Item
#------------------------------------------------------------------------------
#  This window displays a list of inventory items for the item screen, etc.
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # * Update Help Text
  #--------------------------------------------------------------------------
  def update_help
    extra_text = ""
    i=0
    while i<ItemReqs::ItemID.length
      case item
        when RPG::Item
        if ItemReqs::ItemID[i]==item.id
          break
        end
      end
      i+=1
    end
    if i<ItemReqs::ItemID.length && ItemReqs::ItemReqsID[i].length>0
      extra_text = " Requires "+sprintf("%d ",ItemReqs::ItemReqsQTY[i][0])+$data_items[ItemReqs::ItemReqsID[i][0]].name
      if ItemReqs::ItemReqsID[i].length>1
        for j in 1..ItemReqs::ItemReqsID[i].length-1
          extra_text = extra_text+", "+sprintf("%d ",ItemReqs::ItemReqsQTY[i][j])+$data_items[ItemReqs::ItemReqsID[i][j]].name
        end
      end
    end
    @help_window.set_text(item == nil ? "" : item.description+extra_text)
  end
end

#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
#  This class performs the item screen processing.
#==============================================================================

class Scene_Item < Scene_Base
  #--------------------------------------------------------------------------
  # * Use Item (apply effects to non-ally targets)
  #--------------------------------------------------------------------------
  alias use_item_nontarget_ir use_item_nontarget unless method_defined?('use_item_nontarget_ir')
  def use_item_nontarget
    use_item_nontarget_ir
    @item_window.refresh
  end
end


Credit

  • bungatepijalan
[VX] Alissa Item Requirements System Empty2011-10-31, 16:58
PostRe: [VX] Alissa Item Requirements System
#2
WILR00T 
#E nalaJ hagneT id lipugN gnakuT
WILR00T

Level 5
Posts : 461
Thanked : 11
Engine : Multi-Engine User
Skill : Beginner
Type : Developer

[VX] Alissa Item Requirements System Vide
Wew.... Script Baru........



Izin Download nya~!!!! :ngacay:
[VX] Alissa Item Requirements System Empty2011-10-31, 17:07
PostRe: [VX] Alissa Item Requirements System
#3
maihime 
Senior
Senior
maihime

Level 5
Posts : 677
Thanked : 143
Engine : Multi-Engine User
Skill : Very Beginner
Type : Artist

[VX] Alissa Item Requirements System Vide
Yak! XD Another useful script~ :D
Sebagian besar kegunaannya,
sepertinya mai bisa menebak dari ss itu... :3
Ehem~ :3 Mai ijin download ya... :D
[VX] Alissa Item Requirements System Empty2011-10-31, 17:46
PostRe: [VX] Alissa Item Requirements System
#4
Nefusa 7 
Senior
Senior
Nefusa 7

Level 5
Posts : 954
Thanked : 6
Engine : RMXP
Skill : Intermediate
Type : Scripter

[VX] Alissa Item Requirements System Vide
wah script baru :shocked:
great :thumbup:
ijin donlod ya... :D
[VX] Alissa Item Requirements System Empty2011-10-31, 20:38
PostRe: [VX] Alissa Item Requirements System
#5
Garry Laly 
Senior
Senior
Garry Laly

Level 5
Posts : 651
Thanked : 3
Engine : Multi-Engine User
Skill : Beginner

[VX] Alissa Item Requirements System Vide
Eh ada script baru :clap:

Buat lari cepat nih :hmm:


Cekidot :kabur:
[VX] Alissa Item Requirements System Empty2011-10-31, 21:19
PostRe: [VX] Alissa Item Requirements System
#6
Aegis 
Legendary
Legendary
Aegis

Level 3
Posts : 2152
Thanked : 56
Engine : Multi-Engine User
Skill : Very Beginner
Type : Artist
Awards:


[VX] Alissa Item Requirements System Vide
Garry wrote:
Eh ada script baru :clap:

Buat lari cepat nih :hmm:


Cekidot :kabur:

tentu saja bukan :D
This script adds item requirements criteria to item usages (like recipes). Each required items can be set whether it will be used up on item consumption.
katanya gitu :ngacay2:
[VX] Alissa Item Requirements System Empty2011-11-01, 00:15
PostRe: [VX] Alissa Item Requirements System
#7
shikami 
Member 1000 Konsep
avatar

Level 5
Posts : 3744
Thanked : 31
Engine : Multi-Engine User
Skill : Beginner
Type : Developer
Awards:


[VX] Alissa Item Requirements System Vide
kenapa ga make notetag aja recepie,ini sih udah kaek kgc compose item.
[VX] Alissa Item Requirements System Empty2011-11-01, 05:06
PostRe: [VX] Alissa Item Requirements System
#8
fly-man 
Poison Elemental
Anak Cantik
fly-man

Level 5
Posts : 917
Thanked : 11
Engine : RMVX
Skill : Beginner
Type : Artist
Awards:

[VX] Alissa Item Requirements System Vide
banyak amat yang cuman bilang ijin donlot yah ijin donlot yah... hmmm.. mau donlot mah tinggal donlot aja kk2 sekalian, ntar komennya abis make hehe XD, kayanya cuman aegis deh yang komennya paling bermutu hauhahahhahahahah......
[VX] Alissa Item Requirements System Empty2011-12-17, 07:21
PostRe: [VX] Alissa Item Requirements System
#9
darknezz 
Novice
Novice
darknezz

Level 5
Posts : 184
Thanked : 0
Engine : Multi-Engine User
Skill : Intermediate
Type : Developer

[VX] Alissa Item Requirements System Vide
Niech yg aku cari
[VX] Alissa Item Requirements System Empty
PostRe: [VX] Alissa Item Requirements System
Sponsored content 




[VX] Alissa Item Requirements System Vide
 

[VX] Alissa Item Requirements System

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMVX Scripts-