RPGMakerID
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Komunitas RPG Maker Indonesia
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  Login  
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.

 

 [VXA]Yeki Class Upgrade

Go down 
4 posters
PengirimMessage
yeki
Novice
Novice
yeki


Level 5
Posts : 182
Thanked : 6
Engine : RMVX Ace
Skill : Beginner
Type : Scripter

Trophies
Awards:

[VXA]Yeki Class Upgrade Empty
PostSubyek: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-09-18, 02:12

Yeki Class Upgrade
Versi: 1.10


Pengenalan

Script Stand Alone lainya yang sengaja kubuat agar user tidak terlalu repot - repot untuk mendownload Yeki Script Pack.
Script ini memberikan fungsi sang aktor untuk mengupgrade
class nya.


Fitur


  • 1 class bisa berganti ke banyak class
  • Membutuhkan level tertentu untuk berganti class
  • Membutuhkan gold untuk berganti class
  • Membutuhkan item dengan tipe apapun untuk berganti class
  • Membutuhkan parameter untuk berganti class



Screenshots

Display:
Spoiler:


Demo




Scripts

Code:
#===============================================================================
# Yeki Class Upgrade
#===============================================================================
# Author  : Yeki
# Created : 18/9/2012
# Version : 1.10
# Engine  : RMVX Ace
#-------------------------------------------------------------------------------
# Contact : www.rpgmakerid.com
# Username: yeki
#===============================================================================
# Script ini berguna untuk mengupgrade class actor dengan syarat tertentu
#===============================================================================
# License
#-------------------------------------------------------------------------------
# Script ini dapat digunakan untuk apapun dan dimanapun.
# Menggunakan Script ini untuk Game Komresil harus melalui izin dari saya.
# Setiap penggunaan Script ini harus memberikan Credit dengan nama saya.
#===============================================================================
# Cara Pemakaian
#-------------------------------------------------------------------------------
# Letakkan script ini dibawah Materials pada Script Editor.
#===============================================================================
# Changelog
#-------------------------------------------------------------------------------
# 18/9/2012  : add item and param requirement.
#===============================================================================
# Compatibility
#-------------------------------------------------------------------------------
# Aliasing:
# - Window_MenuCommand.make_command_list
# - Scene_Menu.create_command_window
# - Scene_Menu.on_personal_ok
#===============================================================================
# Penjelasan
#-------------------------------------------------------------------------------
# Note tag Class
#
# Format Note Tag:
#
# <class up>
# expression
# <class up>
#
# dimana expression diisi dengan sebagai berikut :
#
# class: id  atau  class: id, id
# Class yang diisi dengan note diatas akan memiliki pilihan upgrade class ke
# urutan id pada Database Class.
#
# level: n
# untuk mengupgrade ke class yang di berikan note ini harus memiliki level
# sebesar n atau lebih.
#
# gold: n
# untuk mengupgrade ke class yang di berikan note ini harus memiliki gold
# sebesar n atau lebih.
#
# item id: n
# untuk mengupgrade ke class yang diberikan note ini harus miliki item dengan
# nomor urut id pada database sejumlah n.
#
# weapon id: n
# sama dengan item tapi membutuhkan weapon dengan nomor urut id pada database
# sejumlah n.
#
# armor id: n
# sama dengan weapon dan item tapi membutuhkan armor dengan nomor urut id pada
# database sejumlah n.
#
# param id: n
# membutuhkan sejumlah n parameter bertipe id.
# id terdiri 0 - 7. dimana :
# 0 : Max HP
# 1 : Max MP
# 2 : atk
# 3 : def
# 4 : mat
# 5 : mdf
# 6 : agi
# 7 : luk
#   
#
# Contoh :
#
# gunakan note ini pada note class no 1
#
# <class up>
# class: 2,3,4
# </class up>
#
# gunakan note ini pada note class no 2, 3 dan 4
#
# <class up>
# level: 3
# gold: 2000
# </class up>
#
# Maka Class Soldier dapat berbah menjadi Monk, Paladin dan Spellblade. Tapi
# untuk berubah sang aktor harus minimal level 3 dan memiliki gold sebesar
# 2000 Gold.

#===============================================================================
module Yeki
  module ClassUp
#===============================================================================
# Pengaturan
#-------------------------------------------------------------------------------
    Continue_Level = false          #jika false maka actor kembali ke lvl 1 saat
                                    #berganti class
                               
    Level_V  = "Require Level"    #text yang muncul pada require window
    Gold_V    = "Require Gold"      #text yang muncul pada require window
    Advance_V = "Class Advance"    #text yang muncul pada label window
    Item_V    = "Require Item"      #text yang muncul pada require window
    Param_V  = "Require Parameter" #text yang muncul pada require window
#===============================================================================
# Merubah, mengganti atau apapun yang ada dibawah ini adalah tanggung jawab
# kalian sendiri.
#===============================================================================
    Regopen        = /<class up>/i
    Regclose        = /<\/class up>/i
    Regclassup      = /(?:class:)\s*(\d+(?:\s*,\s*\d+)*)/i
    Regrequirelvl  = /(?:level:)\s*(\d+)/i
    Regrequiregold  = /(?:gold:)\s*(\d+)/i
    Regweapon      = /(?:weapon)\s*(\d+):\s*(\d+)/i
    Regarmor        = /(?:armor)\s*(\d+):\s*(\d+)/i
    Regitem        = /(?:item)\s*(\d+):\s*(\d+)/i
    Regparam        = /(?:param)\s*(\d+):\s*(\d+)/i
  end
end
#===============================================================================
# SCRIPT START
#===============================================================================
class RPG::Class < RPG::BaseItem
  def cache_class_up
    @classup = []
    @reqlvl = 0
    @reqgold = 0
    @reqitem = []
    @reqparam = [0] * 8
    @classup_flag = false
    command = Yeki::ClassUp
    self.note.split(/\r\n/).each {|line|
    case line
    when command::Regopen
      @classup_flag = true
    when command::Regclose
      @classup_flag = false
    when command::Regclassup
      if @classup_flag
        $1.scan(/\d+/).each {|num|
        @classup.push (num.to_i)}
      end
    when command::Regrequirelvl
      if @classup_flag
        @reqlvl = $1.to_i
      end
    when command::Regrequiregold
      if @classup_flag
        @reqgold = $1.to_i
      end
    when command::Regweapon
      if @classup_flag
        @reqitem.push [$data_weapons[$1.to_i],$2.to_i]
      end
    when command::Regarmor
      if @classup_flag
        @reqitem.push [$data_armors[$1.to_i],$2.to_i]
      end
    when command::Regitem
      if @classup_flag
        @reqitem.push [$data_items[$1.to_i],$2.to_i]
      end
    when command::Regparam
      if @classup_flag
        @reqparam[$1.to_i] = $2.to_i
      end     
    end}
  end
  def reqlvl
    cache_class_up if @reqlvl == nil
    return @reqlvl
  end
  def reqgold
    cache_class_up if @reqgold == nil
    return @reqgold
  end
  def reqitem
    cache_class_up if @reqitem == nil
    return @reqitem
  end
  def reqparam
    cache_class_up if @reqparam == nil
    return @reqparam
  end
  def classup
    cache_class_up if @classup == nil
    return @classup
  end
end
class Game_Actor < Game_Battler
  def classup
    $data_classes[@class_id].classup
  end
end
#-------------------------------------------------------------------------------
class Window_ClassUp < Window_Selectable
  def initialize
    super(0,48,160,368)
    @data = []
    @actor = nil
    activate
  end
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  def col_max
    return 1
  end
  def item_max
    @data ? @data.size : 1
  end
  def item
    @data && index >= 0 ? @data[index] : nil
  end
  def make_item_list
    @data = $data_classes[@actor.class_id].classup
  end
  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect(index)
      rect.width -= 4
      return unless item
      change_color(normal_color, enable?(item))
      draw_text(rect,$data_classes[item].name)
    end
  end 
  def current_item_enabled?
    enable?(@data[index])
  end
  def enable?(item)
    if !item.nil?
      enable1 = @actor.level >= $data_classes[item].reqlvl
      enable2 = $game_party.gold >= $data_classes[item].reqgold
      enable3 = enable1 && enable2
    else
      enable3 = false
    end
    return true if enable3
    return false
  end 
  def select_last
    select(0)
  end
  def item_window=(item_window)
    @item_window = item_window
  end
  def status_window=(status_window)
    @status_window = status_window
    update
  end
  def update
    super
    @item_window.actor = @actor
    @item_window.id = item
    @status_window.item = item
  end
  def refresh
    make_item_list
    create_contents
    draw_all_items
  end
end
#-------------------------------------------------------------------------------
class Window_ParamStatus < Window_Base
  def initialize(x,y,w)
    super(x,y,w,104)
    @data = []
    @id = 0
    @actor = nil
    @line = 20
  end
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  def id=(id)
    return if @id == id
    @id = id
    refresh
  end
  def refresh
    contents.clear
    contents.font.size = @line
    contents.font.color = system_color
    for i in 0..3
      draw_text(0,i * @line,contents.width,@line, Vocab::param(i))
    end
    for i in 4..7
      draw_text(contents.width / 2 + 24, (i - 4) * @line, contents.width / 2, @line,Vocab::param(i))
    end
    if !@id.nil? && @id != 0
      contents.font.color = normal_color
      for i in 0..7
        draw_text(0,i * @line, contents.width / 2,@line,$data_classes[@id].params[i,@actor.level],2) if i < 4
        draw_text(0,(i - 4) * @line,contents.width,@line,$data_classes[@id].params[i,@actor.level],2) if i > 3
      end
    end
  end
end
#-------------------------------------------------------------------------------
class Window_ReqClass < Window_Base
  def initialize(x,y,w)
    super(x,y,w,192)
    @item = 0
    @line = 20
  end
  def item=(item)
    return if @item == item
    @item = item
    refresh
  end
  def refresh
    contents.clear
    contents.font.size = @line
    contents.font.color = system_color
    draw_text(0,0,contents.width,@line,Yeki::ClassUp::Level_V)
    draw_text(0,@line,contents.width,@line,Yeki::ClassUp::Gold_V)
    draw_text(0,48, contents.width/2 - 24, @line, Yeki::ClassUp::Item_V,1)
    draw_text(contents.width/2,48, contents.width/2 - 24, @line, Yeki::ClassUp::Param_V,1)
    if !@item.nil? && @item != 0
      @reqitem = $data_classes[@item].reqitem
      @reqparam = $data_classes[@item].reqparam
      contents.font.color = normal_color
      txt1 = $data_classes[@item].reqlvl == 0 ? "--" : $data_classes[@item].reqlvl
      txt2 = $data_classes[@item].reqgold == 0 ? "--" : $data_classes[@item].reqgold
      draw_text(0,0,contents.width,@line,txt1.to_s,2)
      draw_text(0,@line,contents.width,@line,txt2.to_s,2)
      @reqitem.each_index {|i|
      draw_icon(@reqitem[i][0].icon_index,0,24 * (i + 3))
      draw_text(24,24 * (i + 3),contents.width,24,@reqitem[i][0].name + " x" + @reqitem[i][1].to_s)}
      contents.font.size = 18
      for i in 0..7
        contents.font.color = system_color
        draw_text(contents.width/2, (@line - 2) * (i + 4),contents.width/2,18,Vocab::param(i)) if i < 4
        draw_text(contents.width/4 * 3, (@line - 2) * i,contents.width/4,18,Vocab::param(i)) if i > 3
        contents.font.color = normal_color
        @reqparam[i] == 0 ? text1 = "--" : text1 = @reqparam[i]
        draw_text(0, (@line - 2) * (i + 4),contents.width/4 * 3 -8,18,text1,2) if i < 4
        draw_text(0, (@line - 2) * i,contents.width,18,text1,2) if i > 3
      end
    end
  end
end
#-------------------------------------------------------------------------------
class Scene_ClassUp < Scene_ItemBase
  def start
    super
    create_label_window
    create_actor_window
    create_class_window
    create_status_window
    create_require_window
  end
  def create_label_window
    @label_window = Window_Base.new(0,0,160,48)
    @label_window.draw_text(0,0,160,24,Yeki::ClassUp::Advance_V)
  end
  def create_actor_window
    @actor_window = Window_SkillStatus.new(160,0)
    @actor_window.actor = @actor
  end
  def create_class_window
    @class_window = Window_ClassUp.new
    @class_window.actor = @actor
    @class_window.select_last
    @class_window.set_handler(:ok, method(:confirm_class))
    @class_window.set_handler(:cancel, method(:return_scene))
  end 
  def create_status_window
    x = @label_window.width
    y = @actor_window.height
    w = Graphics.width - x
    @status_window = Window_ParamStatus.new(x,y,w)
    @class_window.item_window = @status_window
  end
  def create_require_window
    x = @label_window.width
    y = @actor_window.height + @status_window.height
    w = Graphics.width - x
    @require_window = Window_ReqClass.new(x,y,w)
    @class_window.status_window = @require_window
  end
  def confirm_class
    @actor.change_class(@class_window.item,Yeki::ClassUp::Continue_Level)
    @class_window.refresh
    @class_window.select_last
    @class_window.activate
    @actor_window.refresh
    @status_window.contents.clear
    @status_window.refresh
    @require_window.refresh
  end
end
#-------------------------------------------------------------------------------
class Window_MenuCommand < Window_Command
  alias :yeki_make_command_list :make_command_list
  def make_command_list
    yeki_make_command_list
    add_command("Class Up",:classup, main_commands_enabled)
  end
end
#-------------------------------------------------------------------------------
class Scene_Menu < Scene_MenuBase
  alias :yeki_create_command_window :create_command_window
  def create_command_window
    yeki_create_command_window
    @command_window.set_handler(:classup, method(:command_personal))
  end
  alias :yeki_command_personal :command_personal
  def on_personal_ok
    case @command_window.current_symbol
    when :skill
      SceneManager.call(Scene_Skill)
    when :equip
      SceneManager.call(Scene_Equip)
    when :status
      SceneManager.call(Scene_Status)
    when :classup
      SceneManager.call(Scene_ClassUp)
    end
  end   
end
#===============================================================================
# SCRIPT END
#===============================================================================


Credits


  • Enterbrain
  • Yeki


Terakhir diubah oleh yeki tanggal 2012-09-30, 17:06, total 2 kali diubah
Kembali Ke Atas Go down
TheoAllen
♫ RMID Rebel ♫
♫ RMID Rebel ♫
TheoAllen


Kosong
Posts : 4935
Thanked : 63

Trophies
Awards:




[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-09-18, 05:56

Mayan nih, calon2 script buat dicolong =w=b

Btw, coba bikin yg ganti class requirementnya status. Bisa ga?
Jadi gini. Harapannya ntar itu kompatible ama script yg ngealokasiin AP (Attribut point) ke status yg ditetukan player sendiri.saat level up. Ga tau sih apa di Ace udah ada script kayak gitu :lol:. Jika bisa ntar bisa bikin misal class Rogue membutuhkan AGI sekian dan class Cleric membutuhkan M.Atk dan M.Def sekian.

Cuman mau nambahin ide aja buat scripting. :kabur:

Oh iya btw, coba spoilernya ganti tag code aja :hmm:
Kembali Ke Atas Go down
http://theodoric-allen-altar.webs.com/
yeki
Novice
Novice
yeki


Level 5
Posts : 182
Thanked : 6
Engine : RMVX Ace
Skill : Beginner
Type : Scripter

Trophies
Awards:

[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-09-18, 22:56

Wish Granted !!!

Update v 1.10 !!

- added parameter requirement
- added item,weapon and armor requirement

Code:
http://www.media*fire.com/?e5oe1vuwde5084y
Kembali Ke Atas Go down
shikami
Member 1000 Konsep
avatar


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

Trophies
Awards:


[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-09-30, 14:03

di PC gw kedetect sebagai virus sama ESET :3
mungkin perlu jaga-jaga ... kasi txt aja :D
Kembali Ke Atas Go down
http://shikamicro.wordpress.com
yeki
Novice
Novice
yeki


Level 5
Posts : 182
Thanked : 6
Engine : RMVX Ace
Skill : Beginner
Type : Scripter

Trophies
Awards:

[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-09-30, 17:06

okeh tq, atas informasinya, dah di edit ke text code....terima kasih sekali lagi
Kembali Ke Atas Go down
Radis3D
Sang Iblis
Radis3D


Level 5
Posts : 755
Thanked : 3
Engine : RMVX Ace
Skill : Very Beginner
Type : Writer

Trophies
Awards:
[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-10-19, 10:45

untuk setting parameter class kedua gmana?
apa langsung ditinggiin?
atau gimana???

masih copo banget
mohon bimbingannya
:)
Kembali Ke Atas Go down
yeki
Novice
Novice
yeki


Level 5
Posts : 182
Thanked : 6
Engine : RMVX Ace
Skill : Beginner
Type : Scripter

Trophies
Awards:

[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-10-19, 12:54

@radis : parameter class selanjutnya disetting di database seperti biasa aja
Kembali Ke Atas Go down
Radis3D
Sang Iblis
Radis3D


Level 5
Posts : 755
Thanked : 3
Engine : RMVX Ace
Skill : Very Beginner
Type : Writer

Trophies
Awards:
[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty2012-10-19, 15:44

brarti masang param nya harus lebih tinggi ya??
bingung :o
Kembali Ke Atas Go down
Sponsored content





[VXA]Yeki Class Upgrade Empty
PostSubyek: Re: [VXA]Yeki Class Upgrade   [VXA]Yeki Class Upgrade Empty

Kembali Ke Atas Go down
 
[VXA]Yeki Class Upgrade
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» [VXA]Yeki NPU
» [VXA]Yeki CTS
» [Nanya] Upgrade Rumah
» [ASK]bikin upgrade weapon dan blacksmith
» Yeki MRS

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