LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

Active Member
Active Member
#1 XAS - Multiple Treasure Info Empty XAS - Multiple Treasure Info
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
Multiple Treasure Info
Version: 2.0
Author: LiTTleDRAgo
Date: June 16, 2011

Description


Screenshot explains everything

XAS - Multiple Treasure Info Multi_10

Instructions
Paste below XAS

Script


Code:
#==============================================================================#
# Multi Treasure Info                                                          #
# By LiTTleDRAgo                                                              #
#==============================================================================#

module DRG_TREASURE_INFO
 
  MTI_HUD_X = -20
  MTI_HUD_Y = 420 - 100
  MTI_TIME = 1
  WINDOW_PRIORITY_Z = 99999
  FONT = 'Monotype Corsiva'
  SIZE = 20 
  ACT_SE = 'Mana - Menu-01'
 
end

#==============================================================================
# ■ MTI
#==============================================================================
 class Mti < Sprite
  include DRG_TREASURE_INFO 
#--------------------------------------------------------------------------
# ● Initialize
#--------------------------------------------------------------------------
  def init
    setup
    @inf = Sprite.new
    @inf.bitmap = Bitmap.new(120,70)
    @inf.z = 2 + WINDOW_PRIORITY_Z
    @inf.oy = -MTI_HUD_Y + 50
    @inf.bitmap.font.name  = 'Georgia'
    @inf.bitmap.font.size  = 30
    @inf.bitmap.font.italic  = true
    @inf.bitmap.font.color = Color.new(255, 255, 128, 255)
  #  @inf.bitmap.draw_circle_gradient(24, 24, 25, Color.gray,45,1)
    @inf.bitmap.draw_text(5, 4, 120, 40, 'Get',0)
    @inf.opacity = 0
  end
#--------------------------------------------------------------------------
# ● Setup
#--------------------------------------------------------------------------
  def setup
    $game_temp.mti_text_x = 0
    $game_temp.mti_text_y = 0
    $game_temp.mti_text_zoom_x = 1.00
    $game_temp.mti_text_zoom_y = 1.00
    $game_temp.mti_text_opa = 0   
  end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
  def update
    super
    update_start_move
    refresh if $game_temp.mti_start
  end
#--------------------------------------------------------------------------
# ● Dispose
#--------------------------------------------------------------------------
  def dispose
    return super if @text.nil?
    @text.each {|i| i.dispose if !i.nil?}
    @inf.dispose if !@inf.nil?
    super 
  end
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
  def refresh
    $game_temp.mti_start = false
    init if @inf.nil?
    (@count.nil? || @count >= 5) ? @count = 0 : @count += 1
    if @text[@count].nil?
      @text[@count] = Sprite.new
      @text[@count].bitmap = Bitmap.new(120,40)
      @text[@count].z = 2 + WINDOW_PRIORITY_Z
      @text[@count].bitmap.font.name = FONT
      @text[@count].bitmap.font.size = SIZE
    end
    @text[@count].bitmap.clear
    @text[@count].opacity = 100
    @text[@count].zoom_x = 1.50
    @text[@count].oy = -MTI_HUD_Y + 5 + $game_temp.mti_text_y
    @text[@count].ox = -MTI_HUD_X - 50 + $game_temp.mti_text_x
    @text[@count].zoom_x = $game_temp.mti_text_zoom_x
    @text[@count].zoom_y = $game_temp.mti_text_zoom_y
    @text[@count].bitmap.draw_text(0, 0, 120, 40, $game_temp.mti_text.to_s,0)
    @text[@count].visible = true
    @time[@count] = MTI_TIME * 40
  end
#--------------------------------------------------------------------------
# ● Update Start Move
#-------------------------------------------------------------------------- 
  def update_start_move
    @text,@time = [],[] if @text.nil? or @time.nil?
    v = @count.nil? ? 0 : @count
    return if @text[v].nil?
    if !@time[v].nil? and @time[v] > 0
      if @text[v].opacity < 255
        @text[v].oy = -MTI_HUD_Y + 5 + $game_temp.mti_text_y
        @text.each_index {|i|
          if v != i && !@text[i].nil?
            @text[i].oy += 1
            @text[i].opacity -= 5 if @text[v-i].opacity > 0
          end}
        @text[v].opacity += 10
      end
      @inf.opacity += 10 if @inf.opacity < 255
    else
      @text.each_index {|i|
        if @text[i].opacity > 0
          @text[i].opacity -= 5
          @text[i].oy += 1
        else
          @text[i].visible = false
        end}
        @inf.opacity -= 10 if @inf.opacity > 0
    end
    @time[v] -= 1 if @time[v] > 0
  end
end
#===============================================================================
# ■ Interpreter
#===============================================================================
class Interpreter 
 
  #--------------------------------------------------------------------------
  # ● multi_treasure_info_popup(text)
  #-------------------------------------------------------------------------- 
  def multi_treasure_info_popup(text)
      $game_temp.mti_text = text
      $game_temp.mti_text_time = 40 * DRG_TREASURE_INFO::MTI_TIME
      $game_temp.mti_start = true     
  end
  #--------------------------------------------------------------------------
  # ● Play SE
  #--------------------------------------------------------------------------
  def play_se_itm
      Audio.se_play('Audio/SE/'+DRG_TREASURE_INFO::ACT_SE , 70, 100) rescue nil
  end
  #--------------------------------------------------------------------------
  # ● Change Gold
  #--------------------------------------------------------------------------
  alias drgXp_command_125 command_125
  def command_125
      drgXp_command_125
      value = operate_value(@parameters[0], @parameters[1], @parameters[2])
      text = value.to_s + ' ' + $data_system.words.gold 
      multi_treasure_info_popup(text) if value > 0   
  end
 #--------------------------------------------------------------------------
 # ● Display Item Animaton
 #--------------------------------------------------------------------------
  alias drgXp_display_item_animaton display_item_animaton
  def display_item_animaton(damage_item,gold_effect,value,item_name)
    drgXp_display_item_animaton(damage_item,gold_effect,value,item_name)
    if damage_item == nil 
        text = value.to_s +  ' x ' + item_name
        multi_treasure_info_popup(text) if value > 0
        play_se_itm if value > 0
    elsif gold_effect != nil
        text = gold_effect.to_s + ' ' + $data_system.words.gold 
        multi_treasure_info_popup(text) if value > 0     
        play_se_itm if value > 0
    end
  end
 #--------------------------------------------------------------------------
 # ● Command_127 (WEAPON)
 #--------------------------------------------------------------------------
  alias drgXp_item_command_127 command_127
  def command_127
    drgXp_item_command_127
    value = operate_value(@parameters[1], @parameters[2], @parameters[3]) 
    item_name = load_data('Data/Weapons.rxdata')
    text = value.to_s +  ' x ' + item_name[@parameters[0]].name
    multi_treasure_info_popup(text) if value > 0         
  end
 #--------------------------------------------------------------------------
 # ● Command_128 (ARMOR)
 #--------------------------------------------------------------------------
  alias drgXp_command_128 command_128
  def command_128
    drgXp_command_128
    value = operate_value(@parameters[1], @parameters[2], @parameters[3]) 
    item_name = load_data('Data/Armors.rxdata')
    text = value.to_s +  ' x ' + item_name[@parameters[0]].name
    multi_treasure_info_popup(text) if value > 0         
  end
end 

#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map   
 
#--------------------------------------------------------------------------
# ● Main
#--------------------------------------------------------------------------
  alias drgXp_mti_main main
  def main 
    drgXp_mti_main
    @mti.dispose
  end   
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
  alias drgXp_mti_update update
  def update
    drgXp_mti_update
    @mti.nil? ? @mti = Mti.new : @mti.update
  end   
end 

#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp 
    attr_accessor :mti_text_x,:mti_text_y,:mti_text_zoom_x,:mti_text_zoom_y,
            :mti_text_opa,:mti_text,:mti_text_time,:mti_start
end


$drago_multi_treasure_info = true

Known Compatibility Issues
XAS Exclusive

Restrictions
None
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Administrator
Administrator
#2 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
@,@ - this is just lovely! This XAS-add on is plug and play, no need for graphics, and works like a charm. Real professional. Thanks for sharing drago! +++

Plus
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
ACTIVATED
ACTIVATED
#3 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

Thunder

Thunder
ACTIVATED
ACTIVATED
ACTIVATED
profile
Can't see any screenshot, did you forgot to post it?
ACTIVATED
Show Signature
ACTIVATED
Administrator
Administrator
#4 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
the screen shot doesn't do the scrolling and the fading any justice, but it looks like this ~
(just got two potions)

XAS - Multiple Treasure Info Multi_10
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
ACTIVATED
ACTIVATED
#5 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

Thunder

Thunder
ACTIVATED
ACTIVATED
ACTIVATED
profile
Oh thanks, I couldnt see it in home, maybe some firefox addon blocking it. I can see now, thanks.
ACTIVATED
Show Signature
ACTIVATED
Active Member
Active Member
#6 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
G@MeF@Ce wrote:
Spoiler:

I'll update the screenshot with yours
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com
Administrator
Administrator
#7 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
yo drago!

how would I position this to appear above the player?
(I've tried tinkering using $game_player.x, etc... no luck)

(I love this script!)
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Active Member
Active Member
#8 XAS - Multiple Treasure Info Empty Re: XAS - Multiple Treasure Info
Loading

LiTTleDRAgo

LiTTleDRAgo
Active Member
Active Member
Active Member
profile
I don't have time (or mood?) to tinkering the script right now

probably you can look at

@text[@count].oy
@text[@count].ox

--edit : that won't do

I guess is easier to make new version from stratch in class game_character & sprite_character
(like baloon script XP or XRXS damage popup)
Active Member
Show Signature
Active Member
http://littledrago.blogspot.com

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled