#====================================================================
# Edited by Lartarin the Super Pig ^@^
#====================================================================
module BlizzCFG
#====================================================================
STARTING_POINTS = 10 # ilość punktów startowych
POINTS_PER_LEVEL = 5 # punkty do rozdania co poziom
DISPLAY_ICON = true # wyświetl ikonę true/false
ICON_DATA = [612, 452, 192]
EVASION = 'Unik'
STR_LIMIT = 999 # max. siły
DEX_LIMIT = 999 # max. zręczności
AGI_LIMIT = 999 # max.szybkości
INT_LIMIT = 999 # max.inteligencji
WINDOW_MODE = true # true/false
AUTOMATIC_CALL = false # true/false
AUTOMATIC_MAP_CALL = false # true/false
#====================================================================
ATTR_LIMITS = [STR_LIMIT, DEX_LIMIT, AGI_LIMIT, INT_LIMIT]
#====================================================================
end
#====================================================================
class Array
def sum
result = 0
self.each {|i| result += i if i.is_a?(Numeric)}
return result
end
end
#====================================================================
class Game_Actor < Game_Battler
#====================================================================
attr_reader :points
alias setup_sds_later setup
def setup(actor_id)
@points = BlizzCFG::STARTING_POINTS
setup_sds_later(actor_id)
end
alias exp_sds_later exp=
def exp=(exp)
old_level = @level
exp_sds_later(exp)
add_stat_points((@level - old_level) * BlizzCFG::POINTS_PER_LEVEL)
end
def add_stat_points(val)
@points += val if val > 0
end
def remove_stat_points(val)
@points = [@points-val, 0].max
end
alias draw_actor_parameter_sds_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, BlizzCFG::EVASION)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_sds_later(actor, x, y, type)
end
end
end
#====================================================================
class Window_Distribution_Status < Window_Base
#====================================================================
attr_accessor :actor
def initialize(actor)
super(BlizzCFG::WINDOW_MODE ? 160 : 0, 0, 480, 480)
@actor = actor
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = "Comic Sans MS"
self.contents.font.size = 22
self.contents.font.bold = true
elsif $defaultfonttype != nil
self.contents.font.name = "Comic Sans MS"
self.contents.font.size = 22
self.contents.font.bold = true
end
refresh
end
def remove_points(num)
if @points > 0 && @att[index] > 0
@points = [@points - num, 0].max
@att[index] = [@att[index] - num, 0].max
return true
end
return false
end
def update
super
return unless self.active
if Input.press?(Input::R)
if Input.repeat?(Input::RIGHT)
if add_points(100)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::LEFT)
if remove_points(100)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
elsif Input.press?(Input::L)
if Input.repeat?(Input::RIGHT)
if add_points(10)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::LEFT)
if remove_points(10)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
elsif Input.repeat?(Input::RIGHT)
if add_points(1)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::LEFT)
if remove_points(1)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
end
def update_cursor_rect
if @index < 0 || !self.active
self.cursor_rect.empty
else
self.cursor_rect.set(32, (@index+1)*64, 64, 32)
end
end
end
#====================================================================
class Window_Sure < Window_Command
#====================================================================
attr_accessor :actor
def refresh
super
self.contents.font.color = system_color
self.contents.draw_text(4, 0, self.contents.width - 8, 32, 'Jesteś pewien?', 1)
end
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * (index+1), self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index], 1)
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(32, (@index+1)*32, self.contents.width - 64, 32)
end
end
end
#====================================================================
class Scene_Points
#====================================================================
def initialize
@actor, @scene = $game_party.actors[0], $scene.class
end
Potrzebuję przerobić ten skrypt tak aby był tylko na jedną postać czyli nie pytał o wybraną postać tylko odrazu przechodził do rozdawania i w rozdawaniu zamiast dziwnych znaczków pokazywał strzaŁKI W BOKI, oto screen:
Poszukuję kogoś do pomocy przy układaniu dialogów jak i robienia grafiki w pixelarcie (chodzi tu głównie o chary roślin, grzybów, i innych naturalnych przedmiotów, które można wyłożyć na mapie)
Poszukuję kogoś do pomocy przy układaniu dialogów jak i robienia grafiki w pixelarcie (chodzi tu głównie o chary roślin, grzybów, i innych naturalnych przedmiotów, które można wyłożyć na mapie)
Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Sob 07 Maj, 2011 22:12
Dobrze przetestuj...
Spoiler:
Kod:
#====================================================================
# Edited by Lartarin the Super Pig ^@^
#====================================================================
module BlizzCFG
#====================================================================
STARTING_POINTS = 10 # ilość punktów startowych
POINTS_PER_LEVEL = 5 # punkty do rozdania co poziom
DISPLAY_ICON = true # wyświetl ikonę true/false
ICON_DATA = [612, 452, 192]
EVASION = 'Unik'
STR_LIMIT = 999 # max. siły
DEX_LIMIT = 999 # max. zręczności
AGI_LIMIT = 999 # max.szybkości
INT_LIMIT = 999 # max.inteligencji
WINDOW_MODE = true # true/false
AUTOMATIC_CALL = false # true/false
AUTOMATIC_MAP_CALL = false # true/false
#====================================================================
ATTR_LIMITS = [STR_LIMIT, DEX_LIMIT, AGI_LIMIT, INT_LIMIT]
#====================================================================
end
#====================================================================
class Array
def sum
result = 0
self.each {|i| result += i if i.is_a?(Numeric)}
return result
end
end
#====================================================================
class Game_Actor < Game_Battler
#====================================================================
attr_reader :points
alias setup_sds_later setup
def setup(actor_id)
@points = BlizzCFG::STARTING_POINTS
setup_sds_later(actor_id)
end
alias exp_sds_later exp=
def exp=(exp)
old_level = @level
exp_sds_later(exp)
add_stat_points((@level - old_level) * BlizzCFG::POINTS_PER_LEVEL)
end
def add_stat_points(val)
@points += val if val > 0
end
def remove_stat_points(val)
@points = [@points-val, 0].max
end
alias draw_actor_parameter_sds_later draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
if type == 7
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, BlizzCFG::EVASION)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
else
draw_actor_parameter_sds_later(actor, x, y, type)
end
end
end
#====================================================================
class Window_Distribution_Status < Window_Base
#====================================================================
attr_accessor :actor
def initialize(actor)
super(BlizzCFG::WINDOW_MODE ? 160 : 0, 0, 480, 480)
@actor = actor
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
# self.contents.font.name = "Comic Sans MS"
self.contents.font.size = 22
self.contents.font.bold = true
elsif $defaultfonttype != nil
# self.contents.font.name = "Comic Sans MS"
self.contents.font.size = 22
self.contents.font.bold = true
end
refresh
end
def remove_points(num)
if @points > 0 && @att[index] > 0
@points = [@points - num, 0].max
@att[index] = [@att[index] - num, 0].max
return true
end
return false
end
def update
super
return unless self.active
if Input.press?(Input::R)
if Input.repeat?(Input::RIGHT)
if add_points(100)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::LEFT)
if remove_points(100)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
elsif Input.press?(Input::L)
if Input.repeat?(Input::RIGHT)
if add_points(10)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::LEFT)
if remove_points(10)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
elsif Input.repeat?(Input::RIGHT)
if add_points(1)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::LEFT)
if remove_points(1)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
end
def update_cursor_rect
if @index < 0 || !self.active
self.cursor_rect.empty
else
self.cursor_rect.set(32, (@index+1)*64 + 32, 64, 32)
end
end
end
#====================================================================
class Window_Sure < Window_Command
#====================================================================
attr_accessor :actor
def update
if @sure_window != nil
@sure_window.update
update_sure
elsif @distro_window.active
@distro_window.update
if Input.trigger?(Input::C) or Input.trigger?(Input::B)
@distro_window.active = false
if @distro_window.points != 0
$game_system.se_play($data_system.decision_se)
make_sure_window
else
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
end
end
end
end
def update_sure
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@sure_window.dispose
@sure_window = nil
@distro_window.active = true
elsif Input.trigger?(Input::C)
if @sure_window.index > 0
$game_system.se_play($data_system.decision_se)
@distro_window.set_new_attributes if @sure_window.index == 1
@actor = @status_window.actor = @distro_window.actor = $game_party.actors[0]
[@status_window, @distro_window].each {|win| win.refresh}
else
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
end
@sure_window.dispose
@sure_window = nil
@distro_window.active = true
end
end
end
#====================================================================
class Scene_Battle
#====================================================================
alias main_sds_later main
def main
main_sds_later
if BlizzCFG::AUTOMATIC_CALL &&
$game_party.actors.any? {|actor| actor.points > 0}
$scene = Scene_Points.new
end
end
end
#====================================================================
class Scene_Map
#====================================================================
alias main_sds_later main
def main
main_sds_later
@notify.dispose if @notify != nil
end
Ayene, Jest już na jedną postać lecz jeszcze jest coś nie tak w głównym kwadracie zobacz screena :
Wcześniej było dobrze jak było rozpisane umiejętności i co się nosi :]
A i te znaki  i  weź zamień na strzałki normalne z pliku umieszczane w pictures, ok ?? :]
Poszukuję kogoś do pomocy przy układaniu dialogów jak i robienia grafiki w pixelarcie (chodzi tu głównie o chary roślin, grzybów, i innych naturalnych przedmiotów, które można wyłożyć na mapie)
Ayene, Wielkie dzięki działa wszystko :]
Jeszcze tak się zastanawiam czy dało by się zrobić tak że jak np.: nie da się odjąć jakiejś UM to nie pokazuje się strzałka??
Jak się nie da albo ci się nie chce tego robić to możesz zamknąć temat.
No i oczywiście pomógł masz:]
Jutro zakładam kolejny temat : "Prośba o przerobienie skryptu 5"
Poszukuję kogoś do pomocy przy układaniu dialogów jak i robienia grafiki w pixelarcie (chodzi tu głównie o chary roślin, grzybów, i innych naturalnych przedmiotów, które można wyłożyć na mapie)
(0...4).each {|i|
if @points > 0
self.contents.draw_text(0, (i + 1) * 64 - 8 + 32, 32, 42, '«', 2)
end
case i
when 0
if @actor.points-@points > 0 and @actor.str < BlizzCFG::STR_LIMIT
self.contents.draw_text(96, (i + 1) * 64 - 8 + 32, 32, 42, '»')
end
when 1
if @actor.points-@points > 0 and @actor.dex < BlizzCFG::DEX_LIMIT
self.contents.draw_text(96, (i + 1) * 64 - 8 + 32, 32, 42, '»')
end
when 2
if @actor.points-@points > 0 and @actor.agi < BlizzCFG::AGI_LIMIT
self.contents.draw_text(96, (i + 1) * 64 - 8 + 32, 32, 42, '»')
end
when 3
if @actor.points-@points > 0 and @actor.int < BlizzCFG::INT_LIMIT
self.contents.draw_text(96, (i + 1) * 64 - 8 + 32, 32, 42, '»')
end
end
}
(celowo nie dałam w kodzie, by nie zamieniło strzałek)
Ayene, jest dobrze tylko że jak dodam np.: siłę to wszędzie się pokazują strzałki żeby odjąć a ja bym chciał żeby pojawiały się tam gdzie dodałem tylko
Poszukuję kogoś do pomocy przy układaniu dialogów jak i robienia grafiki w pixelarcie (chodzi tu głównie o chary roślin, grzybów, i innych naturalnych przedmiotów, które można wyłożyć na mapie)
Poszukuję kogoś do pomocy przy układaniu dialogów jak i robienia grafiki w pixelarcie (chodzi tu głównie o chary roślin, grzybów, i innych naturalnych przedmiotów, które można wyłożyć na mapie)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum