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.
Non sellable objects.

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 87
How do i make an item in rpg maker so that i can't sell it?

*****
Rep:
Level 88
Set the price of the item to 0. I'm pretty sure that does it.

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
What do you mean?
Like, have the item in the shop, but not be able to buy it?

And Vince, that just makes it so it's free.

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

No one ever tries to figure things out on their own.

Key Items.

*****
Rep:
Level 88
And Vince, that just makes it so it's free.
Really? It worked on my game... :-\
I'm gonna try it again...

EDIT: Crap... You were right... :-[

EDIT EDIT: Never mind... I think it worked...
« Last Edit: May 29, 2007, 05:05:17 PM by Vince »

***
Rep:
Level 88
A pirate's life for me
What do you mean?
Like, have the item in the shop, but not be able to buy it?

And Vince, that just makes it so it's free.

No, he means have the item in the inventory, and not being able to sell it in the shop.

For the guy above me, I dunno what yer talkin' about, but I made a new item called Key Item and set the price to 0, and I couldn't sell it in the shop. So that works, with RMXP at least. Of course if ye make the item buyable in the shop you'll get the item for free.


The new generation will go to the distance... Will the distance between us smallen?

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Don't know why I said Key Items, must have been some script.

Price 0 is correct, it will be free, but unable to be sold.

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
But what if you ant to buy it?
Make a common event and remove the item that's buy able then replace it with the one set to zero.

*****
Rep:
Level 88
Wait... I was right? ???

Gah, I'm gonna have to try it out again! :mad:

***
Rep:
Level 88
A pirate's life for me
But what if you ant to buy it?
Make a common event and remove the item that's buy able then replace it with the one set to zero.

Why put an item in the shop if you dont want players to buy it in the first place?


The new generation will go to the distance... Will the distance between us smallen?

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
But what if you ant to buy it?
Make a common event and remove the item that's buy able then replace it with the one set to zero.

Why put an item in the shop if you dont want players to buy it in the first place?

No, I think he wants to make it non sell able.

***
Rep:
Level 88
A pirate's life for me
Yes of course, I understand that and the solution is already given,. But you brought up the buy case so I replied.


The new generation will go to the distance... Will the distance between us smallen?

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
I didn't know what he wanted at first. I was mistaken.

What you do:
Make the item that's buy able.
Make the item that's not sell able.
Of course, name them the same thing.
Make a common event for the buy able one.
Do a conditional branch to check if the buy able item is in the inventory.
Then, make it so that if it is in the inventory it removes it and replaces it with the right item. The sell able one.


But make sure you set the common event to parallel process and have a call common event in the area where you can buy it. And set the call common event to parallel process too.


EDIT:

Wait, try this:

Common event:
Remove [sell able item]
Add [non sell able item]

And link that to the buy able item. So that's easier than doing the conditional branch. I dunno if any of those will work because they're all from memory. I'll check later.
« Last Edit: May 29, 2007, 11:06:43 PM by Anthony »

*
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
Why prevent them from selling it if they can buy it anyway?

If you actually do want them to be able to buy the item, then do what Rex said the first time except don't bother with a common event. Don't do the second one he suggested (the edit) because the player would have to use the item for it to become non-sellable.

So, basically, just make a parallel process event wherever the item can be bought which looks like this:

Conditional Branch: <Buyable item> in inventory
    Change Items: <Buyable item> - 1
    Change Items: <Sellable item> + 1
Branch END


But like I said, I don't see why you'd go through the trouble of making an item unsellable if you can just buy it again. And yeah, like people have ben saying, items are unsellable if their price is 0. And Falcon, you probably said Key Items because there's a script that rearranges the item screen into compartments, placing all items with price 0 into their own compartment called Key Items. I don't recall which script it was though  ;9

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
That's what I said Modern...

*
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
do what Rex said the first time except don't bother with a common event
I know, I was just telling him not to bother with a common event, since it is not good to have a parallel process running all the time when it only serves a function in a couple maps.

I showed the code to him/her again just to show him which of your explanations I was referring to, as your second one:
EDIT:

Wait, try this:

Common event:
Remove [sell able item]
Add [non sell able item]

wouldn't work, since the player would have to use the item before he could get the unsellable one.

*
Crew Slut
Rep:
Level 93
You'll love it!
For taking a crack at the RMRK Wiki
opss! (blush)

Didn't see that!


Ahh, checked it out, and yeah, it doesn't work, hat about switching it over? Like add the non sell able item before then remove the sell able one.

*****
Rep:
Level 88
Wait... Has anyone else realized that the guy who started this hasn't replied yet? To tell who was right? Just thought I would mention this...

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Parallel Process
Variable = # of item
if variable > 0
     remove_item(Item_Buyable,variable)
     add_item(Item_UnSellable,variable)
end


:)
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."