• [THÔNG BÁO] CẢNH BÁO LỪA ĐẢO MẠO DANH QUẢN TRỊ VIÊN
    Chào các thành viên GameVN,
    Dạo gần đây tình trạng lừa đảo scamming và phishing đang gia tăng. Ban quản trị GameVN xin lưu ý toàn bộ thành viên:
    KHÔNG/ ĐỪNG / CẤM cho bất kỳ ai tự xưng là quản trị viên của server vay tiền.
    Mọi hành vi lân la làm quen, tự tiện nhắn tin trên Discord, Facebook, Zalo hoặc các nền tảng mạng xã hội khác,
    núp bóng dưới danh nghĩa sinh hoạt của quản trị viên, đều có tỉ lệ rất, rất cao là lừa đảo.
    Nếu có tài khoản lạ add friend hoặc nhắn tin xin tiền dưới danh nghĩa admin:
    Block ngay
    Report ngay
    Không chuyển khoản, không cung cấp thông tin cá nhân


    Quản trị viên của forum và Discord server GameVN không có nhu cầu vay tiền thành viên.
    Không có lý do nào để admin chủ động kết bạn rồi xin tiền.
    Mọi thông báo chính thức chỉ được đăng trên kênh thông báo của server và topic chính thức trên forum.
    Tin nhắn riêng từ tài khoản lạ không phải thông báo của ban quản trị.
    Cảm ơn các bạn đã chú ý và cùng giữ cộng đồng an toàn.
    — Ban quản trị GameVN

    Tắt thông báo bằng nút X bên góc phải của bảng thông báo*

Mini Games : Đánh bài

Nguyen_Kain

Quậy hết mình
Moderator
Tham gia ngày
28/5/04
Bài viết
1,299
Reaction score
0
Đây là một mini games , giống như FF8 , nhưng cách đánh bài của nó khác , các bạn tự tìm hiểu cách chơi nhé .
Tạo script trên main , đặt tên Card

Mã:
# Parent card, used to give card global properties.
# For simplicity, the card effects are merged with the card displayement.
class Card < RPG::Sprite
 attr_accessor :name
 def initialize
   super
   @name = "unnamed card"
   # The backside of the card when facing up
   @front_pic = RPG::Cache.picture("cardfront")
   # The backside of the card when facing down
   @front_pic = RPG::Cache.picture("cardback")
   # The displayement when facing up, such as monsters.
   @contents = Bitmap.new(90,120)
   # The merging of the contents and the front_pic
   @card_pic = Bitmap.new(90,120)
   update_contents
   # Make card face down.
   @upside = false
   self.bitmap = @back_pic
 end
 # Merge layers when card is facing upwards.
 def update_contents
   @card_pic.clear
   @card_pic.blt(0,0,@front_pic,@front_pic.rect)
   @card_pic.blt(0,0,@contents_pic,@contents_pic.rect)
 end
 def flip
   @upside = !@upside
   @upside ? self.bitmap = @card_pic : self.bitmap = @back_pic
 end
 def play(user)
   @user = user
 end
 def target
   @targets = []
 end
 def effect
   #
 end
 def dispose
   if self.bitmap != nil
     self.bitmap.dispose
   end
   super
 end
end

# Makes a card that allows you to attack twice.
class Card_OdenStrike < Card
 def initialize
   # Calls the initialize function of the Card class.
   super
   @name = "Oden strike"
   @contents_pic.dispose
   @contents_pic = RPG::Cache.picture("oden_card")
   update_contents
 end
 # Function run when the card is first selected.
 def play(user)
   super(user)
   flip
   target
 end
 # Function for targetting.
 def target
   super
   # Select an enemy
   @target_arrow = Arrow_Enemy.new
   Input.update
   while not Input.trigger?(Input::C)
     @target_arrow.update
     Graphics.update
     Input.update
   end
   @targets.push @target_arrow.enemy
   effect
 end
 # Function which handles the effects.
 def effect
   super
   # Perform two strikes
   @targets.first.attack_effect(@user)
   @targets.first.attack_effect(@user)
 end
 def dispose
   super
 end
end

Đây chỉ là khuôn mẫu của một lá bài , nếu ai hiểu về script , hãy chỉnh sửa thành nhiều lá bài , rồi tạo hiệu ứng , có thể download bản demo tại đây :
HERE
 
Hoan hô bác nguyen_kain , :x bác còn những cái nào hay nữa ko , đưa lên nhé , cám ơn bác nhiều lắm :x
 
Back
Top