Страница 412 из 643 ПерваяПервая ... 312362402410411412413414422462512 ... ПоследняяПоследняя
Показано с 4,111 по 4,120 из 6423

Тема: Общие вопросы

  1. #4111
    Хранитель Аватар для Imaginatium
    Информация о пользователе
    Регистрация
    06.12.2015
    Адрес
    АСТРАЛ
    Сообщений
    2,061
    Записей в дневнике
    51
    Репутация: 71 Добавить или отнять репутацию

    По умолчанию

    Спасибо Блади, вопрос исчерпан

  2. #4112

    По умолчанию

    Цитата Сообщение от Bloody Посмотреть сообщение
    Так, вот как бы я сделал.
    Нужно три переменных, на каждую кнопку по одной. Они все на нуле. Нажатие на каждую кнопку меняет значение соответствующей переменной с нуля на единицу. Но, перед изменением переменной, ставим conditional branch, которым проверяем нажимались ли до этого другие кнопки и, следовательно, изменялись ли другие переменные. Если у нас "та правильная кнопка", то происходит просто изменение привязанной к ней переменной, а если "неправильная кнопка" - то обнуляем все переменные и кнопки возвращаются в изначальное положение.
    Можно и одной обойтись.. использовать разрядности "единицы", "десятки", "сотни"
    От 000 до 111 - при правильной комбинации)

    PS. хотя нули подряд наверное сократятся в один нуль) лучше использовать 1 и 2)
    Последний раз редактировалось soulshard; 07.08.2016 в 10:07.

  3. #4113
    Хранитель Аватар для Imaginatium
    Информация о пользователе
    Регистрация
    06.12.2015
    Адрес
    АСТРАЛ
    Сообщений
    2,061
    Записей в дневнике
    51
    Репутация: 71 Добавить или отнять репутацию

    По умолчанию

    Такой вопросик:
    необходимо чтобы при нажатии кнопки на клаве герой выпивал зелье или применял навык.
    Пробывал сделать через такой скрипт
    Common Event Keys
    # -- Author : Dekita
    # -- Version : 1.1
    # -- Level : Easy / Normal
    # -- Requires : $D13x Core v1.6
    # -- Engine : RPG Maker VX Ace.


    Но в нём можно поставить на кнопку общее событие, но как к общему событию привязать питьё зелия или использование навыка?

    сам скрипт если пригодится:
    Спойлер ядро:
    =begin


    * To users of scripts

    * When using scripts obtained through online websites,
    create a new section at this position and paste the script here.
    (Select "Insert" from the pop-up menu in the left list box.)

    * If the creator of the script has any other special instructions, follow them.

    * In general, RPG Maker VX and RPG Maker XP scripts are not compatible,
    so make sure the resources you have are for RPG Maker VX Ace
    before you use them.


    * To authors of scripts

    * When developing scripts to be distributed to the general public,
    we recommend that you use redefinitions and aliases as much as
    possible, to allow the script to run just by pasting it in this position.


    =end
    if true # << Make true to use this script, false to disable.
    #================================================= ==============================
    #
    # ☆ $D13x - CORE
    # -- Author : Dekita
    # -- Version : 2.1
    # -- Level : Easy
    # -- Requires : N/A
    # -- Engine : RPG Maker VX Ace.
    #
    #================================================= ==============================
    # ☆ Import
    #-------------------------------------------------------------------------------
    $D13x={}if$D13x==nil
    $D13x[:CORE] = true
    #================================================= ==============================
    # ☆ Updates
    #-------------------------------------------------------------------------------
    # D /M /Y
    # o3/o6/2o13 - Bugfix, (Exp Showing incorrect info),
    # 27/o5/2o13 - Added $game_party.alive_battle_members Method
    # 22/o5/2o13 - Small Bugfix, (fixed max tp gauge bug)
    # o4/o5/2o13 - Small Update, (added @database_id)
    # 18/o4/2o13 - Bugfixx, (tp gauge),
    # - Added PrtSc Key,
    # o4/o4/2o13 - Added more keyboard keys,
    # ^- :S_Colon, :Equal, :Comma, :Minus, :Period, :F_Slash, :HASH,
    # ^- :L_Sqr_Brack, :B_Slash, :R_Sqr_Brack, :S_Quote,
    # o3/o4/2o13 - Fixed Keys.trigger? method
    # - Added Keys.release? method
    # o1/o4/2o13 - Added More Keyboard Keys,
    # ^- :F1, :F2, :F3, :F4, :F5, :F6, :F7, :F8, :F9, :F10, :F11, :F12
    # ^- :N_0, :N_1, :N_2, :N_3, :N_4, :N_5, :N_6, :N_7, :N_8, :N_9,
    # ^- :ADD, :MUL, :SUB, IV, ECI, :TAB, :BACK, :ENTER, :CAPS,
    # ^- :SPACE, :ESC, :ALT
    # 29/o3/2o13 - Added More Keyboard Keys,(Left/Right CTRL)
    # 28/o3/2o13 - Improved Customisation Layout,
    # - Removed Some Methods,
    # - Improved Keyboard Code,
    # 27/o3/2o13 - Added Keyboard Control,
    # 26/o3/2o13 - Compatibility, (Status Scene)
    # - Update, (Icons w/Hue)
    # 18/03/2013 - Compatibility, (Skill Scene)
    # 23/o2/2o13 - Started, Finished,
    #
    #================================================= ==============================
    # ☆ Introduction
    #-------------------------------------------------------------------------------
    # This script simply holds some information and methods used by some other
    # scripts in the $D13x system.
    # Current Features:
    # Fonts,
    # Color,
    # Vocab,
    # Keyboard Control,
    # Icons (w/Hue)...
    #
    # Place above all other $D13x Scripts.
    #
    #================================================= ==============================
    # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★
    #================================================= ==============================
    # 1. You MUST give credit to "Dekita" !!
    # 2. You are NOT allowed to repost this script.(or modified versions)
    # 3. You are NOT allowed to convert this script.
    # 4. You are NOT allowed to use this script for Commercial games.
    # 5. ENJOY!
    #
    # "FINE PRINT"
    # By using this script you hereby agree to the above terms and conditions,
    # if any violation of the above terms occurs "legal action" may be taken.
    # Not understanding the above terms and conditions does NOT mean that
    # they do not apply to you.
    # If you wish to discuss the terms and conditions in further detail you can
    # contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
    #
    #================================================= ==============================
    # ☆ Instructions
    #-------------------------------------------------------------------------------
    # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
    # Place Above ALL Other $D13x Scripts.
    #
    #================================================= ==============================
    # ☆ Notetags
    # For use with Weapons / Armors
    #-------------------------------------------------------------------------------
    # <tcol: red, grn, blu>
    # use this notetag to change the color of the items text shown in some of my
    # scenes.
    #
    #================================================= ==============================
    # ☆ HELP
    #-------------------------------------------------------------------------------
    # Heres a list of :key_symbols ( for use in scripts that require this one )
    # F KEYS
    # :F1, :F2, :F3, :F4, :F5, :F6, :F7, :F8, :F9, :F10, :F11, :F12
    # NUMBER KEYS
    # :_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9, :_0
    # LETTERS
    # :A, :B, :C, , :E, :F, :G, :H, :I, :J, :K, :L, :M, :N,
    # :O, :P, :Q, :R, :S, :T, :U, :V, :W, :X, :Y, :Z
    # NUM PAD
    # :N_0, :N_1, :N_2, :N_3, :N_4, :N_5, :N_6, :N_7, :N_8, :N_9,
    # :ADD, :MUL, :SUB, IV, ECI
    # ARROWS
    # :LEFT, :RIGHT, :UP, OWN
    # OTHER
    # :SHIFT, :LSHIFT, :RSHIFT, :TAB, :PAUSE, :CTRL, :L_CTRL, :R_CTRL,
    # :BACK, :ENTER, :CAPS, :SPACE, :ESC, :ALT
    # :S_Colon, :Equal, :Comma, :Minus, :Period, :F_Slash, :HASH, :L_Sqr_Brack
    # :B_Slash, :R_Sqr_Brack, :S_Quote,
    #
    # To Disable A Key, Make Symbol = :NONE,
    #
    #================================================= ==============================
    # ☆ For Scripters
    #-------------------------------------------------------------------------------
    # You can use any of the keys above in your own scripts, simply change the
    # default Input.press? / Input.trigger? / Input.repeat? methods with the
    # equivalent new method :
    # Keys.press?(KEY)
    # Keys.repeat?(KEY)
    # Keys.trigger?(KEY)
    # Keys.release?(KEY)
    # KEY should be either the keys 'virtual key code' or you can reference
    # the Keys module like so...
    # Keys.press?( Keys::Key[:SYMBOL] )
    # Keys.repeat?( Keys::Key[:SYMBOL] )
    # Keys.trigger?( Keys::Key[:SYMBOL] )
    # Keys.release?( Keys::Key[:SYMBOL] )
    #
    # Keys.press?
    # ^- will be triggered if the key is being pressed down
    # Keys.repeat?
    # ^- will be triggered if the key is in the "on" state (caps lock ect)
    # Keys.trigger?
    # ^- will be triggered when they key is first pressed
    # Keys.release?(KEY)
    # ^- will be triggered when they key is de-pressed (let go)
    #
    #================================================= ==============================
    module Text_Color
    #================================================= ==============================
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Color Settings
    #-----------------------------------------------------------------------------
    # You can use these colors in any of my scripts that offer color customisation.
    # simply put Text_Color::THE_COLOR_YOU_WANT as the setting.
    # eg.
    # Text_Color::Pure_White
    #-----------------------------------------------------------------------------
    # White's
    Pure_White = Color.new(255,255,255)
    White = Color.new(222,222,222)
    Grey = Color.new(111,111,111)
    Black = Color.new(0 ,0 ,0 )
    #-----------------------------------------------------------------------------
    # Yellow's
    Yellow = Color.new(255,255,0)
    Gold = Color.new(212,212,64)
    Orange = Color.new(255,182,0)
    Deep_Orange = Color.new(212,64,0)
    Dirt_Orange = Color.new(182,64,0)
    Brown = Color.new(128,32,0)
    #-----------------------------------------------------------------------------
    # Red's
    Red = Color.new(251,111,111)
    Deep_Red = Color.new(222,60,60)
    Pure_Red = Color.new(255,0,0)
    Pink = Color.new(255,0,255)
    Dark_Pink = Color.new(182,0,156)
    #-----------------------------------------------------------------------------
    # Blue's
    Sky_Blue = Color.new(0,182,255)
    Light_Blue = Color.new(64,128,255)
    Dark_Blue = Color.new(32,64,255)
    Purple = Color.new(182,64,255)
    Magenta = Color.new(156,156,255)
    #-----------------------------------------------------------------------------
    # Green's
    Green = Color.new(111,251,111)
    Candy_Green = Color.new(0,255,0)
    Dirty_Green = Color.new(128,182,0)
    Khaki_Green = Color.new(111,156,64)
    Turquoise = Color.new(0,255,182)
    #-----------------------------------------------------------------------------
    # Sets the default equipment text color
    Default_Equip_Color = White

    end #================================================= ==========================
    module General
    #================================================= ==============================
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ General Settings
    #-----------------------------------------------------------------------------
    # these settings are usined for visual scripts of mine, such as status screen.
    Fonts = ["VL Gothic"]
    Font_Size = 18
    Font_Bold = false
    #-----------------------------------------------------------------------------
    # Gauges = [ Color 1 , Color 2 ]
    Hp_Colors = [ Text_Color:irt_Orange , Text_Color::Gold ]
    Mp_Colors = [ Text_Color:ark_Blue , Text_Color::Sky_Blue ]
    Tp_Colors = [ Text_Color::Grey , Text_Color::Pure_Red ]
    Exp_Color = [ Text_Color:eep_Red , Text_Color:ark_Pink ]
    #-----------------------------------------------------------------------------
    # Show TP as a percentage ?
    # Only works in scripts i have written
    Show_Tp_As_Perc = false

    end #================================================= ==========================
    module Vocab
    #================================================= ==============================
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Vocabulary Settings
    #-----------------------------------------------------------------------------
    # This is where you would adjust the common vocab used in some of my scripts.
    #-----------------------------------------------------------------------------
    # Parameters
    def self.param(param_id)
    case param_id
    when 0 then "Жизнь" # "Health"
    when 1 then "Мана" # "Will"
    when 2 then "Атака" # "Attack"
    when 3 then "Защита" # "Defence"
    when 4 then "М.Атака" # "Magic"
    when 5 then "М.Защита" # "Aura"
    when 6 then "Ловкость" # "Speed"
    when 7 then "Удача" # "Luck"
    end
    end
    #-----------------------------------------------------------------------------
    # Tp vocab
    Tp = "Rage"
    #-----------------------------------------------------------------------------
    # X - Parameters
    def self.x_param(x_param_id)
    case x_param_id
    when 0 then "Accuracy"
    when 1 then "Evasion"
    when 2 then "Critical"
    when 3 then "Crit Eva"
    when 4 then "Mag Eva"
    when 5 then "Mag Ref"
    when 6 then "Counter"
    when 7 then "HP Regen"
    when 8 then "MP Regen"
    when 9 then "TP Regen"
    end
    end
    #-----------------------------------------------------------------------------
    # S - Parameters
    def self.s_param(s_param_id)
    case s_param_id
    when 0 then "Aggro"
    when 1 then "Guard"
    when 2 then "Recovery"
    when 3 then "Medicine"#Pharmacology
    when 4 then "MP Cost"
    when 5 then "TP Charge"
    when 6 then "P DMG Taken"
    when 7 then "M DMG Taken"
    when 8 then "Floor DMG"
    when 9 then "Exp Rate"
    end
    end
    #-----------------------------------------------------------------------------
    # Specials
    def self.specials(id)
    case id
    when 0 then "Auto-Fight"
    when 1 then "Guard"
    when 2 then "Substitue"
    when 3 then "Preserve TP"
    end
    end
    #-----------------------------------------------------------------------------
    # Collapse Type
    def self.collapse_type(id)
    case id
    when 0 then "Boss"
    when 1 then "Instant"
    when 2 then "No Vanish"
    end
    end
    #-----------------------------------------------------------------------------
    # Party Ability
    def self.party_ability(id)
    case id
    when 0 then "Encounter ½"
    when 1 then "Encounter NA"
    when 2 then "No Surprise"
    when 3 then "Pre-Emptive +"
    when 4 then "Gold Double"
    when 5 then "Double Drops"
    end
    end
    #-----------------------------------------------------------------------------
    # Various Statistics
    Attack_Speed = "Atk Speed"
    Attack_Times = "Atks Per Turn" # "APT"
    Skill_Type = "Skillset"
    Skill = "Skills"
    Equip_Type = "Equipable"
    Action_Times = "Action Time"
    Fixed = "Fixed "
    Sealed = "Sealed "
    Slot_Type = "Slot Type"
    Dual_Slot = "Dual Wield"
    One__Slot = "Single"
    #####################
    # CUSTOMISATION END #
    end #####################
    #☆★☆★☆★☆★☆★☆★☆★☆★ ★☆★☆★☆★☆★☆★☆★☆★☆ ★☆★☆★☆★☆★☆★☆★#
    # #
    # http://dekitarpg.wordpress.com/ #
    # #
    #★☆★☆★☆★☆★☆★☆★☆★☆ ☆★☆★☆★☆★☆★☆★☆★☆★ ☆★☆★☆★☆★☆★☆★☆#
    # The following code is protected under the 2013 Dekita Data Protection Act. #
    # Ie. The “Do Not Fucking Look” Law. #
    # Breaking This One And Only Rule May Result In The Following Side Effects : #
    # Eyes Bleeding, Nightmares, Severe Head Ache's AND A Scratch On Your Knee #
    # That is all ! #
    #★☆★☆★☆★☆★☆★☆★☆★☆ ☆★☆★☆★☆★☆★☆★☆★☆★ ☆★☆★☆★☆★☆★☆★☆#
    class Object
    #================================================= ==============================
    #-------------------------------------------------------------------------
    # rand_between
    #-------------------------------------------------------------------------
    def rand_between(min, max)
    min + rand(max - min + 1)
    end

    end

    #================================================= ==============================
    class Numeric
    #================================================= ==============================
    #---------------------------------------------------------------------------
    # To Float (with limited digits after decimal point)
    #---------------------------------------------------------------------------
    def to_flim(limit = 5, saftey = "0")
    str = self.to_f.to_s + saftey
    new_str = ""
    limit.times do |i|
    break if new_str =~ /[0-9].[0-9][0-9]/
    break if str[i] == nil
    new_str += str[i]
    end
    return new_str
    end
    #---------------------------------------------------------------------------
    # To A Percentage Of (num)
    #---------------------------------------------------------------------------
    def perc_of(num)
    self.to_f / num.to_f * 100.0
    end
    #---------------------------------------------------------------------------
    # Even ?
    #---------------------------------------------------------------------------
    def even?
    e = self.to_s
    e[e.size] == ("0"||"2"||"4"||"6"||"8")
    end
    #---------------------------------------------------------------------------
    # 0dd?
    #---------------------------------------------------------------------------
    def odd?
    o = self.to_s
    o[o.size] == ("1"||"3"||"5"||"7"||"9")
    end

    end

    #================================================= ==============================
    module Keys
    #================================================= ==============================
    #---------------------------------------------------------------------------
    # Win32API Information
    #---------------------------------------------------------------------------
    def self.w ; Win32API ; end
    def self.u ; "user32" ; end
    def self.i ; "i" ; end
    def self.gk ; "GetKeyState" ; end
    def self.ga ; "GetAsyncKeyState" ; end
    #---------------------------------------------------------------------------
    # Key Settings
    #---------------------------------------------------------------------------
    Key={
    # Func's
    :F1 => 0x70,:F2 => 0x71,:F3 => 0x72,:F4 => 0x73,:F5 => 0x74,:F6 => 0x75,
    :F7 => 0x76,:F8 => 0x77,:F9 => 0x78,:F10 => 0x7a,:F11 => 0x7b,:F12 => 0x7c,
    # Numbers
    :_0 => 0x30,:_1 => 0x31,:_2 => 0x32,:_3 => 0x33,:_4 => 0x34,
    :_5 => 0x35,:_6 => 0x36,:_7 => 0x37,:_8 => 0x38,:_9 => 0x39,
    # Letters
    :A => 0x41,:B => 0x42,:C => 0x43, => 0x44,:E => 0x45,:F => 0x46,:G => 0x47,
    :H => 0x48,:I => 0x49,:J => 0x4A,:K => 0x4B,:L => 0x4C,:M => 0x4D,:N => 0x4E,
    :O => 0x4F,:P => 0x50,:Q => 0x51,:R => 0x52,:S => 0x53,:T => 0x54,:U => 0x55,
    :V => 0x56,:W => 0x57,:X => 0x58,:Y => 0x59,:Z => 0x5A,
    # NumPad
    :N_0 => 0x60, :N_1 => 0x61, :N_2 => 0x62, :N_3 => 0x63, :N_4 => 0x64,
    :N_5 => 0x65, :N_6 => 0x66, :N_7 => 0x67, :N_8 => 0x68, :N_9 => 0x69,
    :ADD => 0x6b, :MUL => 0x6a, :SUB => 0x6d, IV => 0x6f, ECI => 0x6e,
    # Arrows
    :LEFT => 0x25, :RIGHT => 0x27, :UP => 0x26, OWN => 0x28,
    # Symbols
    :S_Colon => 0xBA, :Equal => 0xBB, :Comma => 0xBC, :Minus => 0xBD,
    :Period => 0xBE, :F_Slash => 0xBF, :HASH => 0xDE, :L_Sqr_Brack => 0xDB,
    :B_Slash => 0xDC, :R_Sqr_Brack => 0xDD, :S_Quote => 0xC0,
    # Other
    :SHIFT => 0x10, :LSHIFT => 0xa0, :RSHIFT => 0xa1, :TAB => 0x09,
    :PAUSE => 0x13, :L_CTRL => 0xa2, :R_CTRL => 0xa3, :CTRL => 0x11,
    :BACK => 0x08, :ENTER => 0x0D, :CAPS => 0x14, :SPACE => 0x20,
    :ESC => 0x1B, :ALT => 0x12, :PrtSc => 0x2c,
    } # << End Key {}
    #---------------------------------------------------------------------------
    # Constants
    #---------------------------------------------------------------------------
    KS = w.new(u,gk,[i],i)
    AK = w.new(u,ga,[i],i)
    #---------------------------------------------------------------------------
    # Variables
    #---------------------------------------------------------------------------
    @trigger = Array.new(256) { false }
    @presses = Array.new(256) { false }
    @release = Array.new(256) { false }
    @repeats = Array.new(256) { false }
    #---------------------------------------------------------------------------
    # Update All Key's State's
    #---------------------------------------------------------------------------
    def self.update
    @trigger = Array.new(256) { false }
    @release = Array.new(256) { false }
    Key.each do |key|
    akey = AK.call(key[1])
    ktri = KS.call(key[1])
    @trigger[ key[1] ] = true if ((!@presses[key[1]]) && (akey != 0))
    @release[ key[1] ] = true if (( @presses[key[1]]) && (akey == 0))
    @presses[ key[1] ] = (akey != 0) ? true : false
    @repeats[ key[1] ] = (ktri == 1) ? true : false
    end
    end
    #---------------------------------------------------------------------------
    # Key Got Triggered? [ inital key press ]
    #---------------------------------------------------------------------------
    def self.trigger?(key)
    return if key.nil?
    return @trigger[key]
    end
    #---------------------------------------------------------------------------
    # Key Got Released? [ inital key depress ]
    #---------------------------------------------------------------------------
    def self.release?(key)
    return if key.nil?
    return @release[key]
    end
    #---------------------------------------------------------------------------
    # Key Being Pressed Currently ?
    #---------------------------------------------------------------------------
    def self.press?(key)
    return if key.nil?
    return @presses[key]
    end
    #---------------------------------------------------------------------------
    # Key Turned On? [Caps Lock, Num Lock, ect..]
    #---------------------------------------------------------------------------
    def self.repeat?(key)
    return if key.nil?
    return @repeats[key]
    end

    end

    #================================================= ==============================
    module Input
    #================================================= ==============================
    #---------------------------------------------------------------------------
    # Alias List
    #---------------------------------------------------------------------------
    class << self
    alias :update_sD13x_Keys :update
    end
    #---------------------------------------------------------------------------
    # Update $D13x Keys
    #---------------------------------------------------------------------------
    def self.update(*args)
    update_sD13x_Keys(*args)
    Keys.update
    end

    end

    #================================================= ==============================
    module Cache
    #================================================= ==============================
    #--------------------------------------------------------------------------
    # * Get System Graphic
    #--------------------------------------------------------------------------
    def self.icon(filename = "IconSet", hue = 0)
    load_bitmap("Graphics/System/", filename, hue)
    end

    end

    #================================================= ==============================
    module DataManager
    #================================================= ==============================
    #---------------------------------------------------------------------------
    # Alias List
    #---------------------------------------------------------------------------
    class << self
    alias :lbd_unique_shits :load_database
    end
    #---------------------------------------------------------------------------
    # Load Database (alias)
    #---------------------------------------------------------------------------
    def self.load_database
    lbd_unique_shits
    loa_unique_shits
    end
    #---------------------------------------------------------------------------
    # Load Unique Shit
    #---------------------------------------------------------------------------
    def self.loa_unique_shits
    classes = [$data_weapons, $data_armors , $data_items , $data_skills ,
    $data_actors , $data_classes, $data_enemies, $data_states ]
    for g in classes
    for o in g
    next if o == nil
    o.load_unique_shit
    end
    end
    end

    end # << DataManager

    #================================================= ==============================
    class RPG::BaseItem
    #================================================= ==============================
    #--------------------------------------------------------------------------
    # Pi Variables
    #--------------------------------------------------------------------------
    attr_accessor :item_disp_color
    attr_accessor :database_id
    #--------------------------------------------------------------------------
    # Loads Unique Shit
    #--------------------------------------------------------------------------
    def load_unique_shit
    @database_id = @id
    load_item_color
    # << For use in Child Classes
    end
    #---------------------------------------------------------------------------
    # Load Item Text Color
    #---------------------------------------------------------------------------
    def load_item_color
    @item_disp_color = Text_Color:efault_Equip_Color
    if self.note.match(/<tcol.*),(.*),(.*)>/i)
    @item_disp_color = Color.new($1.to_i,$2.to_i,$3.to_i)
    end
    end
    #--------------------------------------------------------------------------
    # Returns features for item filtered by code (credits Tsukihime)
    #--------------------------------------------------------------------------
    def feature_val(code)
    self.features.select {|ft| ft.code == code}
    end
    #--------------------------------------------------------------------------
    # Returns features for item filtered by code and data ID (credits Tsukihime)
    #--------------------------------------------------------------------------
    def feature_val_with_id(code, data_id)
    self.features.select {|ft| ft.code == code && ft.data_id == data_id}
    end
    #--------------------------------------------------------------------------
    # Returns sum of all features for item, by code and data ID (credits Tsukihime)
    #--------------------------------------------------------------------------
    def features_sum(code, data_id)
    feature_val_with_id(code, data_id).inject(0.0) {|r, ft| r += ft.value }
    end
    #--------------------------------------------------------------------------
    # Returns features pi
    #--------------------------------------------------------------------------
    def features_pi(code, data_id)
    feature_val_with_id(code, data_id).inject(1.0) {|r, ft| r *= ft.value }
    end
    #--------------------------------------------------------------------------
    # Calculate Set Sum of Features
    #--------------------------------------------------------------------------
    def features_set(code)
    feature_val(code).inject([]) {|r, ft| r |= [ft.data_id] }
    end

    end

    #================================================= =============================
    class Game_Party < Game_Unit
    #================================================= =============================
    #-----------------------------------------------------------------------------
    # Get Battle Members
    #-----------------------------------------------------------------------------
    def alive_battle_members
    all_members[0, max_battle_members].select {|a| a.exist? && a.hp > 0 }
    end

    end

    #================================================= =============================
    class Window_Base < Window
    #================================================= =============================
    #--------------------------------------------------------------------------
    # Draw Gauge (w/height)
    #--------------------------------------------------------------------------
    def draw_deki_gauge(gx, gy, gw, gh, rate, color1, color2)
    empty_gauge_color = Color.new(0,0,0,128)
    fill_w = [(gw * rate).to_i, gw].min
    gauge_h = gh
    gauge_y = gy + line_height - 2 - gauge_h
    contents.fill_rect(gx, gauge_y, gw, gauge_h, empty_gauge_color)
    contents.gradient_fill_rect(gx, gauge_y, fill_w, gauge_h, color1, color2)
    end
    #--------------------------------------------------------------------------
    # Draw Hp
    #--------------------------------------------------------------------------
    def draw_de_hp(x, y, wid = nil)
    wid = self.width/2 - (standard_padding*2) if wid == nil
    rate = @actor.hp_rate
    color1 = General::Hp_Colors[0]
    color2 = General::Hp_Colors[1]
    draw_deki_gauge(x, y, wid-x-2, 2, rate, color1, color2)
    draw_text(x+4, y, wid, line_height, Vocab:aram(0))
    draw_text(x, y, wid-x-6, line_height, "#{@actor.hp}/#{@actor.mhp}",2)
    end
    #--------------------------------------------------------------------------
    # Draw Mp
    #--------------------------------------------------------------------------
    def draw_de_mp(x, y, wid = nil)
    wid = self.width/2 - (standard_padding*2) if wid == nil
    rate = @actor.mp_rate
    color1 = General::Mp_Colors[0]
    color2 = General::Mp_Colors[1]
    draw_deki_gauge(x, y, wid-x-2, 2, rate, color1, color2)
    draw_text(x+4, y, wid, line_height, Vocab:aram(1))
    draw_text(x, y, wid-x-6, line_height, "#{@actor.mp}/#{@actor.mmp}",2)
    end
    #--------------------------------------------------------------------------
    # Draw Tp
    #--------------------------------------------------------------------------
    def draw_de_tp(x, y, wid = nil)
    wid = self.width/2 - (standard_padding*2) if wid == nil
    rate = @actor.tp.to_i.to_f / @actor.max_tp.to_i
    color1 = General::Tp_Colors[0]
    color2 = General::Tp_Colors[1]
    draw_deki_gauge(x, y, wid-x-2, 2, rate, color1, color2)
    draw_text(x+4, y, wid, line_height, Vocab::Tp)
    text = "#{(@actor.tp).to_i}/#{@actor.max_tp.to_i}"
    text = "#{(@actor.tp.perc_of(@actor.max_tp)).to_flim} %" if General::Show_Tp_As_Perc
    draw_text(x, y, wid-x-6, line_height, text,2)
    end
    #--------------------------------------------------------------------------
    # Draw Exp (w/gauge)
    #--------------------------------------------------------------------------
    def draw_de_xp(x, y, gauge = true)
    s1 = @actor.current_level_exp
    s2 = @actor.next_level_exp
    s1_g = @actor.exp - @actor.current_level_exp
    s2_g = @actor.next_level_exp - @actor.current_level_exp
    wid = self.width/2 - (standard_padding*2)
    wid_b = self.width/2 - (standard_padding)
    rate = (s1_g).to_f / (s2_g)
    color1 = General::Exp_Color[0]
    color2 = General::Exp_Color[1]
    draw_deki_gauge(wid_b, y, wid-x-2, 2, rate, color1, color2) if gauge
    draw_text(wid_b+4, y, wid, line_height, "Exp:")
    draw_text(wid_b, y, wid-x-2, line_height, "#{@actor.exp}/#{s2}",2)
    end
    #--------------------------------------------------------------------------
    # Draw Icon (w/Hue)
    #--------------------------------------------------------------------------
    def draw_de_icon(icon_index, x, y, hue = 0, enabled = true)
    bitmap = Cache.icon("IconSet",hue)
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
    end

    end

    #================================================= =============================
    class Deki_Help < Window_Base
    #================================================= =============================
    #--------------------------------------------------------------------------
    # Object Initialization
    #--------------------------------------------------------------------------
    def initialize(line_number = 2)
    super(0, 0, Graphics.width/4*3, fitting_height(line_number))
    @item = nil
    end
    #--------------------------------------------------------------------------
    # Set Text
    #--------------------------------------------------------------------------
    def set_text(text)
    if text != @text
    @text = text
    refresh
    end
    end
    #--------------------------------------------------------------------------
    # Clear
    #--------------------------------------------------------------------------
    def clear
    set_text("")
    end
    #--------------------------------------------------------------------------
    # Set Item , item : Skills and items etc.
    #--------------------------------------------------------------------------
    def set_item(item)
    return if @item == item
    @item = item
    refresh
    set_text(item ? item.description : "")
    end
    #--------------------------------------------------------------------------
    # Refresh
    #--------------------------------------------------------------------------
    def refresh
    contents.clear
    draw_text_ex(4, 0, @text)
    end
    #--------------------------------------------------------------------------
    # Reset Font Settings
    #--------------------------------------------------------------------------
    def reset_font_settings
    change_color(normal_color)
    self.contents.font.name = General::Fonts
    self.contents.font.size = General::Font_Size
    self.contents.font.bold = General::Font_Bold
    end

    end

    #================================================= =============================#
    # http://dekitarpg.wordpress.com/ #
    #================================================= =============================#
    end # if true # << Make true to use this script, false to disable.


    Спойлер скрипт:
    if true # << Make true to use this script, false to disable.
    #================================================= ==============================
    #
    # ☆ $D13x - Common Event Keys
    # -- Author : Dekita
    # -- Version : 1.1
    # -- Level : Easy / Normal
    # -- Requires : $D13x Core v1.6
    # -- Engine : RPG Maker VX Ace.
    #
    #================================================= ==============================
    # ☆ Import
    #-------------------------------------------------------------------------------
    $D13x={}if$D13x==nil
    $D13x[:Common_Ev_Keys]=true
    #================================================= ==============================
    # ☆ Updates
    #-------------------------------------------------------------------------------
    # D /M /Y
    # 17/o5/2o13 - Update, (Key Menu HUD now shows Event Keys)
    # o4/o4/2o13 - Started, Finished,
    #
    #================================================= ==============================
    # ☆ Introduction
    #-------------------------------------------------------------------------------
    # This script simply allows for common events to be triggered when a key has
    # been triggered (initially pressed), you can have as many common event keys
    # as you wish.
    # Option to disable each common event key with its own switch.
    # And the option to disable all common event keys while moving.
    #
    #================================================= ==============================
    # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★
    #================================================= ==============================
    # 1. You MUST give credit to "Dekita" !!
    # 2. You are NOT allowed to repost this script.(or modified versions)
    # 3. You are NOT allowed to convert this script.
    # 4. You are NOT allowed to use this script for Commercial games.
    # 5. ENJOY!
    #
    # "FINE PRINT"
    # By using this script you hereby agree to the above terms and conditions,
    # if any violation of the above terms occurs "legal action" may be taken.
    # Not understanding the above terms and conditions does NOT mean that
    # they do not apply to you.
    # If you wish to discuss the terms and conditions in further detail you can
    # contact me at http://dekitarpg.wordpress.com/
    #
    #================================================= ==============================
    # ☆ Instructions
    #-------------------------------------------------------------------------------
    # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
    #
    #================================================= ==============================
    # ☆ HELP
    #-------------------------------------------------------------------------------
    # For a list of possible key symbols check the help section of the
    # $D13x core script.
    #
    #================================================= ==============================
    module CMN_Ev_Keys
    #================================================= ==============================
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ General Settings
    #-----------------------------------------------------------------------------
    # Make this false to dis-allow common events to be triggered
    # while player is moving.
    Trigger_While_Move = true

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # ☆ Event Key Settings
    #-----------------------------------------------------------------------------
    # :ID = the id of the key to press for the event to trigger.
    # event = is the id of the common event to trigger
    # switch = the id of the switch to enable/disable the key trigger
    # ^- leave switch 0 to always allow the key to trigger the event.
    # show, x, y, icon && hue are only used if using my key menu HUD script.
    Triggers=[
    # [ :ID , Event , switch , show?, x , y , icon , hue]
    [ :A , 2 , 5 , true , 184, 2 , 114 , 0 ],
    [ :S , 3 , 5 , true , 184, 2 , 114 , 0 ],
    [ :E , 4 , 5 , false , 184, 2 , 114 , 0 ],
    [ , 1 , 5 , false , 184, 2 , 114 , 0 ],
    [ :F8 , 6 , 50 , false , 184, 2 , 114 , 0 ],
    [ :TAB , 7 , 50 , false , 184, 2 , 114 , 0 ],
    [ :M , 8 , 50 , false , 184, 2 , 114 , 0 ],
    [ :CTRL , 9 , 50 , false , 184, 2 , 114 , 0 ],
    # << Add more [key,event,switch], here.
    ]# << Keep
    #####################
    # CUSTOMISATION END #
    end #####################
    #☆★☆★☆★☆★☆★☆★☆★☆★ ★☆★☆★☆★☆★☆★☆★☆★☆ ★☆★☆★☆★☆★☆★☆★#
    # #
    # http://dekitarpg.wordpress.com/ #
    # #
    #★☆★☆★☆★☆★☆★☆★☆★☆ ☆★☆★☆★☆★☆★☆★☆★☆★ ☆★☆★☆★☆★☆★☆★☆#
    #================================================= ==============================#
    # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
    # YES?\.\. #
    # OMG, REALLY? \| #
    # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
    # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
    #================================================= ==============================#
    module CMN_Ev_Keys
    #================================================= ==============================
    #--------------------------------------------------------------------------
    # Update Method For Common Event Triggers
    #--------------------------------------------------------------------------
    def update_cmn_ev_keys
    return unless !$game_map.interpreter.running?
    return if $game_player.moving? unless Trigger_While_Move
    Triggers.each do |block|
    next if (block[2] != 0) && (!$game_switches[block[2]])
    if (Keys.trigger?(Keys::Key[block[0]])) && (block[1] != 0)
    $game_temp.reserve_common_event( block[1] )
    end
    end
    end

    end

    #================================================= ==============================
    class Scene_Map < Scene_Base
    #================================================= ==============================
    #--------------------------------------------------------------------------
    # Included Modules
    #--------------------------------------------------------------------------
    include CMN_Ev_Keys
    #--------------------------------------------------------------------------
    # Alias List
    #--------------------------------------------------------------------------
    alias :update_deki_cmnevs :update
    #--------------------------------------------------------------------------
    # Frame Update
    #--------------------------------------------------------------------------
    def update
    update_deki_cmnevs
    update_cmn_ev_keys
    end

    end

    #================================================= =============================#
    # http://dekitarpg.wordpress.com/ #
    #================================================= =============================#
    end # if true # << Make true to use this script, false to disable.


    Может кто знает какой другой скрипт для этой задачи или можно сделать на ивентах???
    Последний раз редактировалось Imaginatium; 10.08.2016 в 22:18.

  4. #4114
    Маститый Аватар для Yuryol
    Информация о пользователе
    Регистрация
    06.03.2014
    Адрес
    Красноярск
    Сообщений
    1,420
    Записей в дневнике
    44
    Репутация: 60 Добавить или отнять репутацию

    По умолчанию

    сделай событием использование эффекта зелья (например прибавка хп) а затем убавление соответствующего бутылька с зельем

  5. #4115
    Хранитель Аватар для Imaginatium
    Информация о пользователе
    Регистрация
    06.12.2015
    Адрес
    АСТРАЛ
    Сообщений
    2,061
    Записей в дневнике
    51
    Репутация: 71 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от Yuryol Посмотреть сообщение
    сделай событием использование эффекта зелья (например прибавка хп) а затем убавление соответствующего бутылька с зельем
    Это хорошая идея, а как же быть например с еденицами так называемого "TP" и с испоьзованием навыка?

  6. #4116
    Авторитет Аватар для Bloody
    Информация о пользователе
    Регистрация
    22.04.2008
    Сообщений
    1,752
    Записей в дневнике
    94
    Репутация: 36 Добавить или отнять репутацию

    По умолчанию

    Если у тебя один персонаж, то можно легко привязать использование навыков и предметов на определенные кнопки, используя общие события с условиями. Типа
    > проверяем нажата ли кнопка
    >> проверяем количество зелий (если 0 - отмена или выдача текстов "зелий немаэ")
    >>> проверяем количество здоровья у персонажа, если ниже максимального - пополняем на заданное количество
    >>>> отнимаем одно зелье из инвентаря

    если это навык, то отнимает не количество вещей, а количество маны и т.д.
    Проекты:
    Мини-игры: El Presidente -- Red & Blue -- Roll Me Away -- Wizard's Revenge
    На перерыве: Mémoire
    Кажется, заброшены: Street Magic -- Hack in the Dark

  7. #4117
    Местный Аватар для Gforce_Vtk
    Информация о пользователе
    Регистрация
    04.04.2016
    Адрес
    Волгоград.
    Сообщений
    171
    Записей в дневнике
    18
    Репутация: 26 Добавить или отнять репутацию

    По умолчанию

    Эм... Что делать с этим? Skript "window_base" line 310 NoMethodError occured undifened method "upcase" for nil:NilClass
    Мой проект

  8. #4118
    Маститый Аватар для Alisa
    Информация о пользователе
    Регистрация
    29.08.2013
    Сообщений
    1,425
    Записей в дневнике
    8
    Репутация: 76 Добавить или отнять репутацию

    По умолчанию

    Подскажите пожалуйста. Есть ли способ, поймать значение переменной движущегося события?
    Например, в героя летит камень, стоит событие, при котором, если Х героя на карте и Y героя на карте совпадают с текущим положением события на карте.
    Условия совпали = отнять одну жизнь.

  9. #4119
    Хранитель Форума Аватар для Валера
    Информация о пользователе
    Регистрация
    15.04.2008
    Адрес
    Москва
    Сообщений
    14,006
    Записей в дневнике
    3
    Репутация: 166 Добавить или отнять репутацию

    По умолчанию

    Параллельное событие должно схватить. Если нет множества других параллельных событий.

    Спойлер И как тебе не стыдно-то, а, Валера?:


    Оборона форта: http://rghost.ru/8kLGxFtD2
    Сделать, чтоб все происходило, как я хочу, - вот, собственно, и весь мейкер!
    Адский Рейд: http://rpgmaker.su/vbdownloads.php?d...downloadid=106

  10. #4120
    Гость Аватар для DesKarD
    Информация о пользователе
    Регистрация
    01.08.2015
    Адрес
    город Ромдо
    Сообщений
    486
    Записей в дневнике
    2
    Репутация: 14 Добавить или отнять репутацию

    По умолчанию

    Можно вызовом скрипта проверить...
    $game_map.events[ID].x == N && $game_map.events[ID].y == N


    [сюда ID события ]
    x== коордиата

Страница 412 из 643 ПерваяПервая ... 312362402410411412413414422462512 ... ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 9 (пользователей: 0 , гостей: 9)

Метки этой темы

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Общие вопросы