l0rdph0enix
Member
Ok so I'm helping a friend with a game and they want to use the Ocarina Script in their VX game.
Just wondering if someone could make that conversion for me. Thanks in advance.
Code:
############################################################################
################# Ocarina Script ###################
############################################################################
################# By: RENEGADEOFBMX(nahchito)
################# Date:16-2-2008
################## Version: 1.2
################## Added: 2 Songs
################## Notes Show
##################
################## New Version: Custom Notes
############################################################################
class Game_System
attr_reader :ocarina, :ocarina_down, :ocarina_right, :ocarina_up, :ocarina_left
alias tsu_initialize initialize
def initialize
@ocarina = []
##############################################
@ocarina_down = "001-System01"
@ocarina_left = "002-System02"
@ocarina_right = "003-System03"
@ocarina_up = "004-System04"
##############################################
@ocarina[0] = []
@ocarina[0][0] = 4 #NOTE 1
@ocarina[0][1] = 4 #NOTE 2
@ocarina[0][2] = 6 #NOTE 3
@ocarina[0][3] = 6 #NOTE 4
@ocarina[0][4] = 2 #NOTE 5
@ocarina[0][5] = 2 #NOTE 6
@ocarina[0][6] = "Bolero of fire" #NAME OF THE SONG, IT WILL APPEAR AFTER THE PERFORMANCE
@ocarina[0][7] = Color.new(0, 255, 0) #ARROW'S OPACITY
@ocarina[0][8] = "116-Raise02" #SOUND (SE) WHEN YOU SUCCESFULLY PERFOM THE SONG
@ocarina[0][9] = 5 #SWITH THAT THE SUCCESFULL SONG WILL TURN ON.
@ocarina[1] = []
@ocarina[1][0] = 8
@ocarina[1][1] = 2
@ocarina[1][2] = 2
@ocarina[1][3] = 8
@ocarina[1][4] = 2
@ocarina[1][5] = 2
@ocarina[1][6] = "Song of war"
@ocarina[1][7] = Color.new(255, 0, 0)
@ocarina[1][8] = "116-Raise02"
@ocarina[1][9] = 4
@ocarina[1] = []
@ocarina[1][0] = 4
@ocarina[1][1] = 2
@ocarina[1][2] = 4
@ocarina[1][3] = 6
@ocarina[1][4] = 2
@ocarina[1][5] = 2
@ocarina[1][6] = "Song of healing"
@ocarina[1][7] = Color.new(255, 0, 0)
@ocarina[1][8] = "116-Raise02"
@ocarina[1][9] = 6
##############################################
tsu_initialize
end
end
class Ocarina
def main
@spriteset = Spriteset_Map.new
@ocarina_window = Window_Ocarina.new
Graphics.transition
loop do
Graphics.update
Input.update
@ocarina_window.update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@ocarina_window.dispose
end
end
class Window_Ocarina < Window_Base
def initialize
super(0, 280, 640, 80)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@song = []
@correct = false
@counter = 0
refresh
end
def refresh
self.contents.clear
@back = Sprite.new
@back.bitmap = RPG::Cache.picture("pentagrama")
@back.x = 40
@back.y = 360
@back.opacity = 160
end
def update
if @correct
if @counter == 0
self.contents.font.color = $game_system.ocarina[@i][7]
self.contents.draw_text(0, 0, 618, 48, $game_system.ocarina[@i][6], 1)
Audio.se_play("Audio/SE/" + $game_system.ocarina[@i][8], 80, 100)
@arrow1.opacity = 255
@arrow2.opacity = 255
@arrow3.opacity = 255
@arrow4.opacity = 255
@arrow5.opacity = 255
@arrow6.opacity = 255
$game_switches[$game_system.ocarina[@i][9]] = true
end
@counter += 1
if @counter >= 200
@back.dispose
@back.bitmap.dispose
@arrow1.dispose
@arrow1.bitmap.dispose
@arrow2.dispose
@arrow2.bitmap.dispose
@arrow3.dispose
@arrow3.bitmap.dispose
@arrow4.dispose
@arrow4.bitmap.dispose
@arrow5.dispose
@arrow5.bitmap.dispose
@arrow6.dispose
@arrow6.bitmap.dispose
$scene = Scene_Map.new
$game_map.autoplay
$game_map.refresh
end
else
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@back.dispose
@back.bitmap.dispose
if @arrow1 != nil
@arrow1.dispose
@arrow1.bitmap.dispose
end
if @arrow2 != nil
@arrow2.dispose
@arrow2.bitmap.dispose
end
if @arrow3 != nil
@arrow3.dispose
@arrow3.bitmap.dispose
end
if @arrow4 != nil
@arrow4.dispose
@arrow4.bitmap.dispose
end
if @arrow5 != nil
@arrow5.dispose
@arrow5.bitmap.dispose
end
if @arrow6 != nil
@arrow6.dispose
@arrow6.bitmap.dispose
end
$scene = Scene_Map.new
$game_map.autoplay
$game_map.refresh
end
if Input.trigger?(Input::DOWN)
Audio.se_play("Audio/SE/" + $game_system.ocarina_down, 80, 100)
@song.push(2)
case @song.size
when 1
@arrow1 = Sprite.new
@arrow1.bitmap = RPG::Cache.picture("arrow")
@arrow1.angle = 180
@arrow1.opacity = 160
@arrow1.ox = @arrow1.bitmap.width / 2
@arrow1.oy = @arrow1.bitmap.height / 2
@arrow1.x = 160
@arrow1.y = 440
when 2
@arrow2 = Sprite.new
@arrow2.bitmap = RPG::Cache.picture("arrow")
@arrow2.angle = 180
@arrow2.opacity = 160
@arrow2.ox = @arrow2.bitmap.width / 2
@arrow2.oy = @arrow2.bitmap.height / 2
@arrow2.x = 240
@arrow2.y = 440
when 3
@arrow3 = Sprite.new
@arrow3.bitmap = RPG::Cache.picture("arrow")
@arrow3.angle = 180
@arrow3.opacity = 160
@arrow3.ox = @arrow3.bitmap.width / 2
@arrow3.oy = @arrow3.bitmap.height / 2
@arrow3.x = 320
@arrow3.y = 440
when 4
@arrow4 = Sprite.new
@arrow4.bitmap = RPG::Cache.picture("arrow")
@arrow4.angle = 180
@arrow4.opacity = 160
@arrow4.ox = @arrow4.bitmap.width / 2
@arrow4.oy = @arrow4.bitmap.height / 2
@arrow4.x = 400
@arrow4.y = 440
when 5
@arrow5 = Sprite.new
@arrow5.bitmap = RPG::Cache.picture("arrow")
@arrow5.angle = 180
@arrow5.opacity = 160
@arrow5.ox = @arrow5.bitmap.width / 2
@arrow5.oy = @arrow5.bitmap.height / 2
@arrow5.x = 480
@arrow5.y = 440
when 6
@arrow6 = Sprite.new
@arrow6.bitmap = RPG::Cache.picture("arrow")
@arrow6.angle = 180
@arrow6.opacity = 160
@arrow6.ox = @arrow6.bitmap.width / 2
@arrow6.oy = @arrow6.bitmap.height / 2
@arrow6.x = 560
@arrow6.y = 440
end
end
if Input.trigger?(Input::LEFT)
Audio.se_play("Audio/SE/" + $game_system.ocarina_left, 80, 100)
@song.push(4)
case @song.size
when 1
@arrow1 = Sprite.new
@arrow1.bitmap = RPG::Cache.picture("arrow")
@arrow1.angle = 90
@arrow1.opacity = 160
@arrow1.ox = @arrow1.bitmap.width / 2
@arrow1.oy = @arrow1.bitmap.height / 2
@arrow1.x = 160
@arrow1.y = 420
when 2
@arrow2 = Sprite.new
@arrow2.bitmap = RPG::Cache.picture("arrow")
@arrow2.angle = 90
@arrow2.opacity = 160
@arrow2.ox = @arrow2.bitmap.width / 2
@arrow2.oy = @arrow2.bitmap.height / 2
@arrow2.x = 240
@arrow2.y = 420
when 3
@arrow3 = Sprite.new
@arrow3.bitmap = RPG::Cache.picture("arrow")
@arrow3.angle = 90
@arrow3.opacity = 160
@arrow3.ox = @arrow3.bitmap.width / 2
@arrow3.oy = @arrow3.bitmap.height / 2
@arrow3.x = 320
@arrow3.y = 420
when 4
@arrow4 = Sprite.new
@arrow4.bitmap = RPG::Cache.picture("arrow")
@arrow4.angle = 90
@arrow4.opacity = 160
@arrow4.ox = @arrow4.bitmap.width / 2
@arrow4.oy = @arrow4.bitmap.height / 2
@arrow4.x = 400
@arrow4.y = 420
when 5
@arrow5 = Sprite.new
@arrow5.bitmap = RPG::Cache.picture("arrow")
@arrow5.angle = 90
@arrow5.opacity = 160
@arrow5.ox = @arrow5.bitmap.width / 2
@arrow5.oy = @arrow5.bitmap.height / 2
@arrow5.x = 480
@arrow5.y = 420
when 6
@arrow6 = Sprite.new
@arrow6.bitmap = RPG::Cache.picture("arrow")
@arrow6.angle = 90
@arrow6.opacity = 160
@arrow6.ox = @arrow6.bitmap.width / 2
@arrow6.oy = @arrow6.bitmap.height / 2
@arrow6.x = 560
@arrow6.y = 420
end
end
if Input.trigger?(Input::RIGHT)
Audio.se_play("Audio/SE/" + $game_system.ocarina_right, 80, 100)
@song.push(6)
case @song.size
when 1
@arrow1 = Sprite.new
@arrow1.bitmap = RPG::Cache.picture("arrow")
@arrow1.angle = 270
@arrow1.opacity = 160
@arrow1.ox = @arrow1.bitmap.width / 2
@arrow1.oy = @arrow1.bitmap.height / 2
@arrow1.x = 160
@arrow1.y = 400
when 2
@arrow2 = Sprite.new
@arrow2.bitmap = RPG::Cache.picture("arrow")
@arrow2.angle = 270
@arrow2.opacity = 160
@arrow2.ox = @arrow2.bitmap.width / 2
@arrow2.oy = @arrow2.bitmap.height / 2
@arrow2.x = 240
@arrow2.y = 400
when 3
@arrow3 = Sprite.new
@arrow3.bitmap = RPG::Cache.picture("arrow")
@arrow3.angle = 270
@arrow3.opacity = 160
@arrow3.ox = @arrow3.bitmap.width / 2
@arrow3.oy = @arrow3.bitmap.height / 2
@arrow3.x = 320
@arrow3.y = 400
when 4
@arrow4 = Sprite.new
@arrow4.bitmap = RPG::Cache.picture("arrow")
@arrow4.angle = 270
@arrow4.opacity = 160
@arrow4.ox = @arrow4.bitmap.width / 2
@arrow4.oy = @arrow4.bitmap.height / 2
@arrow4.x = 400
@arrow4.y = 400
when 5
@arrow5 = Sprite.new
@arrow5.bitmap = RPG::Cache.picture("arrow")
@arrow5.angle = 270
@arrow5.opacity = 160
@arrow5.ox = @arrow5.bitmap.width / 2
@arrow5.oy = @arrow5.bitmap.height / 2
@arrow5.x = 480
@arrow5.y = 400
when 6
@arrow6 = Sprite.new
@arrow6.bitmap = RPG::Cache.picture("arrow")
@arrow6.angle = 270
@arrow6.opacity = 160
@arrow6.ox = @arrow6.bitmap.width / 2
@arrow6.oy = @arrow6.bitmap.height / 2
@arrow6.x = 560
@arrow6.y = 400
end
end
if Input.trigger?(Input::UP)
Audio.se_play("Audio/SE/" + $game_system.ocarina_up, 80, 100)
@song.push(8)
case @song.size
when 1
@arrow1 = Sprite.new
@arrow1.bitmap = RPG::Cache.picture("arrow")
@arrow1.opacity = 160
@arrow1.ox = @arrow1.bitmap.width / 2
@arrow1.oy = @arrow1.bitmap.height / 2
@arrow1.x = 160
@arrow1.y = 380
when 2
@arrow2 = Sprite.new
@arrow2.bitmap = RPG::Cache.picture("arrow")
@arrow2.opacity = 160
@arrow2.ox = @arrow2.bitmap.width / 2
@arrow2.oy = @arrow2.bitmap.height / 2
@arrow2.x = 240
@arrow2.y = 380
when 3
@arrow3 = Sprite.new
@arrow3.bitmap = RPG::Cache.picture("arrow")
@arrow3.opacity = 160
@arrow3.ox = @arrow3.bitmap.width / 2
@arrow3.oy = @arrow3.bitmap.height / 2
@arrow3.x = 320
@arrow3.y = 380
when 4
@arrow4 = Sprite.new
@arrow4.bitmap = RPG::Cache.picture("arrow")
@arrow4.opacity = 160
@arrow4.ox = @arrow4.bitmap.width / 2
@arrow4.oy = @arrow4.bitmap.height / 2
@arrow4.x = 400
@arrow4.y = 380
when 5
@arrow5 = Sprite.new
@arrow5.bitmap = RPG::Cache.picture("arrow")
@arrow5.opacity = 160
@arrow5.ox = @arrow5.bitmap.width / 2
@arrow5.oy = @arrow5.bitmap.height / 2
@arrow5.x = 480
@arrow5.y = 380
when 6
@arrow6 = Sprite.new
@arrow6.bitmap = RPG::Cache.picture("arrow")
@arrow6.opacity = 160
@arrow6.ox = @arrow6.bitmap.width / 2
@arrow6.oy = @arrow6.bitmap.height / 2
@arrow6.x = 560
@arrow6.y = 380
end
end
if @song.size >= 6
for @i in 0...$game_system.ocarina.size
if @song[0] == $game_system.ocarina[@i][0] &&
@song[1] == $game_system.ocarina[@i][1] &&
@song[2] == $game_system.ocarina[@i][2] &&
@song[3] == $game_system.ocarina[@i][3] &&
@song[4] == $game_system.ocarina[@i][4] &&
@song[5] == $game_system.ocarina[@i][5]
@correct = true
break
end
end
end
if @song.size >= 6 && @correct == false
@counter += 1
if @counter >= 40
@back.dispose
@back.bitmap.dispose
@arrow1.dispose
@arrow1.bitmap.dispose
@arrow2.dispose
@arrow2.bitmap.dispose
@arrow3.dispose
@arrow3.bitmap.dispose
@arrow4.dispose
@arrow4.bitmap.dispose
@arrow5.dispose
@arrow5.bitmap.dispose
@arrow6.dispose
@arrow6.bitmap.dispose
$scene = Scene_Map.new
end
end
end
end
end
Code:
#-------------------------------------------------------------------------------
#Info. Cards - By Jbrist @ rmxp.org
# THANKS JBRIST! - RENEGADEOFBMX
#-------------------------------------------------------------------------------
=begin
--------------------------------------------------------------------------------
How to use:
Make a call script event and insert the corresponding script (Labelled above
each card's script)
--------------------------------------------------------------------------------
What it does:
Enables you to see an NPC's Info. Card, which includes their:
-Name
-Job/Profession
-Signiture Skill
It is very easy to modify to your needs, I have just put those three as as
example.
--------------------------------------------------------------------------------
Capacity:
To make as many as you wish, Just copy and paste one of the scripts over and
over until you have enough, For example, If you have 1 and want to make another,
Copy and paste:
#-------------------------------------------------------------------------------
#Info Card 1 - Call Script: Info_Card1.new
#-------------------------------------------------------------------------------
class Info_Card1 < Window_Base
def initialize
super (160, 120, 320, 240)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.draw_text (85, 0, 180, 32, "Info. Card")
self.contents.draw_text (0, 50, 320, 32, "Name: Crafty Thief")
self.contents.draw_text (0, 80, 320, 32, "Job/Profession: Master Thief")
self.contents.draw_text (0, 120, 320, 32, "Signiture Skill:")
self.contents.draw_text (0, 150, 320, 32, "Mug -")#Skills Line 1
self.contents.draw_text (0, 180, 320, 32, "Attack and steal G from an enemy")#Skills Line 2
#self.opacity = 0
#@picture = Sprite.new
#@picture.bitmap = RPG::Cache.picture("INFO_CARD_BG")
end
end
and change:
Info Card 1 --> Info Card 2
Info_Card1.new --> Info_Card2.new
class Info_Card1 < Window_Base --> class Info_Card2 < Window_Base
Also, make sure you delete the text inside the "", Or else your two people will
have the exact same Info. Card
--------------------------------------------------------------------------------
Additional Info:
If you wish to have no windowskin for it, Delete the # on this line:
#self.opacity = 0
If you wish to have a picture for the windowskin, Delete the # on these lines:
#self.opacity = 0
#@picture = Sprite.new
#@picture.bitmap = RPG::Cache.picture("INFO_CARD_BG")
Picture Info: The picture must be 320x240 to fit with the script.
The picture must be put in the Game/Graphics/Pictures folder
and be called: INFO_CARD_BG
If you have gotten this script from rmxp.org, There will be an INFO_CARD_BG
picture provided.
If this script is posted anywhere other than rmxp.org without my permission,
REMOVE IT ! - Thats copyright fraud ! Especially if my name doesn't go in the
post.
Four Info. Cards have been included.
--------------------------------------------------------------------------------
Compatability:
This script is 100% compatible with all other scripts, Although, as usual, I
don't know about compatability with the SDK.
--------------------------------------------------------------------------------
=end
#-------------------------------------------------------------------------------
#Info Card 1 - Call Script: Info_Card1.new
#-------------------------------------------------------------------------------
class Info_Card1 < Window_Base
def initialize
super (160, 120, 320, 240)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.draw_text (85, 0, 180, 32, "Song1")
self.contents.draw_text (0, 50, 320, 32, "Name: Song of war")
self.contents.draw_text (0, 80, 320, 32, "Action: Raises STR ")
self.contents.draw_text (0, 150, 320, 32, "Notes:")#Skills Line 1
self.contents.draw_text (0, 180, 320, 32, "L+L+R+R+D+D")#Skills Line 2
self.opacity = 0
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("INFO_CARD_BG2")
end
end
#-------------------------------------------------------------------------------
#Info Card 2 - Call Script: Info_Card2.new
#-------------------------------------------------------------------------------
class Info_Card2 < Window_Base
def initialize
super (160, 120, 320, 240)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.draw_text (85, 0, 180, 32, "Song2")
self.contents.draw_text (0, 50, 320, 32, "Name: Bolero of fire")
self.contents.draw_text (0, 80, 320, 32, "Action: Teleports ")
self.contents.draw_text (0, 150, 320, 32, "Notes:")#Skills Line 1
self.contents.draw_text (0, 180, 320, 32, "U+D+D+U+D+D")#Skills Line 2
self.opacity = 0
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("INFO_CARD_BG2")
end
end
#-------------------------------------------------------------------------------
#Info Card 3 - Call Script: Info_Card3.new
#-------------------------------------------------------------------------------
class Info_Card3 < Window_Base
def initialize
super (160, 120, 320, 240)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.draw_text (85, 0, 180, 32, "Song3")
self.contents.draw_text (0, 50, 320, 32, "Name: Song of healing")
self.contents.draw_text (0, 80, 320, 32, "Action: Heals ")
self.contents.draw_text (0, 150, 320, 32, "Notes:")#Skills Line 1
self.contents.draw_text (0, 180, 320, 32, "L+D+L+R+D+D")#Skills Line 2
self.opacity = 0
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("INFO_CARD_BG2")
end
end
#-------------------------------------------------------------------------------
#Info Card 4 - Call Script: Info_Card4.new
#-------------------------------------------------------------------------------
class Info_Card4 < Window_Base
def initialize
super (160, 120, 320, 240)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.draw_text (85, 0, 180, 32, "Info. Card")
self.contents.draw_text (0, 50, 320, 32, "Name: ")
self.contents.draw_text (0, 80, 320, 32, "Job/Profession: ")
self.contents.draw_text (0, 120, 320, 32, "Signiture Skill:")
self.contents.draw_text (0, 150, 320, 32, "")#Skills Line 1
self.contents.draw_text (0, 180, 320, 32, "")#Skills Line 2
#self.opacity = 0
#@picture = Sprite.new
#@picture.bitmap = RPG::Cache.picture("INFO_CARD_BG")
end
end
Just wondering if someone could make that conversion for me. Thanks in advance.