Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Item found message
Skyhunter
post Oct 19 2008, 02:59 AM
Post #1


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




ITEM FOUND MESSAGE

Version
1.5
Author
Skyhuter
Release Date
20.11.2008



Introduction
The script automaticlly shows a message whenever you gain an item. So there is no call scripts whatsoever.
Script is plug and play.
Added sound Chime2 when item found.

Features
Copy script from here, not the demo, this script is updated to 1.4, now when you exit a shop no messages will show.

Script

CODE
#-----------------------------------------------------------------------------
# Sky_Hunter's Item Screen Add On
# Simplified by Jens009
# Version 1.5
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Game_Party
#-----------------------------------------------------------------------------
class Game_Party < Game_Unit
  # Alias Method gain_item
  alias jens009_gain_item_add_on gain_item
  # Alias Method gain_gold
  alias jens009_gain_gold_item_add_on gain_gold
  #-----------------------------------------------------------------------------
  # gain_gold
  #-----------------------------------------------------------------------------  
  def gain_gold(n)
    # Call Old Methods
    jens009_gain_gold_item_add_on(n)
    # Make New Methods
    if n > 0 and not $game_temp.in_battle and not $Scene_Shop
     $game_message.background = 0 #here is the background of the message
     $game_message.position = 0   #the position
     $game_message.texts.push("Found "+(n.to_s)+" gold")
     Audio.se_play("Audio/SE/Chime2", 75, 0)
    end
  end
  #-----------------------------------------------------------------------------
  # GAINING ITEMS
  #-----------------------------------------------------------------------------
  def gain_item(item, n, include_equip = false)
   # Call Old Methods
   jens009_gain_item_add_on(item, n, include_equip = false)
   # Call New Methods
    number = item_number(item)
    case item
    when RPG::Item
      if n > 0 and not $game_temp.in_battle and $game_map.interpreter.running? and $scene.is_a?(Scene_Shop) == false
         $game_message.background = 0 #here is the background of the message
         $game_message.position = 0   #the position
         $game_message.texts.push("Found "+(n.to_s)+" "+($data_items[item.id].name))
         Audio.se_play("Audio/SE/Chime2", 75, 0)
      end
    when RPG::Weapon
      if n > 0 and not $game_temp.in_battle and $game_map.interpreter.running? and $scene.is_a?(Scene_Shop) == false
       $game_message.background = 0 #here is the background of the message
       $game_message.position = 0   #the position
       $game_message.texts.push("Found "+(n.to_s)+" "+($data_weapons[item.id].name)) #and text
       Audio.se_play("Audio/SE/Chime2", 75, 0)
      end
    when RPG::Armor
      if n > 0 and not $game_temp.in_battle and $game_map.interpreter.running? and $scene.is_a?(Scene_Shop) == false
       $game_message.background = 0 #here is the background of the message
       $game_message.position = 0   #the position
       $game_message.texts.push("Found "+(n.to_s)+" "+($data_armors[item.id].name)) #and text
       Audio.se_play("Audio/SE/Chime1", 75, 0)
      end
    end
  end
end
# End of Game_Party Modification


Customization
You can customize the message that appears in any way. the background, position and text.
Audio.se_play("Audio/SE/Chime1", 100, 50) first number is volume, second is pitch.


Compatibility
Should be compatible with everything.

Screenshot



DEMO
Demo is outdated, use the script from the codebox above.
http://www.mediafire.com/?eiynij0dykg

Installation
Copy script

FAQ

Terms and Conditions
Just use it as you wish. Credits would be nice but not necesary.

Credits
Made by skyhunter
Simplified by Jens009

This post has been edited by Skyhunter: Nov 28 2008, 03:49 AM


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
jens009
post Oct 19 2008, 06:38 PM
Post #2


L Did you know? Death gods... only eat apples
Group Icon

Group: +Gold Member
Posts: 2,976
Type: Scripter
RM Skill: Skilled




Hey! Good job for making your first script.
I've simplified it so that you don't have to directly edit Game_Party
*Code removed refer to first post*
Instead of directly editing Game_Party, we simply call the Game_Party class and its methods.
We do not want to edit the methods directly too but rather add to the methods. To do so, we alias the methods.
Here's how aliasing goes:
CODE
alias new_name old_name

All it does is call the old methods of that function
To call the old methods, you have to type the new name as such:
CODE
new_name(inputs)
or if there are no arguments/inputs at all just do
CODE
new_name


Again, lessons to note:
1) You don't have to edit it directly, just call the class again.
2) Alias methods as much as possible.

Hope this helps. =] Good job once again.
.
Reason for edit: code has been removed by request


__________________________

My RMXP Project:


Farewell RRR. =]
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Oct 20 2008, 12:54 AM
Post #3


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




Hey Jens, thanks for your help!
It seems aliasing isn't that complicated at all. Well that's good to know.
Thx again.


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Oct 21 2008, 03:22 PM
Post #4


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




First post has been edited, correct screen and demo there...

This post has been edited by Skyhunter: Nov 20 2008, 04:50 AM


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
hadou17
post Nov 23 2008, 04:07 AM
Post #5


Level 2
Group Icon

Group: Member
Posts: 19
Type: Event Designer
RM Skill: Beginner




Can you make it so that a sound effect chimes in along with the message?


__________________________
*Don't visit site in my sig, it's been long gone, too lazy to edit it out.....*
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Nov 24 2008, 04:23 AM
Post #6


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




QUOTE (hadou17 @ Nov 23 2008, 01:07 PM) *
Can you make it so that a sound effect chimes in along with the message?


Yeah np


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
hadou17
post Nov 24 2008, 04:27 AM
Post #7


Level 2
Group Icon

Group: Member
Posts: 19
Type: Event Designer
RM Skill: Beginner




QUOTE (Skyhunter @ Nov 24 2008, 04:23 AM) *
QUOTE (hadou17 @ Nov 23 2008, 01:07 PM) *
Can you make it so that a sound effect chimes in along with the message?


Yeah np

cool, cant wait for it.


__________________________
*Don't visit site in my sig, it's been long gone, too lazy to edit it out.....*
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Nov 24 2008, 04:50 AM
Post #8


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




QUOTE (hadou17 @ Nov 24 2008, 01:27 PM) *
QUOTE (Skyhunter @ Nov 24 2008, 04:23 AM) *
QUOTE (hadou17 @ Nov 23 2008, 01:07 PM) *
Can you make it so that a sound effect chimes in along with the message?


Yeah np

cool, cant wait for it.


Sound added.
smile.gif
You can customize volume and pitch


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
hadou17
post Nov 24 2008, 05:43 AM
Post #9


Level 2
Group Icon

Group: Member
Posts: 19
Type: Event Designer
RM Skill: Beginner




QUOTE (Skyhunter @ Nov 24 2008, 04:50 AM) *
QUOTE (hadou17 @ Nov 24 2008, 01:27 PM) *
QUOTE (Skyhunter @ Nov 24 2008, 04:23 AM) *
QUOTE (hadou17 @ Nov 23 2008, 01:07 PM) *
Can you make it so that a sound effect chimes in along with the message?


Yeah np

cool, cant wait for it.


Sound added.
smile.gif
You can customize volume and pitch

cool man, works perfectly! thanks alot!


__________________________
*Don't visit site in my sig, it's been long gone, too lazy to edit it out.....*
Go to the top of the page
 
+Quote Post
   
grafikal007
post Nov 24 2008, 07:06 PM
Post #10


Level 2
Group Icon

Group: Member
Posts: 29
Type: Artist
RM Skill: Masterful




Can you pleaaaaase make a .txt file and post it? sad.gif

I keep trying to copy and paste the script but it ends up pasting in a VERY LONG single line in the Script Editor.


Nevermind, I just copied the post below you, I think it's the same.

I was wondering if there's a way to edit it so that the box is much smaller, shows one item at a time instead of listing them, and centered?

This post has been edited by grafikal007: Nov 24 2008, 08:41 PM
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Nov 25 2008, 05:53 AM
Post #11


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




QUOTE (grafikal007 @ Nov 25 2008, 04:06 AM) *
Can you pleaaaaase make a .txt file and post it? sad.gif

I keep trying to copy and paste the script but it ends up pasting in a VERY LONG single line in the Script Editor.


Nevermind, I just copied the post below you, I think it's the same.

I was wondering if there's a way to edit it so that the box is much smaller, shows one item at a time instead of listing them, and centered?


Post below isn't the same, don't use it. It has bugs.

I could probably make what you want. But i don't have the time right now.


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
grafikal007
post Nov 25 2008, 01:33 PM
Post #12


Level 2
Group Icon

Group: Member
Posts: 29
Type: Artist
RM Skill: Masterful




Oh, if it has bugs, can you please upload a .txt document of your script? If I use the script from the first post, it pastes into the Script Editor in a single line. I think it's because of the scroll bar on the code, but I'm not sure. Thanks smile.gif
Go to the top of the page
 
+Quote Post
   
kingoftheroad
post Nov 26 2008, 08:48 AM
Post #13


Level 4
Group Icon

Group: Member
Posts: 49
Type: Mapper
RM Skill: Advanced




fakenopic.gif Hmm... good..
But what if you want to give the charecter a large amount of items?
That would be annoying.


__________________________
Go to the top of the page
 
+Quote Post
   
grafikal007
post Nov 26 2008, 01:15 PM
Post #14


Level 2
Group Icon

Group: Member
Posts: 29
Type: Artist
RM Skill: Masterful




QUOTE (kingoftheroad @ Nov 26 2008, 08:48 AM) *
fakenopic.gif Hmm... good..
But what if you want to give the charecter a large amount of items?
That would be annoying.



Lol, yeah. I didn't like that it created a full message box to list off 4 items then refresh and list off more. But for whatever reason, I really don't mind when in a game if you pick up 3 or 4 items, a small centered window at the bottom of the screen fades in and out 3 or 4 times informing you that you picked up a new item. pinch.gif
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Nov 27 2008, 06:00 PM
Post #15


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




I thought of that before.
But, sry guys i m not that good with scripting, so for the time being this is all there is.
Also i don't have much time, but thx for comments.
Maybe when i have more time will upgrade this script.

This post has been edited by Skyhunter: Nov 27 2008, 06:00 PM


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
jens009
post Nov 27 2008, 08:17 PM
Post #16


L Did you know? Death gods... only eat apples
Group Icon

Group: +Gold Member
Posts: 2,976
Type: Scripter
RM Skill: Skilled




SkyHunter, you should put your code under the code tag instead of codebox.
Also, the bug he mentions is that an error will pop up whenever you gain an item from Scene_Shop.

If you guys still can't copy the script, press the reply button from his original post. A new window should pop up where you can reply to the topic with his quoted text.

Simply copy the script from this window.


__________________________

My RMXP Project:


Farewell RRR. =]
Go to the top of the page
 
+Quote Post
   
Skyhunter
post Nov 28 2008, 03:48 AM
Post #17


Level 2
Group Icon

Group: Member
Posts: 21
Type: Event Designer
RM Skill: Masterful




QUOTE (jens009 @ Nov 28 2008, 05:17 AM) *
SkyHunter, you should put your code under the code tag instead of codebox.
Also, the bug he mentions is that an error will pop up whenever you gain an item from Scene_Shop.

If you guys still can't copy the script, press the reply button from his original post. A new window should pop up where you can reply to the topic with his quoted text.

Simply copy the script from this window.


I put it in spoiler, I can't find that codetag, but the bug isn't just from scene_shop, when u aliased, u also forgot to remove to add items, so it gives double items.

Uh, found the code tahg, jens could you edit the above post so people don't get confused?

This post has been edited by Skyhunter: Nov 28 2008, 03:52 AM


__________________________
It's time to kick ass and chew bubblegum.
Go to the top of the page
 
+Quote Post
   
Twilight27
post Nov 28 2008, 11:16 AM
Post #18


Level 19
Group Icon

Group: Revolutionary
Posts: 371
Type: Event Designer
RM Skill: Beginner




QUOTE (Skyhunter @ Nov 24 2008, 08:50 AM) *
QUOTE (hadou17 @ Nov 24 2008, 01:27 PM) *
QUOTE (Skyhunter @ Nov 24 2008, 04:23 AM) *
QUOTE (hadou17 @ Nov 23 2008, 01:07 PM) *
Can you make it so that a sound effect chimes in along with the message?


Yeah np

cool, cant wait for it.


Sound added.
smile.gif
You can customize volume and pitch


Hey (@ you or jens), adding the feature that the window also shows the graphics picture assigned to the item in the database would be nice. For example, the sword icon you have for the "Super Blade" in the database, appears within the window, like after the "You got the Super Blade!"
For gold, it'll be a set of coins or something.


__________________________

Fall to the power of the Emo!
We have cookies!


Notice!! Check out my topic (http://www.rpgrevolution.com/forums/index.php?showtopic=45736&st=0#entry454175) if you're interested in helping me make a script that limits the number of characters & items you use in battle AND also an item durability feature! Thanks for any help in advance!
Go to the top of the page
 
+Quote Post
   
jens009
post Nov 30 2008, 05:51 PM
Post #19


L Did you know? Death gods... only eat apples
Group Icon

Group: +Gold Member
Posts: 2,976
Type: Scripter
RM Skill: Skilled




QUOTE (Skyhunter @ Nov 28 2008, 03:48 AM) *
Uh, found the code tahg, jens could you edit the above post so people don't get confused?

Done. =]
QUOTE
Hey (@ you or jens), adding the feature that the window also shows the graphics picture assigned to the item in the database would be nice. For example, the sword icon you have for the "Super Blade" in the database, appears within the window, like after the "You got the Super Blade!"
For gold, it'll be a set of coins or something.

Good suggestion! I'm busy right now and besides this is not my script.

Maybe SkyHunter would like to take on the request. ;-D


__________________________

My RMXP Project:


Farewell RRR. =]
Go to the top of the page
 
+Quote Post
   
vandelfan
post Dec 18 2008, 03:17 PM
Post #20


Level 4
Group Icon

Group: Member
Posts: 49
Type: Event Designer
RM Skill: Skilled




Great script sky
I just have one question:
How do i add sound exactly?
thx


__________________________


Click here to level up my card!

LEVEL ME!!!... plz?...

Knock Knock!
Who's there?
It's me, I'll Kill You
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
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: 24th May 2013 - 05:22 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker