| 赞 | 3 |
| VIP | |
| 好人卡 | |
| 积分 | 21 |
| 经验 | |
| 最后登录 | 2025-8-7 |
| 在线时间 | 950 小时 |
- 梦石
- 0
- 星屑
- 2116
- 在线时间
- 950 小时
- 注册时间
- 2015-7-16
- 回帖
- 692

|
发表于 2016-7-13 15:42:41
|
显示全部楼层
首先你需要這個腳本
然後!
設定兩個事件,一個是並行處理,一個是你的陷阱
並行處理使用腳本 輸入$game_self_switches[[地圖編號 , 陷阱事件編號 , "獨立開關"]] = true
打開你陷阱的獨立開關,假設是獨立開關A 會是令人受傷的尖刺,那麼 輸入 $game_self_switches[[地圖編號 , 陷阱事件編號 , "A"]] = true
假設這是第1張地圖,陷阱是第2個事件,那就 輸入 $game_self_switches[[1 , 2 , "A"]] = true
執行完畢後,接著等待幾秒(看你),再次使用腳本 輸入 $game_self_switches[[地圖編號 , 陷阱事件編號 , "A"]] = false
這樣就會關閉獨立開關A
設定好以後,我們回來看看陷阱,獨立開關A還沒打開時,陷阱不會害人,打開則反之
- #-------------------------------------------------------------------------------
- # * Khas Self Switches
- #-------------------------------------------------------------------------------
- # * By Khas Arcthunder
- # * Version: 1.0
- # * Released on: 11/09/2012
- #
- # * Blog: [url]http://arcthunder.com/[/url]
- # * Forum: [url]http://rgssx.com/[/url]
- # * Twitter: [url]http://twitter.com/arcthunder[/url]
- # * Youtube: [url]http://youtube.com/user/darkkhas[/url]
- #
- #-------------------------------------------------------------------------------
- # Terms of Use | Termos de Uso
- #-------------------------------------------------------------------------------
- # * ENGLISH
- # Read updated terms of use at [url]http://arcthunder.com/terms[/url]
- #
- # * PORTUGUES
- # Leia os termos atualizados em [url]http://arcthunder.com/termos[/url]
- #
- #-------------------------------------------------------------------------------
- # How to use - English Instructions
- #-------------------------------------------------------------------------------
- # You can use Call Script with the following commands:
- #
- # Switch_Core.toggle(event_id,switch)
- # Toggle a switch. If it's ON, this command will turn it to OFF. And if it's
- # OFF, this command will turn it to ON.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- #
- # Switch_Core.toggle(event_id,switch,map_id)
- # Toggle a switch. If it's ON, this command will turn it to OFF. And if it's
- # OFF, this command will turn it to ON.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- # map_id -> ID of the map
- #
- # Switch_Core.turn_on(event_id,switch)
- # Turn ON command.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- #
- # Switch_Core.turn_on(event_id,switch,map_id)
- # Turn ON command.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- # map_id -> ID of the map
- #
- # Switch_Core.turn_off(event_id,switch)
- # Turn OFF command.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- #
- # Switch_Core.turn_off(event_id,switch,map_id)
- # Turn OFF command.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- # map_id -> ID of the map
- #
- # Switch_Core.set(event_id,switch,value)
- # Set command. If value is true, it will be turned ON. If value is false,
- # it will be turned OFF.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- # value -> Can be true or false
- #
- # Switch_Core.set(event_id,switch,value,map_id)
- # Set command. If value is true, it will be turned ON. If value is false,
- # it will be turned OFF.
- # event_id -> The ID of the event
- # switch -> Can be "A", "B", "C" or "D"
- # value -> Can be true or false
- # map_id -> ID of the map
- #
- #-------------------------------------------------------------------------------
- #
- # Switch_Core.toggle_all(event_id)
- # Toggle all the event's self switches.
- # event_id -> The ID of the event
- #
- # Switch_Core.toggle_all(event_id,map_id)
- # Toggle all the event's self switches.
- # event_id -> The ID of the event
- # map_id -> ID of the map
- #
- # Switch_Core.turn_on_all(event_id)
- # Turn ON all the event's self switches.
- # event_id -> The ID of the event
- #
- # Switch_Core.turn_on_all(event_id,map_id)
- # Turn ON all the event's self switches.
- # event_id -> The ID of the event
- # map_id -> ID of the map
- #
- # Switch_Core.turn_off_all(event_id)
- # Turn OFF all the event's self switches.
- # event_id -> The ID of the event
- #
- # Switch_Core.turn_off_all(event_id,map_id)
- # Turn OFF all the event's self switches.
- # event_id -> The ID of the event
- # map_id -> ID of the map
- #
- # Switch_Core.set_all(event_id,value)
- # Set all command. If value is true, all self switches will be turned ON. If
- # value is false, all self switches will be turned OFF.
- # event_id -> The ID of the event
- # value -> Can be true or false
- #
- # Switch_Core.set_all(event_id,value,map_id)
- # Set all command. If value is true, all self switches will be turned ON. If
- # value is false, all self switches will be turned OFF.
- # event_id -> The ID of the event
- # value -> Can be true or false
- # map_id -> ID of the map
- #
- #-------------------------------------------------------------------------------
- # Como usar - Instruções em Português
- #-------------------------------------------------------------------------------
- # Você pode usar o Chamar Script com os seguintes comandos:
- #
- # Switch_Core.toggle(event_id,switch)
- # Alterna o switch. Se ele estiver ligado, será então desligado. Se ele estiver
- # ligado, será então desligado.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- #
- # Switch_Core.toggle(event_id,switch,map_id)
- # Alterna o switch. Se ele estiver ligado, será então desligado. Se ele estiver
- # ligado, será então desligado.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- # map_id -> ID do Mapa
- #
- # Switch_Core.turn_on(event_id,switch)
- # Comando que liga o switch.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- #
- # Switch_Core.turn_on(event_id,switch,map_id)
- # Comando que liga o switch.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- # map_id -> ID do Mapa
- #
- # Switch_Core.turn_off(event_id,switch)
- # Comando que desliga o switch.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- #
- # Switch_Core.turn_off(event_id,switch,map_id)
- # Comando que desliga o switch.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- # map_id -> ID do Mapa
- #
- # Switch_Core.set(event_id,switch,value)
- # Comando que ajusta o switch. Se value for true, o switch será ligado. Se
- # value for false, o switch será desligado.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- # value -> Pode ser true ou false
- #
- # Switch_Core.set(event_id,switch,value,map_id)
- # Comando que ajusta o switch. Se value for true, o switch será ligado. Se
- # value for false, o switch será desligado.
- # event_id -> O ID do evento
- # switch -> Pode ser "A", "B", "C" ou "D"
- # value -> Pode ser true ou false
- # map_id -> ID do Mapa
- #
- #-------------------------------------------------------------------------------
- #
- # Switch_Core.toggle_all(event_id)
- # Alterna todos os switches locais do evento.
- # event_id -> O ID do evento
- #
- # Switch_Core.toggle_all(event_id,map_id)
- # Alterna todos os switches locais do evento.
- # event_id -> O ID do evento
- # map_id -> ID do Mapa
- #
- # Switch_Core.turn_on_all(event_id)
- # Liga todos os switches do evento.
- # event_id -> O ID do evento
- #
- # Switch_Core.turn_on_all(event_id,map_id)
- # Liga todos os switches do evento.
- # event_id -> O ID do evento
- # map_id -> ID do Mapa
- #
- # Switch_Core.turn_off_all(event_id)
- # Desliga todos os switches do evento.
- # event_id -> O ID do evento
- #
- # Switch_Core.turn_off_all(event_id,map_id)
- # Desliga todos os switches do evento.
- # event_id -> O ID do evento
- # map_id -> ID do Mapa
- #
- # Switch_Core.set_all(event_id,value)
- # Ajusta todos os switches do evento.
- # event_id -> O ID do evento
- # value -> Pode ser true ou false
- #
- # Switch_Core.set_all(event_id,value,map_id)
- # Ajusta todos os switches do evento.
- # event_id -> O ID do evento
- # value -> Pode ser true ou false
- # map_id -> ID do Mapa
- #
- #-------------------------------------------------------------------------------
- # Script
- #-------------------------------------------------------------------------------
- module Switch_Core
- Switch_Array = ["A","B","C","D"]
- def self.toggle(ei,si,mi=$game_map.map_id)
- $game_self_switches[[mi,ei,si]] = !$game_self_switches[[mi,ei,si]]
- end
- def self.turn_on(ei,si,mi=$game_map.map_id)
- $game_self_switches[[mi,ei,si]] = true
- end
- def self.turn_off(ei,si,mi=$game_map.map_id)
- $game_self_switches[[mi,ei,si]] = false
- end
- def self.set(ei,si,pi,mi=$game_map.map_id)
- $game_self_switches[[mi,ei,si]] = pi
- end
- def self.toggle_all(ei,mi=$game_map.map_id)
- Switch_Array.each {|key| toggle(ei,key,mi)}
- end
- def self.turn_on_all(ei,mi=$game_map.map_id)
- Switch_Array.each {|key| turn_on(ei,key,mi)}
- end
- def self.turn_off_all(ei,mi=$game_map.map_id)
- Switch_Array.each {|key| turn_off(ei,key,mi)}
- end
- def self.set_all(ei,pi,mi=$game_map.map_id)
- Switch_Array.each {|key| set(ei,key,pi,mi)}
- end
- end
复制代码 |
评分
-
查看全部评分
|