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.
[RESOLVED] Phoenix Down like script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
I'm new to the forums and looking for a script that would revive the actor if Item X was in inventory. Any help would be appreciated. In the meantime i'll try to do it in an event.
« Last Edit: February 10, 2010, 04:23:39 AM by ldkraven »

*
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
So you want it to happen automatically, not through another party member using the item on the party member?

*
Last Stop
Rep:
Level 88
Everyone Off
Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.Secret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 92011 Biggest Drama WhoreBronze - GIAW HalloweenGold - Game In A Week VII
man autophoenix in FF games made it like, easy as balls.

**
Rep: +0/-0Level 82
Not exactly, i want them to have a choice. something like: Use item X? Yes or no. This is what i have right now and it doesn't work:

Code: [Select]
@>Conditional Branch: Script: $game_party.all_dead?
   @>Conditional Branch: [ItemX] in Inventory
       @>Text: -, -, Dark, Bottom
        :        : Use ItemX?
       @>Show Choices: Yes, No
        :  When [Yes]
           @>Recover All: Entire party         <<<(theres only one person)
           @>Change Items: [ItemX], -1
           @>Wait: 60 frame(s)
           @>Text: -, -, Dark, Bottom
            :        : Used ItemX!
           @>
        :  When [No]
           @>
        :  Branch End
        @>
     :  Branch End
     @>
  :  Branch End
@>








 

**
Rep: +0/-0Level 82
***bump***

**
Rep:
Level 83
I made a quick script :

Spoiler for:

  #--------------------------------------------------------------------------
  # autorevive item
  #--------------------------------------------------------------------------

class Game_Actor < Game_Battler
  
  #--------------------------------------------------------------------------
  # * Change HP
  #     hp : new HP
  #--------------------------------------------------------------------------
  def hp=(hp)
    @hp = [[hp, maxhp].min, 0].max
    if @hp == 0 and not state?(1) and not @immortal
      for item in $game_party.items
        if item.note == "<Autorevive>" and @hp == 0 then
          @hp=1
          $game_party.consume_item(item)
        else
          add_state(1)                # Add incapacitated (state #1)
          @added_states.push(1)
        end
      end
    elsif @hp > 0 and state?(1)
      remove_state(1)             # Remove incapacitated (state #1)
      @removed_states.push(1)
    end
  end
end


To use this , create an item and add "<Autorevive>" in the comments field .
If one of your heroes die , the item will be automaticaly consumed and the hero will be revive with 1 hp .
if oyu want the hero to be revived with full HP instead , change :
          @hp=1
by
          @hp=@maxhp

This is not exactly what you need , because i don't ask the question . the item is automatically consumed
You can use my scripts freely . but not for commercial use .
:ccbync:
Don't encrypt your game !!!
Want to give me credit ? Easy ,add me in your game :

**
Rep: +0/-0Level 82
I can work around the question. Thanks alot ^.^

*
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
nice work dricc. You should post a topic for it :)