[Script] [ACE] [VXA Script] Hệ thống đệ tử - Focker C

Focker_cFocker_c Posts: 1,577Registered
[align=center][size=x-large]HỆ THỐNG ĐỆ TỬ[/size]
[size=large]Tác giả : Focker C[/size]
[/align]


[size=medium]Vâng, vậy là sao 6 ngày học ruby, mình mới chỉ viết được cái này ~
Mong được sự ủng hộ từ mọi người.
[/size]


[chapter] English [/chapter]
[php]
#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ Pet-Actor system - Hệ thống đệ tử <RMVX Ace>
# ║ by Focker C
# ║ | Facebook : https://www.facebook.com/focker.cuong
# ║ | Website : https://taotrochoi.com/
#═╬═[ENGLISH]═══════════════════════════════════════════════════════════════════​
# ║
# ║ [Introduce]
# ║This system's called "Pet-Actor". You get pets. But they're like actors.
# ║They have real Equiptment or Skill Menu. And they can fight like actors in
# ║battles. Actually, they're actors ^_^ . But there're some different things.
# ║This system is really like pet-system of Wonderland Online,
# ║TS Online, ect.. many games.
# ║For this system, you can bring 3 pets (like 3 actors) in your party. But
# ║there is only ONE pet following the character and there's also only ONE pet
# ║join the battle (commonly, there would be 3 other actors joining the battle).
# ║Note : This system can you in almost battle-systems.
# ║
# ║ [Usage]
# ║Just press P in the keyboard to open the Pet Menu then find out more. It's
# ║really so easy and basic.
# ║- You can call out / rest the pet in first command.
# ║- You can open its Equiptment Menu in 2nd command.
# ║- You can open its Skill Menu in 3nd command.
# ║- You can dimiss it in the 4th command.
# ║- Back to choice other pet in the last command.
# ║You can translate commands or contents to your language
# ║ from 113th to 126th script-lines,
# ║ from 149th to 175th script-lines
# ║ and 318th script-line.
# ║
# ║ [Install and Requirement]
# ║Place this script above the Main.
# ║You also need to place the "Extended Input System" (Author Ramiro) above
# ║this script. It's used on the trigger you press button to open Pet Menu.
# ║
# ║ [Copyright]
# ║Only need to credit Focker C and "Ramiro" then you can do whatever you want with
# ║this script.
# ║
# ║ [Others]
# ║This script was posted by author in
# ║ http://taotrochoi.com/showthread.php?tid=1514 .
# ║If you get any problem with this system. Contact at the facebook (If not
# ║busy, sure).
# ║Thank you. :)
# ║
#═╩════════════════════════════════════════════════════════════════════════════​[/php]


[chapter] Giới thiệu [/chapter]
[php]
# ║Đây là một hệ thống quản lý đệ tử hay thú cưng. Hệ thống này rất giống với
# ║hệ thống thú của những game như TS Online, Wonderland Online, TLBB, vân vân
# ║và vân vân... Điều này chứng tỏ nó cũng khá là phổ biến.
# ║Trong hệ thống này, thú cưng hay để tử của bạn sẽ có Menu Kĩ năng hay Trang
# ║bị thực sự như một nhân vật. Nói chính xác thì họ cũng là nhân vật.
# ║Nhưng sẽ có những điểm khác biệt:
# ║Bạn vẫn mang theo 3 đệ tử (cũng như mang theo 3 nhân vật trong đội ngũ vậy).
# ║Nhưng sẽ chỉ có 1 đệ tử đi theo bạn trên map. Và cũng chỉ có một đệ tử đó sẽ
# ║tham gia chiến đấu trong Battle.
# ║CHÚ Ý : Hệ thống này có thể dùng trong gần như toàn bộ các Battle-system
# ║đang được ưa chuộng hiện nay.
[/php]


[chapter] Sử dụng [/chapter]
[php]
# ║Bạn ấn phím P để mở giao diện đệ tử này.
# ║Tại đây, sau khi lựa chọn đệ tử, bạn có thể :
# ║- Xuất ra / Thu hồi.
# ║- Mở Menu Trang bị hay Menu Kĩ năng của để tử đó.
# ║- Đuổi đệ tử đó đi
[/php]


[chapter] Cài đặt và Yêu cầu [/chapter]
[php]
# ║Bạn đặt script này trên Main. Rồi cài thêm script "Extended Input System"
# ║(của tác giả Ramiro) ở trên script này. Script thứ 2 này phục vụ cho việc
# ║ấn phím P để mở giao diện Đệ tử - thú cưng.
# ║Tiếp tục thêm một script phụ bên dưới đây. Và copy 2 hình vào thư mục
# ║ "Graphics/Pictures" là đã hoàn tất.
[/php]



[chapter] Quyền sử dụng [/chapter]
[php]
Chỉ cần credit 2 tác giả.
[/php]


[chapter] Khác [/chapter]
[php]
# ║Script này được đăng tải bở tác giả tại :
# ║http://taotrochoi.com/showthread.php?tid=1514 .
# ║Nếu có vấn đề gì với hệ thống này, liên hệ với tác giả tại địa chỉ trên hoặc
# ║qua Facebook.
# ║Xin trân thành cảm ơn.
[/php]



[chapter] Script [/chapter]

Hệ thống đệ tử :
[php]
#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ Pet-Actor system - Hệ thống đệ tử <RMVX Ace>
# ║ by Focker C
# ║ | Facebook : https://www.facebook.com/focker.cuong
# ║ | Website : https://taotrochoi.com/
#═╬═[ENGLISH]═══════════════════════════════════════════════════════════════════​
# ║
# ║ [Introduce]
# ║This system's called "Pet-Actor". You get pets. But they're like actors.
# ║They have real Equiptment or Skill Menu. And they can fight like actors in
# ║battles. Actually, they're actors ^_^ . But there're some different things.
# ║This system is really like pet-system of Wonderland Online,
# ║TS Online, ect.. many games.
# ║For this system, you can bring 3 pets (like 3 actors) in your party. But
# ║there is only ONE pet following the character and there's also only ONE pet
# ║join the battle (commonly, there would be 3 other actors joining the battle).
# ║Note : This system can you in almost battle-systems.
# ║
# ║ [Usage]
# ║Just press P in the keyboard to open the Pet Menu then find out more. It's
# ║really so easy and basic.
# ║(You can change this button in .........th line)
# ║- You can call out / rest the pet in first command.
# ║- You can open its Equiptment Menu in 2nd command.
# ║- You can open its Skill Menu in 3nd command.
# ║- You can dimiss it in the 4th command.
# ║- Back to choice other pet in the last command.
# ║You can translate commands or contents to your language
# ║ from 113th to 126th script-lines,
# ║ from 149th to 175th script-lines
# ║ and 318th script-line.
# ║
# ║ [Install and Requirement]
# ║Place this script above the Main.
# ║You also need to place the "Extended Input System" (Author Ramiro) above
# ║this script. It's used on the trigger you press button to open Pet Menu.
# ║
# ║ [Copyright]
# ║Only need to credit Focker C and "Ramiro" then you can do whatever you want with
# ║this script.
# ║
# ║ [Others]
# ║This script was posted by author in
# ║http://taotrochoi.com/showthread.php?tid=1514 .
# ║If you get any problem with this system. Contact at the facebook (If not
# ║busy, sure).
# ║Thank you. :)
# ║
#═╬═[VIETNAMESE]════════════════════════════════════════════════════════════════​
# ║
# ║ [Giới thiệu]
# ║Đây là một hệ thống quản lý đệ tử hay thú cưng. Hệ thống này rất giống với
# ║hệ thống thú của những game như TS Online, Wonderland Online, TLBB, vân vân
# ║và vân vân... Điều này chứng tỏ nó cũng khá là phổ biến.
# ║Trong hệ thống này, thú cưng hay để tử của bạn sẽ có Menu Kĩ năng hay Trang
# ║bị thực sự như một nhân vật. Nói chính xác thì họ cũng là nhân vật.
# ║Nhưng sẽ có những điểm khác biệt:
# ║Bạn vẫn mang theo 3 đệ tử (cũng như mang theo 3 nhân vật trong đội ngũ vậy).
# ║Nhưng sẽ chỉ có 1 đệ tử đi theo bạn trên map. Và cũng chỉ có một đệ tử đó sẽ
# ║tham gia chiến đấu trong Battle.
# ║CHÚ Ý : Hệ thống này có thể dùng trong gần như toàn bộ các Battle-system
# ║đang được ưa chuộng hiện nay.
# ║
# ║ [Sử dụng]
# ║Bạn ấn phím P để mở giao diện đệ tử này.
# ║Tại đây, sau khi lựa chọn đệ tử, bạn có thể :
# ║- Xuất ra / Thu hồi.
# ║- Mở Menu Trang bị hay Menu Kĩ năng của để tử đó.
# ║- Đuổi đệ tử đó đi
# ║
# ║ [Cài đặt và Yêu cầu]
# ║Bạn đặt script này trên Main. Rồi cài thêm script "Extended Input System"
# ║(của tác giả Ramiro) ở trên script này. Script thứ 2 này phục vụ cho việc
# ║ấn phím P để mở giao diện Đệ tử - thú cưng.
# ║
# ║ [Quyền sử dụng]
# ║Chỉ cần credit 2 tác giả.
# ║
# ║ [Khác]
# ║Script này được đăng tải bở tác giả tại :
# ║ http://taotrochoi.com/showthread.php?tid=1514 .
# ║Nếu có vấn đề gì với hệ thống này, liên hệ với tác giả tại địa chỉ trên hoặc
# ║qua Facebook.
# ║Xin trân thành cảm ơn.
# ║
#═╩═════════════════════════════════════════════════════════════════════════════​


#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ ▼ Adjust max_battle_members
#═╩═════════════════════════════════════════════════════════════════════════════​
class Game_Party < Game_Unit
def max_battle_members
return $pet_rest ? 1 : 2
end
end


#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ ▼ Set-up 2 Window_commands
#═╩═════════════════════════════════════════════════════════════════════════════​
class Window_Command_Petname < Window_Command
def make_command_list
@line1 = $game_party.members[1].name
$game_party.members[2] == nil ? @line2 = "<Trống>" : @line2 = $game_party.members[2].name
$game_party.members[3] == nil ? @line3 = "<Trống>" : @line3 = $game_party.members[3].name
add_command(@line1, :Line1)
add_command(@line2, :Line2, $game_party.members[2] != nil)
add_command(@line3, :Line3, $game_party.members[3] != nil)
add_command("---Exit---", :Exit)
end
end

class Window_Command_Pet_Command < Window_Command
# Here are the commands, translate them if you want :
def make_command_list
if $actor_checking != $game_party.members[1] or $pet_rest
add_command("Xuất chiến", :xuat) # Call out
end
if $actor_checking == $game_party.members[1] and !$pet_rest
add_command("Thu hồi", :thu) # Rest
end
add_command("Trang bị", :trangbi) # Equip
add_command("Kĩ năng", :kinang) # Skill
add_command("Đuổi đi", :duoidi) # Dimiss
add_command("Quay lại", :back) # Back
end
end


#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ ▼ Set-up Scene_Pet
#═╩═════════════════════════════════════════════════════════════════════════════​
class Scene_Pet < Scene_MenuBase

def start
$actor_checking = $game_party.members[1]
super
create_background
create_window
draw_pet_info
end

def create_window
@wd_petname = Window_Command_Petname.new(32,32)
@wd_petname.set_handler( :Line1 , method(:Action1))
@wd_petname.set_handler( :Line2 , method(:Action2))
@wd_petname.set_handler( :Line3 , method(:Action3))
@wd_petname.set_handler( :Exit , method(:Action_exit))
@wd_petname.set_handler(:cancel, method(:return_map))
end
# Pet-info is here, translate them if you want :
def draw_pet_info
@pet_info = Window_Text.new(192, 32, 352 , 263)
@pet_info.drawText_pro(0,0, 280, 'Thông tin đệ tử :', 0,["Myriad", "Verdana"],32,true,false)
@pet_info.drawFace(0,32,$actor_checking.face_name,$actor_checking.face_index)
@pet_info.drawText_pro(160,32, 280,"~ "+$actor_checking.nickname+" ~", 0,["Myriad", "Verdana"],18,true,true)
@pet_info.drawText_pro(96,32, 52,"Cấp "+$actor_checking.level.to_s, 0,["Myriad", "Verdana"],22,true,false)
@pet_info.draw_actor_hp($actor_checking, 100, 56, 220)
@pet_info.draw_actor_mp($actor_checking, 100, 80, 220)
@pet_info.drawText(105,104,48,"EXP :",0)
@pet_info.drawPic_wh(152,111,150,11,"EXP_pet_Bar_back")
@exp_bar_w = $actor_checking.exp.to_f / $actor_checking.next_level_exp.to_f*150
@pet_info.drawPic_wh(152,111,@exp_bar_w,11,"EXP_pet_Bar")
@pet_info.drawText(0,132,80,"Trạng thái :",0)
@pet_info.draw_actor_icons($actor_checking, 80, 132, 96)
@pet_info.drawText(32,160,72,"Vũ khí : ",0)
@pet_info.drawIcon(92, 160, $actor_checking.weapons[0].icon_index)
@pet_info.drawText(200,160,66,"Khiên : ",0)
@pet_info.drawIcon(252, 160, $actor_checking.armors[0].icon_index)
@pet_info.drawText(64,188,82,"Trang bị :",0)
@pet_info.drawText(165,188,82,"- - ",0)
@pet_info.drawIcon(135, 188, $actor_checking.armors[1].icon_index)
@pet_info.drawIcon(179, 188, $actor_checking.armors[2].icon_index)
@pet_info.drawIcon(223, 188, $actor_checking.armors[3].icon_index)
@pet_info.drawText(0,212,50,"Phái :",0)
@pet_info.draw_actor_class($actor_checking,50,212)
end

def Action1
$actor_checking = $game_party.members[1]
@slot_checking = 1
draw_window_cmd_pet
end

def Action2
$actor_checking = $game_party.members[2]
@slot_checking = 2
draw_window_cmd_pet
end

def Action3
$actor_checking = $game_party.members[3]
@slot_checking = 3
draw_window_cmd_pet
end

def draw_window_cmd_pet
@pet_info.visible = false
draw_pet_info
@pet_info.visible = true
@wd_petname.unselect
@wd_petcmd = Window_Command_Pet_Command.new(32,151)
@wd_petcmd.set_handler( :xuat , method(:Action_call_pet))
@wd_petcmd.set_handler( :thu , method(:Action_rest_pet))
@wd_petcmd.set_handler( :trangbi , method(:Action_eqip))
@wd_petcmd.set_handler( :kinang , method(:Action_skill))
@wd_petcmd.set_handler( :duoidi , method(:Action_dimiss))
@wd_petcmd.set_handler( :back , method(:Action_back))
@wd_petcmd.set_handler( :cancel, method(:return_scene_pet))
end

def Action_call_pet
$pet_rest = false
$game_party.swap_order(1, @slot_checking)
SceneManager.goto(Scene_Map)
end

def Action_rest_pet
$pet_rest = true
SceneManager.goto(Scene_Map)
end

def Action_eqip
$game_party.menu_actor = $actor_checking
SceneManager.call(Scene_Equip_Pet)
end

def Action_skill
$game_party.menu_actor = $actor_checking
SceneManager.call(Scene_Skill_Pet)
end

def Action_dimiss

SceneManager.call(Scene_Map)
$game_party.remove_actor($actor_checking.id)
end

def Action_back
SceneManager.call(Scene_Pet)
end

def Action_exit
SceneManager.goto(Scene_Map) # SceneManager.return will not work.
end
end


#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ ▼ Fix return/back scene method
#═╩═════════════════════════════════════════════════════════════════════════════​
# Add method return_scene_pet and return_map
class Scene_Base
def return_scene_pet
SceneManager.goto(Scene_Pet)
end
def return_map
SceneManager.goto(Scene_Map)
end
end


#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ ▼ Set_up new Scene_Equip and Scene_Skill for pet.
#═╩═════════════════════════════════════════════════════════════════════════════​
# Add Scene_Equip_Pet
class Scene_Equip_Pet < Scene_Equip
def create_command_window
wx = @status_window.width
wy = @help_window.height
ww = Graphics.width - @status_window.width
@command_window = Window_EquipCommand.new(wx, wy, ww)
@command_window.viewport = @viewport
@command_window.help_window = @help_window
@command_window.set_handler(:equip, method(:command_equip))
@command_window.set_handler(:optimize, method(:command_optimize))
@command_window.set_handler(:clear, method(:command_clear))
@command_window.set_handler(:cancel, method(:return_scene_pet))
@command_window.set_handler(:pagedown, method(:next_actor))
@command_window.set_handler(:pageup, method(:prev_actor))
end
end
# Add Scene_Skill_Pet
class Scene_Skill_Pet < Scene_Skill
def create_command_window
wy = @help_window.height
@command_window = Window_SkillCommand.new(0, wy)
@command_window.viewport = @viewport
@command_window.help_window = @help_window
@command_window.actor = @actor
@command_window.set_handler(:skill, method(:command_skill))
@command_window.set_handler(:cancel, method(:return_scene_pet))
@command_window.set_handler(:pagedown, method(:next_actor))
@command_window.set_handler(:pageup, method(:prev_actor))
end
end


#═╦═════════════════════════════════════════════════════════════════════════════​
# ║ ▼ Press P to open Scene_Pet
#═╩═════════════════════════════════════════════════════════════════════════════​
# Update nhan phim P
class Scene_Map < Scene_Base
alias update_wait_press_P update
def update
update_input_p
update_wait_press_P
end
def update_input_p
return if SceneManager.scene_is?(Scene_Pet)
if Keyboard.press?(:P) # Button P , change if you want.
if $game_party.members.size != 1
SceneManager.call(Scene_Pet)
else
if !$game_message.busy?
# The message will be shown if there is no pet in the party :
$game_message.add("Hiện tại ko có đệ tử nào đi theo cả ...")
end
end
end
end
end
[/php]


Copy 2 hình này vào thư mục Graphics/Pictures :

ilmql3wvj8qr2o8fg.jpg
6yko8u81187cpslfg.jpg


Thêm cả script này trên script Hệ Thống Đệ Tử :
[php]class Window_Base < Window

def drawPic(x, y, i_pic_name)
bitmap = Cache.picture(i_pic_name)
self.contents.blt(x, y, bitmap, bitmap.rect)
end

def drawPic_wh(x,y, chieu_rong, chieu_cao, i_pic_name)
bitmap = Cache.picture(i_pic_name)
src_rect = Rect.new(0, 0, chieu_rong, chieu_cao)
self.contents.blt(x,y, bitmap, src_rect)
end

end

class Window_Text < Window_Base
#
# * Object Initialization
#
def initialize(i_left, i_top, i_width, i_height) # base : w=160 , h=64
super(i_left, i_top, i_width, i_height)
self.contents = Bitmap.new(width - 32, height - 32)
end
#
# * Draw text theo toa do
#
def drawText(toado_x, toado_y, i_w, i_text, i_color)
# self.contents.clear
self.contents.font.color = text_color(i_color)
self.contents.font.name = ["Myriad", "Verdana"]
self.contents.font.size = 24
self.contents.font.bold = false
self.contents.font.italic = false
self.contents.draw_text(toado_x, toado_y, i_w, 24, i_text)
end
#
# * Draw text theo toa do theo cách PRO
#
def drawText_pro(toado_x, toado_y, i_w, i_text, i_color,i_font,i_size,i_bold,i_italic)
# self.contents.clear
self.contents.font.color = text_color(i_color)
self.contents.font.name = i_font
self.contents.font.bold = i_bold
self.contents.font.italic = i_italic
self.contents.font.size = i_size
self.contents.draw_text(toado_x, toado_y, i_w, i_size, i_text)
end

#
# * Draw icon
#
def drawIcon(toado_x, toado_y, i_id_icon)
self.draw_icon(i_id_icon, toado_x, toado_y)
end
#
# * Draw face
#
def drawFace(toado_x, toado_y, i_fc_name, i_fc_id)
self.draw_face(i_fc_name, i_fc_id, toado_x, toado_y)
end
end[/php]


Extended Input System : (thêm vào trên script Hệ Thống Đệ Tử)
[php]#===============================================================================
# ** Extended Input System - Scripter's TOOL
#
# Author Ramiro
# Version 1.0
# Usage Level Hard for non scripters
# Requeriments None
#
# Instructions of use:
#
# 1 About Keyboard:
#
# 1.1 Keyboard Normal methods:
# you have the options to choose the original inputs:
#
# Keyboard.trigger?(sym[, sym, ...])
# Keyboard.press?(sym[, sym, ...])
# Keyboard.repeat?(sym[, sym, ...])
# Keyboard.release?(sym[, sym, ...])
#
# If you put more than 1 symbol or key id, you will get true if any of the
# keys choosed are selected.
# Examples of key symbols are:
# :CTRL (Control key), :LEFT_SHIFT (Left Shift), :ARROW_UP ( arrow up)
# :FN (with N from 1 to 12) to function keys
# You can check the ASCII_SYM table to view all the other Symbols.
# You can also use the number key eg: 65, means "A key". Check an ASCII table
# if you wish to know more about.
#
# You can check insthead of any of the pressed keys, all of the pressed keys.
#
# Keyboard.all_trigger?(sym[, sym, ...])
# Keyboard.all_press?(sym[, sym, ...])
# Keyboard.all_repeat?(sym[, sym, ...])
# Keyboard.all_release?(sym[, sym, ...])
#
# 1.2 How each method works:
#
# trigger is activated on the first frame the key was pressed, and not again
# until you release the key.
#
# press will give true each time the key is pressed, even on consecutive frames.
#
# repeat is a special case, it will check between frames, alternating between
# true and false if the key is pressed. its more convenient to use it if you want
# a slower version of 'press'
#
# Finally release, will be set to true, when you release the key. but only the
# first frame.
#
# 1.3 Keyboard's input character:
#
# You can get the keyboard's input character using the next function:
#
# Keyboard.character
#
# This system supports custom Keyboard layauts with api calls, you yes,
# you'll never have to configure each Keyboard version or use the "Only English"
# keyboard.
#
# 2.1 About the mouse.
#
# The Mouse has great influence on modern pcs, or at least when touchscreens
# were expensive and were hard to manufacture.
#
# It doesn't matter anyway, because touchscreens still acts like a Mouse
# sometimes.
#
# 2.2 Mouse position
#
# If you use a Mouse, you can use this next functions:
#
# Mouse.screen_x
# Mouse.screen_y
# Mouse.x
# Mouse.y
#
# if you want to know the real position (in the OS) use screen_x and screen_y
# functions.
#
# to get the relative positions (the position in the game) of the Mouse, use x,
# and y.
#
# 2.3 Mouse keys
#
# You have this same functions from the Keyboard, with some differences:
#
# Mouse.trigger?([sym])
# Mouse.press?([sym])
# Mouse.repeat?([sym])
# Mouse.release?([sym])
#
# sym has to be: :PRIMARY, :SECONDARY, :MIDDLE, :MOUSE4 or :MOUSE5
#
# Each one refered to a key of the mouse, it supports left handed mouses,
# primary, means the principal key, not the left key, and the same for the
# secondary.
#
# if you don't use ANY of the symbols, it will be :PRIMARY by default.
#
# 2.4 Getting areas of mouse:
#
# you can check if the mouse is inside a rect with the next commands:
#
# Mouse.in_area?(x, y, width, height)
# Mouse.in_area?(rect)
#
# both returns true if the mouse is INSIDE the rect and false if the mouse is
# OUTSIDE.
#
# 3.1 About Gamepad
#
# Gamepad works quite different like all the other Inputs, well not really.
# to use it just call this:
#
# Gamepad[index].method(args)
#
# Where index is a number from 1 to the supported numbers of gamepad by
# the system.
#
# On windows 2k it can only support 2 Gamepads
# On windows XP and newer it can support up to 16 Gamepads at least
#
# You can always get the max number of joypads by using the function:
#
# Gamepad.pugged_joypads
#
# 3.2 Getting Gamepad input
#
# The functions are te same of the Keyboard:
#
# Gamepad[id].trigger?(sym[, sym, ...])
# Gamepad[id].press?(sym[, sym, ...])
# Gamepad[id].repeat?(sym[, sym, ...])
# Gamepad[id].release?(sym[, sym, ...])
#
# Gamepad[id].all_trigger?(sym[, sym, ...])
# Gamepad[id].all_press?(sym[, sym, ...])
# Gamepad[id].all_repeat?(sym[, sym, ...])
# Gamepad[id].all_release?(sym[, sym, ...])
#
# The difference here is about the symbols, you can only use symbols and has to
# be one of the next:
# :UP, :DOWN, :LEFT, :RIGHT, :JOY1, :JOY2, :JOY3, :JOY4, :JOY5, :JOY6, :JOY7,
# :JOY8, :JOY9, :JOY10, :JOY11, :JOY12
#
# If you like a more RM Style Gamepad, you can still use the original syms:
#
# :A, :B, :C, :X, :Y, :Z, :L, :R
#
# The are refering from JOY1, to JOY8
#
# if you wisth to know the X axis, the Y axis or the Z axis of an analog stick
# (if supported by your gamepad/s, of course) you can use this functions:
#
# Gamepad[id].x
# Gamepad[id].y
# Gamepad[id].z
#
# They work giving a number from - 32511 to 32511.
#
# Have fun scripting some strange things.
#
#===============================================================================
module Api
#Keyboard Apis
GetKeyboardState = Win32API.new('user32','GetKeyboardState', 'P', 'I')
GetKeyboardLayout = Win32API.new('user32', 'GetKeyboardLayout','L', 'L')
MapVirtualKeyEx = Win32API.new('user32', 'MapVirtualKeyEx', 'IIL', 'I')
ToUnicodeEx = Win32API.new('user32', 'ToUnicodeEx', 'LLPPILL', 'L')
GetKeyState = Win32API.new("user32","GetKeyState",'I','I')
ScreenToClient = Win32API.new('user32', 'ScreenToClient', 'lp', 'i')
GetClientRect = Win32API.new('user32', 'GetClientRect', 'lp', 'i')
GetPrivateProfileStringA = Win32API.new('kernel32', 'GetPrivateProfileStringA','pppplp', 'l')
FindWindowA = Win32API.new('user32', 'FindWindowA', 'pp', 'l')
#Mouse Apis
SwapMouseButton = Win32API.new('user32', 'SwapMouseButton', 'L', 'L')
GetDoubleClickTime = Win32API.new('user32', 'GetDoubleClickTime', '', 'L')
GetSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
GetCursorPos = Win32API.new('user32', 'GetCursorPos', 'p', 'v')
SetCursorPos = Win32API.new('user32', 'SetCursorPos', 'ii', 'I')
GetWindowRect = Win32API.new('user32', 'GetWindowRect', 'lp', 'v')
FindWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
ShowCursor = Win32API.new("user32", "ShowCursor", "i", "i")
#Gamepad Apis
JoyGetNumDevs = Win32API.new("winmm","joyGetNumDevs", 'v', "i")
JoyGetPos = Win32API.new("winmm","joyGetPos", 'lp', "l")

# Get the RGSS window
game_name = "\0" * 256
GetPrivateProfileStringA.call('Game', 'Title', '', game_name, 255, ".\\Game.ini")
game_name.delete!("\0")
h = FindWindowA.call('RGSS Player', game_name)
if h
RGSS_WINDOW = h
else
RGSS_WINDOW = FindWindowA.call('RGSS Player', nil)
end

end

module Keyboard

KEY_SIZE = 256
DOWN_STATE_MASK = 0x80
DEAD_KEY_MASK = 0x80000000

@state = "\0" * 256
@triggered = Array.new(KEY_SIZE, false)
@pressed = Array.new(KEY_SIZE, false)
@released = Array.new(KEY_SIZE, false)
@repeated = Array.new(KEY_SIZE, false)
@frame_keys = []
@caracter = []

#
# * Keys Names
#
KEYS_NAMES = {1=>'Mouse Primary',2=>'Mouse Secondary',3=>'Cancel',
4=>'Mouse Middle',5=>'Mouse 4th',6=>'Mouse 5th',8=>'Backspace',9=>'Tab',
12=>'Clear',13=>'Enter',16=>'Shift',17=>'Control',18=>'Alt',19=>'Pause',
20=>'Capitals Lock',21=>'Kana',23=>'Junja',24=>'Final',25=>'Kanji',
27=>'Escape',28=>'Convert',29=>'Non Convert',30=>'Accept',31=>'Mode Change',
32=>'Space',33=>'Page Up',34=>'Page Down',35=>'End',36=>'Home',37=>'Left',
38=>'Up',39=>'Right',40=>'Down',41=>'Select',42=>'Print',43=>'Execute',
44=>'Snapshot',45=>'Insert',46=>'Delete',47=>'Help',48=>'0',49=>'1',50=>'2',
51=>'3',52=>'4',53=>'5',54=>'6',55=>'7',56=>'8',57=>'9',65=>'A',66=>'B',
67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',72=>'H',73=>'I',74=>'J',75=>'K',
76=>'L',77=>'M',78=>'N',79=>'O',80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',
85=>'U',86=>'V',87=>'W',88=>'X',89=>'Y',90=>'Z',91=>'Left Windows',
92=>'Right Windows',93=>'Application',95=>'Sleep',96=>'PAD 0',97=>'PAD 1',
98=>'PAD 2',99=>'PAD 3',100=>'PAD 4',101=>'PAD 5',102=>'PAD 6',103=>'PAD 7',
104=>'PAD 8',105=>'PAD 9',106=>'*',107=>'+',108=>'Separator',109=>'-',110=>'.',
111=>'/',112=>'F1',113=>'F2',114=>'F3',115=>'F4',116=>'F5',117=>'F6',118=>'F7',
119=>'F8',120=>'F9',121=>'F10',122=>'F11',123=>'F12',124=>'F13',125=>'F14',
126=>'F15',127=>'F16',128=>'F17',129=>'F18',130=>'F19',131=>'F20',132=>'F21',
133=>'F22',134=>'F23',135=>'F24',144=>'Number Lock',145=>'Scroll Lock',
146=>'OEM 15',147=>'OEM 16',148=>'OEM 17',149=>'OEM 18',150=>'OEM 19',
160=>'Left Shift',161=>'Right Shift',162=>' Left Control',163=>'Right Control',
164=>' Left Alt',165=>'Right Alt',166=>'Browser Back',167=>'Browser Forward',
168=>'Browser Refresh',169=>'Browser Stop',170=>'Browser Search',
171=>'Browser Favorites',172=>'Browser Home',173=>'Volume Mute',
174=>'Volume Down',175=>'Volume Up',176=>'Media Next Track',
177=>'Media Previous Track',178=>'Media Stop',179=>'Media Play Pause',
180=>'Launch Mail',181=>'Launch Media Select',182=>'Launch Application',
183=>'Launch Application',186=>'OEM 1',187=>'OEM 2',188=>'OEM 3',189=>'OEM 4',
190=>'OEM 5',191=>'OEM 6',192=>'OEM 7',219=>'OEM 8',220=>'OEM 9',221=>'OEM 10',
222=>'OEM 11',223=>'OEM 13',225=>'OEM 20',226=>'OEM 14',227=>'OEM 21',
228=>'OEM 22',229=>'Proccess',230=>'OEM 23',232=>'OEM 24',240=>'OEM 25',
241=>'OEM 26',242=>'OEM 27',243=>'OEM 28',244=>'OEM 29',245=>'OEM 30',
246=>'ATTN',247=>'CRSEL',248=>'EXSEL',249=>'EREOF',250=>'Play',251=>'Zoom',
253=>'PA1',254=>'OEM Clear'}

# simle symbol-to-ascii-table
ASCII_SYM = { :A => 65, :B => 66, :C => 67, :D => 68, :E => 69, :F => 70,
:G => 71, :H => 72, :I => 73, :J => 74, :K => 75, :L => 76, :M => 77,
:N => 78, :O => 79, :P => 80, :Q => 81, :R => 82, :S => 83, :T => 84,
:U => 85, :V => 86, :W => 87, :X => 88, :Y => 89, :Z => 90,
:N1 => 48, :N2 => 49, :N3 => 50, :N4 => 51, :N5 => 52, :N6 => 53, :N7 => 54,
:N8 => 55, :N9 => 56, :N0 => 57,
:NUMPAD_0 => 45, :NUMPAD_1 => 35, :NUMPAD_2 => 40, :NUMPAD_3 => 34,
:NUMPAD_4 => 37, :NUMPAD_5 => 12, :NUMPAD_6 => 39, :NUMPAD_7 => 36,
:NUMPAD_8 => 38, :NUMPAD_9 => 33,
:F1 => 112, :F2 => 113, :F3 => 114, :F4 => 115, :F5 => 116, :F6 => 117,
:F7 => 118, :F8 => 118, :F9 => 120, :F10 => 121, :F11 => 122, :F12 => 123,
:BACKSPACE => 8, :TAB => 9, :ENTER => 13, :SHIFT => 16, :CTRL => 17,
:ALT => 18, :PRINT => 27, :SPACE => 32, :PAGE_UP => 33, :PAGE_DOWN => 34,
:K_END => 35, :LEFT_SHIFT => 160, :RIGHT_SHIFT => 161, :DELETE => 46,
:LEFT_CTRL => 162, :RIGHT_CTRL => 163, :HOME => 35, :INSERT => 45,
:UP => 38, :DOWN => 40, :LEFT => 37, :RIGHT => 39, :ESC => 27,
:ARROW_UP => 38, :ARROW_DOWN => 40, :ARROW_LEFT => 37, :ARROW_RIGHT => 39}

def self.trigger?(*keys)
keys.any? { |key| key.is_a?(Symbol) ? @triggered[ASCII_SYM[key]] : @triggered[key] }
end

def self.repeat?(*keys)
keys.any? { |key| key.is_a?(Symbol) ? @repeated[ASCII_SYM[key]] : @repeated[key] }
end

def self.press?(*keys)
keys.any? { |key| key.is_a?(Symbol) ? @pressed[ASCII_SYM[key]] : @pressed[key] }
end

def self.release?(*keys)
keys.any? { |key| key.is_a?(Symbol) ? @released[ASCII_SYM[key]] : @released[key] }
end

def self.all_trigger?(*keys)
keys.all? { |key| key.is_a?(Symbol) ? @triggered[ASCII_SYM[key]] : @triggered[key] }
end

def self.all_repeat?(*keys)
keys.all? { |key| key.is_a?(Symbol) ? @repeated[ASCII_SYM[key]] : @repeated[key] }
end

def self.all_press?(*keys)
keys.all? { |key| key.is_a?(Symbol) ? @pressed[ASCII_SYM[key]] : @pressed[key] }
end

def self.all_release?(*keys)
keys.all? { |key| key.is_a?(Symbol) ? @released[ASCII_SYM[key]] : @released[key] }
end

def self.character
@character
end

def self.update

@language_layout = Api::GetKeyboardLayout.call(0)
Api::GetKeyboardState.call(@state)
@frame_keys.clear
KEY_SIZE.times do |key|
if Api::GetKeyState.call(key) & DOWN_STATE_MASK == DOWN_STATE_MASK
@released[key] = false
if !@pressed[key]
@pressed[key] = true
@triggered[key] = true
@repeated[key] = false
else
@triggered[key] = false
end
@repeated[key] = !@repeated[key]
@frame_keys.push(key)
elsif !@released[key]
@triggered[key] = false
@pressed[key] = false
@repeated[key] = false
@released[key] = true
else
@released[key] = false
end
end
@character = make_character
end

def self.get_character(vk)
c = Api::MapVirtualKeyEx.call(vk, 2, @language_layout)
return '' if c < 32 && (c & DEAD_KEY_MASK != DEAD_KEY_MASK)
vsc = Api::MapVirtualKeyEx.call(vk, 0, @language_layout)
result = "\0" * 2
length = Api::ToUnicodeEx.call(vk, vsc, @state, result, 2, 0, @language_layout)
length == 0 ? '' : result
end

def self.unicode_to_utf8(string)
result = ''
begin
string.unpack('S*').each do |c|
if c < 0x0080
result += c.chr
elsif c < 0x0800
result += (0xC0 | (c >> 6)).chr
result += (0x80 | (c & 0x3F)).chr
else
result += (0xE0 | (c >> 12)).chr
result += (0x80 | ((c >> 12) & 0x3F)).chr
result += (0x80 | (c & 0x3F)).chr
end
end
rescue
end
result
end

def self.make_character
result = ''
@frame_keys.each do |key|
c = get_character(key)
result += c if c != ''
end
result ? unicode_to_utf8(result) : ''
end

end

module Mouse

PRIMARY = 0
SECONDARY = 1

@double_click_time = 0
@swap = 0
@swap_values = {:PRIMARY => 1 + @swap, :SECONDARY => 2 - @swap}

@mouse_pos = "\0" * 8
@mouse_drag = [false, false]
@mouse_doubleclick = [false, false]

@visible = true

@x = 0
@y = 0
@screen_x = 0
@screen_y = 0

def self.screen_x
return @screen_x
end

def self.screen_y
return @screen_y
end

def self.x
return @x
end

def self.y
return @y
end

def self.pos
@mouse_pos.clone
end

def self.swapped?
(@swap == 1)
end

def self.press?(key=:PRIMARY)
Keyboard.press?(@swap_values[key])
end

def self.trigger?(key=:PRIMARY)
Keyboard.trigger?(@swap_values[key])
end

def self.repeat?(key=:PRIMARY)
Keyboard.repeat?(@swap_values[key])
end

def self.release?(key=:PRIMARY)
Keyboard.release?(@swap_values[key])
end

def self.click?(key=:PRIMARY)
Keyboard.trigger?(@swap_values[key])
end

def self.set_pos(x, y)
SetCursorPos.call(x, y)
@screen_x = x
@screen_y = y
p = [@x, @y].pack('LL')
Api::ScreenToClient.call(Api::RGSS_WINDOW, p)
@x, @y = p.unpack('ll')
end

def x=(value)
SetCursorPos.call(value, @y)
@screen_x = x
p = [@x, @y].pack('LL')
Api::ScreenToClient.call(Api::RGSS_WINDOW, p)
@x, @y = p.unpack('ll')
@x
end

def y=(value)
SetCursorPos.call(@x, value)
@screen_y = y
p = [@x, @y].pack('LL')
Api::ScreenToClient.call(Api::RGSS_WINDOW, p)
@x, @y = p.unpack('ll')
@y
end

def self.update
@double_click_time = Graphics.frame_rate * (Api::GetDoubleClickTime.call / 10) / 100
@swap = Api::SwapMouseButton.call(0)
@swap_values = {:PRIMARY => 1 + @swap, :SECONDARY => 2 - @swap, :MIDDLE => 4, :MOUSE4 => 5, :MOUSE5 => 6}
Api::GetCursorPos.call(@mouse_pos)
@screen_x, @screen_y = @mouse_pos.unpack('LL')
Api::ScreenToClient.call(Api::RGSS_WINDOW, @mouse_pos)
@x, @y = @mouse_pos.unpack('ll')
end

def self.in_area?(*args)
if args[0].is_a?(Rect)
p = @x >= args[0].x && @y >= args[0].y
q = @x <= args[0].x + args[0].width && @y <= args[0].y + args[0].height
else
p = @x >= args[0].x && @y >= args[1]
q = @x <= args[0] + args[2] && @y <= args[1].y + args[3]
end
return (p && q)
end

def self.visible
@visible
end

def self.visible=(value)
Api::ShowCursor.call(value ? 0 : 0)
@visible = value
end

def self.show
self.visible=true
end

def self.hide
self.visible=false
end

end

module Gamepad

AXIS = 32511

KEYS = [:UP, :DOWN, :LEFT, :RIGHT,
:JOY1, :JOY2,:JOY3, :JOY4, :JOY5, :JOY6, :JOY7, :JOY8, :JOY9, :JOY10,
:JOY11,:JOY12]

class GamepadData
def initialize(number)
@info = "\x00" * 16
@number = number
@data = {}
@pressed = {}
@triggered = {}
@released = {}
@repeated = {}
end

def update
Api::JoyGetPos.call(@number, @info)
@x, @y, @z, @buttons = @info.unpack('I4')
triggers = {:UP => (y < 0), :DOWN => (y > 0), :LEFT => (x < 0),
:RIGHT => (x > 0),
:JOY1 => (0x1 & @buttons == 0x1),
:JOY2 => (0x2 & @buttons == 0x2),
:JOY3 => (0x4 & @buttons == 0x4),
:JOY4 => (0x8 & @buttons == 0x8),
:JOY5 => (0x10 & @buttons == 0x10),
:JOY6 => (0x20 & @buttons == 0x20),
:JOY7 => (0x40 & @buttons == 0x40),
:JOY8 => (0x80 & @buttons == 0x80),
:JOY9 => (0x100 & @buttons == 0x100),
:JOY10 => (0x200 & @buttons == 0x200),
:JOY11 => (0x400 & @buttons == 0x400),
:JOY12 => (0x800 & @buttons == 0x800)}
triggers.each_key do |key|
if triggers[key]
@released[key] = false
if !@triggered[key]
@pressed[key] = true
@triggered[key] = true
@repeated[key] = false
else
@triggered[key] = false
end
@repeated[key] = !@repeated[key]
elsif !@released[key]
@triggered[key] = false
@pressed[key] = false
@repeated[key] = false
@released[key] = true
else
@released[key] = false
end
end

@pressed[:A] = @pressed[:JOY1]
@released[:A] = @released[:JOY1]
@triggered[:A] = @triggered[:JOY1]
@repeated[:A] = @repeated[:JOY1]

@pressed[:B] = @pressed[:JOY2]
@released[:B] = @released[:JOY2]
@triggered[:B] = @triggered[:JOY2]
@repeated[:B] = @repeated[:JOY2]

@pressed[:C] = @pressed[:JOY3]
@released[:C] = @released[:JOY3]
@triggered[:C] = @triggered[:JOY3]
@repeated[:C] = @repeated[:JOY3]

@pressed[:X] = @pressed[:JOY4]
@released[:X] = @released[:JOY4]
@triggered[:X] = @triggered[:JOY4]
@repeated[:X] = @repeated[:JOY4]

@pressed[:Y] = @pressed[:JOY5]
@released[:Y] = @released[:JOY5]
@triggered[:Y] = @triggered[:JOY5]
@repeated[:Y] = @repeated[:JOY5]

@pressed[:Z] = @pressed[:JOY6]
@released[:Z] = @released[:JOY6]
@triggered[:Z] = @triggered[:JOY6]
@repeated[:Z] = @repeated[:JOY6]

@pressed[:L] = @pressed[:JOY7]
@released[:L] = @released[:JOY7]
@triggered[:L] = @triggered[:JOY7]
@repeated[:L] = @repeated[:JOY7]

@pressed[:R] = @pressed[:JOY8]
@released[:R] = @released[:JOY8]
@triggered[:R] = @triggered[:JOY8]
@repeated[:R] = @repeated[:JOY8]

end

def press?(*args)
args.any? {|sym| @pressed[sym]}
end

def trigger?(*args)
args.any? {|sym| @triggered[sym]}
end

def release?(*args)
args.any? {|sym| @released[sym]}
end

def repeat?(*args)
args.any? {|sym| @repeated[sym]}
end

def all_press?(*args)
args.any? {|sym| @pressed[sym]}
end

def all_trigger?(*args)
args.any? {|sym| @triggered[sym]}
end

def all_release?(*args)
args.any? {|sym| @released[sym]}
end

def all_repeat?(*args)
args.any? {|sym| @repeated[sym]}
end

def x
return @x - AXIS
end

def y
return @y - AXIS
end

def z
return @z - AXIS
end

end

@pads = []
@plugged_joypads = 0

def self.[](number)
id = number - 1
@pads[id] = GamepadData.new(number) if !@pads[id]
@pads[id]
end

def self.update
@plugged_joypads = Api::JoyGetNumDevs.call
@plugged_joypads.times do |i|
@pads = GamepadData.new(i) if !@pads
end
@pads.each do |pad|
pad.update if pad
end
end

def self.pugged_joypads
return @plugged_joypads
end

end

module Input

class << self
alias ramiro_input_mod_update update
def update
Keyboard.update
Mouse.update
Gamepad.update
ramiro_input_mod_update
end

def [](index)
@pads = {} if !@pads
return pads[index]
end

def get_first_input_type
for i in 6...256
return [:keyboard, i] if Keyboard.trigger?(i)
end
for i in 1..16
Gamepad::KEYS.each do |key|
return [:gamepad, [i, key]] if Gamepad.trigger?(key)
end
end
return nil
end

def get_name(item)
case item[0]
when :keyobard
return "KEY #{get_key_name(item[1])}"
when :gamepad
return "PAD#{item[1][0]} #{get_joykey_name(item[1][1])}"
end
end

def get_key_name(number)
KEYS_NAMES[number]
end

def get_joykey_name(sym)
case sym
when :UP
return 'UP'
when :DOWN
return 'DOWN'
when :LEFT
return 'LEFT'
when :RIGHT
return 'RIGHT'
when :JOY1
return '1'
when :JOY2
return '2'
when :JOY3
return '3'
when :JOY4
return '4'
when :JOY5
return '5'
when :JOY6
return '6'
when :JOY7
return '7'
when :JOY8
return '8'
when :JOY9
return '9'
when :JOY10
return '10'
when :JOY11
return '11'
when :JOY12
return '12'
end
return '???'
end

end
end[/php]




[chapter] Screenshot [/chapter]


[align=center]10409474_1491113011123971_2361702595638030898_n.jpg
10446020_1491113014457304_8786988404294906123_n.jpg
10457607_1491112981123974_725716443257090699_n.jpg
10462965_1491113004457305_7926221074431425354_n.jpg[/align]

«1

Comments

  • L9 GameL9 Game Posts: 63Registered
    Anh lại chuyển qua dùng rpg maker à :3 tưởng anh chuyên về GM chứ
  • Focker_cFocker_c Posts: 1,577Registered
    Muốn thử sức qua bên ruby language tí :)
    Biết thêm nhiều lang lập trình chứ sao. :D

    Cơ bản là a vẫn muốn làm game rpg . Nếu làm bằng GME thì phải viết tất cả các hệ thống hơi bị mệt.
    Trong khi bên này nó có base rồi, mình chỉ cần mod lại thôi ^^
  • DeathDeath Posts: 732Registered, Moderators
    * Bài viết:
    - Quá nhiều Spoiler không cần thiết trong bài viết.
    - Cần lắm một cái demo.

    * Script:
    - Chiều cao và chiều dài của Text chưa được căn chỉnh hợp lí. VD: Chữ "Trạng thái" bị ép vào nên không còn được như cỡ ban đầu, chữ "Spellblade" thì chữ p bị mất nguyên phần dưới...
    - Những biến toàn cầu như $actor_checking chỉ nên dùng trong quá trình viết, còn khi post lên đây thì nên được đặt trong Game_System ($game_system.actor_checking) vì những biến như vậy sẽ không được Save lại như thường.
    - Nên tách riêng Window và Scene ra để update cho thuận tiện.

    - Nếu viết script ra để cho người khác sử dụng thì:
    + Những phần thuộc về Config như Text giao diện (Xuất chiến, Đuổi đi...) hay nút bấm P,... nên được đặt vào Module để dễ thay đổi, đỡ mất công tìm kiếm.
    + Đừng nên thêm cả script Extended Input System vào chỉ để phục vụ cho cái nút bấm của script này. Những người đang dùng các script Keyboard Input khác phải mất công để sửa lại.
    + Nên tham khảo phần User Service (Module, Config,...) trong những script của người nước ngoài. Chứ như thế này người khác khó dùng lắm.
    ...
    Nói tóm lại là không phải Project nào cũng dùng được script này, post lên để khoe thì tạm chấp nhận được :D
  • Focker_cFocker_c Posts: 1,577Registered
    Chả biết Module là cái gì luôn ^_^ . Lại phải tìm hiểu.
    Mà về global variable dùng như vậy có vấn đề ư ? , nói rõ hơn dùm đi. :D
  • DeathDeath Posts: 732Registered, Moderators
    Đơn giản là nó không lưu lại...
    Load file save khác thì giá trị của nó vẫn y nguyên.
  • jokerjoker Posts: 116Registered
    công nhận là dùng lắm cái show/hide dùng 1 cái là được rồi
  • Dang_KhoaDang_Khoa Posts: 3,861Administrators
    Ngoài trừ screenshot ra, còn lại đều bị đưa vào code hết
    :cuoideu:
  • David ChaseDavid Chase Posts: 1,766Registered
    lão focker còn script này của XP ko
  • Focker_cFocker_c Posts: 1,577Registered
    Death wrote:
    Đơn giản là nó không lưu lại...
    Load file save khác thì giá trị của nó vẫn y nguyên.

    Có lẽ là khi load hay start game, hệ thống sẽ đọc lại toàn bộ một lần các script, cho nên global.script sẽ được đặt lại từ đầu. :)
    Như vậy thì làm cách nào để khắc phục vậy ? :(
  • DeathDeath Posts: 732Registered, Moderators
    Như đã nói, đặt trong Game_System.
  • Focker_cFocker_c Posts: 1,577Registered
    Tức là sẽ thành : $game_system.actor_checking phải ko nhỉ ? :(
  • DeathDeath Posts: 732Registered, Moderators
    Đúng rồi đó, hoặc có cách khác là sửa Save và Load :D
  • Focker_cFocker_c Posts: 1,577Registered
    Thực ra biến actor_checking ko cần save lại, vì nó chỉ hoạt động khi chọn 1 pet trong command.
    Tức là nó ko có tầm ảnh hưởng rộng :)

    Nhưng mà cử thử để nó về Game_System xem :D
  • luucu123luucu123 Posts: 1Registered
    Có thể đưa lên hẳn 1 demon về cái này không hoặc là hướng dẫn chèn vào đâu vào đâu 1 cách chi tiết không ??? mới làm quen nhìn không hiểu rõ cho lắm
  • Focker_cFocker_c Posts: 1,577Registered
    wow :3 Không ngờ top này của mình cũng có người đọc :v
Sign In or Register to comment.