Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: iJaco on June 25, 2009, 07:26:49 am

Title: My first ever script :o
Post by: iJaco on June 25, 2009, 07:26:49 am
Yesterday, I decided instead of waiting for sombody to develop a rather complicated script(s) for my reward shop that uses a separate currency, I thought I would just make a ranking system. This script is very simple, Its just an edit of the Window_Gold script, but It has tought me the functionalities of window scripts and gives me a start on learning how to make scripts. It is still a little bugged but It basicly does what I want it to do.

#[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]
# +-------------------+
# |Window_Arena_Rank  |
# |V 1.15 FINAL       |
# |RELEASE 6-24-09    |
# +-------------------+
#
#     [+]=::Current Version::=[+]=[+]=[+]=[+]=[+]=[+]
#       [+]V.1.15 [Fixed Text Allignment Bug]
#     [+]=::Version History::=[+]=[+]=[+]=[+]=[+]=[+]
#       [+]V.1.10 [Re-Allignment of Display Window]
#       [+]V 1.00 [Alligned Display Variables]
#       [+]V 0.15 [Developed Display Variables]
#       [+]V 0.10 [Adjust window position]
#       [+]V 0.01 [Development Stage]
#     [+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]
#
# The Text alignments are only compatable with names with five characters long
# or less, So the maximum name length must be five.
#
#   -Displays Battle Arena Ranking                        -Developed by :: iJaco
#[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]=[+]
class Window_Rank < Window_Base
 def initialize
   super(80, 370, 490, 60)
   self.contents = Bitmap.new(width - 32, height - 32)
   refresh
 end
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# +=Draw Ranking=+ [DO NOT EDIT]||||||||||||||||||||||||||||||||||||||||||||||||
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 def refresh
   actor = $game_party.actors[0].name
   self.contents.clear
   self.contents.font.color = disabled_color
   self.contents.draw_text(20, 0, 100, 32, "Battle Rank", 2)
   self.contents.font.color = system_color
   self.contents.draw_text(90, 0, 120, 32, actor, 2)
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# +=Draw Ranking=+ [EDIT BELOW]|||||||||||||||||||||||||||||||||||||||||||||||||                                                      
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
     if $game_variables[8] == 0 then
       self.contents.draw_text(185, 0, 120, 32, "the Novice", 2)
     end
     if $game_variables[8] == 1 then
       self.contents.draw_text(180, 0, 160, 32, "the Adventurer", 2)
     end
     if $game_variables[8] == 2 then
       self.contents.draw_text(180, 0, 120, 32, "the Knight", 2)
     end
     if $game_variables[8] == 3 then
       self.contents.draw_text(205, 0, 120, 32, "the Assassin", 2)
     end
     if $game_variables[8] == 4 then
       self.contents.draw_text(210, 0, 120, 32, "the Arena Pro", 2)
     end
     if $game_variables[8] == 5 then
       self.contents.draw_text(180, 0, 120, 32, "the Slayer", 2)
     end
     if $game_variables[8] == 6 then
       self.contents.draw_text(210, 0, 120, 32, "the Berserker", 2)
     end
     if $game_variables[8] == 7 then
       self.contents.draw_text(210, 0, 120, 32, "the Destroyer", 2)
     end
     if $game_variables[8] == 8 then
       self.contents.draw_text(190, 0, 210, 32, "the Expert Combatant", 2)
     end
     if $game_variables[8] == 9 then
       self.contents.draw_text(195, 0, 160, 32, "the Battle Master", 2)
     end
     if $game_variables[8] == 10 then
       self.contents.draw_text(200, 0, 160, 32, "the Divine Knight", 2)
     end
 end
end


I even made a DEMO (http://www.sendspace.com/file/lqi2e4)

What were your guy's firsts scripts if you can remember?
Title: Re: My first ever script :o
Post by: G_G on June 25, 2009, 08:17:19 am
http://forum.chaos-project.com/index.php?topic=1866.0 This terrible terrible menu
Title: Re: My first ever script :o
Post by: Landith on June 25, 2009, 12:27:51 pm
Looks good.

My first script was this terrible HUD I created recently - Here (http://forum.chaos-project.com/index.php?topic=3691.0)
Title: Re: My first ever script :o
Post by: FenrisHalo on June 26, 2009, 10:10:26 am
Sweet Arshes, this looks great!

Which maker is it for, btw?