查看: 1208|回复: 0

[Finish Script] Hp restore pack

[复制链接]

梦石
0
星屑
407
在线时间
1291 小时
注册时间
2013-1-12
回帖
3349

贵宾

发表于 2013-9-27 08:30:23 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
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
复制代码

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本发帖返回顶部