Project1

标题: Hp restore pack [打印本页]

作者: 熊喵酱    时间: 2013-9-27 08:30
标题: Hp restore pack
It's a simple script based on someone's question.......
I don't really get how to use alias, would be nice if someone teaches me to do it.

Screen shot:
None Needed

Credits:
Panda King(76213585)

Usage:
Plug and play if you want to go with default setting....

This script does....................:
1.restore hp based on the variable of hp restore variable(fill in the lost hp based on the variable)

=====Version Note=====
1.00 | Relese

OverWrites:
class Scene_Map
     def update
  1. module Panda
  2. U_VAR = 1 #Hp restore Variable
  3. ACT = 1#The ID of actor reciving the hp restore
  4. end
  5. class Scene_Map < Scene_Base
  6.   def update
  7.     super
  8.     $game_map.update(true)
  9.     $game_player.update
  10.     $game_timer.update
  11.     @spriteset.update
  12.      update_scene if scene_change_ok?   
  13.      @k = $game_actors[Panda::ACT].mhp - $game_actors[Panda::ACT].hp
  14.      if $game_variables[Panda::U_VAR]!= 0
  15.       if $game_variables[Panda::U_VAR]>= @k
  16.         $game_variables[Panda::U_VAR] -= @k
  17.         $game_actors[Panda::ACT].hp += @k
  18.       end
  19.       else if $game_variables[Panda::U_VAR]<= @k
  20.         $game_actors[Panda::ACT].hp += $game_variables[Panda::U_VAR]
  21.         $game_variables[Panda::U_VAR] = 0
  22.       end
  23.       end
  24.    end
  25. end
复制代码





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1