[XP] Need some script calls

Started by The Niche, March 08, 2011, 03:45:41 am

Previous topic - Next topic

The Niche

Ok, I'm working on an evented menu system and I need the following script calls:


  • I want a script call to write a save file to whichever file I choose.

  • I want a script call to force the use of an item.

  • I want a script call to set a variable to the number of a certain item that there is in the inventory



That's all for now, but I will definitely need more.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

ForeverZer0

I'm at work at the second, so I will need to look at RMXP's scripts to get the exact calls for all of them, but the last one:

$game_variables[VAR_ID] = $game_party.item_number(ITEM_ID)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

The Niche

Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

G_G

Try this for the saving. Call with Scene_Save.save("file name.rxdata")
class Scene_Save
  def self.save(file_name)
    save_obj = self.new
    file = File.open(file_name, "wb")
    save_obj.write_save_data(file)
    file.close
  end
end

ForeverZer0

I don't know if that will work without creating an instance of Scene_Save. You would need to create a static method that does the same thing, but that defeats the purpose of an evented menu.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

It works I tested. It uses a static method. def self.save. Then what it does is create an instance of itself and calls all methods from that.

Ryex

the script call for that is
Scene_Save.save(FILE_NAME)

that last call you want depends on weather or not your using BABS
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

The Niche

Thanks Ryex, but one problem. When I said...oh wait. It doesn't actually matter. Ryex, I love you.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

G_G

I don't get any credit for this D:

The Niche

*Facepalm*

I meant you. I'm really not with it today.
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!