Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Creating a script to do this
Adrien.
post Jan 11 2012, 06:05 PM
Post #1


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




THis script would have to be placed inside the script box for events, essentially I am looking to say:

if item x exists in the inventory then for the amount of item x add that number to a variable id of y

So if you have 4 feathers then variable of 15 would = 4

How would I do this?

This post has been edited by Adrien.: Jan 11 2012, 06:06 PM


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
The Law G14
post Jan 11 2012, 06:09 PM
Post #2


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




CODE
$game_variables[Y] = $game_party.items[X]


I believe that would be the code, with X being the Item ID smile.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Adrien.
post Jan 11 2012, 06:20 PM
Post #3


Bet Mapper
Group Icon

Group: Banned
Posts: 1,632
Type: Mapper
RM Skill: Advanced




That didnt work. the item was given in battle but the variable never increased by 1 - I was given one item

its item_number(item) that I want but I cant figure out how to pass item id of 30 in.....

This post has been edited by Adrien.: Jan 11 2012, 06:34 PM


__________________________



Games I am working on | Each image is a link to the game
Go to the top of the page
 
+Quote Post
   
The Law G14
post Jan 11 2012, 07:10 PM
Post #4


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Ooh, I think I used XP code, try this instead:

CODE
$game_variables[Y] = $game_party.item_number($data_items[X])


EDiT: Just tested it, and it's working fine smile.gif

This post has been edited by The Law G14: Jan 11 2012, 07:11 PM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   

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: 20th May 2013 - 05:57 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker