RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST] Create Magic weapon

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 86
Ryu is the best!
I want to create a sword that can also be used as an item, and what happens when you use it as an item is a magic fire spell is cast.  Only problem is how do i do this and by default when you use an item it disappears after use, how can i resolve this issue?
Thanks for your help,
~Ryu
« Last Edit: January 31, 2008, 02:31:57 PM by Ryu009 »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
You will need to have some kind of script for that. And, the other question was answered in your other topic but you set consumable to NO

EDIT::
Also, it would be possible to do the first through events - BUT, anybody could use the item :/ Which doesn't make any sense unless your guys are cocnstantly throwing each other a flaming sword.

**
Rep: +0/-0Level 86
Ryu is the best!
I'm a noob at scripting, I just started to read the help file from rmxp about scripting so I'm still in the process of learning how to script.  Could someone please write this script for me or tell me where i can find such a script which will allow a weapon to be used as an item that casts a fire spell.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Are you sure you want it to show up as an item? Why not a skill?

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Moved to script requests, please adhere to the script request forum rules within 24 hours.

**
Rep: +0/-0Level 86
Ryu is the best!
<Create Magic Weapon>
<11/27/2008>



Summary
<<What this script will do is temporarily make a skill available for use only when a certain weapon is equipped.  So when the user unequips the item the skill will no longer be visible in the list of skills during combat.>>

Features Desired
  • Allow an equipped weapon to make a new skill available which hasn't yet been learned
  • The new skill is only available when the item IS EQUIPPED

Mockups
<<no visual aspect>>

Games its been in
  • Final Fantasy 9
  • Final Fantasy 7



Did you search?
<<yes, i searched>>

Where did you search?

What did you search for?
  • Magic Weapon
  • Battle scripts
  • Skill scripts

P.S. Falcon, is this what u meant by "please adhere to the script request forum rules within 24 hours."
Please disregard anything i said in the previous posts, I only want it to appear as a weapon and i no longer want the weapon to be used as an item effect.  This might sound confusing so please just tell me if it is and I'll try to explain it better.
« Last Edit: January 28, 2008, 12:42:48 AM by Ryu009 »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Try this:

Code: [Select]
#==============================================================================
#  Skill Teaching Weapons
#  Version 1.0
#  Author: modern algebra (rmrk.net)
#  Date: January 27, 2008
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#     Insert this script just above Main. To configure your database, see the
#     Configuration Section at line 23
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ** RPG::Weapon
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Adds an additional stat, skill id, to the weapon object
#==============================================================================

class RPG::Weapon
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Skill ID
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def skill_id
    learn_skill = 0
    case @id
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * CONFIGURATION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  It is very easy to configure the database. All that you need to do
    #  is write:
    #
    #     when <weapon ID>
    #       learn_skill = <skill_id>
    #
    #  For every weapon that you want to teach skills. To discover what the
    #  ID of a weapon or a skill, look at the number directly to the left
    #  of their names in the Database. There are two examples below. Feel
    #  free to delete them once you understand what you need to do.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    when 1 # Bronze Sword
      learn_skill = 1 # Heal
    when 2 # Iron Sword
      learn_skill = 69 # Poison Edge
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * END CONFIGURATION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    end
    return learn_skill
  end
end

#==============================================================================
# ** Game_Actor (addition for skill teaching weapons)
#==============================================================================

class Game_Actor
  #--------------------------------------------------------------------------
  # * Change Equipment
  #     equip_type : type of equipment
  #     id    : weapon or armor ID (If 0, remove equipment)
  #--------------------------------------------------------------------------
  alias ma_skill_teaching_weapons_change_equipment equip
  def equip (equip_type, id)
    # Forget the skill from the previously equipped weapon
    forget_skill ($data_weapons[@weapon_id].skill_id) if equip_type == 0 && @weapon_id != 0
    # Run original method
    ma_skill_teaching_weapons_change_equipment (equip_type, id)
    # Learn the skill from the weapon just equipped
    learn_skill ($data_weapons[@weapon_id].skill_id) if equip_type == 0 && @weapon_id != 0
  end
  #--------------------------------------------------------------------------
  # * Setup
  #     actor_id : actor ID
  #--------------------------------------------------------------------------
  alias ma_skill_teaching_weapons_actor_setup setup
  def setup(actor_id)
    # Run original method
    ma_skill_teaching_weapons_actor_setup (actor_id)
    # If there is a skill attached to weapon, learn it
    learn_skill ($data_weapons[@weapon_id].skill_id) if @weapon_id != 0
  end
end

I think I will put that in my scriptlets too :<

EDIT:: Tell me if anything goes wrong :O)
« Last Edit: January 28, 2008, 01:25:15 AM by modern algebra »

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Well done modern!

If Modern's doesn't work, I believe Sepiroth Spawn made one like that.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Thanks  :D


There's one problem with it right now ryuu, and that is that unequipping the weapon will always make the actor forget the skill, even if he had the skill through natural means (i.e. got it from something besides the weapon). Is that going to be a problem for you? If it is, the problem is fixed by this other version:

http://rmrk.net/index.php/topic,24405.0.html
« Last Edit: January 28, 2008, 03:40:32 PM by modern algebra »

**
Rep: +0/-0Level 86
Ryu is the best!
Thanks modern for your help and ill check out the other version your talking about and see how it goes.

**
Rep: +0/-0Level 86
Ryu is the best!
Modern your scripting skills are awesome. :) Thanks for your script it works perfectly.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
No problem. I'm glad you like it