设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 875|回复: 0
打印 上一主题 下一主题

[Finish Script] Hp restore pack

[复制链接]

梦石
0
星屑
362
在线时间
1292 小时
注册时间
2013-1-12
帖子
3590

贵宾

跳转到指定楼层
1
发表于 2013-9-27 08:30:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-15 17:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表