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.
Small edit to autorevive script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
I recieved this script from dricc back in february and was wondering if someone could help me edit the script.

Code: [Select]
#--------------------------------------------------------------------------
  # 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



I need it to ask if i want to use the item before it revives the character. If anyone could tell me how I would appreciate it.

**
Rep:
Level 83
Oh , yes , i remember .

Well , it is much more difficult but not impossible . You must create a "scene" class to make that . and maybe a "window" class also .
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
Thats what i figured but i have no idea how. I tried to get the script to call a common event or change a switch/variable but it wasn't working. The reviving works though, thanks again.

**
Rep: +0/-0Level 82