ถ้าคุณอยากทำเมนูแบบ Gay Hazard (ของพี่ Griever)
อันนี้เป็นสคริปเมนูของเกม Gay Hazard 2 ครับ
ก่อนอื่นก๊อปโค๊ดด้านล่างนี่ไปก่อนครับ
วิธีใช้
1. ต้องศรัทธาบูจูเสียก่อน
2. ต้องบูชาแมวน้ำเปรียบเสมือนบร๊ะมหาเมพ
3. เมื่อทำตาม 2 ข้อบนแล้วให้ก๊อปโค๊ดข้างบนแปะไว้ในช่องใหม่
เหนือ Main ตั้งชื่อสคริปว่า Griever Handsome555+ ถ้ารับไม่ได้ก็เปลี่ยนเป็นอะไรก็ได้-*-
4. แค่นั้นแหละ แล้วอย่าลืม...ศรัทธาบูจู เชิดชูแมวน้ำ ขย้ำพุงๆ
ถ้าอยากให้มีรูปขึ้นด้านซ้าย
1. ประมาณบรรทัดที่ 149 หาโค๊ด
แล้วลบ # ออก ให้เคลือแค่
Credit by Griever
อันนี้เป็นสคริปเมนูของเกม Gay Hazard 2 ครับ
ก่อนอื่นก๊อปโค๊ดด้านล่างนี่ไปก่อนครับ
#==============================================================================
# * Window_Griever_Handsome5555+
#------------------------------------------------------------------------------
# Mwahahahaa_Buju
#==============================================================================
class Window_Gold2 < Window_Base
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
# - Refreshment
def refresh
self.contents.clear
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
end
#==============================================================================
# * Window_Item
#------------------------------------------------------------------------------
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(320, 64, 320, 416)
@column_max = 1
refresh
self.index = 0
# When it is in the midst of fighting, it moves the window to the picture center, makes translucent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# - Acquisition of item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Adding the item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
# While fighting if other than it adds also the weapon and the guard
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
# If the number of items is not 0, it draws up bit map, drawing all item
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# - Drawing of item
# index : Item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 1 * (288 + 32)
y = index / 1 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# - Help text renewal
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# * Window_Status
#------------------------------------------------------------------------------
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# - Object initialization
# actor : Actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 64, 320, 320)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
# draw_actor_picture(@actor, 80, 280)
draw_actor_hp(@actor, 96, 32, 172)
end
end
#==============================================================================
# * Window_PlayTime
#------------------------------------------------------------------------------
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# - Object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# - Refreshment
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# - Frame renewal
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# * Scene_Item
#------------------------------------------------------------------------------
# ?It is the class which processes the item picture.
#==============================================================================
class Scene_Menu
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# - Main processing
#--------------------------------------------------------------------------
def main
# Drawing up the help window and the item window
@actor = $game_party.actors[@actor_index]
@help_window = Window_Help.new
@item_window = Window_Item.new
@status_window = Window_Status.new(@actor)
# Drawing up the play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 160
@playtime_window.y = 384
# Drawing up the Goldwyn dough
@gold_window = Window_Gold2.new
@gold_window.x = 0
@gold_window.y = 384
# Help window association
@item_window.help_window = @help_window
# Target window compilation (invisibility non actively setting)
@target_window = Window_Target.new
@target_window.visible = false
@target_window.active = false
# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@playtime_window.dispose
@gold_window.dispose
@status_window.dispose
@help_window.dispose
@item_window.dispose
@target_window.dispose
end
#--------------------------------------------------------------------------
# - Frame renewal
#--------------------------------------------------------------------------
def update
# Renewing the window
@playtime_window.update
@gold_window.update
@help_window.update
@item_window.update
@status_window.update
@target_window.update
# When the item window is active,: Update_item is called
if @item_window.active
update_item
return
end
# When the target window is active,: Update_target is called
if @target_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
# - When frame renewal (the item window is active)
#--------------------------------------------------------------------------
def update_item
# The B when button is pushed
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# Change to menu screen
$scene = Scene_Map.new
return
end
# When C button is pushed
if Input.trigger?(Input::C)
# Acquiring the data which presently is selected in the item window
@item = @item_window.item
# When it is not the use item
unless @item.is_a?(RPG::Item)
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# When you cannot use
unless $game_party.item_can_use?(@item.id)
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Performing decision SE
$game_system.se_play($data_system.decision_se)
# When the effective range takes part,
if @item.scope >= 3
# Active conversion target window
@item_window.active = false
@target_window.x = (@item_window.index + 1) % 2 * 304
@target_window.visible = true
@target_window.active = true
# Setting cursor position the effective range (the single unit/the whole) according to
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
# When the effective range is other than taking part
else
# When common event ID is effective
if @item.common_event_id > 0
# Common event call reservation
$game_temp.common_event_id = @item.common_event_id
# When using the item performing SE
$game_system.se_play(@item.menu_se)
# In case of consumable
if @item.consumable
# The item which you use is decreased 1
$game_party.lose_item(@item.id, 1)
# Redrawing the item of the item window
@item_window.draw_item(@item_window.index)
end
# Change to map picture
$scene = Scene_Map.new
return
end
end
return
end
end
#--------------------------------------------------------------------------
# - When frame renewal (the target window is active)
#--------------------------------------------------------------------------
def update_target
# The B when button is pushed
if Input.trigger?(Input::B)
# Performing cancellation SE
$game_system.se_play($data_system.cancel_se)
# When with the item and so on is cut off and it becomes not be able to use
unless $game_party.item_can_use?(@item.id)
# Rewriting the contents of the item window
@item_window.refresh
end
# Eliminating the target window
@item_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
# When C button is pushed
if Input.trigger?(Input::C)
# When the item is consumed
if $game_party.item_number(@item.id) == 0
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# When the target is the whole
if @target_window.index == -1
# Applying the use effect of the item to the whole party
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
# When the target is the single unit
if @target_window.index >= 0
# Applying the use effect of the item to the actor of the target
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
# When the item was used
if used
# When using the item performing SE
$game_system.se_play(@item.menu_se)
# In case of consumable
if @item.consumable
# The item which you use is decreased 1
$game_party.lose_item(@item.id, 1)
# Redrawing the item of the item window
@item_window.draw_item(@item_window.index)
end
# Rewriting the contents of the target window
@target_window.refresh
# In case of total destruction
if $game_party.all_dead?
# Change to game over picture
$scene = Scene_Gameover.new
return
end
# When common event ID is effective
if @item.common_event_id > 0
# Common event call reservation
$game_temp.common_event_id = @item.common_event_id
# Change to map picture
$scene = Scene_Map.new
return
end
end
# When the item was not used
unless used
# Performing buzzer SE
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end
วิธีใช้
1. ต้องศรัทธาบูจูเสียก่อน
2. ต้องบูชาแมวน้ำเปรียบเสมือนบร๊ะมหาเมพ
3. เมื่อทำตาม 2 ข้อบนแล้วให้ก๊อปโค๊ดข้างบนแปะไว้ในช่องใหม่
เหนือ Main ตั้งชื่อสคริปว่า Griever Handsome555+ ถ้ารับไม่ได้ก็เปลี่ยนเป็นอะไรก็ได้-*-
4. แค่นั้นแหละ แล้วอย่าลืม...ศรัทธาบูจู เชิดชูแมวน้ำ ขย้ำพุงๆ
ถ้าอยากให้มีรูปขึ้นด้านซ้าย
1. ประมาณบรรทัดที่ 149 หาโค๊ด
# draw_actor_picture(@actor, 80, 280)
แล้วลบ # ออก ให้เคลือแค่
draw_actor_picture(@actor, 80, 280)
Credit by Griever
[สคริปต์]เมนูแบบ Gay Hazard