Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V  < 1 2  
Reply to this topicStart new topic
> Magica Scroll System
Mefisno
post Sep 4 2008, 07:32 AM
Post #21


Is most likly drunk somewhere. But I'm sure he will get back
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Advanced




Hmmm this script really isn't working for me at all does anyone know what i've done wrong?

I've created the scroll item (ID 26)
changed the first element to one called Scroll and set the number 26 ID item as that element.
and I think I've done the script rigth but I'm not sure why it's not working right.


CODE
#======================================================================
========
# ■ Magica
#------------------------------------------------------------------------------
# Right, now here is where you can set each scroll's effects. Wether it was it was adding magical
# skills, corresponding with other events, it doesn't matter !
# I made the basic commands which are setting a new skill,
#
# How to use :
#
# - Add the effects you want using the already setted methods under "def initialize" :
# (set_magica or switch_trigger)
# the arguments are as follows :
# set_magica(scroll_id,skill_id)
# set_switch(scroll_id, switch, character)
#
#==============================================================================

class Magica

def initialize #Add the scroll related skills below this line

set_magica(26,20)
end


#This is the method you'll be using for setting magic.
def set_magica(scroll_id,skill_id)
for i in 0...$game_party.members.size
@actor = $game_party.members[i]
if @actor.scroll.id == $data_items[scroll_id].scroll.id or @actor.scroll2.id == $data_items[scroll_id].scroll.id or @actor.scroll3.id == $data_items[scroll_id].scroll.id
@actor.learn_skill(skill_id)
else
@actor.forget_skill(skill_id)
end
end
end
#This is the method you'll be using for triggering a switch
def switch_trigger(scroll_id, switch, character)
if $game_party.members[character-1].scroll.id == $data_items[scroll_id].scroll.id or $game_party.members[character-1].scroll2.id == $data_items[scroll_id].scroll.id or $game_party.members[character-1].scroll3.id == $data_items[scroll_id].scroll.id
$game_switches[switch] = true
else
$game_switches[switch] = false
end
end

end

(the error message that comes up takes me to the bit that says "(26, 20)"


CODE
module Scrolls

class Scroll_Array

def initialize
# Don't forget to add the scroll's class name in this array, and don't forget the ".new"
@scroll_array = [Fire_Scroll.new]
end
def data(id)
for i in 0...@scroll_array.size
if @scroll_array[i].id == id
return @scroll_array[i]
end
end
end

end
#=====================================================================
#=====================================================================
#=====================================================================
#How to set Scrolls :
# 1 - Use the template below and follow the instructions
# 2 - Add the <class name> with a ".new" sticked to the end of it in the Array above..
# 3 - Add a line in the "Set_Item_Scrolls" class below using this syntax :
# $data_items[item_id].scroll = Scrolls::<class name>.new
# item_id : The id of the item related to the scroll
# <class name> : The name of the class of the scroll, again, don't forget the ".new"
#4 - All the items related to scrolls must have the first attribute -name it "Scroll"- setted on..
# If you still have problems with functioning the script please revise the templates in the
# demonstration game, if you still experince problems, you can PM in the RRR forums
# or through msn live messanger through my e-mail : denarto0o0@hotmail.com
#=====================================================================
#=====================================================================

begin

class Fire_Scroll #This can be anything but it should start with a capital letter
def initialize
end
def id
return 26 #This is the ID of the item you want the scroll to be related to..
end
def item_related
return $data_items[id]
end
def name
return "Fire Scroll" #The name of the scroll, you should name it like
#the item the scroll is related to although you can change it
# don't forget to put BETWEEN 2 QOUTE MARKZ
end
end
end



#=====================================================================
end

class Set_Item_Scrolls
def initialize
#Set the items related to the scrolls here

$data_items[26].scroll = Scrolls::Fire_Scroll.new


end
end

(And also with this one it tells me 26 is wrong)


This post has been edited by Mefisno: Sep 4 2008, 07:37 AM


__________________________
Go to the top of the page
 
+Quote Post
   
Shu
post Sep 5 2008, 01:23 PM
Post #22


JAYOKU HOUTENJIN!!
Group Icon

Group: Revolutionary
Posts: 316
Type: Artist
RM Skill: Masterful




Well, you aren't telling me how it's "not working" so I wouldn't know how to point you in the right direction.
I've messed around a lot with this script, so I might be able to, if you specify better what part of this script isn't working for you.

Edit: Okay, I've looked through the scripts you included, and I found your error message in the code section of your Magica script. Now maybe I can work it out for you.

Try copy/pasting the original Magica_Effect_Handling script to replace that one, and replace set_magica(22,59) -or whatever it says there- with set_magica(26, 20)

Make sure the spell you're trying to link(Fire?) the scroll with is Skill #20. So make sure Fire is on 20.
Your Scroll Database script looks fine to me, so it's probably a problem within the first code.'

If this didn't help you, upload your project via MediaFire or something and let me look at it. I'll fix it.

This post has been edited by Shu: Sep 5 2008, 03:40 PM


__________________________
Go to the top of the page
 
+Quote Post
   
Putri
post Oct 16 2008, 06:17 AM
Post #23


Level 2
Group Icon

Group: Member
Posts: 25
Type: Developer
RM Skill: Skilled




hey there, i would like to know how to change this so only one class can use the scrolls, as the game im working on has a singer with bad memory, so i wanted to give him lyrics that gave him acess to songs, but as it is, even my mage sings >>


__________________________
Go to the top of the page
 
+Quote Post
   
miget man12
post Nov 11 2008, 08:59 AM
Post #24


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




Is there a way to make this into a system similar to the 'Element' System in Chrono Cross? With the amount that you can equip going up when you beat a boss, and being able to use a grid with different power levels?
Thanks, Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
Rei
post Jan 12 2009, 07:41 PM
Post #25


Level 1
Group Icon

Group: Member
Posts: 6
Type: Developer
RM Skill: Beginner




I like the script though I'm having difficulties getting it to work. Wonders if someone could help with this error.

QUOTE
Script 'Magica_Scroll_System' line 321: NoMethodError occurred.

undefined method `scroll' for #<Game_Actor:0x327cc78>


Scripts I'm Using:

RPG Tankentai Sideview Battle System v3.3 & ATB v1.1
Caterpillar Script
~[Quest System Script]~, By Samo, The Thieft
Level up stat and skill window
Character Select Menu Ver. 1.1c
Recover HP/MP/States when Level Up
Pause script
Skew's Teleport System


This post has been edited by Rei: Jan 12 2009, 08:36 PM
Go to the top of the page
 
+Quote Post
   
Mickadell
post Jan 17 2009, 02:27 AM
Post #26


Level 5
Group Icon

Group: Member
Posts: 71
Type: Event Designer
RM Skill: Masterful




Comment
Rate: Ok
It's ok, not the best.
Go to the top of the page
 
+Quote Post
   

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 11:20 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker