Chào mừng bạn đến với diễn đàn của DF Team
----------------------------------------
[Video] Tổng Quát Về Game Mafia Legends-The Lost City:
https://www.youtube.com/watch?v=MYPJKUiWILo
[Demo] Mafia Legends-The Lost City :http://dfteam.forumvi.com/t331-topic#4512
Tổng hợp ver game City of Roleplay : http://dfteam.forumvi.com/t206-topic
-----------------------------------
[New] Dự án Naruto RPG đã bị huỷ bỏ
[New] Mafia Legends-The Lost City đã ra bản Demo
-----------------------------------
Hãy đăng ký làm thành viên của diễn đàn nếu bạn muốn cập nhật thêm thông tin về các dự án làm game của tụi mình Smile. Thanks!!! Very Happy

You are not connected. Please login or register

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down  Thông điệp [Trang 1 trong tổng số 1 trang]

Officer David
avatar
Join date : 28/03/2013
Coins : 14457
Posts : 1089
Thanked : 146

.
Huy chương:

còn đây là scipr của nó! phải lưu vào chứ
Spoiler:
module Caterpillar
#--------------------------------------------------------------------------
# * Maximum Size of Party
#--------------------------------------------------------------------------
MAX_SIZE = 4
#--------------------------------------------------------------------------
# * Switch to Enable Party Followers
# syntax: nil for none (always active) or switch_id
#--------------------------------------------------------------------------
INVISIBLE = nil
#--------------------------------------------------------------------------
# * Switch to Enable Movement
# syntax: nil for none (always active) or switch_id
# note: this does not disable $game_player.moveto(x, y)
#--------------------------------------------------------------------------
ENABLE_MOVEMENT = nil
#--------------------------------------------------------------------------
# * Switch for followers to activate events
# syntax: nil for none (always active) or switch_id
#--------------------------------------------------------------------------
FOLLOWER_EVENTS = nil
#--------------------------------------------------------------------------
# * Do Not Touch
#--------------------------------------------------------------------------
def self.active?(symbol)
value = const_get(symbol)
return value == nil || $game_switches[value]
end
end
===========
Spoiler:
class Game_Follower < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :actor
attr_accessor :move_speed
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor)
super()
@through = true
@actor = actor
end
#--------------------------------------------------------------------------
# * Set Actor
#--------------------------------------------------------------------------
def actor=(actor)
if actor != @actor
@actor = actor
refresh
end
end
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def refresh
if @actor != nil
@character_name = actor.character_name
@character_hue = actor.character_hue
else
@character_name = ''
@character_hue = 0
end
@opacity = 255
@blend_type = 0
end
#--------------------------------------------------------------------------
# * Screen Z
#--------------------------------------------------------------------------
def screen_z(height = 0)
if $game_player.x == @x and $game_player.y == @y
return $game_player.screen_z(height) - 1
end
super(height)
end
#--------------------------------------------------------------------------
# * Same Position Starting Determinant
#--------------------------------------------------------------------------
def check_event_trigger_here(triggers)
result = false
if !Caterpillar.active?(:FOLLOWER_EVENTS)
# If event is running
if $game_system.map_interpreter.running?
return result
end
# All event loops
for event in $game_map.events.values
# If event coordinates and triggers are consistent
if event.x == @x and event.y == @y and triggers.include?(event.trigger)
# If starting determinant is same position event (other than jumping)
if not event.jumping? and event.over_trigger?
event.start
result = true
end
end
end
end
return result
end
#--------------------------------------------------------------------------
# * Front Envent Starting Determinant
#--------------------------------------------------------------------------
def check_event_trigger_there(triggers)
result = false
if !Caterpillar.active?(:FOLLOWER_EVENTS)
# If event is running
if $game_system.map_interpreter.running?
return result
end
# Calculate front event coordinates
new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# All event loops
for event in $game_map.events.values
# If event coordinates and triggers are consistent
if event.x == new_x and event.y == new_y and
triggers.include?(event.trigger)
# If starting determinant is front event (other than jumping)
if not event.jumping? and not event.over_trigger?
event.start
result = true
end
end
end
# If fitting event is not found
if result == false
# If front tile is a counter
if $game_map.counter?(new_x, new_y)
# Calculate 1 tile inside coordinates
new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# All event loops
for event in $game_map.events.values
# If event coordinates and triggers are consistent
if event.x == new_x and event.y == new_y and
triggers.include?(event.trigger)
# If starting determinant is front event (other than jumping)
if not event.jumping? and not event.over_trigger?
event.start
result = true
end
end
end
end
end
end
return result
end
#--------------------------------------------------------------------------
# * Touch Event Starting Determinant
#--------------------------------------------------------------------------
def check_event_trigger_touch(x, y)
result = false
if !Caterpillar.active?(:FOLLOWER_EVENTS)
# If event is running
if $game_system.map_interpreter.running?
return result
end
# All event loops
for event in $game_map.events.values
# If event coordinates and triggers are consistent
if event.x == x and event.y == y and [1,2].include?(event.trigger)
# If starting determinant is front event (other than jumping)
if not event.jumping? and not event.over_trigger?
event.start
result = true
end
end
end
end
return result
end
end
Spoiler:
class Spriteset_Map
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 200
@viewport3.z = 5000
# Make tilemap
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
# Make panorama plane
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
# Make fog plane
@fog = Plane.new(@viewport1)
@fog.z = 3000
# Make character sprites
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
$game_party.followers.each do |char|
@character_sprites << Sprite_Character.new(@viewport1, char)
end
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame update
update
end
end
Spoiler:
class Game_Party
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :followers
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_party_initialize, :initialize
def initialize
trick_caterpillar_party_initialize
@followers = Array.new(Caterpillar::MAX_SIZE - 1) {Game_Follower.new(nil)}
@move_list = Array.new(Caterpillar::MAX_SIZE - 1) {nil}
end
#--------------------------------------------------------------------------
# * Update Followers
#--------------------------------------------------------------------------
def update_followers
transparent = !(Caterpillar.active?(:INVISIBLE) ? true :
$game_player.transparent)
@followers.each_with_index do |char, i|
char.actor = @actors[i + 1]
char.transparent = transparent
char.move_speed = $game_player.move_speed
char.update
end
end
#--------------------------------------------------------------------------
# * Move To Party
#--------------------------------------------------------------------------
def moveto_party(x, y)
@followers.each {|char| char.moveto(x, y)}
@move_list.fill(nil)
end
#--------------------------------------------------------------------------
# * Move Party
#--------------------------------------------------------------------------
def move_party
@move_list.each_index do |i|
case @move_list[i].type
when 2
@followers[i].move_down(*@move_list[i].args)
when 4
@followers[i].move_left(*@move_list[i].args)
when 6
@followers[i].move_right(*@move_list[i].args)
when 8
@followers[i].move_up(*@move_list[i].args)
when 1
@followers[i].move_lower_left
when 3
@followers[i].move_lower_right
when 7
@followers[i].move_upper_left
when 9
@followers[i].move_upper_right
when 5
@followers[i].jump(*@move_list[i].args)
end
end
end
#--------------------------------------------------------------------------
# * Add Move List
#--------------------------------------------------------------------------
def update_move(type, *args)
if Caterpillar.active?(:ENABLE_MOVEMENT)
move_party
@move_list.unshift(Game_MoveListElement.new(type, args))
@move_list.pop
end
end
end

Game_MoveListElement = Struct.new(:type, :args)
Spoiler:
class Game_Player
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :move_speed
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_update, :update
def update
$game_party.update_followers
trick_caterpillar_player_update
end
#--------------------------------------------------------------------------
# * Moveto
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_moveto, :moveto
def moveto(x, y)
$game_party.moveto_party(x, y)
trick_caterpillar_player_moveto(x, y)
end
#--------------------------------------------------------------------------
# * Move Down
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_down, :move_down
def move_down(turn_enabled = true)
if passable?(@x, @y, 2)
$game_party.update_move(2, turn_enabled)
end
trick_caterpillar_player_move_down(turn_enabled)
end
#--------------------------------------------------------------------------
# * Move Left
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_left, :move_left
def move_left(turn_enabled = true)
if passable?(@x, @y, 4)
$game_party.update_move(4, turn_enabled)
end
trick_caterpillar_player_move_left(turn_enabled)
end
#--------------------------------------------------------------------------
# * Move Right
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_right, :move_right
def move_right(turn_enabled = true)
if passable?(@x, @y, 6)
$game_party.update_move(6, turn_enabled)
end
trick_caterpillar_player_move_right(turn_enabled)
end
#--------------------------------------------------------------------------
# * Move Up
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_up, :move_up
def move_up(turn_enabled = true)
if passable?(@x, @y, Cool
$game_party.update_move(8, turn_enabled)
end
trick_caterpillar_player_move_up(turn_enabled)
end
#--------------------------------------------------------------------------
# * Move Lower Left
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_lower_left, :move_lower_left
def move_lower_left
if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or
(passable?(@x, @y, 4) and passable?(@x - 1, @y, 2))
$game_party.update_move(1)
end
trick_caterpillar_player_move_lower_left
end
#--------------------------------------------------------------------------
# * Move Lower Right
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_lower_right, :move_lower_right
def move_lower_right
if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or
(passable?(@x, @y, 6) and passable?(@x + 1, @y, 2))
$game_party.update_move(3)
end
trick_caterpillar_player_move_lower_right
end
#--------------------------------------------------------------------------
# * Move Upper Left
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_upper_left, :move_upper_left
def move_upper_left
if (passable?(@x, @y, Cool and passable?(@x, @y - 1, 4)) or
(passable?(@x, @y, 4) and passable?(@x - 1, @y, Cool)
$game_party.update_move(7)
end
trick_caterpillar_player_move_upper_left
end
#--------------------------------------------------------------------------
# * Move Upper Right
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_move_upper_right, :move_upper_right
def move_upper_right
if (passable?(@x, @y, Cool and passable?(@x, @y - 1, 6)) or
(passable?(@x, @y, 6) and passable?(@x + 1, @y, Cool)
$game_party.update_move(9)
end
trick_caterpillar_player_move_upper_right
end
#--------------------------------------------------------------------------
# * Move Upper Right
#--------------------------------------------------------------------------
alias_method :trick_caterpillar_player_jump, :jump
def jump(x_plus, y_plus)
new_x = @x + x_plus
new_y = @y + y_plus
if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)
$game_party.update_move(5, x_plus, y_plus)
end
trick_caterpillar_player_jump(x_plus, y_plus)
end
end

Xem lý lịch thành viên
Fire Dragon
avatar
Join date : 28/03/2013
Coins : 12847
Posts : 809
Thanked : 90

.
Huy chương:
1 phần backup rất hay và tôi rất mệt khi cùng với david



Xem lý lịch thành viên http://dfteam.forumvi.com
Officer David
avatar
Join date : 28/03/2013
Coins : 14457
Posts : 1089
Thanked : 146

.
Huy chương:
Phù. mất gần 1 tiếng cùng chú rồi còn gì



Đừng có đùa!! anh gọi hỗ trợ đấy!!
Watcha want, whatcha gonna do?
When Officer David come for you?
Xem lý lịch thành viên
Madara
avatar
Join date : 29/03/2013
Coins : 6124
Posts : 532
Thanked : 13

.
Huy chương:
Nice Very Happy



Xem lý lịch thành viên
Hieu_Yelich
Join date : 29/03/2013
Coins : 6
Posts : 4
Thanked : 2

.
Huy chương:
Thích0

Gửi một tin nhắn lên tường.

Good job sir Very Happy

Xem lý lịch thành viên
Hoang_Vu
avatar
Join date : 29/03/2013
Coins : 5215
Posts : 256
Thanked : 16

.
Huy chương:
Thích0

Gửi một tin nhắn lên tường.

Quá hay Chú David Pro qua



Xem lý lịch thành viên
Nhox_Bizboy
avatar
Join date : 29/03/2013
Coins : 2325
Posts : 130
Thanked : 1

.
Huy chương:
Ghe vai =]]

Xem lý lịch thành viên
Hoang_Vu
avatar
Join date : 29/03/2013
Coins : 5215
Posts : 256
Thanked : 16

.
Huy chương:
Chú David và Fire quá Đỉnh



Xem lý lịch thành viên
SC_Maka2008
Join date : 30/03/2013
Coins : 1041
Posts : 62
Thanked : 6

.
Huy chương:
backup police là gì ?



Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad
Why Why Why Why
Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy
Xem lý lịch thành viên
SC_Maka2008
Join date : 30/03/2013
Coins : 1041
Posts : 62
Thanked : 6

.
Huy chương:
dạo này làm biếng quá sắp phải thi , Very Happy học c++ và java xong quên béng cái RGSS Very Happy



Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad
Why Why Why Why
Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy
Xem lý lịch thành viên
Officer David
avatar
Join date : 28/03/2013
Coins : 14457
Posts : 1089
Thanked : 146

.
Huy chương:
Backup Police là gọi hỗ trợ trên radio và nó sẽ trợ giúp mình Smile)



Đừng có đùa!! anh gọi hỗ trợ đấy!!
Watcha want, whatcha gonna do?
When Officer David come for you?
Xem lý lịch thành viên
Hoang_Vu
avatar
Join date : 29/03/2013
Coins : 5215
Posts : 256
Thanked : 16

.
Huy chương:
Vậy nó lại rồi làm gì, đứng nhìn mình ak` @@!!!



Xem lý lịch thành viên
Officer David
avatar
Join date : 28/03/2013
Coins : 14457
Posts : 1089
Thanked : 146

.
Huy chương:
ừ nó đi theo mình! mình nói chuyện với nó thì có 2 lựa chọn
1 là khi mình battle thì có nó bên cạnh đánh cùng
2 là nó cứ đi theo mình thôi Smile)
nếu ko muốn nó đi theo thì ấn radio -> code4



Đừng có đùa!! anh gọi hỗ trợ đấy!!
Watcha want, whatcha gonna do?
When Officer David come for you?
Xem lý lịch thành viên
Sponsored content
Sponsored content 

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang  Thông điệp [Trang 1 trong tổng số 1 trang]

Permissions in this forum:
Bạn không có quyền trả lời bài viết

 

Skin FCAmusement [Blue and Pink] - Designed by Méo Hắc Hắc
Please don't rip the skin and sell it