Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: G_G on June 07, 2009, 06:32:20 am

Title: [XP] Skill Shop
Post by: G_G on June 07, 2009, 06:32:20 am
Skill Shop
Authors: game_guy
Version: 2.2
Type: Skill Buying Script
Key Term: Custom Shop System



Introduction

What this script does is act as a shop but sells skills instead that you can teach to your party members.


Features




Screenshots

Spoiler: ShowHide
(http://i307.photobucket.com/albums/nn318/bahumat27/skillshoop.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/skillshoop2.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/skillshoop3.png)



Demo

MediaFire (http://www.mediafire.com/download.php?wmmvtmt2yk1)


Script


Spoiler: ShowHide

#===============================================================================
# Skill Shop
# Author: Game_guy
# Date: June 7th, 2009
# Version: 2.2
#===============================================================================
#
# Intro:
# What this script does is act as a shop but sells skills instead.
#
# Instructions:
# 1: First how do you want it setup? Theres two ways
#    1: -Any person can learn any skill
#    or
#    2: -Classes learn different skills then other classes
#
#    Go down to UseClasses and set it to false for 1: or true for 2:
#
# 2: Ok now that thats over lets move onto price. Go down to CONFIG PRICE and
#    follow the instructions there.
#  
# 3: Skip this step if you set UseClasses to false.
#    Go to CONFIG CLASS SKILLS and follow the instructions there.
#    
# 4: Ok so everythings setup now. Time to actually find out how to open the
#    skillshop right? You use this line
#    $scene = SkillShop.new([skill id's go here])
#    example
#    $scene = SkillShop.new([1, 2]) will make a shop with the skills
#    Heal and Great Heal
#
# 5: Ok the script now is able to make it where only skills are learnable at
#    certain levels. Go to CONFIG LEVEL and follow instructions there.
#
# 6: Ok so now there's a new option that sorts the skills in the following.
#    Alphabetical
#    Reverse Alphabetical
#    Numeric (Sorts it by Id)
#    Reverse Numberic
#    Price
#    Reverse price
#    At default its at numeric but to change it use this,
#    $game_system.ssort = 0,1,2, or 3.
#    0 = Numeric, 1 = Reverse Numeric, 2 = Alphabetical,
#    3 = Reverse Alphabetical, 4 = Price, 5 = Reverse Price.
#===============================================================================
module GameGuy
 #==========================
 # BEGIN CONFIG
 #==========================
 UseClasses = true # if false anyone can learn any skill
                    # if true only classes can learn the defined skills
end
module RPG
 class Skill
   def price
     case id
     #==========================
     # CONFIG PRICE
     #==========================
     # use
     # when skill_id then return price
     when 1 then return 50
     when 57 then return 75
     end
     return 10
   end
   def llevel
     case id
     #==========================
     # CONFIG LEVEL
     #==========================
     # use
     # when skill_id then return level
     when 57 then return 2
     end
     return 1
   end
 end
 class Class
   def learnskills
     case id
     #==========================
     # CONFIG CLASS SKILLS
     #==========================
     # use
     # when class_id then return [skill id's here]
     when 1 then return [57, 58, 59, 60]
     when 2 then return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 81]
     when 7 then return [69, 70, 71, 72, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80]
     when 8 then return [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56]
     end
     return []
   end
 #==========================
 # END CONFIG
 #==========================
 end
end
class Game_System
 attr_accessor :ssort
 alias sort_me_skillz initialize
 def initialize
   @ssort = 0
   sort_me_skillz
 end
end
class Window_SkillCommand < Window_Selectable
 def initialize
   super(0, 64, 480, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   @item_max = 2
   @column_max = 2
   @commands = ["Learn", "Exit"]
   refresh
   self.index = 0
 end
 def refresh
   self.contents.clear
   for i in 0...@item_max
     draw_item(i)
   end
 end
 def draw_item(index)
   x = 4 + index * 240
   self.contents.draw_text(x, 0, 128, 32, @commands[index])
 end
end

class Window_SkillBuy < Window_Selectable
 def initialize(shop_goods)
   super(0, 128, 368, 352)
   @skill_shop_goods = shop_goods
   self.active = false
   refresh
   self.index = 0
 end
 def skill
   return @data[self.index]
 end
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   for i in 0...@skill_shop_goods.size
     skill = $data_skills[@skill_shop_goods[i]]
     if skill != nil
       @data.push(skill)
     end
   end
   case $game_system.ssort
   when 0
     [@data].each {|ary| ary.sort! {|a, b| a.id <=> b.id}}
   when 1
     [@data].each {|ary| ary.sort! {|a, b| a.id <=> b.id}}
     [@data].each {|ary| ary.reverse!}
   when 2
     [@data].each {|ary| ary.sort! {|a, b| a.name <=> b.name}}
   when 3
     [@data].each {|ary| ary.sort! {|a, b| a.name <=> b.name}}
     [@data].each {|ary| ary.reverse!}
   when 4
     [@data].each {|ary| ary.sort! {|a, b| a.price <=> b.price}}
   when 5
     [@data].each {|ary| ary.sort! {|a, b| a.price <=> b.price}}
     [@data].each {|ary| ary.reverse!}
   else
     [@data].each {|ary| ary.sort! {|a, b| a.id <=> b.id}}
   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)
   skill = @data[index]
   price = skill.price
   enabled = (price <= $game_party.gold)
   if enabled
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width - 32, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   bitmap = RPG::Cache.icon(skill.icon_name)
   opacity = self.contents.font.color == normal_color ? 255 : 128
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   self.contents.draw_text(x + 28, y, 212, 32, skill.name, 0)
   self.contents.draw_text(x + 240, y, 88, 32, price.to_s, 2)
 end
 def update_help
   @help_window.set_text(skill == nil ? "" : skill.description)
 end
end

class Window_SkillStatus2 < Window_Selectable
 def initialize
   super(368, 128, 272, 352)
   self.contents = Bitmap.new(width - 32, height - 32)
   refresh
   self.z = 200
   self.active = false
   self.index = -1
 end
 def refresh
   self.contents.clear
   @item_max = $game_party.actors.size
   for i in 0...$game_party.actors.size
     x = 64
     y = i * 80
     actor = $game_party.actors[i]
     classs = $data_classes[$game_actors[actor.id].class_id]
     draw_actor_graphic(actor, x - 40, y + 60)
     draw_actor_name(actor, x - 13, y + 10)
     if actor.skill_learn?($thing.id)
       self.contents.font.color = crisis_color
       $text = "Aquired"
     elsif GameGuy::UseClasses
       if classs.learnskills.include?($thing.id) && $thing.llevel <= actor.level
         self.contents.font.color = normal_color
         $text = "Can Learn"
       elsif classs.learnskills.include?($thing.id) && $thing.llevel > actor.level
         self.contents.font.color = disabled_color
         $text = "Can Learn At Level " + $thing.llevel.to_s
       else
         self.contents.font.color = disabled_color
         $text = "Can't Learn"
       end
     else
       if actor.level >= $thing.llevel
         self.contents.font.color = normal_color
         $text = "Can Learn"
       else
         self.contents.font.color = disabled_color
         $text = "Can Learn At Level " + $thing.llevel.to_s
       end
     end
     self.contents.draw_text(x - 13, y + 40, 200, 32, $text)
   end
 end
 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 SkillShop
 def initialize(skills)
   @skills = skills
 end
 def main
   @command = Window_SkillCommand.new
   @help_window = Window_Help.new
   @skillbuy = Window_SkillBuy.new(@skills)
   @skillbuy.active = false
   @skillbuy.help_window = @help_window
   $thing = @skillbuy.skill
   @status = Window_SkillStatus2.new
   #@status.visible = false
   @gold = Window_Gold.new
   @gold.x = 480
   @gold.y = 64
   
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @gold.dispose
   @skillbuy.dispose
   @help_window.dispose
   @command.dispose
   @status.dispose
 end
 def update
   @gold.update
   @status.update
   @gold.refresh
   @command.update
   @skillbuy.update
   @help_window.update
   $thing = @skillbuy.skill
   @status.refresh
   if @command.active
     update_command
     return
   end
   
   if @status.active
     update_status
     return
   end
   
   if @skillbuy.active
     update_buy
     return
   end
 end
 
 def update_buy
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @skillbuy.active = false
     @skillbuy.index = -1
     @command.active = true
     @command.index = 0
     return
   end
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     @skillbuy.active = false
     @status.active = true
     @status.visible = true
     @status.index = 0 if @status.index == -1
   end
 end
 
 def update_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     case @command.index
     when 0
       @command.active = false
       @command.index = -1
       @skillbuy.active = true
       @skillbuy.index = 0
     when 1
       $game_system.se_play($data_system.cancel_se)
       $scene = Scene_Map.new
     end
     return
   end
 end
 
 def update_status
   if Input.trigger?(Input::B)
     @status.active = false
     @status.index = -1
     @skillbuy.active = true
     return
   end
   if Input.trigger?(Input::C)
     price = @skillbuy.skill.price
     @actort = $game_party.actors[@status.index]
     enabled = (price <= $game_party.gold)
     
     if enabled
       if @actort.skill_learn?(@skillbuy.skill.id)
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       if GameGuy::UseClasses
         if $data_classes[@actort.class_id].learnskills.include?(@skillbuy.skill.id) && @actort.level >= @skillbuy.skill.llevel
           @actort.learn_skill(@skillbuy.skill.id)
           $game_party.lose_gold(@skillbuy.skill.price)
           $game_system.se_play($data_system.decision_se)
           @status.refresh
           @skillbuy.refresh
           return
         else
           $game_system.se_play($data_system.buzzer_se)
           return
         end
       else
         if @actort.level >= @skillbuy.skill.llevel
           @actort.learn_skill(@skillbuy.skill.id)
           $game_party.lose_gold(@skillbuy.skill.price)
           $game_system.se_play($data_system.decision_se)
           @status.refresh
           @skillbuy.refresh
         else
           $game_system.se_play($data_system.buzzer_se)
           return
         end
         return
       end
       
     else
       $game_system.se_play($data_system.buzzer_se)
       return
     end
   end
 end

end



Instructions

In the script


Compatibility

Not tested with SDK. Wont work with other skill shop scripts


Credits and Thanks




Author's Notes

Give credits and enjoy!
Title: Re: [XP] Skill Shop
Post by: Sally on June 07, 2009, 08:13:47 pm
awsome!! this is very good,
Title: Re: [XP] Skill Shop
Post by: G_G on June 10, 2009, 10:18:32 pm
Anyone else like this script?
Title: Re: [XP] Skill Shop
Post by: Blizzard on June 11, 2009, 05:01:17 am
Put up a screenshot. xD
Title: Re: [XP] Skill Shop
Post by: G_G on June 11, 2009, 11:51:13 am
Oh yea huh xD

Ok here's some I completely forgot about adding them...sorry guys :(
Spoiler: ShowHide
(http://i307.photobucket.com/albums/nn318/bahumat27/skillshoop.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/skillshoop2.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/skillshoop3.png)
Title: Re: [XP] Skill Shop
Post by: Holyrapid on July 10, 2009, 05:07:17 am
Is there a way to show in the level that is required for the skill, in the shop window?
I mean like this:
Description of skill
Skill Name       Lvl needed     Price
or something like this anyway. Or does it allready display that?
Title: Re: [XP] Skill Shop
Post by: winkio on July 11, 2009, 10:13:03 am
An all around useful script :)
Title: Re: [XP] Skill Shop
Post by: Jackolas on July 11, 2009, 01:43:07 pm
Great script... only found 1 (i think really big) problem

when you bought a skill for a character you will see 3 selectable windows (the white boxes) at the same time
its really hard to see what 1 you are controlling

for example:
which 1 am I controlling atm:
Spoiler: ShowHide
(http://img249.imageshack.us/img249/3676/problem.png)

awnser:
Spoiler: ShowHide
Its the top 1...


the way to do it is:
show 1 cursor in total when your in the top menu
show only 2 cursors when your in the skill select menu
and only show 3 cursors when your controlling the window what char should learn a skill
Title: Re: [XP] Skill Shop
Post by: G_G on July 11, 2009, 02:00:39 pm
see the one you're controlling is blinking if you want I'll set it so the windows that arent active the index will be -1
Title: Re: [XP] Skill Shop
Post by: Jackolas on July 11, 2009, 02:07:57 pm
i know the 1 blinking is the 1 your controlling.. but I'm afraid a lot of peep will get confused. (even I got confused)
this problem is the only reason why i'm not switching to this skill shop
Title: Re: [XP] Skill Shop
Post by: G_G on July 11, 2009, 02:30:33 pm
there updated see if thats how you want it?
Title: Re: [XP] Skill Shop
Post by: Jackolas on July 11, 2009, 02:41:29 pm
there is a bug
when you learned a skill to character and press esc and select learn again the cursor is gone and you can't select anything anymore

but nvm my request.. I don't want to waist your time for little things like this. I will stick with my own script I have.
Title: Re: [XP] Skill Shop
Post by: G_G on July 11, 2009, 02:57:19 pm
check to see if its fixed now
Title: Re: [XP] Skill Shop
Post by: dylanf3 on July 11, 2009, 03:05:24 pm
I have some skills, i dont want to be bought, how can i do that?
Title: Re: [XP] Skill Shop
Post by: G_G on July 11, 2009, 03:08:16 pm
dont include the skills when you call the skillshop you call it this way

SkillShop.new([skills])

example
SkillShop.new([1, 2, 3, 4])
would sell skills 1-4
Title: Re: [XP] Skill Shop
Post by: Jackolas on July 11, 2009, 03:29:35 pm
the bug is fixed...

but think u misunderstand me :S

the top window was not really of my consurn
it the most right window where u select the actor after you bought the skill.
if you buy a skill and selected the actor who learns it i would love to see the actor select window cursor been hidden until u buy the next skill
Title: Re: [XP] Skill Shop
Post by: dylanf3 on July 11, 2009, 03:59:37 pm
But if i do that, i cant get to skill no. 57.....
Isnt there a way to sell all excluding no. 58 and 59?
Title: Re: [XP] Skill Shop
Post by: G_G on July 11, 2009, 04:35:23 pm
@dylan you do this

SkillShop.new([1, 2, 3, 4, 57, 89])

Just put any skill id's in there or do these

Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on July 25, 2009, 11:17:23 am
Hey G_G, is there a way to make a shop sell all skills without having to list every skill ID?
Title: Re: [XP] Skill Shop
Post by: TheBlob on July 25, 2009, 11:31:43 am
Okay so I decided to try this out and ran into a strange problem that is almost certainly my doing.

First, I used the script and set up 9 skills just to test them out. Then, I called the script to run the item shop and discovered there was no text. No skills names, no "Learn" and "Exit", and no character names. I figured I did something wrong in my configuring, so I made a new game which just called the script without any editing whatsoever, and got the same result:

(http://i3.photobucket.com/albums/y85/blobbyman/Problem.jpg)

Any advice or help to fix it?
Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on July 25, 2009, 11:42:11 am
I think it's most likely that's it's because your using a cracked version of rmxp :P Are you?
Title: Re: [XP] Skill Shop
Post by: winkio on July 25, 2009, 11:43:32 am
It seems to me that you are using Postality Knights Edition of RMXP, by the blue icon in the upper left instead of an orange one.  Lots of scripts aren't compatible with it.  It shouldn't been too hard to edit them though.
Title: Re: [XP] Skill Shop
Post by: G_G on July 25, 2009, 12:05:42 pm
Quote from: Hellfire Dragon on July 25, 2009, 11:17:23 am
Hey G_G, is there a way to make a shop sell all skills without having to list every skill ID?

use this in a script call

skills = []
for i in 1...$data_skills.size
  skill.push(i)
end
$scene = SkillShop.new(skills)
Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on July 25, 2009, 01:21:31 pm
Quote
NameError occurred while running script.

undefined local variable or method 'skill' for #<Interpreter:0x4042ad8>


:(
Title: Re: [XP] Skill Shop
Post by: Ryex on July 25, 2009, 01:26:57 pm
skills = []
for i in 1...$data_skills.size
  skills.push(i)
end
$scene = SkillShop.new(skills)

try that^^
Title: Re: [XP] Skill Shop
Post by: G_G on July 25, 2009, 01:29:20 pm
woops silly me xD
Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on July 25, 2009, 01:32:01 pm
Silly G_G, oh well, small mistake :haha: Thanks ;)

EDIT: Just a suggestions, it'd be cool if we could have the skills sorted in different ways other than by the ID number, looks kinda random :P Like alphabetical would be cool :)
Title: Re: [XP] Skill Shop
Post by: G_G on July 25, 2009, 02:14:55 pm
Ok I'll see if I can do that.
Title: Re: [XP] Skill Shop
Post by: Blizzard on July 26, 2009, 08:36:00 am
Get Tons of Add-ons and turn on Ultimate Font Override.
Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on July 26, 2009, 08:53:22 am
What? Posted in the wrong thread Blizzy?
Title: Re: [XP] Skill Shop
Post by: Blizzard on July 26, 2009, 08:55:06 am
Have I? O_o

Quote from: TheBlob on July 25, 2009, 11:31:43 am
Okay so I decided to try this out and ran into a strange problem that is almost certainly my doing.

First, I used the script and set up 9 skills just to test them out. Then, I called the script to run the item shop and discovered there was no text. No skills names, no "Learn" and "Exit", and no character names. I figured I did something wrong in my configuring, so I made a new game which just called the script without any editing whatsoever, and got the same result:

(http://i3.photobucket.com/albums/y85/blobbyman/Problem.jpg)

Any advice or help to fix it?

Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on July 26, 2009, 08:59:54 am
:o You should've quoted or used @USER or something in your post :xD:
Title: Re: [XP] Skill Shop
Post by: Blizzard on July 26, 2009, 09:22:42 am
Yes, I should have. xD
Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on August 20, 2009, 05:44:24 pm
Quote from: game_guy on July 25, 2009, 02:14:55 pm
Ok I'll see if I can do that.

Are you doing this G_G?
Title: Re: [XP] Skill Shop
Post by: G_G on August 20, 2009, 06:30:39 pm
I'll start on it in about 30 minutes I forgot about it sorry ^_^
Title: Re: [XP] Skill Shop
Post by: G_G on August 22, 2009, 01:25:50 pm
Updates* Okay HD I added 4 different sorting options just for you :)
Title: Re: [XP] Skill Shop
Post by: Hellfire Dragon on August 22, 2009, 02:08:16 pm
Awesome :D
You think you could add the sorting option to the version you made me? If you don't have it I can send it to you ;)
Title: Re: [XP] Skill Shop
Post by: G_G on August 22, 2009, 02:11:02 pm
Yea send me your version and I'll add it to it :)
Title: Re: [XP] Skill Shop
Post by: dylanf3 on August 24, 2009, 05:52:09 pm
Is it possible to add a Sort By Price? It would help more then names
Title: Re: [XP] Skill Shop
Post by: Blizzard on November 27, 2009, 08:50:28 pm
Bug: When you buy a skill and you don't have enough money to buy another, the other skills don't get grayed out. You can fix it by adding a refresh call after buying a skill.
Title: Re: [XP] Skill Shop
Post by: G_G on November 28, 2009, 01:07:23 am
@dylanf3: I'll add it
@Blizzard: I'll fix it
Title: Re: [XP] Skill Shop
Post by: G_G on November 30, 2009, 08:13:05 pm
*updates*
Fixed the bug blizz posted, and added sorting by pricing
Title: Re: [XP] Skill Shop
Post by: ojp2010 on August 28, 2010, 10:06:55 pm
Doesn't really work well with Mouse controller any way to edit it or fix?
Title: Re: [XP] Skill Shop
Post by: ForeverZer0 on August 30, 2010, 12:30:13 pm
Very nice. I can't believe nobody has done this yet. Lvl ++
Title: Re: [XP] Skill Shop
Post by: Holyrapid on August 30, 2010, 03:42:56 pm
Why was this excelnt script forgotten for so long? This is a great system.
Title: Re: [XP] Skill Shop
Post by: ojp2010 on September 20, 2010, 04:31:41 pm
Is there a way to make it so the shop will only show you skills that your class can use, instead of listing them all and saying which ones you can't learn.
Title: Re: [XP] Skill Shop
Post by: zottel89 on October 15, 2012, 11:41:50 am
I'm sorry for necroposting,
but I have a question regarding this script (and I think it's awesome by the way^^) !

The thing is:

I can buy the same skill over and over again with the same character !
I guess it's because I'm using a Skill Equipping system (by game_guy) ?!

Is there a way to only be able to learn a skill ONCE per character,
even though I'm using the skill equipping script (which means they don't appear directly in the skill menu) ?!
Title: Re: [XP] Skill Shop
Post by: KK20 on October 15, 2012, 01:36:38 pm
Try this.
class Game_Actor < Game_Battler
  def skill_learn?(skill_id)
    return @skills.include?(skill_id) or @eskills.include?(skill_id)
  end
end
Title: Re: [XP] Skill Shop
Post by: G_G on October 15, 2012, 04:05:31 pm
Oh wow, I hadn't realized the two scripts would even conflict. >.< Thanks again KK20 for fixing my scripts again. *levels up*
Title: Re: [XP] Skill Shop
Post by: zottel89 on October 15, 2012, 05:58:22 pm
Quote from: Ezel Berbier on October 15, 2012, 01:36:38 pm
Try this.
class Game_Actor < Game_Battler
  def skill_learn?(skill_id)
    return @skills.include?(skill_id) or @eskills.include?(skill_id)
  end
end



Uuuhm sry for the dumb question,
but where do I have to input this?
Title: Re: [XP] Skill Shop
Post by: G_G on October 15, 2012, 08:53:23 pm
@KK20: That snippet you provided has a syntax error. I dunno why but it errors out with "or" but when you use "||" instead, it works just fine.

@zottel: Just use my updated Skills Equipment Script and you'll be fine.
Title: Re: [XP] Skill Shop
Post by: KK20 on October 15, 2012, 09:29:47 pm
herp

Didn't know about that. I didn't test it (if that was any indication), it just looked logical to me. Probably would work if you use parenthesis around the statement.
return (@skills.include?(skill_id) or @eskills.include?(skill_id))
Glad to have pointed that out for you! All scripts must be perfect!
Big IMG: ShowHide
(http://fc02.deviantart.net/fs70/i/2012/005/b/2/mlp___two_sides_of_twilight_sparkle_by_tehjadeh-d4ht724.jpg)