Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # ▼▼▼▼▼▼ FFL - TP Simple Configurator ▼▼▼▼▼▼
- # ==============================================================================
- # Script by : Agung Prasetyo(TroyZ)
- # Contact me by : - Email agung.endisnear.xyz@gmail.com
- # - Forum RPGMakerID, username TroyZ
- # - Handphone 085756289121
- # Engine : VXAce
- # Level : Easy
- # Version : 1.0
- #
- # WARNING !!!
- # Script ini dibuat khusus untuk FightForLife Series dan semua game yang
- # dikehendaki oleh saya. Tidak ada versi english untuk script ini. Pemakaian
- # diluar dari kehendak saya, harap tetap mengikuti aturan lisensi yang sudah
- # tertera di script ini.
- # ------------------------------------------------------------------------------
- # Change Logs :
- # 14 December 2013 : Version 1.0 released
- # ------------------------------------------------------------------------------
- # How this work :
- # Bosan dengan TP yang jumlahnya 100 terus? Script ini bisa merubah Max TP untuk
- # setiap aktor menjadi jumlah berapapun yang kamu inginkan. Kamu juga bisa
- # mengontrol total TP yang dimiliki aktor sepanjang permainan.
- # ------------------------------------------------------------------------------
- # How to use :
- # Pasang diantara material dan main. Pake notetag ini di aktor :
- #
- # <max tp: x>
- #
- # x diisi dengan angka. Misalnya :
- #
- # <max tp: 200>
- #
- # Berarti, Max TP untuk aktor ini adalah 200. Ada juga fungsi script call lain
- # yang bisa digunakan untuk mengatur jumlah TP yang dimiliki aktor :
- # - add_tp(actor_id, value)
- # - min_tp(actor_id, value)
- # - mul_tp(actor_id, value)
- # - div_tp(actor_id, value)
- #
- # Kalo add_tp buat tambahin TP sejumlah value ke actor_id yang bersangkutan.
- # Kalo min_tp buat kurangin TP sejumlah value ke actor_id yang bersangkutan.
- # Kalo mul_tp buat mengalikan TP sejumlah value ke actor_id yang bersangkutan.
- # Kalo div_tp buat membagi TP sejumlah value ke actor_id yang bersangkutan.
- #
- # actor_id diisi dengan id aktor yang bersangkutan, kalo value diisi angkanya.
- # ------------------------------------------------------------------------------
- # Compatibility issues :
- # Sejauh ini belum ada, masih aman-aman aja kok. Kalo ketemu bug, langsung lapor
- # aja, lewat contact di setiap script header ada kok.
- # ------------------------------------------------------------------------------
- # Who to credit :
- # - Allah swt. : Demi kesempatan yang sudah Dia berikan.
- # - Nabi Muhammad saw. : Nabi dari umat Islam dan pemimpin umat yang PERFECT.
- # Saya bangga jadi umatmu. :)
- # - Agung Prasetyo(TroyZ) : Ya saya, yang buat script kan saya. :P
- # ------------------------------------------------------------------------------
- # License :
- # - Free Game : HARUS credit nama-nama diatas
- # - Commercial Game : Sama dengan lisensi Free Game + gamenya yang full version
- # dibagikan kepada saya secara gratis.
- # ------------------------------------------------------------------------------
- $imported = {} if $imported.nil?
- $imported[:FFL_TPSimpleConfigurator] = true
- puts "Imported : FFL - TP Simple Configurator"
- # ------------------------------------------------------------------------------
- # Konfigurasi mulai dari sini
- # ------------------------------------------------------------------------------
- module FFL
- module TP_SIMPLE_CONFIGURATOR
- MAX_TP_DEFAULT = 100 # angka maksimum untuk TP secara default
- end
- end
- # ------------------------------------------------------------------------------
- # Akhir dari konfigurasi
- # ------------------------------------------------------------------------------
- # ------------------------------------------------------------------------------
- # Tidak boleh lewat
- # ------------------------------------------------------------------------------
- module DataManager
- class << self
- alias ffl_load_tp_simple_configurator_dbase_x load_database
- end
- def self.load_database
- ffl_load_tp_simple_configurator_dbase_x
- ffl_load_notetags_tp_simple_configurator_x
- end
- def self.ffl_load_notetags_tp_simple_configurator_x
- [$data_actors].each do |object|
- object.each do |obj|
- next unless obj
- obj.ffl_load_notetags_tp_simple_configurator_x
- end
- end
- end
- end
- class RPG::Actor < RPG::BaseItem
- include FFL::TP_SIMPLE_CONFIGURATOR
- attr_accessor :max_tp
- def ffl_load_notetags_tp_simple_configurator_x
- @max_tp = MAX_TP_DEFAULT
- self.note.split(/[\r\n]+/).each { |baris|
- case baris
- when /<(?:max tp):[ ]*(\d+)>/i
- @max_tp = $1.to_i
- end
- }
- end
- end
- class Game_BattlerBase
- include FFL::TP_SIMPLE_CONFIGURATOR
- def max_tp
- return actor.max_tp if actor?
- return MAX_TP_DEFAULT
- end
- end
- class Game_Interpreter
- def add_tp(actor_id, value)
- $game_actors[actor_id].tp += value
- end
- def min_tp(actor_id, value)
- $game_actors[actor_id].tp -= value
- end
- def mul_tp(actor_id, value)
- $game_actors[actor_id].tp *= value
- end
- def div_tp(actor_id, value)
- $game_actors[actor_id].tp /= value
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement