| Event pake item sebagai obor | |
|
2010-12-10, 19:08 | Event pake item sebagai obor |
---|
night_thinker Newbie
Posts : 5 Thanked : 0 Engine : RMVX Skill : Intermediate Type : Developer
| ijin nyumbang demo pakai item obor ya.... ini demonya... - Spoiler:
http://www.media fire.com/?tci81sq15b6x6cx
ini scriptnya yang sudah di sesuaikan - Spoiler:
#=============================================================================== # † [VX] † Rei Limited Vision(torch version) † † # † Limit player's visibility with a picture † #------------------------------------------------------------------------------- # by reijubv [aruyasoft@comic.com] # Rpgrevolution.com # Released on: 12/06/2009 # Translate and edit for indonesian : # Night_thinker (rmid.forumotion.net) #------------------------------------------------------------------------------- # > Changelog: # V.1.0 (12-06-09) = Initial release # V.1.1 (15-06-09) = > Dapat ON/OFF # > Menghapus baris script yang tidak dibutuhkan # > Merubah gambar dengan mudah # > dapat mengganti warna dengan mudah # V.1.2 (21-06-09) = > Visibilitas diperbaiki untuk party # > dapat menggunakan KGC's DayNight #------------------------------------------------------------------------------- # Script ini menggunakan gambar av,av1,av2,av3,av4 #------------------------------------------------------------------------------- # Gambar harus sangat besar disesuaikan dengan map # sekitar 2000x2000 pixels atau lebih sesuaikan dengan kebutuhan # demo ini menggunakan 2048x2048 pixels. #------------------------------------------------------------------------------- # How to use : # Gunakan control switch dan variable #------------------------------------------------------------------------------- # untuk membuat efek state gunakan di notes dengan memasukan kode dibawah # %mod (num) # Ganti (num) dengan yang kamu mau untuk visibilitas jarak. # Contoh : # %mod -70 = > mengurangi jarak sampai 70% # %mod 120 = > menambah jarak sampai 120% # Yang di atas kalau mau buat state yang effeknya jadi kayak obor tetapi jarak # pandang berbeda dengan mengurangi atau menambahkan... #------------------------------------------------------------------------------- # Credits: # Night_thinker # Thanks to : # Reijubv and # Woratana for his picture under character script #------------------------------------------------------------------------------- # Installation: # Taruh di material #===============================================================================
$imported = {} if $imported == nil $imported["ReiLimitedVision"] = true
#--------------------------------------------------------------------------- # ** Rei Module #--------------------------------------------------------------------------- module Rei module LimitedVision TOG = 1 HFR = 0 IZX = 1 IZY = 1 RUN = -30 STD = 50 LGT = 15 BUT = Input::F5 RWL = 20 SWL = 80 DLY = 10 KTS = false # true = kalau pake script KTS, false = gak pake KTS KGC = false # true = kalau pake KGC's DayNight, false = gak # dibawah sini kalau pake script kts atau kgc # -- di luar MAP tanpa KTS -- INT = -50 # saat malam , visibilitas akan ON/OFF dengan % IMN = 50 # saat pagi , visibilitas akan ON/OFF dengan % IDY = 75 # saat siang , visibilitas akan ON/OFF dengan % IEN = -25 # saat sore , visibilitas akan ON/OFF dengan % # -- diluar MAP pake KTS -- ONT = -30 # saat malam , visibilitas akan ON/OFF dengan % OMN = 75 # saat pagi , visibilitas akan ON/OFF dengan % ODY = 100 # saat siang , visibilitas akan ON/OFF dengan % OEN = -10 # saat sore , visibilitas akan ON/OFF dengan % # V.1.1 #---- VSP = [] # < JANGAN DIHAPUS #---- USV = 0 # kontrol variable untuk mengganti visibilitas VSP[0] = "av" # < gambar no.0 VSP[1] = "av1" # < gambar no.1 VSP[2] = "av2" # < gambar no.2 VSP[3] = "av3" # < gambar no.3 VSP[4] = "av4" # < gambar no.4 # boleh lebih silahkan SET = 0 # set visibilitas gambar dan atur dengan yang di bawah ini TON = Tone.new(0,0,0,255) # kalau mau ganti visibilitas pake script dibawah ini, # use REI::LIMITEDVISION::TON = Tone.new(r,g,b,a) # contoh : REI::LIMITEDVISION::TON = Tone.new(255,0,0,255) # r = red, g = green, b = blue, a = alpha/grey end end
#------------------------------------------------------------------------------ # pengeditan di bawah ini menyebabkan kepala pusing dan game error #------------------------------------------------------------------------------
#------------------------------------------------------------------------------ # Module RPG #------------------------------------------------------------------------------ module RPG class State def mod_vis self.note.each_line {|line| return line.gsub!('%mod ', '').chomp.to_i if line.include?('%mod ') } return 0 end end end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs the map screen processing. #============================================================================== class Scene_Map < Scene_Base # Alias things alias reilimitedvisioninit initialize unless method_defined?('reilimitedvisioninit') alias reilimitedvisionstart start unless method_defined?('reilimitedvisionstart') alias reilimitedvisionupdate update unless method_defined?('reilimitedvisionupdate') alias reilimitedvisionterminate terminate unless method_defined?('reilimitedvisionterminate') #-------------------------------------------------------------------------- # * Initialize #-------------------------------------------------------------------------- def initialize $reivisibility_sprite = Game_Picture.new(21) reilimitedvisioninit end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start if $game_switches[Rei::LimitedVision::TOG] index = $game_variables[Rei::LimitedVision::USV] @pic = Rei::LimitedVision::VSP[index] $reivisibility_sprite.show(@pic,1,getvis[0],getvis[1], Rei::LimitedVision::IZX+Rei::LimitedVision::STD+mod_state_range[0], Rei::LimitedVision::IZY+Rei::LimitedVision::STD+mod_state_range[1],255, 0) dovisibilitythingy(1) @showed = true end reilimitedvisionstart end #-------------------------------------------------------------------------- # * Get modified range by states #-------------------------------------------------------------------------- def mod_state_range result = [0,0] for actor in $game_party.members next if actor.states.empty? for state in actor.states next if state.nil? or state.mod_vis == 0 zoomx = state.mod_vis zoomy = state.mod_vis result = [zoomx,zoomy] end end return result end #-------------------------------------------------------------------------- # * Setup visibility coordinate #-------------------------------------------------------------------------- def getvis result = [] case $game_player.direction when 2 x = $game_player.screen_x y = $game_player.screen_y + Rei::LimitedVision::HFR when 4 x = $game_player.screen_x - Rei::LimitedVision::HFR y = $game_player.screen_y when 6 x = $game_player.screen_x + Rei::LimitedVision::HFR y = $game_player.screen_y when 8 x = $game_player.screen_x y = $game_player.screen_y - Rei::LimitedVision::HFR end result = [x,y] return result end #-------------------------------------------------------------------------- # * Setup visibility #-------------------------------------------------------------------------- def dovisibilitythingy(dur = Rei::LimitedVision::DLY) zoomx = Rei::LimitedVision::IZX + mod_state_range[0] zoomy = Rei::LimitedVision::IZY + mod_state_range[1] opa = 255 if Rei::LimitedVision::KTS == true if $kts_map_data[$game_map.map_id].outside_tint? zoomx += Rei::LimitedVision::ONT if $game_switches[KTS::NIGHT] zoomy += Rei::LimitedVision::ONT if $game_switches[KTS::NIGHT] zoomx += Rei::LimitedVision::OMN if $game_switches[KTS::DAWN] zoomy += Rei::LimitedVision::OMN if $game_switches[KTS::DAWN] zoomx += Rei::LimitedVision::ODY if $game_switches[KTS::DAY] zoomy += Rei::LimitedVision::ODY if $game_switches[KTS::DAY] zoomx += Rei::LimitedVision::OEN if $game_switches[KTS::SUNSET] zoomy += Rei::LimitedVision::OEN if $game_switches[KTS::SUNSET] else zoomx += Rei::LimitedVision::INT if $game_switches[KTS::NIGHT] zoomy += Rei::LimitedVision::INT if $game_switches[KTS::NIGHT] zoomx += Rei::LimitedVision::IMN if $game_switches[KTS::DAWN] zoomy += Rei::LimitedVision::IMN if $game_switches[KTS::DAWN] zoomx += Rei::LimitedVision::IDY if $game_switches[KTS::DAY] zoomy += Rei::LimitedVision::IDY if $game_switches[KTS::DAY] zoomx += Rei::LimitedVision::IEN if $game_switches[KTS::SUNSET] zoomy += Rei::LimitedVision::IEN if $game_switches[KTS::SUNSET] end elsif Rei::LimitedVision::KGC == true if $game_map.daynight_void? phase = KGC::DayNight::PHASE_VARIABLE zoomx += Rei::LimitedVision::ODY if phase == 0 zoomy += Rei::LimitedVision::ODY if phase == 0 zoomx += Rei::LimitedVision::OEN if phase == 1 zoomy += Rei::LimitedVision::OEN if phase == 1 zoomx += Rei::LimitedVision::ONT if phase == 2 zoomy += Rei::LimitedVision::ONT if phase == 2 zoomx += Rei::LimitedVision::OMN if phase == 3 zoomy += Rei::LimitedVision::OMN if phase == 3 else phase = KGC::DayNight::PHASE_VARIABLE zoomx += Rei::LimitedVision::IDY if phase == 0 zoomy += Rei::LimitedVision::IDY if phase == 0 zoomx += Rei::LimitedVision::IEN if phase == 1 zoomy += Rei::LimitedVision::IEN if phase == 1 zoomx += Rei::LimitedVision::INT if phase == 2 zoomy += Rei::LimitedVision::INT if phase == 2 zoomx += Rei::LimitedVision::IMN if phase == 3 zoomy += Rei::LimitedVision::IMN if phase == 3 end end if $game_player.moving? and $game_player.dash? zoomx += Rei::LimitedVision::RUN zoomy += Rei::LimitedVision::RUN else zoomx += Rei::LimitedVision::STD zoomy += Rei::LimitedVision::STD end if Input.press?(Rei::LimitedVision::BUT) and $game_switches[Rei::LimitedVision::LGT] if $game_player.moving? and $game_player.dash? zoomx += Rei::LimitedVision::RWL zoomy += Rei::LimitedVision::RWL else zoomx += Rei::LimitedVision::SWL zoomy += Rei::LimitedVision::SWL end end if $game_switches[Rei::LimitedVision::SET] $reivisibility_sprite.start_tone_change(Rei::LimitedVision::TON,0) else $reivisibility_sprite.start_tone_change(Tone.new(0,0,0,0),0) end $reivisibility_sprite.move(1, getvis[0], getvis[1], zoomx,zoomy,opa, 0, dur) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update reilimitedvisionupdate if $game_switches[Rei::LimitedVision::TOG] if @showed == true if @pic != Rei::LimitedVision::VSP[$game_variables[Rei::LimitedVision::USV]] @pic = Rei::LimitedVision::VSP[$game_variables[Rei::LimitedVision::USV]] @showed = false end dovisibilitythingy $reivisibility_sprite.update else if @pic != Rei::LimitedVision::VSP[$game_variables[Rei::LimitedVision::USV]] @pic = Rei::LimitedVision::VSP[$game_variables[Rei::LimitedVision::USV]] end $reivisibility_sprite.show(@pic,1,getvis[0],getvis[1], Rei::LimitedVision::IZX+Rei::LimitedVision::STD+mod_state_range[0], Rei::LimitedVision::IZY+Rei::LimitedVision::STD+mod_state_range[1],255, 0) @showed = true dovisibilitythingy(1) end else if $reivisibility_sprite.name != "" $reivisibility_sprite.erase @showed = false end end end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate $reivisibility_sprite.erase @showed = false reilimitedvisionterminate end end #============================================================================== #------------------------------------------------------------------------------ # Woratana script, my version #------------------------------------------------------------------------------ class Spriteset_Map alias reicreatepic create_pictures unless method_defined?('reicreatepic') #-------------------------------------------------------------------------- # * Create Picture Sprite #-------------------------------------------------------------------------- def create_pictures(*args);reicreatepic(*args) @picture_sprites.push(Sprite_Picture.new(@viewport1,$reivisibility_sprite)) end end class Sprite_Picture < Sprite alias reipic_upd update unless method_defined?('reipic_upd') #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update(*args);reipic_upd(*args) self.z = $game_player.screen_z + 125 if @picture.number == 21;end end #------------------------------------------------------------------------------ #------------------------------------------------------------------------------
|
| | |
| Event pake item sebagai obor | |
|
Similar topics | |
|
Similar topics | |
|
|
Halaman 1 dari 1 |
|
|
Permissions in this forum: | Anda tidak dapat menjawab topik
| |
|
|
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|