Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Jackolas

1
Tutorials / [TUT] Setting up RMX-OS (under construction)
December 27, 2009, 10:19:23 am
Under Construction, Plzz do NOT reply

1) Intro
First of all, English is not my main language, so there may be some errors in this guide. Sorry for this.

This is an extended guide to get RMX-OS to work (or a guide in plain English without the difficult terms).
If you fail to get it to work after reading this I suggest to drop it and focus on something else,
because you will never make it.

Also this guide is based on a Windows server. I can't and will not help with a linux server.
In this guide I made the server on windows vista (the hardest one) personal I suggest to build it
on one that runs Windows XP or windows 7 (but all 3 windows should work roughly the same).

2) Before starting up:
Before you start you need to know how a MMO (Massive Multiplayer online) works and
what comes in to run it.
- First of all, MMO's normally run on a server, that's a PC that's on 24h a day and is always
connected to the internet with a big bandwidth. Without it you can't run your MMO.
- Second, if you can't run this for yourself (AKA an extra pc in your home on-line for 24h a day) than
you need an online server. !!!THERE ARE NO FREE SERVERS!!! The cheapest one I found is 15 dollar a month,
For maybe 10 player support (guess why there is a monthly subscription fee for professional MMO'S).
And no, there is no way around this.

If you got a server (like me) than continue reading :P

3) What do I need?
If your reading this than I guess that you already looked into the manual that's included in blizzard
his awesome RMX-OS. If not I suggest to read it before starting. otherwise continue reading

Before we start lest first see what you need:


4) Let's get started:
4.1)Installing Ruby
First of all install the Ruby 1.8.6 somewhere on your server. This should be a straight forward job
and if you fail you can stop right here and cry in a corner. When you installed it, Extract the
Ruby 1.9.1 package to the 1.8.6 install path and replace the needed files.
Congratulations, you just installed Ruby 1.9.1.

4.2) Installing the RMX-OS server


4.3) Installing MySQL Database
Next we can get on with installing the MySQL Database. You need this becouse this is where all
the data of the players get saved, its the new save system of your game. This is also where most
people get stuck. MySQL has some nasty stuff in store. First of all you need to make sure your
logged in into the administrator account of your PC (in XP this is every account).
when your in the Administrator go ahead and install MySQL. this should be straight forward job.
until you get to a screen like below:

Spoiler: ShowHide

make sure you have "Configure the Mysql Server now" on
and the "Register the MySQL Server now" off like the screen above. and press finish.
the Configuration will pop up like below:

Spoiler: ShowHide

Press next and the next screen will appear.

Spoiler: ShowHide

make sure that you have the "Detailed Confuguration" on like the above screen and press next
you will get the following screen

Spoiler: ShowHide

Here you see 3 options. now its the time to think ahead. if the PC your installing the MySQL on
is going to run other applications than its suggested to use the top option (like in the screen shot).
If the PC is only going to run the MySQL than you can chose one of the other 2 options. If you made
your selection press next and it will change to the following screen:

Spoiler: ShowHide

For RMX-OS you need to select the "Multifunctional Databas". If you selected this press next

Spoiler: ShowHide

Next you get to chose where the database will be saved. personal I suggest somewhere you can
find it back easily. I installed mine into the Database folder of the "RMX-OS Server" map, but any
place will do. if done, press next

Spoiler: ShowHide

This screen you need to decide how many people will connect to your server at the same time.
Its kinda the server limit. For a starting server I suggest to have around 20 peep and chose the
top option "Decision Support (DSS)/OLAP". If you want to have more people than chose the lower
option "Manual Setting" and fill in the right amount of people. Remember that the more people are
connecting to your server the more bandwidth it will take.

Spoiler: ShowHide

In the next screen make sure that "Enable TCP/IP Networking" is turned on or else the whole server
might crash. for simple keep the port that is put up (3306). Also if your not a star in Firewalls make
sure that "add firewall exception for this port" is turned on.
Also make sure that "Enable Strict Mode" is on. than press next.

Spoiler: ShowHide

next up is setting up the Default Characters.
just enable "Best Support for Multilingualism" and everything should work fine. Press next

Spoiler: ShowHide

This screen is to set up the Windows Service. put both "Install As Windows Service" and
"Include Bin Directory in Windows PATH" on
also make sure that Service Name: is set to MySQL.
to automatic start up the database when windows start enable "Launch the MySQL Server automatically"
This is Recommended because lots of stuff can go wrong starting it manual every time.
Press next when ready

Spoiler: ShowHide

The next 1 is important. this is where you set up the Root password. YOU NEED THIS PASS LATER so write it down.
Make sure that "Modify Security Settings" is on and fill in a password.
Do NOT turn "Enable root access from remote Machines" and "Create An Anonymous Account"
when you filled in the pass press on next

Spoiler: ShowHide

Now is the moment of truth and to see if you followed the tutorial.
if everything is correct than the Database will be set up as soon as you press Execute.
Press Execute and see what happens.

If everything is done correctly you will see 4 blue V in the circles.
if the wizard is stopped at "Start Service" or a error popped up look into the FAQ 1.1
Otherwise, Congratulations. you just successfully created the hardest thing of RMX-OS

Managing the MySQL database
2
Jackolas Advance GameOver Script
Authors: Jackolas
Version: 1.1
Type: GameOver Script
Key Term: Title / Save / Load / GameOver Add-on



Introduction

The Advance Game-Over Script gives you the option to add almost every possible
game-over from popular games. from the respawn in pokemon centres till the
show a menu like in NWN where you can check to respawn, reload or restart.


Features

Current Features:

  • Fixed Spawn location / Variable spawn location
  • Map id / Variable of map id
  • Map x / Variable of map x
  • Map y / Variable of map y
  • Able to lose gold on death (true/false)
  • How much gold to lose (can be in % or in fixed number)
  • Able to lose exp on death (true/false)
  • Able to lose lvls on death (true/false)
  • How much exp to lose (can be in % or in fixed number)
  • Auto-heal on respawn (true/false)

    To be added in later versions:
  • Better instructions
  • Show Game Over screen with option to continue, load or main menu (true/false)
  • Able to lose items in backpack (true/false)
  • Likelihood you will lose item from backpack (in %)
  • Able to lose equipped items (true/false)
  • Likelihood you will lose item equipped (in %)



Screenshots

Not possible for this script atm


Demo

Respect my laziness


Script

Spoiler: ShowHide

#==============================================================================
# ■ Jackolas Advance GameOver Script
#==============================================================================
# script by:            Jackolas
# Version number:       V 1.1
# Last edit date:       17-12-09
#
# Thanks:               macht102 (for requesting)
#                       elementisland (asking for options)
#                       winkio (for example script)
#==============================================================================
# Introduction:
#   The Advance Game-Over Script gives you the option to add almost every possible
#   game-over from popular games. from the respawn in pokemon centres till the
#   show menu where you can check to respawn, reload or restart in NWN.
# ====================
# Compatibility:
#   95% compatible with SDK v1.x. 80% compatible with SDK 2.x.
#   Will not work with scripts that edit the Scene_Gameover
# ====================
# Current Features:
#   - Fixed Spawn location / Variable spawn location
#   - Map id / Variable of map id
#   - Map x / Variable of map x
#   - Map y / Variable of map y
#   - Able to lose gold on death (true/false)
#   - How much gold to lose (can be in % or in fixed number)
#   - Able to lose exp on death (true/false)
#   - Able to lose lvls on death (true/false)
#   - how much exp to lose (can be in % or in fixed number)
#   - Auto-heal on respawn (true/false)
# ====================
# To be added in later versions:
#   - Better instructions
#   - Show Game Over screen with option to continue, load or main menu (true/false)
#   - Able to lose items in backpack (true/false)
#   - Likelihood you will lose item from backpack (in %)
#   - Able to lose equipped items (true/false)
#   - Likelihood you will lose item equipped (in %)
# ====================
# Instructions:
#   Place the script above Main and below any other custom scripts.
#   Edit the Configuration to your likings.
#   Play the game and die
# ====================
# Notes:
#   - Do not edit anything else than the configuration.
#   - If you find any bugs, please report them here:
#     http://forum.chaos-project.com
#==============================================================================
module Jackolas_GameOver
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration below
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 Fixed_Spawn = false     # true / false
 VarID = 1               # Var number for map id / fixed map ID location
 VarX = 2                # var number for map x / fixed map x location
 VarY = 3                # var number for map y / fixed map y location
#  Show_gameover = false  # true / false (not build in yet)
 LoseGold = false        # true / false
 GoldAmount = 0          # Above 1 = fixed amount / Below 1 = % of total
 LoseExp = false         # true / false
 LoseLvl = false         # true / false
 ExpAmount = 0           # Above 1 = fixed amount / Below 1 = % amount
 Autoheal = false        # true / false
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration above
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end

class Game_Actor
 attr_accessor :exp_list
end

class Scene_Gameover
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
   def main
   # Set game over flag
   $game_temp.gameover = false
   # Return to BGM before battle starts
   $game_system.bgm_play($game_temp.map_bgm)
   # Clear in battle flag
   $game_temp.in_battle = false
   # Clear entire party actions flag
   $game_party.clear_actions
   # Clear enemies
   $game_troop.enemies.clear
   # Call battle callback
   if $game_temp.battle_proc != nil
     $game_temp.battle_proc.call(2)
     $game_temp.battle_proc = nil
   end
   # Execute transition
   Graphics.transition(120)
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Start special options
     auto_heal
     remove_gold
     remove_exp
     remove_item
     # start transport
     start_transport
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Execute transition
   Graphics.transition(120)
   # Prepare for transition
   Graphics.freeze
   # If battle test
   if $BTEST
     $scene = nil
   end
 end
 #--------------------------------------------------------------------------
 # * Auto heal Processing
 #--------------------------------------------------------------------------
 def auto_heal
   for actor in $game_party.actors
     actor.remove_states_battle
   end
   if Jackolas_GameOver::Autoheal
     for actor in $game_party.actors
       actor.recover_all
     end
   else
     for actor in $game_party.actors
       actor.hp = 1
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Remove Gold Processing
 #--------------------------------------------------------------------------
 def remove_gold
   if Jackolas_GameOver::LoseGold
     if Jackolas_GameOver::GoldAmount >=1
       if Jackolas_GameOver::GoldAmount >= $game_party.gold
         goldlose = $game_party.gold
       else
         goldlose = Jackolas_GameOver::GoldAmount
       end
       else
       goldlose = $game_party.gold * Jackolas_GameOver::GoldAmount
     end
     $game_party.gain_gold(-goldlose.to_i)
   else
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Remove EXP Processing
 #--------------------------------------------------------------------------
 #This works, Do never touch any of these or the script WILL crash!!!
 #The reason for the many "if" is to make sure you won't get -exp
 def remove_exp
   if Jackolas_GameOver::LoseExp
     if Jackolas_GameOver::ExpAmount >= 1
       for actor in $game_party.actors
         if Jackolas_GameOver::LoseLvl
           if Jackolas_GameOver::ExpAmount >= actor.exp
             explose = Jackolas_GameOver::ExpAmount
           else
             explose = actor.exp
           end
         else
           if (actor.exp - actor.exp_list[actor.level]) >= Jackolas_GameOver::ExpAmount
             explose = Jackolas_GameOver::ExpAmount
           else
             explose = actor.exp - actor.exp_list[actor.level]
           end            
         end
         actor.exp -= explose
         actor.exp = actor.exp.to_i
       end
     else
       for actor in $game_party.actors
         if Jackolas_GameOver::LoseLvl
           explose = actor.exp * Jackolas_GameOver::ExpAmount
         else
           explose = (actor.exp - actor.exp_list[actor.level]) * Jackolas_GameOver::ExpAmount
         end
         actor.exp -= explose
         actor.exp = actor.exp.to_i
       end
     end
   else
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Remove item Processing
 #--------------------------------------------------------------------------
 def remove_item
   return
 end
 #--------------------------------------------------------------------------
 # * start_transport
 #--------------------------------------------------------------------------
 def start_transport
   # Set variables
   if Jackolas_GameOver::Fixed_Spawn
     @MapID = Jackolas_GameOver::VarID
     @MapX = Jackolas_GameOver::VarX
     @MapY = Jackolas_GameOver::VarY
   else
     @MapID = $game_variables[Jackolas_GameOver::VarID]
     @MapX = $game_variables[Jackolas_GameOver::VarX]
     @MapY = $game_variables[Jackolas_GameOver::VarY]
   end
   # Transport player
   $game_map.setup(@MapID)
   $game_player.moveto(@MapX, @MapY)
   # Refresh map
   $game_player.refresh
   $game_map.autoplay
   $game_map.update
   $scene = Scene_Map.new  
 end
end



Instructions

Place the script above Main and below any other custom scripts.
Edit the Configuration to your likings.
Play the game and die


Compatibility

95% compatible with SDK v1.x. 80% compatible with SDK 2.x.
Will not work with scripts that edit the Scene_Gameover


Credits and Thanks


  • macht102 (for requesting)
  • elementisland (asking for options)
  • winkio (for example script)



Author's Notes

Do not edit anything else than the configuration.
If you find any bugs, please report them here:
http://forum.chaos-project.com
3
I have a question (probably really simple to fix)

atm I'm working on a script and in the configure I have for example how much exp an actor needs to lose.
now in a script I have this part:
Spoiler: ShowHide
  def remove_exp
   if Jackolas_GameOver::LoseExp
     if Jackolas_GameOver::ExpAmount >=1
       for actor in $game_party.actors
         explose = Jackolas_GameOver::ExpAmount
       end
     else
       for actor in $game_party.actors
         explose = actor.exp * Jackolas_GameOver::ExpAmount
       end
     end
     for actor in $game_party.actors
       actor.exp -= explose
     end
   end
 end

if I fill in like 0.5 in the config it works like a dream. no errors and 50% is removed.
only problem is that he puts now 1 number behind the "." in the number, like 10.0 exp  (if you know what I mean)
my question is how can I round that up/down so its a whole number again?
or prevent it from happening.

(yes I know I still need to build in a safety check so it won't try to remove exp below 0)
4
RMVX Script Database / [VX] Pre Title-Screen Cutscene
December 09, 2009, 04:44:28 am
Pre Title-Screen Cutscene
Authors: Jackolas
Version: 1.0
Type: Title Screen Add-on
Key Term: Title / Save / Load / GameOver Add-on



Introduction

Simple script that adds the Possibility to add an in-game, event controlled
cut-scene before your title-screen pops up.


Features


  • Option to set the Map ID of the cutscene.
  • Option to set the X,Y of the cutscene.
  • Option to disable the cutscene if there is a save available.



Screenshots

How to make a screenshot of a system that skips the title screen?


Demo

Don't have [VX] to make one


Script

Place above main.
Spoiler: ShowHide
#==============================================================================
# ** Cutscene Script [VX]
#
# Script by:         Jackolas
# Thanks:            Game_Guy (for fixing bugs)
#                    Arisenhorizen (for requesting and bug testing)
#
# version number:    V1.0
#------------------------------------------------------------------------------
#  This script allows you to skip the title screen and go to an event
#  created cutscene.
#
# - Option to set the Map ID of the cutscene.
# - Option to set the X,Y of the cutscene.
# - option to disable the cutscene if there is a save available.
#------------------------------------------------------------------------------
# How to use:
#
# Place as last script above main.
# Edit the Config to your Cutscene map.
# To end the cut-scene add an event with a script
# with: $scene = Scene_Title.new
# or use a return to title screen command.
#
# Also replace in the Main script     $scene = Scene_Title.new
# For                                 $scene = Cutscene_Title.new
#==============================================================================

module CutsceneStart
 #--------------------------------------------------------------------------
 # * Configuration Begin
 #--------------------------------------------------------------------------
 def self.map_id  
   return 1          # The map id of the cutscene
 end
 def self.map_x
   return 1          # The x of the cutscene
 end
 def self.map_y          
   return 1          # The y of the cutscene
 end
 def self.checksave
   return true       #Disable cut-scene when save is available
 end
 #--------------------------------------------------------------------------
 # * Configuration END
 #--------------------------------------------------------------------------  
end

#==============================================================================
# ** Cutscene Script
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================
class Cutscene_Title < Scene_Base
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   if $BTEST                         # If battle test
     $scene = Scene_Title.new        # Change to Battle test
   else if CutsceneStart.checksave   # Check if check for save
       check_savegame_on               # Check for savegames
       if not @savegame_enabled        # If no savegames are found
         command_cutscene              # Start Cutscene
       else                            # If savegames are found
         $scene = Scene_Title.new      # Skip to title screen
       end
     else                              # If no check for save
       command_cutscene                # Start Cutscene
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Command: New Game
 #--------------------------------------------------------------------------
 def command_cutscene
   load_database
   create_game_objects
   $game_party.setup_starting_members
   $game_map.setup(CutsceneStart.map_id)
   $game_player.moveto(CutsceneStart.map_x, CutsceneStart.map_y)
   $game_player.refresh
   $scene = Scene_Map.new
   $game_map.autoplay
 end
 #--------------------------------------------------------------------------
 # * Load Database
 #--------------------------------------------------------------------------
 def load_database
   $data_actors        = load_data("Data/Actors.rvdata")
   $data_classes       = load_data("Data/Classes.rvdata")
   $data_skills        = load_data("Data/Skills.rvdata")
   $data_items         = load_data("Data/Items.rvdata")
   $data_weapons       = load_data("Data/Weapons.rvdata")
   $data_armors        = load_data("Data/Armors.rvdata")
   $data_enemies       = load_data("Data/Enemies.rvdata")
   $data_troops        = load_data("Data/Troops.rvdata")
   $data_states        = load_data("Data/States.rvdata")
   $data_animations    = load_data("Data/Animations.rvdata")
   $data_common_events = load_data("Data/CommonEvents.rvdata")
   $data_system        = load_data("Data/System.rvdata")
   $data_areas         = load_data("Data/Areas.rvdata")
 end
 #--------------------------------------------------------------------------
 # * Create Game Objects
 #--------------------------------------------------------------------------
 def create_game_objects
   $game_temp          = Game_Temp.new
   $game_message       = Game_Message.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.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
 end
 #--------------------------------------------------------------------------
 # * Determine if Continue is Enabled
 #--------------------------------------------------------------------------
 def check_savegame_on
   @savegame_enabled = (Dir.glob('Save*.rvdata').size > 0)
 end
end



Instructions

Place above main (to be save, place above other custom scripts).
Replace in the "Main" script            
$scene = Scene_Title.new

For                                        
$scene = Cutscene_Title.new

Edit the Config to your cut-scene map.
To end the cut-scene add an event with a script with:
$scene = Scene_Title.new

or use a return to title screen command.


Compatibility

will cause compatibility problems with scripts that add to the
"create_game_objects" of the basic Title_Screen script.


Credits and Thanks


  • Game_Guy (for fixing bugs)
  • Arisenhorizen (for requesting and bug testing)



Author's Notes

If you find any compatibility problems post here and I will try to fix them.

Vampyr SBABS compatibility problems
Add the following script to the bottom of Vampyr SBABS script
and make sure that Cutscene Script is above main and Vampyr SBABS
Spoiler: ShowHide
#------------------------------------------------------------------------------
# Scene Title
#------------------------------------------------------------------------------
class Cutscene_Title < Scene_Base

 alias vampyr_sbabs_cutscenetitle_create_game_objects create_game_objects
 alias vampyr_sbabs_cutscenetitle_command_new_game command_new_game

 def create_game_objects
   $game_monsters = []
   $game_allies = []
   $game_range = []
   $game_drop = []
   $game_bomb = []
   vampyr_sbabs_cutscenetitle_create_game_objects
   $Vampyr_SBABS = Vampyr_SBABS.new
 end

 def command_new_game
   vampyr_sbabs_cutscenetitle_command_new_game
   for ally in $game_allies.compact
     ally.map_id = CutsceneStart.map_id
     ally.moveto(CutsceneStart.map_x, CutsceneStart.map_y)
     ally.move_random
   end
 end
end
5
Script Troubleshooting / Increase Item cost (Solved)
October 28, 2009, 03:55:43 pm
working on a script atm.
but I wane know how I can add a number to the cost of an item
the reason for this is because the database is limited to max 99999G for an item.
I want to increase this by adding for example 100000G so the item would cost 199999G in a shop

how can I do this true a script?
6
Script Troubleshooting / Quest log edit [fixed]
June 14, 2009, 12:22:23 pm
got a quest log from somewhere that works very well. (dunno any more from where, also heavy edited myself)
but to make it more clear and look nicer I wane change a couple of things.
most I manage to fix myself without breaking the script  :^_^':

but I can't get the top bar fixed (6 hours and counting). think I can explain better with pictures.

this is how it looks now:
Spoiler: ShowHide

(if you press left ore right you switch to side quest ore main quests)

and this is what it should be:
Spoiler: ShowHide

(again if you press left ore right you will switch between main quest and side quest)

everything is already made in there. so the quests will switch from main to side etc. only the top bar where it is displayed is not working.

So my request is if someone could build a working top bar into this script.
(or if someone could point me in the right direction)

Spoiler: ShowHide
class Bitmap
 # Draws an outline around the text,
 # both the outline color and the color of the
 # text inside can be anything.
 def draw_text_outline_custom(x, y, wid, hei, text, align, outlinecolor, insidecolor)
  if $qdata.useoutlines == true
    self.font.color = outlinecolor
     draw_text(x + 1,y + 1,wid,hei,text, align)
     draw_text(x + 1,y - 1,wid,hei,text, align)
     draw_text(x - 1,y - 1,wid,hei,text, align)
     draw_text(x - 1,y + 1,wid,hei,text, align)
  end
  self.font.color = insidecolor
  draw_text(x,y,wid,hei,text, align)
 end
end

class Scene_Quests
 attr_accessor  :questids
 attr_accessor  :command_window
 attr_accessor  :questswitches
 # QSETUP This is the initialize method.
 # It's where you set up which list will load:
 def initialize(list = 1)
    @quest_index = 0
  @currentlist = list
  # Right here. The format is:
  # when A
  #   $qdata = B.new
  #   @questswitches = $game_temp.C
  #
  # A is the number called in $scene = Scene_Quests.new(Number)
  # B is the class name for the list.
  # C is the variable name for the quest list. Don't put the @ part with it here.
  case list
  when 1
     $qdata = Quest_Data.new
    @questswitches = $game_temp.qupdate
  when 2
    $qdata = Quest_Data2.new
    @questswitches = $game_temp.qupdate2
  end
 end

 def main
    # Displays the map as background:
    @backpic = Spriteset_Map.new
    # Creates the quest list based on how many quests are active on that list:
    questwin = []
  @questids = []
        # QSETUP This is one of the for branches that will need changing once your game is complete.
        # More about that later.
  for i in 1...10000
    if @questswitches[i][0] == true
     questwin.push($qdata.questname[i])
     @questids.push(i)
    end
  end
  if questwin.size == 0
    questwin.push($qdata.questname[0])
    @questids.push(0)
  end
  @command_window = Window_Qmand.new(182, questwin)
    @command_window.index = @quest_index
    @command_window.opacity = 200
    @command_window.z = 1100
    @command_window.opacity = 200  
  # This makes the window for the description text and objectives:
    @status_window = Quest.new
    @status_window.x = 184
    @status_window.y = 64
    @status_window.z = 1100
    @status_window.opacity = 200
    Graphics.transition
    loop do
     Graphics.update
     Input.update
     update_command
     if $scene != self
        break
     end
    end
    Graphics.freeze
  @command_window.contents.clear
    @command_window.dispose
  @status_window.contents.clear
    @status_window.dispose
  end
end
#-------------------------------------------------------------------------------
# Updates the quest data, and switches between lists:
#-------------------------------------------------------------------------------
 def update_command
     if Input.repeat?(Input::UP)
    if @command_window.index == 0
     @command_window.index = @questids.size - 1
    else
     @command_window.index -= 1
    end
    unless @questids.size == 1
     $game_system.se_play($data_system.cursor_se) unless @questids.size == 1
     @status_window.refresh
    end
    end
    if Input.repeat?(Input::DOWN)
    if @command_window.index == @questids.size - 1
     @command_window.index = 0
    else
     @command_window.index += 1
    end
    unless @questids.size == 1
     $game_system.se_play($data_system.cursor_se)
     @status_window.refresh
    end
    end
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
    return
  end
 # QSETUP This is where you set up how it switches between lists.
 # If you want to have say, 2 parties, each with different lists,
 # this is where you would set up how it switches between lists.
 # The format is simple:
 # when listnumber
 #   $scene = Scene_Quests.new(list number to switch to)
 #
 # So if lists 1/2 are for the first party, and you want lists 3/4 to be for the second party,
 # You'd just set up list 3 to switch to list 4 and list 4 to switch to list 3.
  if Input.trigger?(Input::LEFT)
  $game_system.se_play($data_system.cursor_se)
  case @currentlist
  when 1
     $scene = Scene_Quests.new(2)
  when 2
     $scene = Scene_Quests.new(1)
  end
  end
  if Input.trigger?(Input::RIGHT)
  $game_system.se_play($data_system.cursor_se)
    case @currentlist
  when 1
     $scene = Scene_Quests.new(2)
  when 2
     $scene = Scene_Quests.new(1)
  end
 end
end
#-------------------------------------------------------------------------------
# This creates the description text and the objectives
# for the the quests in progress. Objectives change colors
# and have an icon next to them.
#-------------------------------------------------------------------------------
class Quest < Window_Base
 def initialize
  super(0, 0, 456, 416)
  self.contents = Bitmap.new(width - 32, height - 32)
    refresh
 end

 def refresh
  self.contents.clear
  y = 0
  for i in 0...$qdata.description[$scene.questids[$scene.command_window.index]].size
    self.contents.draw_text_outline_custom(2, 24 * y, 480, 32, $qdata.description[$scene.questids[$scene.command_window.index]][i],0, $qdata.descoutline, $qdata.desctext)
    y += 1
  end
  for i in 0...$qdata.objectives[$scene.questids[$scene.command_window.index]].size
    y += 1
    if $scene.questswitches[$scene.questids[$scene.command_window.index]][i + 1] == true
     bitmap = RPG::Cache.icon("CompletedIcon")
     self.contents.blt(0, 4 + ( y * 24) , bitmap, Rect.new(0, 0, 18, 18))
     self.contents.draw_text_outline_custom(24, 0 + (y * 24), 456, 24, $qdata.objectives[$scene.questids[$scene.command_window.index]][i], 0, $qdata.compoutline, $qdata.comptext)
    else
     bitmap = RPG::Cache.icon("InProgressIcon")
     self.contents.blt(0, 4 + ( y * 24) , bitmap, Rect.new(0, 0, 18, 18))
     self.contents.draw_text_outline_custom(24, 0 + (y * 24), 456, 24, $qdata.objectives[$scene.questids[$scene.command_window.index]][i], 0, $qdata.incompoutline, $qdata.incomptext)
    end
  end
 end
end

#-------------------------------------------------------------------------------
# This is for the list of quests on the left:
#-------------------------------------------------------------------------------
class Window_Qmand < Window_Selectable
 def initialize(width, commands)
    super(0, 64, width, 416)
  self.contents = Bitmap.new(width - 32, commands.size * 32)
    @commands = commands
  @item_max = @commands.size
  self.index = 0
    refresh
 end

 def refresh
    self.contents.clear
    for i in 0...@commands.size
     self.contents.draw_text_outline_custom(0, 32 * i, self.contents.width, 32,@commands[i],1, $qdata.menuoutline, $qdata.menutext)
    end
 end
end
   
#    (self.width-32, self.height-32)
#    @title_window.contents = Bitmap.new(640 - 32 , 64 - 32)
#    @title_window.contents.draw_text(0, 0, 288, 32, "Main Quests in Progress", 1)
#    @title_window.contents.draw_text(288, 0, 288, 32, "Side Quests in Progress", 1)

class Game_Temp
 # QSETUP This is where you add the variables that control the quests on the lists.
 attr_accessor :qupdate
 attr_accessor :qupdate2
 # You'll need one of these for every list. The script is setup by default to
 # use qupdate for the first list and qupdate2 for the second.
 #You can change these if you want.
 alias asdfghjkl initialize
 def initialize
  asdfghjkl
  # You'll need to add any new quest variables here, like this:
  @qupdate = []
  @qupdate2 = []
  for i in 0...10000
    # And here, too, like this:
    @qupdate[i] = []
    @qupdate2[i] = []
  end
  # That 10000 there is the maximum number of quests per list.
  # Once your game is completely finished, count the number of quests on each list.
  # There'll be a for loop like this in each of the quest lists.
  # Replace the 10000 there with the number of quests on the list.
  # This will lower the amount of time it takes to read the list.
  # Do the same to the 10000 both here and in the main method up at the top,
        # with the highest number of quests your lists have.
 end
end

class Scene_Save < Scene_File

 alias qwertyuiop write_save_data
 def write_save_data(file)
  qwertyuiop(file)
  # QSETUP You'll need to add any new quest variables here, too, like this:
  Marshal.dump($game_temp.qupdate, file)
  Marshal.dump($game_temp.qupdate2, file)
 end
end

class Scene_Load < Scene_File

 alias zxcvbnm read_save_data
 def read_save_data(file)
  zxcvbnm(file)
  # QSETUP Also need to add any new quest variable here, like this:
  $game_temp.qupdate = Marshal.load(file)
  $game_temp.qupdate2 = Marshal.load(file)
 end
end

side note: the script needs 2 data scripts to work. but those are not really required for this request.
if you do need them plzz ask.

7
I have been looking for a skill shop for a long time. after long searching around i found in total 3 of them.

1 made by Nechigawara,
This is the best 1 of the 3. it is clean and works like a dream. only problem is that its based on the Actor ID instead of the CLass ID of the hero.

1 made by SephirothSpawn
has some bugs in it but those where easy fixed. also the script looks a bid messy and has the same problems as above. as an extra its almost nowhere to be found any more.

1 made by Trickster
This 1 is based on the hero class ID instead of the Actor ID. but it requires SDK and there is no way to get it to work without SDK (already asked)

of these 3 the best 1 is the 1 from Nechigawara, the problem with it that its based on the Actor ID for what skills he can learn. because I'm planning to use the Class changer of legacy there will be a problem. if the actor change classes he needs to be able to learn different skills. and that's not possible if the whole script is based on the Actor ID instead of the class ID of the Actor.

my question is that if there is someone that can change this script a little bid so it will work on the Class ID instead of the actor ID.

Spoiler: ShowHide

#==============================================================================
# Skill Shop for RMXP
#==============================================================================
# By Nechigawara Sanzenin
# WARNING!! : This script can use on RPG Maker XP Only!! (VX Not Support)
#==============================================================================
# Buy Skill Option For RMXP
#==============================================================================
=begin

How to Use:

You will add "$skill_shop =[Id of Skill]" 
To Call Script to set id of skill for sell.
You will add "$scene = Scene_Skill_Shop.new" 
To Call Skill Shop Windows.

Example:
$skill_shop = [1,2,3,6,7]
$scene = Scene_Skill_Shop.new

You can set text to use in Skill Shop under "# Learn Text".
You can set Skill Price under "# Price Data".
You can set Skill that the fighter each person can study under "# Hero Data".

You will setting look like this in Hero Data
[ID of skill, Level requirement for learn]

=end
#==============================================================================
#module SKILL_SHOP
#==============================================================================
module SKILL_SHOP
  # Learn Text
  How_Learn = "What 's hero can learn?"
  Can_Learn = "Can Learn"
  Can_Learn_Lv = "On Lv"
  Cant_Learn = "Can't Learn"
  Learnt = "Learnt"
  Teach = "Teach"
  Cancel = "Cancel"
  # Price Data
  PRICE = {
  # for No Set Price
  0 => 100,
  # Add Price Here
  1 => 150,
  2 => 550,
  3 => 450,
  # End
  }
  # Hero Data
  SKILL_BUY = {
  # Add what skill can hero buy Here
  # [ID of skill,Level]
 
  1 => [
 
  [1,4],[2,3],[3,1],[7,1],
 
  ],
 
  2 => [
 
  [1,4],[2,3],[3,1],[7,5],
 
  ],
 
  # End
  }
  # Add Price
  def self.skill_price(id)
    if PRICE.include?(id)
      return PRICE[id]
    else
      return PRICE[0]
    end
  end
  # Add Hero id
  def self.skill_buy(id)
    if SKILL_BUY.include?(id)
      return SKILL_BUY[id]
    else
      return []
    end
  end
end
#==============================================================================
#class Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
  def learn?(skill)
    learn = skill_learn?(skill.id)
    if learn
      return false
    else
      return true
    end
  end
end
#==============================================================================
#class Window_Skill_ShopCommand
#==============================================================================
class Window_Skill_ShopCommand < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 2
    @column_max = 2
    s1 = SKILL_SHOP::Teach
    s2 = SKILL_SHOP::Cancel
    @commands = [s1, s2]
    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_Skill_ShopBuy
#==============================================================================
class Window_Skill_ShopBuy < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize(shop_goods)
    super(0, 128, 368, 352)
    @skill_shop_goods = $skill_shop
    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
    # If the number of items is not 0, it draws up bit map, drawing all item
    @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]
    # Acquiring the frequency of possession of the item
    price = SKILL_SHOP.skill_price(skill.id)
    enabled = (price <= $game_party.gold)
    # If price is not below the money in hand, at the same time the frequency of possession 99, usually in letter color
    # So if is not, it sets to invalid letter color
    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_Skill_ShopStatus
#==============================================================================
class Window_Skill_ShopStatus < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(368, 128, 272, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item = nil
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    if @item == nil
      return
    end
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, self.width - 32, 32, SKILL_SHOP::How_Learn)
    self.contents.font.color = normal_color
    # Equipment supplementary information
    for i in 0...$game_party.actors.size
      # Acquiring the actor
      can = false
      lv = false
      ac_lv = 0
      actor = $game_party.actors[i]
      can_learn = SKILL_SHOP.skill_buy(actor.id)
      id = @item.id
      for e in 0...can_learn.size
        if can_learn[e][0] == id
          can = true
          if can_learn[e][1] <= actor.level
            lv = true
          else
            lv = false
            ac_lv = can_learn[e][1]
          end
          break
        else
          can = false
        end
      end
      enabled = (can and lv and actor.learn?(@item))
      # If equipment possibility if usually in letter color, the impossibility, it sets to invalid letter color
      if enabled
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      #Draw Cha Pic
      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
      cw = bitmap.rect.width / 4
      ch = bitmap.rect.height / 4
      src_rect = Rect.new(0, 0, cw, ch)
      cx = contents.text_size(actor.name).width
      self.contents.blt(cx, 64 + 64 * i, bitmap, src_rect)
      # Drawing the name of the actor
      self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
      # Check Skill
      if can == false
        text = SKILL_SHOP::Cant_Learn
      elsif can == true and lv == false
        ac = ac_lv.to_s
        text = SKILL_SHOP::Can_Learn_Lv + " " + ac + "+"
      elsif actor.learn?(@item) == false
        text = SKILL_SHOP::Learnt
      else
        text = SKILL_SHOP::Can_Learn
      end
      # Drawing the item
      self.contents.draw_text(124, 64 + 64 * i, 112, 32, text, 2)
    end
  end
  #--------------------------------------------------------------------------
  def item=(item)
    if @item != item
      @item = item
      refresh
    end
  end
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # Cursor position as for -1 all selection, -2 below independence selection (user himself)
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 62 + @index * 64, self.width - 32, 50)
    end
  end
end
#==============================================================================
#class Scene_Skill_Shop
#==============================================================================
class Scene_Skill_Shop
  #--------------------------------------------------------------------------
  def main
    # Drawing up the help window
    @help_window = Window_Help.new
    # Drawing up the command window
    @command_window = Window_Skill_ShopCommand.new
    # Drawing up the Goldwyn dough
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 64
    # Drawing up the dummy window
    @dummy_window = Window_Base.new(0, 128, 640, 352)
    # Drawing up the purchase window
    @buy_window = Window_Skill_ShopBuy.new($game_temp.shop_goods)
    @buy_window.active = false
    @buy_window.visible = false
    @buy_window.help_window = @help_window
    # Drawing up the status window
    @status_window = Window_Skill_ShopStatus.new
    @status_window.visible = false
    @status_window.active
    # Transition execution
    Graphics.transition
    # Main loop
    loop do
      # Renewing the game picture
      Graphics.update
      # Updating the information of input
      Input.update
      # Frame renewal
      update
      # When the picture changes, discontinuing the loop
      if $scene != self
        break
      end
    end
    # Transition preparation
    Graphics.freeze
    # Releasing the window
    @help_window.dispose
    @command_window.dispose
    @gold_window.dispose
    @dummy_window.dispose
    @buy_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  def update
    # Renewing the window
    @help_window.update
    @command_window.update
    @gold_window.update
    @dummy_window.update
    @buy_window.update
    @status_window.update
    # When the command window is active,: Update_command is called
    if @command_window.active
      update_command
      return
    end
    # When the purchase window is active,: Update_buy is called
    if @buy_window.active
      update_buy
      return
    end
    # When the target window is active,: Update_target is called
    if @status_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_command
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # Change to map picture
      $scene = Scene_Map.new
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      # Eliminating the help text
      @help_window.set_text("")
      # It diverges at cursor position of the command window
      case @command_window.index
      when 0  # It purchases
        # Performing decision SE
        $game_system.se_play($data_system.decision_se)
        # State of window to purchase mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # It stops
        # Performing decision SE
        $game_system.se_play($data_system.decision_se)
        # Change to map picture
        $scene = Scene_Map.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_buy
    # Setting the item of the status window
    @status_window.item = @buy_window.skill
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # State of window to early mode
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      # Eliminating the help text
      @help_window.set_text("")
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      # Acquiring the item
      @item = @buy_window.skill
      @price = SKILL_SHOP.skill_price(@item.id)
      enabled = (@price <= $game_party.gold)
      # When the item is invalid, or when price it is on from the money in hand
      unless  enabled
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing decision SE
      $game_system.se_play($data_system.decision_se)
      @buy_window.active = false
      @status_window.active = true
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  def update_target
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # Eliminating the target window
      @buy_window.active = true
      @status_window.index =- 1
      @status_window.active = false
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      @actor = $game_party.actors[@status_window.index]
      can = false
      lv = false
      can_learn = SKILL_SHOP.skill_buy(@actor.id)
      id = @item.id
      for i in 0...can_learn.size
        if can_learn[i][0] == id
          can = true
          if can_learn[i][1] <= @actor.level
            lv = true
          else
            lv = false
          end
          break
        else
          can = false
        end
      end
      enabled = (can and lv and @actor.learn?(@item))
      # When with SP and so on is cut off and it becomes not be able to use
      unless enabled
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing shop SE
      $game_system.se_play($data_system.shop_se)
      @actor.learn_skill(@item.id)
      $game_party.lose_gold(@price)
      @buy_window.refresh
      @gold_window.refresh
      @status_window.refresh
      @buy_window.active = true
      @status_window.index =- 1
      @status_window.active = false
     end
  end
end


Edit:
Fixed it. got it to work with some tips from WcW. many thanks to him :P

for the one that are interested to have a skill shop next to Legacy Class Change by Legacyblade, here is the fixed version of the skill shop:

Spoiler: ShowHide
#==============================================================================
# Skill Shop for RMXP
#==============================================================================
# By Nechigawara Sanzenin
# Edit by jackolas with thanks to WcW
# WARNING!! : This script can use on RPG Maker XP Only!! (VX Not Support)
#==============================================================================
# Buy Skill Option For RMXP
#==============================================================================
=begin

How to Use:

You will add "$skill_shop =[Id of Skill]" 
To Call Script to set id of skill for sell.
You will add "$scene = Scene_Skill_Shop.new" 
To Call Skill Shop Windows.

Example:
$skill_shop = [1,2,3,6,7]
$scene = Scene_Skill_Shop.new

You can set text to use in Skill Shop under "# Learn Text".
You can set Skill Price under "# Price Data".
You can set Skill that the fighter each person can study under "# Hero Data".

You will setting look like this in Hero Data
[ID of skill, Level requirement for learn]

=end
#==============================================================================
#module SKILL_SHOP
#==============================================================================
module SKILL_SHOP
  # Learn Text
  How_Learn = "What 's hero can learn?"
  Can_Learn = "Can Learn"
  Can_Learn_Lv = "On Lv"
  Cant_Learn = "Can't Learn"
  Learnt = "Learnt"
  Teach = "Teach"
  Cancel = "Cancel"
  # Price Data
  PRICE = {
  # for No Set Price
  0 => 100,
  # Add Price Here
  1 => 150,
  2 => 550,
  3 => 450,
  # End
  }
  # class Data
  SKILL_BUY = {
  # Add what skill a Class can buy Here
  # [ID of skill,Level]
 
  1 => [
 
  [1,4],[2,3],[3,1],[7,1],
 
  ],
 
  2 => [
 
  [1,4],[2,3],[3,1],[7,5],
 
  ],
 
  # End
  }
  # Add Price
  def self.skill_price(id)
    if PRICE.include?(id)
      return PRICE[id]
    else
      return PRICE[0]
    end
  end
  # Add Hero id
  def self.skill_buy(id)
    if SKILL_BUY.include?(id)
      return SKILL_BUY[id]
    else
      return []
    end
  end
end
#==============================================================================
#class Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
  def learn?(skill)
    learn = skill_learn?(skill.id)
    if learn
      return false
    else
      return true
    end
  end
end
#==============================================================================
#class Window_Skill_ShopCommand
#==============================================================================
class Window_Skill_ShopCommand < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 2
    @column_max = 2
    s1 = SKILL_SHOP::Teach
    s2 = SKILL_SHOP::Cancel
    @commands = [s1, s2]
    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_Skill_ShopBuy
#==============================================================================
class Window_Skill_ShopBuy < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize(shop_goods)
    super(0, 128, 368, 352)
    @skill_shop_goods = $skill_shop
    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
    # If the number of items is not 0, it draws up bit map, drawing all item
    @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]
    # Acquiring the frequency of possession of the item
    price = SKILL_SHOP.skill_price(skill.id)
    enabled = (price <= $game_party.gold)
    # If price is not below the money in hand, at the same time the frequency of possession 99, usually in letter color
    # So if is not, it sets to invalid letter color
    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_Skill_ShopStatus
#==============================================================================
class Window_Skill_ShopStatus < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(368, 128, 272, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item = nil
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    if @item == nil
      return
    end
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, self.width - 32, 32, SKILL_SHOP::How_Learn)
    self.contents.font.color = normal_color
    # Equipment supplementary information
    for i in 0...$game_party.actors.size
      # Acquiring the actor
      can = false
      lv = false
      ac_lv = 0
      actor = $game_party.actors[i]
      actorz = $game_party.actors[i].class_id
      can_learn = SKILL_SHOP.skill_buy(actorz)
      id = @item.id
      for e in 0...can_learn.size
        if can_learn[e][0] == id
          can = true
          if can_learn[e][1] <= actor.level
            lv = true
          else
            lv = false
            ac_lv = can_learn[e][1]
          end
          break
        else
          can = false
        end
      end
      enabled = (can and lv and actor.learn?(@item))
      # If equipment possibility if usually in letter color, the impossibility, it sets to invalid letter color
      if enabled
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      #Draw Cha Pic
      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
      cw = bitmap.rect.width / 4
      ch = bitmap.rect.height / 4
      src_rect = Rect.new(0, 0, cw, ch)
      cx = contents.text_size(actor.name).width
      self.contents.blt(cx, 64 + 64 * i, bitmap, src_rect)
      # Drawing the name of the actor
      self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
      # Check Skill
      if can == false
        text = SKILL_SHOP::Cant_Learn
      elsif can == true and lv == false
        ac = ac_lv.to_s
        text = SKILL_SHOP::Can_Learn_Lv + " " + ac + "+"
      elsif actor.learn?(@item) == false
        text = SKILL_SHOP::Learnt
      else
        text = SKILL_SHOP::Can_Learn
      end
      # Drawing the item
      self.contents.draw_text(124, 64 + 64 * i, 112, 32, text, 2)
    end
  end
  #--------------------------------------------------------------------------
  def item=(item)
    if @item != item
      @item = item
      refresh
    end
  end
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # Cursor position as for -1 all selection, -2 below independence selection (user himself)
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 62 + @index * 64, self.width - 32, 50)
    end
  end
end
#==============================================================================
#class Scene_Skill_Shop
#==============================================================================
class Scene_Skill_Shop
  #--------------------------------------------------------------------------
  def main
    # Drawing up the help window
    @help_window = Window_Help.new
    # Drawing up the command window
    @command_window = Window_Skill_ShopCommand.new
    # Drawing up the Goldwyn dough
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 64
    # Drawing up the dummy window
    @dummy_window = Window_Base.new(0, 128, 640, 352)
    # Drawing up the purchase window
    @buy_window = Window_Skill_ShopBuy.new($game_temp.shop_goods)
    @buy_window.active = false
    @buy_window.visible = false
    @buy_window.help_window = @help_window
    # Drawing up the status window
    @status_window = Window_Skill_ShopStatus.new
    @status_window.visible = false
    @status_window.active
    # Transition execution
    Graphics.transition
    # Main loop
    loop do
      # Renewing the game picture
      Graphics.update
      # Updating the information of input
      Input.update
      # Frame renewal
      update
      # When the picture changes, discontinuing the loop
      if $scene != self
        break
      end
    end
    # Transition preparation
    Graphics.freeze
    # Releasing the window
    @help_window.dispose
    @command_window.dispose
    @gold_window.dispose
    @dummy_window.dispose
    @buy_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  def update
    # Renewing the window
    @help_window.update
    @command_window.update
    @gold_window.update
    @dummy_window.update
    @buy_window.update
    @status_window.update
    # When the command window is active,: Update_command is called
    if @command_window.active
      update_command
      return
    end
    # When the purchase window is active,: Update_buy is called
    if @buy_window.active
      update_buy
      return
    end
    # When the target window is active,: Update_target is called
    if @status_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_command
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # Change to map picture
      $scene = Scene_Map.new
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      # Eliminating the help text
      @help_window.set_text("")
      # It diverges at cursor position of the command window
      case @command_window.index
      when 0  # It purchases
        # Performing decision SE
        $game_system.se_play($data_system.decision_se)
        # State of window to purchase mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # It stops
        # Performing decision SE
        $game_system.se_play($data_system.decision_se)
        # Change to map picture
        $scene = Scene_Map.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_buy
    # Setting the item of the status window
    @status_window.item = @buy_window.skill
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # State of window to early mode
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      # Eliminating the help text
      @help_window.set_text("")
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      # Acquiring the item
      @item = @buy_window.skill
      @price = SKILL_SHOP.skill_price(@item.id)
      enabled = (@price <= $game_party.gold)
      # When the item is invalid, or when price it is on from the money in hand
      unless  enabled
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing decision SE
      $game_system.se_play($data_system.decision_se)
      @buy_window.active = false
      @status_window.active = true
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  def update_target
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # Eliminating the target window
      @buy_window.active = true
      @status_window.index =- 1
      @status_window.active = false
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      @actor = $game_party.actors[@status_window.index]
      @actorz = $game_party.actors[@status_window.index].class_id
      can = false
      lv = false
      can_learn = SKILL_SHOP.skill_buy(@actorz)
      id = @item.id
      for i in 0...can_learn.size
        if can_learn[i][0] == id
          can = true
          if can_learn[i][1] <= @actor.level
            lv = true
          else
            lv = false
          end
          break
        else
          can = false
        end
      end
      enabled = (can and lv and @actor.learn?(@item))
      # When with SP and so on is cut off and it becomes not be able to use
      unless enabled
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing shop SE
      $game_system.se_play($data_system.shop_se)
      @actor.learn_skill(@item.id)
      $game_party.lose_gold(@price)
      @buy_window.refresh
      @gold_window.refresh
      @status_window.refresh
      @buy_window.active = true
      @status_window.index =- 1
      @status_window.active = false
     end
  end
end
8
I just wane know what to do to check for a weapon id when the damage is calculated.

an example:

if the player has a sword equipped the following calculation is used:
atk = [attacker.atk + (attacker.str) * (1 - (self.pdef/1000))
and with a bow this is used:
atk = [attacker.atk + (attacker.agi) * (1 - (self.pdef/1000))

my only problem is that he needs to check what weapon is equipped to see what dmg calculation is used.
but could not work it out (1 note.. it should work for multiple bows ets. so an array)

hope this explains enough. don't need whole code.. just how to do this little bid
9
General Discussion / Character Stats Question
February 23, 2009, 02:53:09 pm
this could be 1 of the most stupid questions ever.

By looking true the stats that you can set-up and looking at all the calculations I found only 1 strange thing

I know from most stats what kind of impact they have on the gameplay

-Max HP = the max HP of the character
-Max SP = the max SP of the character
-STR = is used to add extra dmg to an attack
-Dex = Used to calculate Crit rate on an enemy
-Agi = is used to reduce the effects of crits on you and is used for escape.

-ATK = is used for DMG
-PDEF = Normal dmg resistance
-MDEF = Magic DMG resistance
-EVA = think its about dodging incomming effects


the only stat I could not find anywhere is intelligence.
so far I don't know what kind of effect it has on anything.

could anyone help me out with this (or correct stuff)
10
Script Requests / Skill Shop
January 13, 2009, 10:29:40 am
i been looking for a nice script for a skill shop and i could only find 2... (and 1 working on SDK left me with 1 good script)

This is a Skill shop system made by Nechigawara (all credits go to him)
now the problem: its based on hero id, while I want one that works on class id

I already tried to change the system so it would use class id instead of hero id to see if u can buy a skill.
but the problem seems greater than I thought.
my last option now is to ask one of you guys knows a nice solution to fix this. ore maybe have a better system of there own.


#==============================================================================
# Skill Shop for RMXP
#==============================================================================
# By Nechigawara Sanzenin
# WARNING!! : This script can use on RPG Maker XP Only!! (VX Not Support)
#==============================================================================
# Buy Skill Option For RMXP
#==============================================================================
=begin

How to Use:

You will add "$skill_shop =[Id of Skill]" 
To Call Script to set id of skill for sell.
You will add "$scene = Scene_Skill_Shop.new" 
To Call Skill Shop Windows.

Example:
$skill_shop = [1,2,3,6,7]
$scene = Scene_Skill_Shop.new

You can set text to use in Skill Shop under "# Learn Text".
You can set Skill Price under "# Price Data".
You can set Skill that the fighter each person can study under "# Hero Data".

You will setting look like this in Hero Data
[ID of skill, Level requirement for learn]

=end
#==============================================================================
#module SKILL_SHOP
#==============================================================================
module SKILL_SHOP
  # Learn Text
  How_Learn = "What 's hero can learn?"
  Can_Learn = "Can Learn"
  Can_Learn_Lv = "On Lv"
  Cant_Learn = "Can't Learn"
  Learnt = "Learnt"
  Teach = "Teach"
  Cancel = "Cancel"
  # Price Data
  PRICE = {
  # for No Set Price
  0 => 100,
  # Add Price Here
  1 => 150,
  2 => 550,
  3 => 450,
  # End
  }
  # Hero Data
  SKILL_BUY = {
  # Add what skill can hero buy Here
  # [ID of skill,Level]
 
  1 => [
 
  [1,4],[2,3],[3,1],[7,1],
 
  ],
 
  2 => [
 
  [1,4],[2,3],[3,1],[7,5],
 
  ],
 
  # End
  }
  # Add Price
  def self.skill_price(id)
    if PRICE.include?(id)
      return PRICE[id]
    else
      return PRICE[0]
    end
  end
  # Add Hero id
  def self.skill_buy(id)
    if SKILL_BUY.include?(id)
      return SKILL_BUY[id]
    else
      return []
    end
  end
end
#==============================================================================
#class Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
  def learn?(skill)
    learn = skill_learn?(skill.id)
    if learn
      return false
    else
      return true
    end
  end
end
#==============================================================================
#class Window_Skill_ShopCommand
#==============================================================================
class Window_Skill_ShopCommand < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 480, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item_max = 2
    @column_max = 2
    s1 = SKILL_SHOP::Teach
    s2 = SKILL_SHOP::Cancel
    @commands = [s1, s2]
    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_Skill_ShopBuy
#==============================================================================
class Window_Skill_ShopBuy < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize(shop_goods)
    super(0, 128, 368, 352)
    @skill_shop_goods = $skill_shop
    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
    # If the number of items is not 0, it draws up bit map, drawing all item
    @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]
    # Acquiring the frequency of possession of the item
    price = SKILL_SHOP.skill_price(skill.id)
    enabled = (price <= $game_party.gold)
    # If price is not below the money in hand, at the same time the frequency of possession 99, usually in letter color
    # So if is not, it sets to invalid letter color
    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_Skill_ShopStatus
#==============================================================================
class Window_Skill_ShopStatus < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(368, 128, 272, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item = nil
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    if @item == nil
      return
    end
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, self.width - 32, 32, SKILL_SHOP::How_Learn)
    self.contents.font.color = normal_color
    # Equipment supplementary information
    for i in 0...$game_party.actors.size
      # Acquiring the actor
      can = false
      lv = false
      ac_lv = 0
      actor = $game_party.actors[i]
      can_learn = SKILL_SHOP.skill_buy(actor.id)
      id = @item.id
      for e in 0...can_learn.size
        if can_learn[e][0] == id
          can = true
          if can_learn[e][1] <= actor.level
            lv = true
          else
            lv = false
            ac_lv = can_learn[e][1]
          end
          break
        else
          can = false
        end
      end
      enabled = (can and lv and actor.learn?(@item))
      # If equipment possibility if usually in letter color, the impossibility, it sets to invalid letter color
      if enabled
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      #Draw Cha Pic
      bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
      cw = bitmap.rect.width / 4
      ch = bitmap.rect.height / 4
      src_rect = Rect.new(0, 0, cw, ch)
      cx = contents.text_size(actor.name).width
      self.contents.blt(cx, 64 + 64 * i, bitmap, src_rect)
      # Drawing the name of the actor
      self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
      # Check Skill
      if can == false
        text = SKILL_SHOP::Cant_Learn
      elsif can == true and lv == false
        ac = ac_lv.to_s
        text = SKILL_SHOP::Can_Learn_Lv + " " + ac + "+"
      elsif actor.learn?(@item) == false
        text = SKILL_SHOP::Learnt
      else
        text = SKILL_SHOP::Can_Learn
      end
      # Drawing the item
      self.contents.draw_text(124, 64 + 64 * i, 112, 32, text, 2)
    end
  end
  #--------------------------------------------------------------------------
  def item=(item)
    if @item != item
      @item = item
      refresh
    end
  end
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # Cursor position as for -1 all selection, -2 below independence selection (user himself)
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, 62 + @index * 64, self.width - 32, 50)
    end
  end
end
#==============================================================================
#class Scene_Skill_Shop
#==============================================================================
class Scene_Skill_Shop
  #--------------------------------------------------------------------------
  def main
    # Drawing up the help window
    @help_window = Window_Help.new
    # Drawing up the command window
    @command_window = Window_Skill_ShopCommand.new
    # Drawing up the Goldwyn dough
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 64
    # Drawing up the dummy window
    @dummy_window = Window_Base.new(0, 128, 640, 352)
    # Drawing up the purchase window
    @buy_window = Window_Skill_ShopBuy.new($game_temp.shop_goods)
    @buy_window.active = false
    @buy_window.visible = false
    @buy_window.help_window = @help_window
    # Drawing up the status window
    @status_window = Window_Skill_ShopStatus.new
    @status_window.visible = false
    @status_window.active
    # Transition execution
    Graphics.transition
    # Main loop
    loop do
      # Renewing the game picture
      Graphics.update
      # Updating the information of input
      Input.update
      # Frame renewal
      update
      # When the picture changes, discontinuing the loop
      if $scene != self
        break
      end
    end
    # Transition preparation
    Graphics.freeze
    # Releasing the window
    @help_window.dispose
    @command_window.dispose
    @gold_window.dispose
    @dummy_window.dispose
    @buy_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  def update
    # Renewing the window
    @help_window.update
    @command_window.update
    @gold_window.update
    @dummy_window.update
    @buy_window.update
    @status_window.update
    # When the command window is active,: Update_command is called
    if @command_window.active
      update_command
      return
    end
    # When the purchase window is active,: Update_buy is called
    if @buy_window.active
      update_buy
      return
    end
    # When the target window is active,: Update_target is called
    if @status_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_command
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # Change to map picture
      $scene = Scene_Map.new
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      # Eliminating the help text
      @help_window.set_text("")
      # It diverges at cursor position of the command window
      case @command_window.index
      when 0  # It purchases
        # Performing decision SE
        $game_system.se_play($data_system.decision_se)
        # State of window to purchase mode
        @command_window.active = false
        @dummy_window.visible = false
        @buy_window.active = true
        @buy_window.visible = true
        @buy_window.refresh
        @status_window.visible = true
      when 1  # It stops
        # Performing decision SE
        $game_system.se_play($data_system.decision_se)
        # Change to map picture
        $scene = Scene_Map.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  def update_buy
    # Setting the item of the status window
    @status_window.item = @buy_window.skill
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # State of window to early mode
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      # Eliminating the help text
      @help_window.set_text("")
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      # Acquiring the item
      @item = @buy_window.skill
      @price = SKILL_SHOP.skill_price(@item.id)
      enabled = (@price <= $game_party.gold)
      # When the item is invalid, or when price it is on from the money in hand
      unless  enabled
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing decision SE
      $game_system.se_play($data_system.decision_se)
      @buy_window.active = false
      @status_window.active = true
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  def update_target
    # The B when button is pushed
    if Input.trigger?(Input::B)
      # Performing cancellation SE
      $game_system.se_play($data_system.cancel_se)
      # Eliminating the target window
      @buy_window.active = true
      @status_window.index =- 1
      @status_window.active = false
      return
    end
    # When C button is pushed
    if Input.trigger?(Input::C)
      @actor = $game_party.actors[@status_window.index]
      can = false
      lv = false
      can_learn = SKILL_SHOP.skill_buy(@actor.id)
      id = @item.id
      for i in 0...can_learn.size
        if can_learn[i][0] == id
          can = true
          if can_learn[i][1] <= @actor.level
            lv = true
          else
            lv = false
          end
          break
        else
          can = false
        end
      end
      enabled = (can and lv and @actor.learn?(@item))
      # When with SP and so on is cut off and it becomes not be able to use
      unless enabled
        # Performing buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Performing shop SE
      $game_system.se_play($data_system.shop_se)
      @actor.learn_skill(@item.id)
      $game_party.lose_gold(@price)
      @buy_window.refresh
      @gold_window.refresh
      @status_window.refresh
      @buy_window.active = true
      @status_window.index =- 1
      @status_window.active = false
     end
  end
end