Notice
Like RMID on Facebook!
Follow RMID on Twitter @RPGMakerID

Share | 
 

 (ask) cara melimitasi pemakai POTION?

View previous topic View next topic Go down 
Goto page : 1, 2  Next
Sun 20 Nov 2011 - 16:29
Post(ask) cara melimitasi pemakai POTION?
#1
pram12345 
New RMer C
New RMer C


Level 5
Post Count: 58
Joined: 2011-02-20
Thanked: 1
Engine: RMVX
Skill: Very Beginner
Type: Databaser

kakak saya mau tanya lagi T_T mohon pencerahannya...

jadi gini, kan saya bikin potion, sebuat saja
"air suci" dimana deskripsinya adalah sbg berikut...

AIR SUCI
menambah 5000 HP

dan sbg info, karakter dalam gameku ada 3, sebut saja si anu, una, sama nau....

Well, ada yang tau nggak? gimana caranya agar nih AIR SUCI
hanya dapat dipakai oleh si Anu saja? jadi si una sama nau nggak bisa
pakai... mohon pencerahanya T_T
makasih ^^
Reply to topic
Sun 20 Nov 2011 - 18:46
PostRe: (ask) cara melimitasi pemakai POTION?
#2
bradhawk 
Admin
Admin


Level 5
Post Count: 622
Joined: 2009-02-18
Thanked: 8
Engine: RMXP
Skill: Skilled
Type: Event Designer

ini ada scriptnya, hasil nge-RIP dari Tons of Addons-nya Blizzard .. tapi scripter aslinya Fantastist .. ;)
Code:
#==============================================================================
# ** Actor-specific Item Usability
#------------------------------------------------------------------------------
# by Fantasist
# Version 1.0
# 21-Nov-2008
#------------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# - code reviewed, optimized, integrated into Tons of Add-ons, freed from
#  potential bugs and beta tested by Blizzard
# - this add-on is part of Tons of Add-ons with full permission of the original
#  author(s)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#------------------------------------------------------------------------------
# Version History:
#
#  v1.0 - First release
#------------------------------------------------------------------------------
# Description:
#
#    This scriptlet enables you to define which items can't be consumed by
#  each actor. For example, actor ID 4 (who maybe a robot) cannot use
#  "Potion". Similarly, actor ID 1 (Arshes) cannot consume "Recharge Cell".
#------------------------------------------------------------------------------
# Compatibility:
#
#    - Should be compatible with most scripts.
#------------------------------------------------------------------------------
# Instructions:
#
#  Place this below "Scene_Debug" and above "Main"
#------------------------------------------------------------------------------
# Configuration:
#
#    Scroll down and you'll find the configuration.
#
#  The main syntax is:
#
#    when ACTOR_ID then [IDs of all items which this actor CAN'T use]
#
#  Examples:
#
#    when 1 then [1, 2] # Arshes can't use "Potion" and "High Potion".
#
#    when 7 then [10, 11, 12] # Gloria can't use "Full Tonic", "Antidote" and
#                              # "Dispell Herb".
#
#  NOTE: For all actors without a configuration, items are usable by default.
#        So if Basil can use all items, then you don't need to configure for
#        ID 2.
#------------------------------------------------------------------------------
# Issues:
#
#    None that I know of.
#------------------------------------------------------------------------------
# Credits and Thanks:
#
#  Credits: Fantasist, for making this
#  Thanks: Spoofus, for requesting this
#------------------------------------------------------------------------------
# Notes:
#
#  If you have any problems or suggestions, you can find me at:
#
#    - www.chaos-project.com
#    - www.quantumcore.forumotion.com
#
#  Enjoy ^_^
#============================================================================

#==============================================================================
# * module FTSConfigs
#==============================================================================

module FTSConfigs
 
  def self.item_can_consume?(actor_id, item_id)
    nonusable_item_ids = case actor_id
    #==========================================================================
    # * CONFIG BEGIN
    #==========================================================================
    when 1 then [1]
    when 2 then [2]
    # when ACTOR_ID then [IDs of all items which this actor CAN'T use]
    #==========================================================================
    # * CONFIG END
    #==========================================================================
    else
      []
    end
    return !nonusable_item_ids.include?(item_id)
  end
 
end

#==============================================================================
# * Game_Battler
#==============================================================================

class Game_Battler
 
  alias item_effect_actoritem_override item_effect
  def item_effect(item)
    if self.is_a?(Game_Actor)
      return false if !FTSConfigs.item_can_consume?(self.id, item.id)
    end
    return item_effect_actoritem_override(item)
  end
 
end

______________________

Quote:
An epic of epic epicness.

epic~
Quote:
[17:21:57] @ dnasman : ane lagi sibuk smsan ma cewe neh :hammer:
Reply to topic
Sun 20 Nov 2011 - 19:25
PostRe: (ask) cara melimitasi pemakai POTION?
#3
Aegis 
Legendary RMer B


Level 3
Post Count: 1833
Joined: 2010-06-29
Thanked: 47
Engine: Multi-Engine User
Skill: Very Beginner
Type: Artist
Awards:

tapi :D
Air Sucinya subjektif ya :v
masa mau nyembuhin malah milih2 orang :ngacay2:
Reply to topic
Mon 21 Nov 2011 - 4:21
PostRe: (ask) cara melimitasi pemakai POTION?
#4
pram12345 
New RMer C
New RMer C


Level 5
Post Count: 58
Joined: 2011-02-20
Thanked: 1
Engine: RMVX
Skill: Very Beginner
Type: Databaser

kk brad... makasih buanyak ^^ btw, sy mau nanya... maksudnya ACTOR ID dan ITEM ID tuh "namanya" apa "nomornya"??? trus jika misal ITEMnya lebih dr 1 dipisahkan pake apa kk???
Reply to topic
Mon 21 Nov 2011 - 4:40
PostRe: (ask) cara melimitasi pemakai POTION?
#5
superkudit 
Pahlawan Super


Level 5
Post Count: 1917
Joined: 2009-09-24
Thanked: 22
Engine: RMXP
Skill: Very Beginner
Type: Artist
Awards:

ijin jawab..
ID itu = nomer/angka yg mewakili actor sama itemnya...

Biasanya ada di depan nama, dan berurutan posisinya di database.

Untuk memisahkan antar id satu dengan yang lain biasanya menggunakan tanda koma ( , )
Reply to topic
Mon 21 Nov 2011 - 4:40
PostRe: (ask) cara melimitasi pemakai POTION?
#6
shikami 
Tukang Sapu
Pakde RMID


Level 5
Post Count: 3298
Joined: 2009-07-18
Thanked: 27
Engine: Multi-Engine User
Skill: Beginner
Type: Developer
Awards:


konfirmasi dulu,ente pake rmxp apa rmvx nih? kalo rmxp sih silahkan pake script yang dipost si brad,klo bkan ya cari lg :)

______________________
this is no signature
Reply to topic
Mon 21 Nov 2011 - 5:09
PostRe: (ask) cara melimitasi pemakai POTION?
#7
pram12345 
New RMer C
New RMer C


Level 5
Post Count: 58
Joined: 2011-02-20
Thanked: 1
Engine: RMVX
Skill: Very Beginner
Type: Databaser

kk brad... udah tak coba... tapi tetep nggak bisa... gimana nih T_T

ini kodeku...

Spoiler:
 


mohon pencerhannya T_T
Reply to topic
Mon 21 Nov 2011 - 5:10
PostRe: (ask) cara melimitasi pemakai POTION?
#8
pram12345 
New RMer C
New RMer C


Level 5
Post Count: 58
Joined: 2011-02-20
Thanked: 1
Engine: RMVX
Skill: Very Beginner
Type: Databaser

weee pantesan nggak bisa T_T sy pake VX kk... haduh... ada nggak ya scriptnya T_T sy buener2 butuh kk... saya mohon T______________________T
Reply to topic
Mon 21 Nov 2011 - 9:22
PostRe: (ask) cara melimitasi pemakai POTION?
#9
fredy 
Senior RMer E
Senior RMer E


Level 5
Post Count: 608
Joined: 2009-07-15
Thanked: 4
Engine: RMVX

Maaf Anda double post
Dan Benar Itu Script XP
Reply to topic
Mon 21 Nov 2011 - 9:56
PostRe: (ask) cara melimitasi pemakai POTION?
hart 
Senior RMer D
Senior RMer D


Level 5
Post Count: 746
Joined: 2009-12-21
Thanked: 33
Engine: Other
Skill: Very Beginner
Type: Developer

IMO bikin aja air suci itu item yg gk bisa dipakai.
terus bikin skill khusus untuk si anu, skill tersebut menambah HP 5000 dan mengkonsumsi 1 air suci...
Reply to topic
 

(ask) cara melimitasi pemakai POTION?

View previous topic View next topic Back to top 
Page 1 of 2Goto page : 1, 2  Next

Permissions in this forum:You cannot reply to topics in this forum
RPGMakerID :: Engines :: RPG Maker In General-