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.
Cursed Weapons (Unequippable) and Equip / Unequip with a Script?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 70
RMRK Junior
Two questions, anyone know of a Cursed Weapons script that makes a cursed weapon Unequippable, and Question 2, how do you Equip / Unequip Weapons with a Script?  Like character.weapon.equip = true or something?
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Firstly, I'll mention that you can equip/unequip weapons through an event command, in case you had accidentally missed it and all you had wanted to do was unequip through an event and thought you needed a script.

The code for unequipping through a script call, however, is:

Code: [Select]
actor.change_equip (equip_type, nil, false)

where actor is a Game_Actor object (like $game_actors[y] or $game_party.members[0], etc.). equip_type is 0-4 depending on what type you are unequipping. Weapons are 0, Shields are 1, Helmets are 2, Body Armor is 3, Accessories are 4. nil and false are just values and you leave them. You can exclude false generally unless you have a custom script which, for some reason, reverses the presumption.

So to unequip a weapon off of the lead actor in the party, it would be:

Code: [Select]
$game_party.members[0].change_equip (0, nil)

If using two weapons style, then you could remove that weapon with:

Code: [Select]
$game_party.members[0].change_equip (1, nil)

You can use the same method to also equip new weapons and replace nil with an RPG::Weapon/Armor object ($data_weapons[1-999] or $data_armors[1-999]). However, it will probably be easier to use the following method unless you are already using the RPG::Weapon/Armor object.

Code: [Select]
$game_party.members[0].change_equip_by_id (equip_type, 1-999)

where 1-999 is any id within that range and it will return the weapon/armor with that ID. equip_type is the same as in the previous method.


As for cursed weapons, look in the RMVX Script Index. I know there is something there.

***
Rep:
Level 70
RMRK Junior
Wow!  Thanks a ton for the detailed response!  I forgot to mention I was using XP, cuz I know the script structure for VX is different.

I'll take a look at that link...
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Spoiler for Oh.:
PAC's ISaE Addons (Item, Skill and Equip Addons) has a 'sticky equipment' feature, which is basically cursed equipment with a funky name. So you don't have to download the demo, here it is.
Oh, it exceeds the character limit. Fetch it from PasteBin.
\sticky
Place this in a weapon or armor's notebox to make it a sticky piece, meaning that it cannot be unequipped from the equip menu. It can still be unequipped
via event commands.
\unsticky
Place this in an item or skill's notebox to make it able to remove sticky equipment. If you want to remove all sticky pieces equipped to an actor, use:
$game_actors[ACTOR_ID].unequip_sticky_equips

Okay, you using XP changes everything. I can't help you there.
it's like a metaphor or something i don't know

***
Rep:
Level 74
I'm baaack!
Did you run a google search? 90% of the times when I've used it for RPG Maker purposes I've discovered a new forum I've never heard of :D

***
Rep:
Level 70
RMRK Junior
Did you run a google search? 90% of the times when I've used it for RPG Maker purposes I've discovered a new forum I've never heard of :D

Ok, I tried Player[0].Google.Search, but I get a script error!  :P
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
No, that's not how you do a Google search. It's:
Code: [Select]
Google.search(Player[0])
Jeez, everyone should know this stuff.
it's like a metaphor or something i don't know

***
Rep:
Level 70
RMRK Junior
Well, now that I have a little more time to go back to working on this, I looked around, several other msg boards, and did find a couple of Cursed Items scripts, but every single one was for VX!  Does anyone know of any Cursed Items / Weapons scripts for XP?
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!