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 | 
 

 buka / tutup shop system

Topik sebelumnya Topik selanjutnya Go down 
buka / tutup shop system Empty2012-05-03, 10:12
Postbuka / tutup shop system
#1
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
om2 yg mahir
gimana sih cara bikin toko yg buka dr jam 06.00 - 23.00
jadi jam 06.00 dia buka sampe jam 23.00
jadi kalo jam 23.00 keluar massage "tutup"

dan jamnya pake jam komputer masing2 / jam internet / jam zone

bantu ya...
kalo pake event tolong kasi demo

kalo pake script juga kasi demo

kalo gampang Reply topic ini
buka / tutup shop system Empty2012-05-03, 10:20
PostRe: buka / tutup shop system
#2
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
:kabur: Karena gk gampang ya udh saya ngomong aja..
Anda harus pake' script dari sini :

http://www.rpgmakervxace.net/topic/3225-basic-game-time-nightday/

Ini VX Acekan? Ya udh cocok tuh pake' itu..
Untuk buat kayak gitu harus pake' conditional branch :D
Dan untuk itu silahkan baca comment2nya disana :D Atau saya bisa buat demonya
buka / tutup shop system Empty2012-05-03, 10:26
PostRe: buka / tutup shop system
#3
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
lha error kk, bisa kasi direct link aja kk
kalo udah kk kasi jawab ini juga ?
dan cara ubah time ke variable gimana...
kalo pake conditional branch ane selalu setingnya di variable
buka / tutup shop system Empty2012-05-03, 10:34
PostRe: buka / tutup shop system
#4
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
Actually Conditional Branch --> Script
Gitu sih..kalau pake' Variable gk ada disini..
Error itu karena emang harus daftar dulu disana :swt:
Anyway, ini scriptnya :

Spoiler:

Ini gk sesuai dengan jam komputer sih :swt: Tapi berguna banget kalau kamu mengerti


Terakhir diubah oleh marjoni01 tanggal 2012-05-03, 11:23, total 1 kali diubah
buka / tutup shop system Empty2012-05-03, 10:41
PostRe: buka / tutup shop system
#5
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
Conditional Branch --> Script
script di isi judul scrip ya kk.........
buka / tutup shop system Empty2012-05-03, 10:46
PostRe: buka / tutup shop system
#6
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
Kira2 seperti ini :

Code:
GameTime::hour? >= 6 and GameTime::hour? < 21

Itu berarti bukanya mulai jam 6 - jam 9 malam...
Jadi ya kira2 gitu silahkan mulai2 bereksperimen
buka / tutup shop system Empty2012-05-03, 11:22
PostRe: buka / tutup shop system
#7
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
mana nih, kok gag bisa klick spoiler ya...
udah berualang2 klick tetep aj gag ada keluar apa2
padahal browser udah Done
buka / tutup shop system Empty2012-05-03, 11:23
PostRe: buka / tutup shop system
#8
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
Nih dah tanpa spoiler:

Code:
#Basic Game Time + Night/Day
#----------#
#Features: Provides a series of functions to set and recall current game time
#          as well customizable tints based on current game time to give the
#          appearance of night and day.
#
#Usage:  Script calls:
#          GameTime::minute?  - returns the current minute
#          GameTime::hour?    - returns the current hour
#          GameTime::set(time) - sets the game time to time, in frames (max:1440)
#          GameTime::change(time) - increments the game time! (can be negative)
#          GameTime::pause_time(set) - stops time for events and stuff, true or false
#          GameTime::pause_tint(set) - time runs, but tints do not update
#          GameTime::clock(set) - sets whether clock is visible or not
#       
#Customization: Set below, in comments.
#
#Examples: GameTime::set(360)
#
#----------#
#-- Script by: V.M of D.T
#--- Free to use in any project with credit given

#---Game Clock---#
#USE_CLOCK to true to display game time clock
#CLOCK_POSITION for position of clock
#  1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
#CLOCK_TOGGLE is any input button available, see the INPUT help file for options
#------#
USE_CLOCK      = true
CLOCK_POSITION  = 4
CLOCK_TOGGLE    = :SHIFT

module GameTime
  #---Game Time Details---#
  #Number of frames in a game minute, 60 frames = 1 second
  TIME_COUNT      = 6
  #Sets whether to tint screen based on game time
  USE_TINT        = true

  #True to pause time while not in map or while during a message
  PAUSE_IN_COMBAT  = false
  PAUSE_NOT_IN_MAP = true
  PAUSE_IN_MESSAGE = true

  #Sets time frames of tints by minute count, one day is 1440 minutes
  # 0 = 12am, 360 = 6am, 720 = 12pm, 1080 = 6pm  etc...
  PRESUNRISE_TIME = 240
  SUNRISE_TIME    = 360
  NOONSTART_TIME  = 660
  NOONEND_TIME    = 900
  PRESUNSET_TIME  = 1080
  SUNSET_TIME    = 1260
  MIDNIGHT_TIME  = 60  #Must be greater than 0

  #Sets custome tints
  PRESUNRISE_TONE = Tone.new(-75,-75,0,50)
  SUNRISE_TONE    = Tone.new(0,0,0,0)
  NOONSTART_TONE  = Tone.new(45,45,0,-25)
  NOONEND_TONE    = Tone.new(0,0,0,0)
  PRESUNSET_TONE  = Tone.new(-50,-50,0,25)
  SUNSET_TONE    = Tone.new(-75,-100,0,75)
  MIDNIGHT_TONE  = Tone.new(-125,-125,0,125)

  #Include the ids of any maps not to be tinted based on time
  # Usually reserved for indoor maps
  NOTINTMAPS = [2]
  #---END---#

  def self.init
    $game_time = 0
    $game_time_pause_time = false
    $game_time_pause_tint = false
  end
  def self.update
    if $game_time_pause_time then return else end
    case SceneManager::scene_is?(Scene_Map)
    when true
      if $game_message.visible == true && PAUSE_IN_MESSAGE then else
      $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
    when false
      if SceneManager::scene_is?(Scene_Battle) && PAUSE_IN_COMBAT != true
      $game_time += 1 if Graphics.frame_count % TIME_COUNT == 0 end
    end
    if $game_time == 1440 then $game_time = 0 end
    GameTime::tint if $game_time_pause_tint != true
  end
  def self.hour?
    return $game_time / 60
  end
  def self.minute?
    return $game_time % 60
  end
  def self.time?
    meri = "AM"
    hour = GameTime::hour?
    minute = GameTime::minute?
    if hour > 11 then meri = "PM" end
    if hour == 0 then hour = 12; meri = "AM" end
    if hour > 12 then hour -= 12 end
    if hour < 10 then hour = " " + hour.to_s else hour.to_s end
    if minute < 10 then minute = "0" + minute.to_s else minute.to_s end
    return hour.to_s + ":" + minute.to_s + " " + meri
  end
  def self.set(number)
    $game_time = number if number < 1440
    GameTime::tint(0)
  end
  def self.change(number)
    $game_time += number
    $game_time -= 1440 if $game_time > 1440
    $game_time += 1440 if $game_time < 0
    GameTime::tint(0)
  end
  def self.tint(tint = 60)
    if USE_TINT != true then return end
    for i in NOTINTMAPS
      if $game_map.map_id == i
        $game_map.screen.start_tone_change(Tone.new(0,0,0,0),0)
        return
      end
    end
    if SceneManager::scene_is?(Scene_Map) then else return end
    case $game_time
    when PRESUNRISE_TIME .. SUNRISE_TIME
      $game_map.screen.start_tone_change(PRESUNRISE_TONE, tint)
    when SUNRISE_TIME .. NOONSTART_TIME
      $game_map.screen.start_tone_change(SUNRISE_TONE, tint)
    when NOONSTART_TIME .. NOONEND_TIME
      $game_map.screen.start_tone_change(NOONSTART_TONE, tint)
    when NOONEND_TIME .. PRESUNSET_TIME
      $game_map.screen.start_tone_change(NOONEND_TONE, tint)
    when PRESUNSET_TIME .. SUNSET_TIME
      $game_map.screen.start_tone_change(PRESUNSET_TONE, tint)
    when SUNSET_TIME .. 1440
      $game_map.screen.start_tone_change(SUNSET_TONE, tint)
    when 0 .. MIDNIGHT_TIME
      $game_map.screen.start_tone_change(SUNSET_TONE, tint)
    when MIDNIGHT_TIME .. PRESUNRISE_TIME
      $game_map.screen.start_tone_change(MIDNIGHT_TONE, tint)
    end
  end
  def self.pause_time(set)
    $game_time_pause_time = set
  end
  def self.pause_tint(set)
    $game_time_pause_tint = set
  end
  def self.clock(set)
    SceneManager.scene.clock_visible?(set)
  end

  class Window_Clock < Window_Base
    def initialize
      case CLOCK_POSITION
      when 1
        super(0,0,115,56)
      when 2
        super(429,0,115,56)
      when 3
        super(0,360,115,56)
      when 4
        super(429,360,115,56)
      end
    end
    def update
      self.contents.clear
      self.contents.draw_text(0,0,100,24,GameTime::time?)
    end
  end

end

module DataManager
  class << self
  alias gametime_msc make_save_contents
  alias gametime_esc extract_save_contents
  end
  def self.make_save_contents
    contents = gametime_msc
    contents[:gametime] = $game_time
    contents
  end
  def self.extract_save_contents(contents)
    gametime_esc(contents)
    $game_time = contents[:gametime]
  end
end


class Scene_Map < Scene_Base
  alias gametime_post_transfer post_transfer
  alias gametime_create_all_windows create_all_windows
  alias gametime_update_map update
  def post_transfer
    GameTime::tint(0)
    gametime_post_transfer
  end
  def create_all_windows
    gametime_create_all_windows
    @gametimeclock = GameTime::Window_Clock.new if USE_CLOCK
  end
  def update
    gametime_update_map
    @gametimeclock.update if @gametimeclock.nil? == false
    if Input.trigger?(CLOCK_TOGGLE) and @gametimeclock.nil? == false
      @gametimeclock.visible ? @gametimeclock.visible = false : @gametimeclock.visible = true
    end
  end
  def clock_visible?(set)
    @gametimeclock.visible = set
  end
end

class Scene_Base
  alias gametime_update update
  def update
    gametime_update
    GameTime::update
  end
end

GameTime::init

buka / tutup shop system Empty2012-05-03, 11:34
PostRe: buka / tutup shop system
#9
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
btw kk
menitnya kecepetan
kalo ubah menitnya selambat detik
edit yg mana kk
buka / tutup shop system Empty2012-05-03, 11:39
PostRe: buka / tutup shop system
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
Cari ini :

Code:
TIME_COUNT      = 6

Itu ganti 60 aja biar tidak cpt
buka / tutup shop system Empty2012-05-03, 13:11
PostRe: buka / tutup shop system
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
sorry tanya terus, mungkin ini pertanyaan terakhir
bs minta ss command eventnya gag,
masih bingung ngakalinya nih
mau bikin berapa condition branch

lalu kalo kita tidur lalu bangun tiba2 jamnya jd jam 6, gimana ?


Terakhir diubah oleh ineceper tanggal 2012-05-03, 13:18, total 1 kali diubah
buka / tutup shop system Empty2012-05-03, 13:16
PostRe: buka / tutup shop system
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
Uh...Untuk Command SSnya sih...
karena di mobile gk bisa..
Tapi kira2 kayak gini :

Code:
Page 1 - Parallel Process
Condition branch: Script: GameTime::hour? == 6
Self-switch Operation A=ON
Switch Operation: [0001]Nighttime = OFF
Branch End

Page 2 -Parallel Process, Self switch A is on.
Condition branch Script: GameTime::hour? == 18
Self-switch Operation A=OFF
Switch Operation: [0001]Nighttime = ON
Branch End

Jadi Intinya kalau jam 6 pagi Self Switch A itu ON tapi kalau udh jam 6 malam Self Switch Anya itu off
Mohon dimengerti sendiri...
Nanti aja kalau saya udh pegang VX Acenya :D
buka / tutup shop system Empty2012-05-03, 13:32
PostRe: buka / tutup shop system
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
Quote :
lalu kalo kita tidur lalu bangun tiba2 jamnya jd jam 6, gimana ?
jawaban yg ini apa...?
buka / tutup shop system Empty2012-05-03, 13:35
PostRe: buka / tutup shop system
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
@Ineceper
Caranya Pake' Comment kayak gini :


Code:
GameTime::set(360)

Inget! COMMENT! Bukan Script Call..
Anyway, begitulah Kalau 360 itu jam 6 pagi kalau 1440 itu jam 12 malam...Well coba2 sendiri aja :D
buka / tutup shop system Empty2012-05-03, 13:41
PostRe: buka / tutup shop system
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
comment yg di flow control kah...
tp kok kaga ngefek, masih aja jam 12
buka / tutup shop system Empty2012-05-03, 13:46
PostRe: buka / tutup shop system
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
:ngacay2: Kan harus dijalankan dulu...
Jadi bukan otomatis jalan...
Jadi kalau misalnya kasur gitu...
Disela2 event kasur kasih comment kayak gitu...
Pasti work =w=b
buka / tutup shop system Empty2012-05-03, 13:53
PostRe: buka / tutup shop system
ineceper 
Novice
Novice
ineceper

Level 5
Posts : 115
Thanked : 0
Engine : Multi-Engine User
Skill : Advanced
Type : Developer

buka / tutup shop system Vide
makasih ya kk marjoni01

~~~~~Solved~~~~~
buka / tutup shop system Empty2012-05-03, 13:54
PostRe: buka / tutup shop system
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

buka / tutup shop system Vide
=w=b Oke monggo tanya aja kalau butuh bantuan...
Anyway, Globmod or momod mohon ditutup ya :sembah:
Ini udh solved :sembah:
buka / tutup shop system Empty
PostRe: buka / tutup shop system
Sponsored content 




buka / tutup shop system Vide
 

buka / tutup shop system

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Engines :: RMVX Ace-