~P.S.~ The File_Test script is not mine but the Title_Screen and the demo is !! The sript was made by: danjchau from creation assylum!
About:
Haven't you always wished you could add an activation key to your game?? Well now u can with this :D. Try it out here: http://files.filefront.com/Activationexe/;...;/fileinfo.html
The activation code for the demo is 246813579, 987654321, 135792468, 123456789, or 246813579. You can use any of those for the demo!
Pretty much it does what it says... makes you type in an actiavtion key. If you need to know how to set it up just read below! I will add screenshots in one minute!
Screenshots:
http://img186.imageshack.us/img186/4799/untitlednu6.png[/IMG]
The first title screen.
http://img406.imageshack.us/img406/5749 ... edbny2.png[/IMG]
A poor animation of a loading screen type thing! (can someone make a better one! OR maybe a script one?
http://img246.imageshack.us/img246/9007 ... edcla6.png[/IMG]
If the activation is found a message pops up and the game is started
http://img100.imageshack.us/img100/4996 ... eddmo3.png[/IMG]
The activation screen.
The first title screen.
http://img406.imageshack.us/img406/5749 ... edbny2.png[/IMG]
A poor animation of a loading screen type thing! (can someone make a better one! OR maybe a script one?
http://img246.imageshack.us/img246/9007 ... edcla6.png[/IMG]
If the activation is found a message pops up and the game is started
http://img100.imageshack.us/img100/4996 ... eddmo3.png[/IMG]
The activation screen.
The first title screen
Activation script:
Code:
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs title screen processing.
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = "Main Menu"
s2 = "Activate"
s3 = "Shutdown"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = true
for i in 0...6
if FileTest.exist? ("246813579.txt")
elsif FileTest.exist? ("123456789.txt")
elsif FileTest.exist? ("135792468.txt")
elsif FileTest.exist? ("987654321.txt")
@continue_enabled = false
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
# Dispose of title graphic
@sprite.bitmap.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
$scene= Scene_Title2.new
when 1 # Continue
$scene= Scene_Activation.new
when 2
command_shutdown
end
end
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end
Activation script:
Code:
#
#========================================================================
#---------------------danjchau's Activation script-----------------------------#
#-----------Runs with danjchau's Multiple File Checking Script-----------------#
#-----------------Edit codes at line 42 stop at END----------------------------#
#========================================================================
class Scene_Activation
def main
@edit_window = Window_ActivationEdit.new
@input_window = Window_ActivationInput.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@edit_window.dispose
@input_window.dispose
end
def update
@edit_window.update
@input_window.update
if Input.repeat?(Input::B)
if @edit_window.index == 0
return
end
$game_system.se_play($data_system.cancel_se)
@edit_window.back
return
end
if Input.trigger?(Input::C)
if @input_window.character == nil
@Activation_word = @edit_window.Activation.downcase
#Edit below
if @Activation_word == "987654321"
file = File.open("987654321.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("987654321")
print("Activation Successful!")
elsif @Activation_word == "135792468"
file = File.open("135792468.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("135792468")
print("Activation Successful!")
elsif @Activation_word == "123456789"
file = File.open("123456789.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("123456789")
print("Activation Successful!")
elsif @Activation_word == "246813579"
file = File.open("246813579.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("246813579")
print("Activation Successful!")
# END/STOP EDITING
else
$game_system.se_play($data_system.buzzer_se)
print("Activation Invalid")
$scene =Scene_Title2.new
end
$scene = nil
return
end
if @input_window.character == ""
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@edit_window.add(@input_window.character)
return
end
end
end
class Window_Base < Window
def draw_icon_graphic(icon, x, y)
bitmap = RPG::Cache.icon(icon)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
class Window_ActivationEdit < Window_Base
attr_reader :Activation
attr_reader :index
def initialize
super(0, 0, 640, 128)
self.contents = Bitmap.new(width - 32, height - 32)
@max_char = 17
@index = 0
@Activation = ""
refresh
update_cursor_rect
end
def add(character)
if @index < @max_char and character != ""
@Activation += character
@index += 1
refresh
update_cursor_rect
end
end
def back
if @index > 0
name_array = @Activation.split(//)
@Activation = ""
for i in 0...name_array.size-1
@Activation += name_array[i]
end
@index -= 1
refresh
update_cursor_rect
end
end
def refresh
self.contents.clear
name_array = @Activation.split(//)
for i in 0...@max_char
c = name_array[i]
if c == nil
c = "_"
end
x = (i + 1) * 32
self.contents.draw_text(x, 32, 28, 32, c, 1)
end
end
def update_cursor_rect
x = (@index + 1) * 32
self.cursor_rect.set(x, 32, 28, 32)
end
def update
super
update_cursor_rect
end
end
class Window_ActivationInput < Window_Base
CHARACTER_TABLE =
[
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z"," "," "," "," ",
"+","-","*","/","!",
"1","2","3","4","5",
"" ,"" ,"" ,"" ,"" ,
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z"," "," "," "," ",
"#","$","%","&","@",
"6","7","8","9","0",
"" ,"" ,"" ,"" ,"" ,
]
def initialize
super(0, 128, 640, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@index = 0
refresh
update_cursor_rect
end
def character
return CHARACTER_TABLE[@index]
end
def refresh
self.contents.clear
for i in 0...90
x = 140 + i / 5 / 9 * 180 + i % 5 * 32
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 32, 32, CHARACTER_TABLE[i], 1)
end
self.contents.draw_text(428, 9 * 32, 48, 32, "OK", 1)
end
def update_cursor_rect
if @index >= 90
self.cursor_rect.set(428, 9 * 32, 48, 32)
else
x = 140 + @index / 5 / 9 * 180 + @index % 5 * 32
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 32, 32)
end
end
def update
super
if @index >= 90
if Input.trigger?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@index -= 90
end
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@index -= 90 - 40
end
else
if Input.repeat?(Input::RIGHT)
if Input.trigger?(Input::RIGHT) or
@index / 45 < 3 or @index % 5 < 4
$game_system.se_play($data_system.cursor_se)
if @index % 5 < 4
@index += 1
else
@index += 45 - 4
end
if @index >= 90
@index -= 90
end
end
end
if Input.repeat?(Input::LEFT)
if Input.trigger?(Input::LEFT) or
@index / 45 > 0 or @index % 5 > 0
$game_system.se_play($data_system.cursor_se)
if @index % 5 > 0
@index -= 1
else
@index -= 45 - 4
end
if @index < 0
@index += 90
end
end
end
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
if @index % 45 < 40
@index += 5
else
@index += 90 - 40
end
end
if Input.repeat?(Input::UP)
if Input.trigger?(Input::UP) or @index % 45 >= 5
$game_system.se_play($data_system.cursor_se)
if @index % 45 >= 5
@index -= 5
else
@index += 90
end
end
end
if Input.repeat?(Input::L) or Input.repeat?(Input::R)
$game_system.se_play($data_system.cursor_se)
if @index < 45
@index += 45
else
@index -= 45
end
end
end
update_cursor_rect
end
end
1. Copy both scene_titles to ur game from the demo. (Delete the normal Scene_Title already in ur game!)
2. Copy the File_Test script as well.
3. Make a new map and copy the event in map004 not labeled S int o a new map u create called intro! Copy the S now and paste it in that map. (DO NOT EDIT MAP!!).
4. Copy picture files in game to ur game under the pictures folder)
5. If you want too make a new serial you can do so by adding this:
Code:
if @Activation_word == "your serial here"
file = File.open("your serial here.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("your serial here")
print("Activation Successful!")
Under
Code:
if @Activation_word == "987654321"
file = File.open("987654321.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("987654321")
print("Activation Successful!")
elsif @Activation_word == "135792468"
file = File.open("135792468.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("135792468")
print("Activation Successful!")
elsif @Activation_word == "123456789"
file = File.open("123456789.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("123456789")
print("Activation Successful!")
elsif @Activation_word == "246813579"
file = File.open("246813579.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("246813579")
print("Activation Successful!")
If you dont want a new serial use one of these: 246813579, 987654321, 135792468, 123456789, or 246813579.
6. If u made a new serial go to Scene_Title and add this
Code:
elsif FileTest.exist? ("serial u added.txt")
under this:
Code:
for i in 0...3
if FileTest.exist? ("246813579.txt")
elsif FileTest.exist? ("123456789.txt")
elsif FileTest.exist? ("135792468.txt")
elsif FileTest.exist? ("987654321.txt")
If you didnt make your own code your done!
7. (Only if you added your own code) Now in the event u copied from the demo copy the code at the very end from "Show picture check45" all the way to script: Print...
8. Delete it after you copy it and Press the new event page button and paste it the new page for the time being!
9. Now copy the code from conditional branch: Script: Filetest.exist? ("135792468.txt") then paste that code under the else at the very bottom of the code.
10. Now change the 135792468 to the serial u created(dont change both 1257 codes.)
11. Go back to the new event page and copy the code again!
12. Paste the code under the other else code at the bottom! Now you are finneshed!
It is best if every person u give the game too the activation # changes :D just change the serial number u added if u added one each time and everythign else that says ur serial here :D to the new serial, if u knwo what i mean :D
If you have any ?'s or need help please post below!
Frequently asked ?'s:
Q1: Can u delete:
Code:
if @Activation_word == "987654321"
file = File.open("987654321.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("987654321")
print("Activation Successful!")
elsif @Activation_word == "135792468"
file = File.open("135792468.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("135792468")
print("Activation Successful!")
elsif @Activation_word == "123456789"
file = File.open("123456789.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("123456789")
print("Activation Successful!")
elsif @Activation_word == "246813579"
file = File.open("246813579.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("246813579")
print("Activation Successful!")
and just add:
elsif @Activation_word == "(your serial here)"
file = File.open("your serial here.txt","w")
file.write("Activation Demo V2")
file.write(" Activation Key:")
file.write("246813579")
print("your serial here")
so each game only has one serial and u can change that every time!
A1: Yes you can and it would be easier! But u need to do alot of fixing! :D
~P.S.~ The File_Test script is not mine but the Title_Screen and the demo is !! The sript was made by: danjchau from creation assylum!