iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Closed TopicStart new topic
> Having Trouble Making a Script, Help is Appriciated
Xraxis
post Dec 3 2011, 04:50 AM
Post #1


Dragon's are my thing...
Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




Hello, I'm trying to get better at Ruby and I was wondering if someone could help me with a script I'm making. The script is supposed to be a Profession Bonus Script, that is going to have a few features... hopefully the ones I am wanting. The script is going to be a basic menu that will list the Professions that you have learned and what skill you have in that profession and then I was going to make it so you could use items to give a bonus to your profession level that is decided by the user. It would also be nice if the user would be able to change the profession level cap. Well here is what I have... and just so there is no confusion I haven't been at this very long.

Spoiler:
CODE
#-------------------------------------------------------------------------------
# Version: 1.0
#-------------------------------------------------------------------------------
# 12/02/2011 - Started Script
#
#-------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------
#===============================================================================
# Begin Customization
#===============================================================================
module XSS
module PROF_SKILL

PROF_AMT = 5
PROF_BONUS = 5

PROF_NAME = {
1 => "Bla1",
2 => "Bla2",
3 => "Bla3",
4 => "Bla4",
5 => "Bla5",
}

#===============================================================================
# End Customization
#===============================================================================

#===============================================================================
# Begin the Script
#===============================================================================

class Window_Prof < Window_Base
def initialize
super(0, 0, 544, 416)
self.contents.draw_text(0, 0, self.width, WLH, XSS::PROF_SKILL::PROF_NAMES)
end
end

class Scene_Prof < Scene_Base
def start
@prof_win = Window_Prof.new
end
def update
@prof_win.update
if Input.trigger?(Input::C)
$scene = Scene_Map.new
end
end
def terminate
@prof_win.dispose
end
end

class Add_Selections < Window_Selectable
def create_contents
self.contents.dispose
self.contents.font.color = system_color
case XSS::PROF_SKILL::PROF_AMT
when 1; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1])
when 2; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..2])
when 3; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..3])
when 4; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..4])
when 5; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..5])
when 6; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..6])
when 7; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..7])
when 8; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..8])
when 9; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..9])
when 10; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..10])
when 11; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..11])
when 12; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..12])
when 13; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..13])
when 14; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..14])
when 15; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..15])
when 16; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..16])
when 17; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..17])
when 18; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..18])
when 19; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..19])
when 20; self.contents.draw_text(x, y, 30, WLH, (XSS::PROF_SKILL::PROF_NAME[1..20])
end
end







--------------------
Go to the top of the page
 
+Quote Post
   
Mr. Bubble
post Dec 4 2011, 09:44 PM
Post #2



Group Icon


Type: Undisclosed
Alignment: Unaligned




Closed at OP's request.


--------------------
I no longer support Tankentai.
Go to the top of the page
 
+Quote Post
   

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 30th August 2014 - 03:21 PM

RPGMakerVX.net is an Privacy Policy, Legal.