Guest Access
Go to page : 1, 2, 3, 4
EVENTALIST
EVENTALIST
EVENTALIST
profile
Makes the enemies in XAS re-spawn after a set time instead of after a map change, or make the the enemies never re-spawn.
Post any problems you may encounter, or a suggestion for a future update here in this topic.
mr_wiggles
profile
XAS - Respawn Timer
Version: 3.0
Author: Mr Wiggles
Date: November 3, 2011
Version History
Version: 3.0
Author: Mr Wiggles
Date: November 3, 2011
Version History
- Version 3.0 11/3/11 - New System.
- Version 2.5 7/1/10 - Fixed some minor bugs
- Version 2.2 6/27/10 - Cleaned code up. Added new installation instructions.
- version 2.0 6/25/10 - Updated script to work with both the new and old versions of XAS (3.6 and 3.7)
- Version 1.3 6/11/10 - Removed dependency on self variables script. Added new feature, never re-spawn.
- Version 1.0 4/19/10 - Original Release
Planned Future Versions
- Maybe more features, like individual re-spawn times depending on enemy id.
Description
Makes the enemies in XAS re-spawn after a set time instead of after a map change, or make the the enemies never re-spawn.
Features
- Enemies can be tagged so that they will never re-spawn
- Set the time it takes to re-spawn
- Lag prevention by limiting updates
- Can set the re-spawn time for item enemies like crates and such as well.
Instructions
Paste this script in your script data base above your add on scripts but bellow XAS System scripts (in the add on section). Set up the the constants in the script header.script
- Code:
#===============================================================================
# XAS - Respawn Timer
#-------------------------------------------------------------------------------
# By, Mr_Wiggles
# Version 3.0
# 11/3/11
#-------------------------------------------------------------------------------
# Directions -
# Paste script in the data base above main and below all of XAS System
# Scripts. Then fill in the constants bellow.
#
# To make an enemy never respawn, make a comment on the first page of the
# enemy event that says: (case sensitive)
# NEVER_RESPAWN
#
module Respawn_Settings
#===============================================================================
# ** EDIT AREA **
#===============================================================================
# Any value bellow set to -1 will never respawn.
#-------------------------------------------------------------------------------
# Respawn template...
# when (id of enemy)
# return (number of seconds)
def Respawn_Settings.enemy_time(id)
case id
when 2 # When the enemy id is this
return 15 # return this number of seconds
when 6
return 50
else # Other wise return the default respawn time
return 20 # number of seconds for the default time
end
end
#-------------------------------------------------------------------------------
# Number of seconds until an item Enemy will respawn
ITEM_RESPAWN_TIME = 30
#===============================================================================
# ** END EDIT **
#===============================================================================
end
#===============================================================================
class Game_Event < Game_Character
alias respawn_init initialize
def initialize(*args)
respawn_init(*args)
@never_respawn = false
unless @page.nil?
for i in @page.list
if (i.code == 108 or i.code == 408) and
i.parameters[0].upcase[/NEVER_RESPAWN/] != nil
@never_respawn = true
end
end
end
mid = $game_map.map_id
key = [mid, @id]
return if $game_respawns.empty?(key)
if $game_respawns.dead?(key)
self.opacity = 0
self.erase
$game_map.need_refresh = true
end
end
alias respawn_update update
def update
respawn_update
return if self.battler.nil? or !self.battler.is_a?(Game_Enemy)
mid = $game_map.map_id
key = [mid, @id]
return if $game_respawns.dead?(key)
if self.battler.hp <= 0
if @never_respawn
respawn = -1
elsif XAS_BA_ENEMY::ITEM_ENEMY.include?(self.battler.id)
respawn = Respawn_Settings::ITEM_RESPAWN_TIME
else
respawn = Respawn_Settings.enemy_time(self.battler.id)
end
$game_respawns.respawn(key, respawn)
print("Dead and added id #{key.join(', ')} = #{respawn}")
end
end
end
#===============================================================================
class Scene_Map
alias :abs_spawn_up :update
def update
$game_respawns.update_spawns
abs_spawn_up
end
end
#===============================================================================
class Respawn_Hash
def initialize
@data = {}
@spawn_wait = 0
end
def respawn(key, value)
@data[key] = value
end
def dead?(key)
time = @data[key].nil? ? 0 : @data[key]
return (time != 0)
end
def update_spawns
@spawn_wait -= 1
return if @spawn_wait > 0
@data.each{|key, value|
respawn = value.nil? ? 0 : value
respawn -= 1 if respawn > 0
@data[key] = respawn
}
@spawn_wait = 40
end
def remove(key)
@data.delete(key)
end
def empty?(key)
return @data[key].nil?
end
end
#==============================================================================
class Scene_Title
alias :resp_main :main
def main
$game_respawns = Respawn_Hash.new
resp_main
end
end
#==============================================================================
class Scene_Save < Scene_File
alias :resp_save :write_save_data
def write_save_data(file)
resp_save(file)
Marshal.dump($game_respawns, file)
end
end
#==============================================================================
class Scene_Load < Scene_File
alias :resp_save :read_save_data
def read_save_data(file)
resp_save(file)
$game_respawns = Marshal.load(file)
end
end
Support
Post any problems you may encounter, or a suggestion for a future update here in this topic.
Known Compatibility Issues
This script will not work with SDK.Restrictions
DO not post this any where with out my permission, you are free to edit in any way you see fit, but i must be credited some place. EVENTALIST
Show Signature
EVENTALIST
WORDSMITH
WORDSMITH
WORDSMITH
profile
Cardboard Square
profile
This is great! I should have been using this program all along. It's funny, a lot of the scripts you post are things I've had to event myself with RM2K.
WORDSMITH
Show Signature
WORDSMITH
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
@wiggles- man this kix @$$! more control as to how the enemy re-spawns?
I'm using this. Other than your XAS difficulties script, this makes for another enemy twist. Thanks for sharing!!!
(G@/\/\(e|F/A\(C|=
I'm using this. Other than your XAS difficulties script, this makes for another enemy twist. Thanks for sharing!!!
(G@/\/\(e|F/A\(C|=
Administrator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
I guess im script happy... lol
this was one of 2 i wrote in one night. The other made the weapon damage the skill's power, and i can directly effect the weapons damage so i can make it do more damage depending on the players skill with that type of weapon.
this was one of 2 i wrote in one night. The other made the weapon damage the skill's power, and i can directly effect the weapons damage so i can make it do more damage depending on the players skill with that type of weapon.
EVENTALIST
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
i'm going to make this script more of a stand alone after i finish with a requested update.
EVENTALIST
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
ACTIVATED
ACTIVATED
ACTIVATED
profile
rpg-dutch
profile
I don't understand I created a new script field and pasted the script under the XAS System and I get a message saying...
Line 63 NoMethodError Occured
Undefined Method 'push' for nil:NilClass
Please help this script sounds like what I've been after all this time
Line 63 NoMethodError Occured
Undefined Method 'push' for nil:NilClass
Please help this script sounds like what I've been after all this time
ACTIVATED
Show Signature
ACTIVATED
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
How are you using the script? i can't replicate this error, and if i can't replicate it i can't fix.
can you give more details?
What other scripts are you using?
Is this script above or bellow those?
can you give more details?
What other scripts are you using?
Is this script above or bellow those?
EVENTALIST
Show Signature
EVENTALIST
ACTIVATED
ACTIVATED
ACTIVATED
profile
rpg-dutch
profile
I use a few different add-ons see below.
- Spoiler:
- #===============================================================================
# Check_Time, By Leon_Westbrooke
#-------------------------------------------------------------------------------
# Details:
# Will automatically change the tint of maps that it is called on based on
# the computer's internal clock.
#
# Instructions:
# Place script above main, but below other default scripts.
# On each map you want the tint set by this script, make an event as follows:
# [Parallel Process Event]
# Turn on switch 3
# Loop
# script... Check_Time.new
# Wait 1 frame
# End Loop
#
# Notes:
# You must set a switch to change this parallel process if you wish to change
# the tint of the screen on that map.
#
#===============================================================================
class Check_Time
def initialize
@time_stamp = Time.new
if $game_switches[246] == false
if @time_stamp.strftime("%H").to_i < 6 or @time_stamp.strftime("%H").to_i > 20
red = -100
green = -100
blue = -90
$game_screen.start_tone_change(Tone.new(red, green, blue, 20), 120)
elsif @time_stamp.strftime("%H").to_i > 5 and @time_stamp.strftime("%H").to_i < 9
red = -60
green = -42
blue = -60
$game_screen.start_tone_change(Tone.new(red, green, blue, 15), 120)
elsif @time_stamp.strftime("%H").to_i > 8 and @time_stamp.strftime("%H").to_i < 18
red = 0
green = 0
blue = 0
$game_screen.start_tone_change(Tone.new(red, green, blue, 0), 120)
elsif @time_stamp.strftime("%H").to_i >17 and @time_stamp.strftime("%H").to_i < 21
red = -40
green = -60
blue = -60
$game_screen.start_tone_change(Tone.new(red, green, blue, 15), 120)
end
else
if @time_stamp.strftime("%H").to_i < 6 or @time_stamp.strftime("%H").to_i > 20
red = -100
green = -100
blue = -90
$game_screen.start_tone_change(Tone.new(red, green, blue, 20), 0)
$game_switches[246] = false
elsif @time_stamp.strftime("%H").to_i > 5 and @time_stamp.strftime("%H").to_i < 9
red = -60
green = -42
blue = -60
$game_screen.start_tone_change(Tone.new(red, green, blue, 15), 0)
$game_switches[246] = false
elsif @time_stamp.strftime("%H").to_i > 8 and @time_stamp.strftime("%H").to_i < 18
red = 0
green = 0
blue = 0
$game_screen.start_tone_change(Tone.new(red, green, blue, 0), 0)
$game_switches[246] = false
elsif @time_stamp.strftime("%H").to_i >17 and @time_stamp.strftime("%H").to_i < 21
red = -42
green = -60
blue = -60
$game_screen.start_tone_change(Tone.new(red, green, blue, 15), 0)
$game_switches[246] = false
end
end
end
end
- Spoiler:
- #==============================================================================#
# Quest Log script
# By: game_guy
# Date: May 31st, 2009
# Version: 1.6
#==============================================================================#
=begin
Intro:
This script allows you to have a quest system. A bit more overcomplicated than
most quest scripts but still easy to configure I hope.
The quests are items which allowed me to knock off a bunch of lines of code.
Easy to setup (I hope)
Instructions:
Ok so how do you setup quests? Thats easy just follow the steps.
1: First make an Item in the database. For example call it Goblin Raid
2: Set the description to the quest description. Example:
Kill all the goblins before they attack.
3: Come in the script and go to CONFIG REWARD and follow the steps there
4: Now go to CONFIG LOCATION and follow the steps there
You're done SETTING up a quest.
Ok so then how do I add a quest to the quest log?
Use this in a script call
$quest.gain_quest(item_id)
Remember that the quests are items
Ok so then how do I mark them as complete?
Use this in a script call
$game_items[the item id here].completed = true
So heres an example:
$quest.gain_quest(32) This will give the player the item #32 which acts as a quest
Then say he completes it use this
$game_items[32].completed = "Complete"
Oh and to see if a quest has even been accepted use this in a conditional branch
$quest.quest(item id) > 0
See the demo to see how everything is setuo.
Hopefully these arent confusing instructions...
=end
module RPG
class Item
def reward
case id
#==========================
# CONFIG REWARD NOTE THIS DOES NOT GIVE THE PLAYER A REWARD IT JUST
# GIVES THE script INFO ON THE QUEST
#==========================
# Use this
# when item_id then return "Reward here"
when 32 then return "Batman?"
when 32 then return "300 Gold"
# END CONFIG REWARD
end
return "Nothing"
end
def location
case id
#==========================
# CONFIG LOCATION
#==========================
# Use this
#when item_id then return "Location Here"
when 24 then return "Lynnia"
when 32 then return "Lynnia"
#END CONFIG LOCATION
end
return "Nowhere"
end
def completed
return false
end
end
end
class Game_Item
attr_accessor :completed
def initialize(actor_id)
super()
setup(actor_id)
end
def setup(actor_id)
actor = $data_items[actor_id]
@completed = false
end
end
class Game_Items
def initialize
@data = []
end
def [](actor_id)
if actor_id > 999 or $data_items[actor_id] == nil
return nil
end
if @data[actor_id] == nil
@data[actor_id] = Game_Item.new(actor_id)
end
return @data[actor_id]
end
end
class Quests
def initialize
@items = {}
end
def quest(item_id)
return @items.include?(item_id) ? @items[item_id] : 0
end
def gain_quest(item_id)
if item_id > 0
@items[item_id] = [[quest(item_id) + 1, 0].max, 99].min
end
end
def lose_quest(item_id)
gain_item(item_id, -1)
end
end
class Window_Quest < Window_Selectable
def initialize
super(0, 64, 320, 416)
@column_max = 1
refresh
self.index = 0
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $quest.quest(i) > 0
@data.push($data_items[i])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $quest.quest(item.id)
end
self.contents.font.color = normal_color
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)
if $game_items[item.id].completed
self.contents.font.color = crisis_color
else
self.contents.font.color = normal_color
end
#opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), 255)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
end
def update_help
@help_window.set_text(self.item == nil ? "" : "Press the action key to view Quest Info.")
end
end
class Window_QuestInfo < Window_Base
def initialize(name, info, location, reward, completed)
super(0, 64, 640, 416)
self.contents = Bitmap.new(width - 32, height - 32)
@name = name
@info = info
self.z = 200
@location = location
@reward = reward
@completed = completed
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 300, 32, "Quest")
self.contents.draw_text(4, 64, 300, 32, "Description")
self.contents.draw_text(4, 128, 300, 32, "Location")
self.contents.draw_text(4, 192, 300, 32, "Reward")
self.contents.draw_text(4, 256, 300, 32, "Status")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 300, 32, @name)
self.contents.draw_text(4, 96, 300, 32, @info)
self.contents.draw_text(4, 160, 300, 32, @location)
self.contents.draw_text(4, 224, 300, 32, @reward)
if @completed == true
self.contents.font.color = crisis_color
self.contents.draw_text(4, 288, 300, 32, "Completed")
else
self.contents.font.color = normal_color
self.contents.draw_text(4, 288, 300, 32, "Not Finished")
end
end
end
class Scene_Quest
def main
@quest = Window_Quest.new
@help_window = Window_Help.new
@quest.help_window = @help_window
@map = Spriteset_Map.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@map.dispose
@quest.dispose
@questinfo.dispose if @questinfo != nil
@help_window.dispose
end
def update
@quest.update
@questinfo.update if @questinfo != nil
@help_window.update
if @quest.active
update_quest
end
if @questinfo != nil and @questinfo.active
update_questinfo
end
end
def update_quest
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if @quest.item == nil
$game_system.se_play($data_system.buzzer_se)
return
else
$game_system.se_play($data_system.decision_se)
@quest.active = false
@help_window.set_text("Press the cancel key to back out.")
@questinfo = Window_QuestInfo.new(@quest.item.name, @quest.item.description, @quest.item.location, @quest.item.reward, $game_items[@quest.item.id].completed)
@questinfo.active = true
end
end
def update_questinfo
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@help_window.set_text("Press the action key to view Quest Info.")
@quest.active = true
@questinfo.visible = false
@questinfo.active = false
end
end
end
end
class Scene_Save < Scene_File
alias quest_save_later write_save_data
def write_save_data(file)
quest_save_later(file)
Marshal.dump($quest, file)
Marshal.dump($game_items, file)
end
end
class Scene_Title
alias load_quest_later command_new_game
def command_new_game
$quest = Quests.new
$game_items = Game_Items.new
load_quest_later
end
end
class Scene_Load < Scene_File
alias quest_load_later read_save_data
def read_save_data(file)
quest_load_later(file)
$quest = Marshal.load(file)
$game_items = Marshal.load(file)
end
end
- Spoiler:
- #===================================================
# ■ Ring Menu - Show Player Location - Release #1 (Enhanced By Dubealex)
#===================================================
# For more infos and update, visit:
# asylum.dubealex.com
#
# Original Ring Menu by: 和希 (From XRXS)
# Original Edit and Fix by: Maki
# Show Player Location Version by: Dubealex
#
# You can customize this script at line #35 - Have fun !!
# If you want to show more stuff, its easy to do, you can try to ask in the forum.
#
# alex@dubealex.com
#===================================================
#===================================================
# ▼ CLASS Scene_Menu Begins
#===================================================
class Scene_Menu
#--------------------------------------------------------------------------
# پ? ?I?u?W?F?N?gڈ?????
# menu_index : ?R?}???h??Jپ[?\??ڈ?????u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
$location_text=[]
$window_size=[]
$ring_menu_text=[]
$chara_select=[]
@window_opacity=[]
@chara_select=[]
@window_position=[]
#--------------------------------------------------------------------------------------------------
# ■ Ring Menu Customization Section: (By Dubealex)
#--------------------------------------------------------------------------------------------------
# Those variables defines how the script will act.
# Simply change the value by those you want.
# Remember that changing the font size has its limitation due to text space allocation.
#
# ▼ TEXT SETTINGS FOR SHOW PLAYER LOCATION WINDOW:
$location_text[0]="Tahoma" # Font Type
$location_text[1]=22 # Font Size
$location_text[2]=6 # Location Title Color
$location_text[4]=0 # Map Name Color
$location_text[3]="Location:" # Customize the "Location" Title Text
# ▼ SHOW LOCATION WINDOW SETTINS:
@show_location_window=true #Set to false to not use it !
@window_opacity[0]=255 # Border Opacity
@window_opacity[1]=130 # Background Opacity
$window_location_skin="001-Blue01" # Window Skin
@window_position[0]=20 # X Axis Position
@window_position[1]=20 # Y Axis Position
$window_size[0]=160 # Lengh
$window_size[1]=96 # Heigh
# ▼ TEXT SETTINGS FOR INSIDE THE RING MENU:
$ring_menu_text[0]="Tahoma" # Font Type
$ring_menu_text[11]=0 # Font Color
$ring_menu_text[10]=22 # Font Size
$ring_menu_text[1]="Items" # Items Menu Text
$ring_menu_text[2]="Skills" # Skills Menu Text
$ring_menu_text[3]="Equip" # Equip Menu Text
$ring_menu_text[4]="Stats" # Stats Menu Text
$ring_menu_text[5]="Quests" # Quests
$ring_menu_text[6]="Main" # Main
$ring_menu_text[7]="Save" # Save Menu Text
$ring_menu_text[8]="Quit" # Quit Menu Text
# ▼ CHARACTER SELECTION WINDOW SETTINGS :
@chara_select[0]=400 # X Axis Position
@chara_select[1]=0 # Y Axis Position
$chara_select[0]="Tahoma" # Font Type
$chara_select[1]=0 # Font Color
$chara_select[5]=22 # Font Size
$chara_select[2]=255 # Window Border Opacity
$chara_select[3]=130 # Window Background Opacity
$chara_select[4]="001-Blue01" # Window Skin to use
#--------------------------------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
# پ? ?پ?C??ڈ??
#--------------------------------------------------------------------------
def main
# Show Player Location Feature:
if @show_location_window==true
@window_location = Window_Location.new
@window_location.x = @window_position[0]
@window_location.y = @window_position[1]
@window_location.opacity = @window_opacity[0]
@window_location.back_opacity = @window_opacity[1]
end
#End of Show Player Location
# ?X?v???C?g?Z?b?g??چ? ?
@spriteset = Spriteset_Map.new
# ?R?}???h?E?B???h?E??چ? ?
px = $game_player.screen_x - 15
py = $game_player.screen_y - 24
@command_window = Window_RingMenu.new(px,py)
@command_window.index = @menu_index
# ?pپ[?e?B l ??? 0 l??ڈ?چ?
if $game_party.actors.size == 0
# ?A?C?e??پA?X?L??پA????پA?X?eپ[?^?X????????
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@command_window.z = 100
# ?Zپ[?u??~??ڈ?چ?
if $game_system.save_disabled
# ?Zپ[?u???????????
@command_window.disable_item(4)
end
# ?X?eپ[?^?X?E?B???h?E??چ? ?
@status_window = Window_RingMenuStatus.new
@status_window.x = @chara_select[0]
@status_window.y = @chara_select[1]
@status_window.z = 200
@status_window.opacity=$chara_select[2]
@status_window.back_opacity=$chara_select[3]
@status_window.visible = false
# ?g?????W?V??????چs
Graphics.transition
# ?پ?C????پ[?v
loop do
# ?Qپ[???????چX V
Graphics.update
# ????ڈ?????چX V
Input.update
# ?t??پ[??چX V
update
# ????? ???????????پ[?v?????f
if $scene != self
break
end
end
# ?g?????W?V????ڈ???
Graphics.freeze
# ?X?v???C?g?Z?b?g??????
@spriteset.dispose
# ?E?B???h?E??????
if @show_location_window==true
@window_location.dispose
end
@command_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# پ? ?t??پ[??چX V
#--------------------------------------------------------------------------
def update
# ?E?B???h?E??چX V
if @show_location_window==true
@window_location.update
end
@command_window.update
@status_window.update
# ?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_command ?????
if @command_window.active
update_command
return
end
# ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?: update_status ?????
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# پ? ?t??پ[??چX V (?R?}???h?E?B???h?E???A?N?e?B?u??ڈ?چ?)
#--------------------------------------------------------------------------
def update_command
# B ?{?^??????????ڈ?چ?
if Input.trigger?(Input::B)
# ?L?????Z?? SE ?????t
$game_system.se_play($data_system.cancel_se)
# ?}?b?v????? ?????
$scene = Scene_Map.new
return
end
# C ?{?^??????????ڈ?چ?
if Input.trigger?(Input::C)
# ?pپ[?e?B l ??? 0 l??پA?Zپ[?uپA?Qپ[??ڈI????O??R?}???h??ڈ?چ?
if $game_party.actors.size == 0 and @command_window.index < 4
# ?u?Uپ[ SE ?????t
$game_system.se_play($data_system.buzzer_se)
return
end
# ?R?}???h?E?B???h?E??Jپ[?\????u?????
case @command_window.index
when 0 # ?A?C?e??
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?A?C?e??????? ?????
$scene = Scene_Item.new
when 1 # ?X?L??
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 2 # ????
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 3 # ?X?eپ[?^?X
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?X?eپ[?^?X?E?B???h?E???A?N?e?B?u?????
@command_window.active = false
@status_window.active = true
@status_window.visible = true
@status_window.index = 0
when 4 # ?Qپ[??ڈI??
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?Qپ[??ڈI??????? ?????
$scene = Scene_Quest.new
when 5 # ?Qپ[??ڈI??
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?Qپ[??ڈI??????? ?????
$scene = Scene_Map.new
$game_switches[67] = true
when 6 # ?Zپ[?u
# ?Zپ[?u??~??ڈ?چ?
if $game_system.save_disabled
# ?u?Uپ[ SE ?????t
$game_system.se_play($data_system.buzzer_se)
return
end
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?Zپ[?u????? ?????
$scene = Scene_Save.new
when 7 # ?Qپ[??ڈI??
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?Qپ[??ڈI??????? ?????
$scene = Scene_End.new
end
return
end
# ?A?j?پپ[?V??????????Jپ[?\????ڈ?? ??چs?????
return if @command_window.animation?
# پ?orپ? ?{?^??????????ڈ?چ?
if Input.press?(Input::UP) or Input.press?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
return
end
# پ?orپ? ?{?^??????????ڈ?چ?
if Input.press?(Input::DOWN) or Input.press?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
return
end
end
#--------------------------------------------------------------------------
# پ? ?t??پ[??چX V (?X?eپ[?^?X?E?B???h?E???A?N?e?B?u??ڈ?چ?)
#--------------------------------------------------------------------------
def update_status
# B ?{?^??????????ڈ?چ?
if Input.trigger?(Input::B)
# ?L?????Z?? SE ?????t
$game_system.se_play($data_system.cancel_se)
# ?R?}???h?E?B???h?E???A?N?e?B?u?????
@command_window.active = true
@status_window.active = false
@status_window.visible = false
@status_window.index = -1
return
end
# C ?{?^??????????ڈ?چ?
if Input.trigger?(Input::C)
case @command_window.index
when 1 # ?X?L??
# ????A?N?^پ[??چs?? ????? 2 ??ڈ???ڈ?چ?
if $game_party.actors[@status_window.index].restriction >= 2
# ?u?Uپ[ SE ?????t
$game_system.se_play($data_system.buzzer_se)
return
end
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?X?L??????? ?????
$scene = Scene_Skill.new(@status_window.index)
when 2 # ????
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ????????? ?????
$scene = Scene_Equip.new(@status_window.index)
when 3 # ?X?eپ[?^?X
# ???? SE ?????t
$game_system.se_play($data_system.decision_se)
# ?X?eپ[?^?X????? ?????
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
#===================================================
# ▲ CLASS Scene_Menu Ends
#===================================================
#===================================================
# ▼ CLASS Window_RingMenu Begins
#===================================================
class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# پ? ?N???X?? ?
#--------------------------------------------------------------------------
STARTUP_FRAMES = 20
MOVING_FRAMES = 5
RING_R = 64
ICON_ITEM = RPG::Cache.icon("034-Item03")
ICON_SKILL = RPG::Cache.icon("044-Skill01")
ICON_EQUIP = RPG::Cache.icon("001-Weapon01")
ICON_STATUS = RPG::Cache.icon("050-Skill07")
ICON_QUEST = RPG::Cache.icon("039-Item08")
ICON_MAIN = RPG::Cache.icon("046-Skill03")
ICON_SAVE = RPG::Cache.icon("038-Item07")
ICON_EXIT = RPG::Cache.icon("046-Skill03")
ICON_DISABLE= RPG::Cache.icon("")
SE_STARTUP = "056-Right02"
MODE_START = 1
MODE_WAIT = 2
MODE_MOVER = 3
MODE_MOVEL = 4
#--------------------------------------------------------------------------
# پ? ?A?N?Z?T
#--------------------------------------------------------------------------
attr_accessor :index
#--------------------------------------------------------------------------
# پ? ?I?u?W?F?N?gڈ?????
#--------------------------------------------------------------------------
def initialize( center_x, center_y )
super(0, 0, 640, 480)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $ring_menu_text[0]
self.contents.font.color = text_color($ring_menu_text[11])
self.contents.font.size = $ring_menu_text[10]
self.opacity = 0
self.back_opacity = 0
s1 = $ring_menu_text[1]
s2 = $ring_menu_text[2]
s3 = $ring_menu_text[3]
s4 = $ring_menu_text[4]
s5 = $ring_menu_text[5]
s6 = $ring_menu_text[6]
s7 = $ring_menu_text[7]
s8 = $ring_menu_text[8]
@commands = [ s1, s2, s3, s4, s5, s6, s7, s8 ]
@item_max = 7
@index = 0
@items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_QUEST, ICON_SAVE, ICON_EXIT ]
@disabled = [ false, false, false, false, false, false ]
@cx = center_x - 16
@cy = center_y - 16
setup_move_start
refresh
end
#--------------------------------------------------------------------------
# پ? ?t??پ[??چX V
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# پ? ????چ?`??
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# ?A?C?R?????`??
case @mode
when MODE_START
refresh_start
when MODE_WAIT
refresh_wait
when MODE_MOVER
refresh_move(1)
when MODE_MOVEL
refresh_move(0)
end
# ?A?N?e?B?u??R?}???h???\??
rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index],1)
end
#--------------------------------------------------------------------------
# پ? ????چ?`??(ڈ???????)
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / STARTUP_FRAMES
r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# پ? ????چ?`??(??@??)
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# پ? ????چ?`??(???]??)
# mode : 0=?????v???? 1=???v????
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = MODE_WAIT
end
end
#--------------------------------------------------------------------------
# پ? چ????`??
# x :
# y :
# i : چ????چ?
#--------------------------------------------------------------------------
def draw_item(x, y, i)
#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s
rect = Rect.new(0, 0, @items[i].width, @items[i].height)
if @index == i
self.contents.blt( x, y, @items[i], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[i], rect, 128 )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
end
end
end
#--------------------------------------------------------------------------
# پ? چ?????????????
# index : چ????چ?
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# پ? ڈ??????A?j?پپ[?V??????ڈ???
#--------------------------------------------------------------------------
def setup_move_start
@mode = MODE_START
@steps = STARTUP_FRAMES
if SE_STARTUP != nil and SE_STARTUP != ""
Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
end
end
#--------------------------------------------------------------------------
# پ? ???]?A?j?پپ[?V??????ڈ???
#--------------------------------------------------------------------------
def setup_move_move(mode)
if mode == MODE_MOVER
@index -= 1
@index = @items.size - 1 if @index < 0
elsif mode == MODE_MOVEL
@index += 1
@index = 0 if @index >= @items.size
else
return
end
@mode = mode
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# پ? ?A?j?پپ[?V?????????????
#--------------------------------------------------------------------------
def animation?
return @mode != MODE_WAIT
end
end
#===================================================
# ▲ CLASS Window_RingMenu Ends
#===================================================
#===================================================
# ▼ CLASS Window_RingMenuStatus Begins
#===================================================
class Window_RingMenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# پ? ?I?u?W?F?N?gڈ?????
#--------------------------------------------------------------------------
def initialize
super(204, 64, 232, 352)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = $chara_select[5]
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# پ? ???t???b?V??
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.windowskin = RPG::Cache.windowskin($chara_select[4])
self.contents.font.name = $chara_select[0]
self.contents.font.color = text_color($chara_select[1])
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 80
y = 80 * i
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y + 24)
end
end
#--------------------------------------------------------------------------
# پ? ?Jپ[?\??????`چX V
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
end
end
end
#===================================================
# ▲ CLASS Window_RingMenuStatus Ends
#===================================================
#===================================================
# ▼ CLASS Game_Map Additional Code Begins
#===================================================
class Game_Map
#Dubealex Addition (from XRXS) to show Map Name on screen
def name
$map_infos[@map_id]
end
end
#===================================================
# ▲ CLASS Game_Map Additional Code Ends
#===================================================
#===================================================
# ▼ CLASS Scene_Title Additional Code Begins
#===================================================
class Scene_Title
#Dubealex Addition (from XRXS) to show Map Name on screen
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
#===================================================
# ▲ CLASS Scene_Title Additional Code Ends
#===================================================
#===================================================
# ▼ CLASS Window_Location Begins
#===================================================
class Window_Location < Window_Base
def initialize
super(0, 0, $window_size[0], $window_size[1])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $location_text[0]
self.contents.font.size = $location_text[1]
refresh
end
def refresh
self.contents.clear
self.windowskin = RPG::Cache.windowskin($window_location_skin)
self.contents.font.color = text_color($location_text[2])
self.contents.draw_text(4, 0, 120, 32, $location_text[3])
self.contents.font.color = text_color($location_text[4])
self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
end
end
#===================================================
# ▲ CLASS Window_Location Ends
#===================================================
#===================================================
# ▲ Ring Menu - Show Player Location R1 - Ends
#===================================================
- Spoiler:
- #===============================================================================
# ** Player : Swap Dead Actor 2.5 by Kain Nobel
#===============================================================================
#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
#SDK.log('Player.SwapDeadActor', 'Kain Nobel ', 2.5, '12.10.2008')
#-------------------------------------------------------------------------------
# * SDK Enabled Test : BEGIN
#-------------------------------------------------------------------------------
#if SDK.enabled?('Player.SwapDeadActor')
#===============================================================================
# ** Scene_Map
#===============================================================================
class Scene_Map
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :swap_dead_leader_scene_map_update, :update
#-----------------------------------------------------------------------------
# * Update
#-----------------------------------------------------------------------------
def update
swap_dead_leader_scene_map_update
unless $game_party.actors.empty?
if ($game_party.actors[0].hp).zero?
unless $game_party.all_dead?
$game_party.actors << $game_party.actors.shift
$game_player.refresh
if @sthero != nil
@sthero.dispose
@sthero = Window_HUD.new
@sthero.x = XAS_HUD::XASHUD_X
@sthero.y = XAS_HUD::XASHUD_Y
if $game_switches[XAS_HUD::DISABLE_STATUS_HUD_SWITCH] == false
@sthero.visible = true
else
@sthero.visible = false
end
@sthero.update
end
else ; $game_temp.gameover = true
end
end
end
end
end
#-------------------------------------------------------------------------------
# * SDK Enabled Test : END
#-------------------------------------------------------------------------------
#end
- Spoiler:
- #------------------#
#Dod Change Leader #
#by:Dodoop #
#version:1.0 #
#------------------#
#
# Edited by: Night_Runner
# Date: 15/Sept/09
#
# Designed to: Turn on the switch corresponding with the leading player's ID
# (and turn off the switch from the last leading player). And update the
# leading player before battle (designed to be compatable with MOG XAS Hud
# V2.6.
#
#-----------------#
#Muda o líder quando uma certa tecla for pressionada no mapa.
module Dodoop
#Tecla que devera ser pressiona para mudar o líder.
CHANGE_LEADER_INPUT = Input::L
end
class Scene_Map
alias change_leader update
def update
change_leader
if Input.trigger?(Dodoop::CHANGE_LEADER_INPUT)
leader_read
end
$game_variables[$game_party.actors[0].id] = $game_system.xas_skill_id
$game_switches[$game_party.actors[0].id] = true # Turns on the switch of
# the leading hero
end
def leader_read
$game_switches[$game_party.actors[0].id] = false # Turns off the switch of
# the last hero
@actors = []
for i in 0...$game_party.actors.size
@actors[i] = $game_party.actors[i]
end
for i in 1...@actors.size
$game_party.actors[i - 1] = @actors[i]
end
$game_party.actors[@actors.size - 1] = @actors[0]
$game_player.refresh
$game_party.refresh # Needed to update the party order.
@sthero.refresh # Only to be used with MOG's XAS, refreshes the HUD.
@sthero.update if @sthero != nil
@sthero.refresh if @sthero != nil
@sthero.update if @sthero != nil
if @sthero != nil
@sthero.dispose
last_act = $game_party.actors.shift
$game_party.add_actor (last_act.id)
$game_player.refresh
$game_system.xas_item_id = 0
$scene = Scene_Map.new
$game_system.xas_skill_id = $game_variables[$game_party.actors[0].id]
@sthero = Window_HUD.new
@sthero.x = XAS_HUD::XASHUD_X
@sthero.y = XAS_HUD::XASHUD_Y
if $game_switches[XAS_HUD::DISABLE_STATUS_HUD_SWITCH] == false
@sthero.visible = true
else
@sthero.visible = false
end
@sthero.update
$game_switches[25] = true
end
end
end
#================================================#
# Game_Party
#================================================#
class Game_Party
def remove_actor(actor_id)
# Delete actor
@actors.delete($game_actors[actor_id])
# Refresh player
$game_player.refresh
$game_switches[actor_id] = false # If the actor is removed, they cannot
# be the leading hero.
end
end
ACTIVATED
Show Signature
ACTIVATED
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
It shouldn't be conflicting with those scripts, and the error just told me that the array i have set up in system did not get set up. so that i why i was wondering what other script you where using.
Is the re-spawn script above or bellow those?
Is the re-spawn script above or bellow those?
EVENTALIST
Show Signature
EVENTALIST
Go to page : 1, 2, 3, 4