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] Weapon's Bullet

Topik sebelumnya Topik selanjutnya Go down 
Pilih halaman : Previous  1, 2
[VX] Weapon's Bullet - Page 2 Empty2011-11-09, 10:11
Post[VX] Weapon's Bullet
#1
DrDhoom 
Doomed Zombie
DrDhoom

Level 5
Posts : 629
Thanked : 22
Engine : Multi-Engine User
Skill : Intermediate
Type : Scripter

[VX] Weapon's Bullet - Page 2 Vide
First topic message reminder :

Weapon's Bullet
Versi: 1. 0
Tipe: Misc


Pengenalan

Iseng-iseng kepikiran untuk bikin ini script


Fitur


  • Membuat senjata membutuhkan peluru untuk memakainya
  • Jumlah penggunaan dan damage dari peluru dapat diatur
  • easy to use



Screenshots

Tidak ada


Demo

For Default BS
Code:
http://www.media*fire.com/?cy9p2t4mbmr90n5

For Tankentai BS
Code:
http://www.media*fire.com/?q404h90rs68u4js


Scripts
For Default BS
Code:
#===============================================================================
#--------------------------=• Weapon's Bullet •=---------------------------------
#---------------------------=• by: DrDhoom •=-----------------------------------
# Version: 1.2
# Date Published: 11 - 11 - 2011
# RPGMakerID Community
#-------------------------------------------------------------------------------
# Introduction:
# With this script, Player must have an ammo of specified weapon to use it.
#-------------------------------------------------------------------------------
# Compatibility:
# Note: not tested in other battle system
#-------------------------------------------------------------------------------
# How to use:
#  - Insert this script above Main
#-------------------------------------------------------------------------------
# Changelog:
# 09/11/2011 : •Starting
#              •v1.0 publish base script
#              •v1.1 added skill ammunition
# 11/11/2011 : •v1.2 added ammunition usage and damage
#===============================================================================

module Dhoom
   module Bullet
      TEXT = "Run out of ammo." #The text that appear if the ammo is run out
      
      #Don't do anything with this------------------------------------------------
      BULLET = []
      BULLET_PROP = []
      #---------------------------------------------------------------------------
      
      #BULLET[Weapon ID] = [Item ID]
      BULLET[4] = [22]
    BULLET[11] = [21,22,23]
      
      #Define the bullet damage and usage. If bullet not defined, it will use
      #default value
      
      #DEFAULT_PROP = [Usage, Damage]
      DEFAULT_PROP = [1, 0]
      
      #BULLET_PROP[Item ID] = [Usage, Damage]
      BULLET_PROP[21] = [4, 20]
    BULLET_PROP[23] = [2, 5]
      
      #SKILL_NEED_AMMO = [skill ID]
      SKILL_NEED_AMMO = [83,84]
   end
end

class Scene_Battle
 
   include Dhoom::Bullet
   
   def check_ammo
      if BULLET[@active_battler.weapon_id] != nil
         @item = nil
         for i in 0..BULLET[@active_battler.weapon_id].size-1
            if $game_party.items.include?($data_items[BULLET[@active_battler.weapon_id][i]])
               if BULLET_PROP[BULLET[@active_battler.weapon_id][i]] != nil
                  if $game_party.item_number($data_items[BULLET[@active_battler.weapon_id][i]]) >= BULLET_PROP[BULLET[@active_battler.weapon_id][i]][0]
                     @item = $data_items[BULLET[@active_battler.weapon_id][i]]
                     break
                  end
               elsif $game_party.item_number($data_items[BULLET[@active_battler.weapon_id][i]]) >= DEFAULT_PROP[0]
                  @item = $data_items[BULLET[@active_battler.weapon_id][i]]
                  break
               end
            end
         end
         if @item != nil
            if BULLET_PROP[@item.id] != nil
               $game_party.lose_item(@item, BULLET_PROP[@item.id][0])
          @include_ammo = true
            else
               $game_party.lose_item(@item, DEFAULT_PROP[0])
          @include_ammo = true
            end
         else
            @include_ammo = false
         end
      end
   end
 
  def ammo_atk_plus
    if @include_ammo
      if BULLET_PROP[@item.id] != nil
        @active_battler.atk += BULLET_PROP[@item.id][1]
      else
        @active_battler.atk += DEFAULT_PROP[1]
      end
    end   
  end
 
  def ammo_atk_minus
    if @include_ammo
      if BULLET_PROP[@item.id] != nil
        @active_battler.atk -= BULLET_PROP[@item.id][1]
      else
        @active_battler.atk -= DEFAULT_PROP[1]
      end
    end   
  end
   
   def execute_action_attack
      if @active_battler.actor?
         check_ammo
         if @include_ammo
        ammo_atk_plus
            text = sprintf(Vocab::DoAttack, @active_battler.name)
            @message_window.add_instant_text(text)
            targets = @active_battler.action.make_targets
            display_attack_animation(targets)
            wait(20)
            for target in targets
               target.attack_effect(@active_battler)
               display_action_effects(target)
            end
        ammo_atk_minus
            @include_ammo = false
         else
            @message_window.add_instant_text(TEXT)
            wait(40)
         end
      else
         text = sprintf(Vocab::DoAttack, @active_battler.name)
         @message_window.add_instant_text(text)
         targets = @active_battler.action.make_targets
         display_attack_animation(targets)
         wait(20)
         for target in targets
            target.attack_effect(@active_battler)
            display_action_effects(target)
         end
      end
   end
   
   def execute_action_skill
      if @active_battler.actor?
         if SKILL_NEED_AMMO.include?(@active_battler.action.skill.id)      
        check_ammo
        if @include_ammo
          ammo_atk_plus
          skill = @active_battler.action.skill
          text = @active_battler.name + skill.message1
          @message_window.add_instant_text(text)
          unless skill.message2.empty?
            wait(10)
            @message_window.add_instant_text(skill.message2)
          end
          targets = @active_battler.action.make_targets
          display_animation(targets, skill.animation_id)
          @active_battler.mp -= @active_battler.calc_mp_cost(skill)
          $game_temp.common_event_id = skill.common_event_id
          for target in targets
            target.skill_effect(@active_battler, skill)
            display_action_effects(target, skill)
          end
          ammo_atk_minus
          @include_ammo = false
        else
          @message_window.add_instant_text(TEXT)
          wait(40)
        end
         else       
            skill = @active_battler.action.skill
            text = @active_battler.name + skill.message1
            @message_window.add_instant_text(text)
            unless skill.message2.empty?
               wait(10)
               @message_window.add_instant_text(skill.message2)
            end
            targets = @active_battler.action.make_targets
            display_animation(targets, skill.animation_id)
            @active_battler.mp -= @active_battler.calc_mp_cost(skill)
            $game_temp.common_event_id = skill.common_event_id
            for target in targets
               target.skill_effect(@active_battler, skill)
               display_action_effects(target, skill)
            end
         end
      else
         skill = @active_battler.action.skill
         text = @active_battler.name + skill.message1
         @message_window.add_instant_text(text)
         unless skill.message2.empty?
            wait(10)
            @message_window.add_instant_text(skill.message2)
         end
         targets = @active_battler.action.make_targets
         display_animation(targets, skill.animation_id)
         @active_battler.mp -= @active_battler.calc_mp_cost(skill)
         $game_temp.common_event_id = skill.common_event_id
         for target in targets
            target.skill_effect(@active_battler, skill)
            display_action_effects(target, skill)
         end
      end
   end
end

#===============================================================================
# End
#===============================================================================

For Tankentai SBS
Code:
#===============================================================================
#-------------------=• Weapon's Bullet for Tankentai •=-------------------------
#---------------------------=• by: DrDhoom •=-----------------------------------
# Version: 1.2
# Date Published: 11 - 11 - 2011
# RPGMakerID Community
#-------------------------------------------------------------------------------
# Introduction:
# With this script, Player must have an ammo of specified weapon to use it.
#-------------------------------------------------------------------------------
# Compatibility:
# Note: not tested in other battle system
#-------------------------------------------------------------------------------
# How to use:
#  - Insert this script above Main
#-------------------------------------------------------------------------------
# Changelog:
# 09/11/2011 : •Starting
#              •v1.0 publish base script
#              •v1.1 added skill ammunition
# 11/11/2011 : •v1.2 added ammunition usage and damage
#===============================================================================

module Dhoom
   module Bullet
      TEXT = "Run out of ammo." #The text that appear if the ammo is run out
      
      #Don't do anything with this------------------------------------------------
      BULLET = []
      BULLET_PROP = []
      #---------------------------------------------------------------------------
      
      #BULLET[Weapon ID] = [Item ID]
      BULLET[4] = [22]
    BULLET[11] = [21,22,23]
      
      #Define the bullet damage and usage. If bullet not defined, it will use
      #default value
      
      #DEFAULT_PROP = [Usage, Damage]
      DEFAULT_PROP = [1, 0]
      
      #BULLET_PROP[Item ID] = [Usage, Damage]
      BULLET_PROP[21] = [4, 20]
    BULLET_PROP[23] = [2, 5]
      
      #SKILL_NEED_AMMO = [skill ID]
      SKILL_NEED_AMMO = [83,84]
   end
end

class Scene_Battle
 
   include Dhoom::Bullet
   
   def check_ammo
      if BULLET[@active_battler.weapon_id] != nil
         @item = nil
         for i in 0..BULLET[@active_battler.weapon_id].size-1
            if $game_party.items.include?($data_items[BULLET[@active_battler.weapon_id][i]])
               if BULLET_PROP[BULLET[@active_battler.weapon_id][i]] != nil
                  if $game_party.item_number($data_items[BULLET[@active_battler.weapon_id][i]]) >= BULLET_PROP[BULLET[@active_battler.weapon_id][i]][0]
                     @item = $data_items[BULLET[@active_battler.weapon_id][i]]
                     break
                  end
               elsif $game_party.item_number($data_items[BULLET[@active_battler.weapon_id][i]]) >= DEFAULT_PROP[0]
                  @item = $data_items[BULLET[@active_battler.weapon_id][i]]
                  break
               end
            end
         end
         if @item != nil
            if BULLET_PROP[@item.id] != nil
               $game_party.lose_item(@item, BULLET_PROP[@item.id][0])
          @include_ammo = true
            else
               $game_party.lose_item(@item, DEFAULT_PROP[0])
          @include_ammo = true
            end
         else
            @include_ammo = false
         end
      end
   end
 
  def ammo_atk_plus
    if @include_ammo
      if BULLET_PROP[@item.id] != nil
        @active_battler.atk += BULLET_PROP[@item.id][1]
      else
        @active_battler.atk += DEFAULT_PROP[1]
      end
    end   
  end
 
  def ammo_atk_minus
    if @include_ammo
      if BULLET_PROP[@item.id] != nil
        @active_battler.atk -= BULLET_PROP[@item.id][1]
      else
        @active_battler.atk -= DEFAULT_PROP[1]
      end
    end   
  end
   
   def execute_action_attack
      if @active_battler.actor?
         check_ammo
         if @include_ammo
        ammo_atk_plus
            if @active_battler.weapon_id == 0
          action = @active_battler.non_weapon
          immortaling
        else 
          action = $data_weapons[@active_battler.weapon_id].base_action
          if $data_weapons[@active_battler.weapon_id].state_set.include?(1)
            for member in $game_party.members + $game_troop.members
              next if member.immortal
              next if member.dead?
            member.dying = true
            end
          else
            immortaling
          end
        end
        ammo_atk_minus
            @include_ammo = false
         else
            @help_window.set_text(TEXT, 1)
        @help_window.visible = true
        @active_battler.active = false
        wait(45)
        @help_window.visible = false
        immortaling
        return
         end
      else
         if @active_battler.weapon == 0
        action = @active_battler.base_action
        immortaling
      else
        action = $data_weapons[@active_battler.weapon].base_action
        if $data_weapons[@active_battler.weapon].state_set.include?(1)
          for member in $game_party.members + $game_troop.members
            next if member.immortal
            next if member.dead?
            member.dying = true
          end
        else
          immortaling
        end
      end 
    end
    target_decision
    @spriteset.set_action(@active_battler.actor?, @active_battler.index, action)
    playing_action
   end
   
   def execute_action_skill
      if @active_battler.actor?
         if SKILL_NEED_AMMO.include?(@active_battler.action.skill.id)      
        check_ammo
        if @include_ammo
          ammo_atk_plus
          skill = @active_battler.action.skill
          return unless @active_battler.action.valid?
          if skill.plus_state_set.include?(1)
            for member in $game_party.members + $game_troop.members
              next if member.immortal
              next if member.dead?
              member.dying = true
            end
          else
            immortaling
          end
          target_decision(skill)
          @spriteset.set_action(@active_battler.actor?, @active_battler.index, skill.base_action)
          pop_help(skill)
          playing_action
          @active_battler.mp -= @active_battler.calc_mp_cost(skill)
          @status_window.refresh
          $game_temp.common_event_id = skill.common_event_id
          ammo_atk_minus
          @include_ammo = false
        else
          @help_window.set_text(TEXT, 1)
          @help_window.visible = true
          @active_battler.active = false
          wait(45)
          @help_window.visible = false
          immortaling
          return
        end
         else       
            skill = @active_battler.action.skill
        return unless @active_battler.action.valid?
        if skill.plus_state_set.include?(1)
          for member in $game_party.members + $game_troop.members
            next if member.immortal
            next if member.dead?
            member.dying = true
          end
        else
          immortaling
        end
        target_decision(skill)
        @spriteset.set_action(@active_battler.actor?, @active_battler.index, skill.base_action)
        pop_help(skill)
        playing_action
        @active_battler.mp -= @active_battler.calc_mp_cost(skill)
        @status_window.refresh
        $game_temp.common_event_id = skill.common_event_id
         end
      else
         skill = @active_battler.action.skill
      return unless @active_battler.action.valid?
      if skill.plus_state_set.include?(1)
        for member in $game_party.members + $game_troop.members
          next if member.immortal
          next if member.dead?
          member.dying = true
        end
      else
        immortaling
      end
      target_decision(skill)
      @spriteset.set_action(@active_battler.actor?, @active_battler.index, skill.base_action)
      pop_help(skill)
      playing_action
      @active_battler.mp -= @active_battler.calc_mp_cost(skill)
      @status_window.refresh
      $game_temp.common_event_id = skill.common_event_id
      end
   end
end

#===============================================================================
# End
#===============================================================================


Credits


  • DrDhoom


Terakhir diubah oleh DrDhoom tanggal 2011-11-11, 17:10, total 4 kali diubah

[VX] Weapon's Bullet - Page 2 Empty2011-11-11, 17:12
PostRe: [VX] Weapon's Bullet
DrDhoom 
Doomed Zombie


Posts : 629

[VX] Weapon's Bullet - Page 2 Vide
@mai: terima kasih kembali :D
btw, Script UPDATED. sekarang sudah ditambahkan jumlah peluru yang diperlukan dan damage dari peluru. dan juga sudah ada demonya. ;)
[VX] Weapon's Bullet - Page 2 Empty2011-12-19, 17:36
PostRe: [VX] Weapon's Bullet
ashm 
Veteran
Veteran
ashm

Level 5
Posts : 1131
Thanked : 8
Engine : RMVX Ace
Skill : Intermediate
Type : Event Designer
Awards:

[VX] Weapon's Bullet - Page 2 Vide
Moga2 gak necro, amin.

Begini pak dokter XD
1. Tadinya saya ragu dgn damage system nya, maka saya (di konfigurasi tentunya) membuat sebuah ammo dgn damage 999, nah ammo itu adl requirement tiap nembak pake pedang (yeah... Just dummy).
Tapi damage output nya masih normal. Dan ammo nya berkurang tetep.
2. Dok, saya kurang paham skill_need ammo karena hanya bisa di isi skill ID. Dimana kuantitas, jenis ammo, dan tambahan damage nya.
3. Ama yg terakhir, bisa gak di enchant gak cuma item aja.
Tapi gold juga. Maklum jadi inget coin shot.

Maap ngerepotin :D
[VX] Weapon's Bullet - Page 2 Empty2011-12-19, 23:29
PostRe: [VX] Weapon's Bullet
DrDhoom 
Doomed Zombie
DrDhoom

Level 5
Posts : 629
Thanked : 22
Engine : Multi-Engine User
Skill : Intermediate
Type : Scripter

[VX] Weapon's Bullet - Page 2 Vide
kucoba jawab satu"
1. Mngkin krna batas maks Attack power untuk vx yg cuman 999 :hmm: ntar kulihat lagi
2. Skill need ammo, artinya kalau ammo untuk senjata yang sedang dipakai ga ada, maka skill nya ga bisa diaktifin. Jenis ammo sesuai dengan senjata :hmm:
3. Menarik... nanti aku coba tmbhin :hmm:
[VX] Weapon's Bullet - Page 2 Empty2011-12-20, 04:14
PostRe: [VX] Weapon's Bullet
Oscar 
Senior
Senior
Oscar

Level 5
Posts : 830
Thanked : 13
Engine : RMVX
Skill : Beginner
Type : Writer

[VX] Weapon's Bullet - Page 2 Vide
Dhoom, coba digabung dengan scriopt notetag :v , kalo bisa :D

ditankentai update 6 bulan yang lalu ada itu scriptnya ;)
[VX] Weapon's Bullet - Page 2 Empty2011-12-20, 10:35
PostRe: [VX] Weapon's Bullet
DrDhoom 
Doomed Zombie
DrDhoom

Level 5
Posts : 629
Thanked : 22
Engine : Multi-Engine User
Skill : Intermediate
Type : Scripter

[VX] Weapon's Bullet - Page 2 Vide
kucoba dulu deh, mslhnya aku ga gitu ngerti ama notetag ini :hammer:
[VX] Weapon's Bullet - Page 2 Empty
PostRe: [VX] Weapon's Bullet
Sponsored content 




[VX] Weapon's Bullet - Page 2 Vide
 

[VX] Weapon's Bullet

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 2 dari 2Pilih halaman : Previous  1, 2

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