Project1
标题:
如何在MMO状态菜单中显示血条及判定等级后显示文字
[打印本页]
作者:
gb68783568
时间:
2013-4-22 13:41
标题:
如何在MMO状态菜单中显示血条及判定等级后显示文字
1.请教如何在MMO状态菜单中加入血条.
2.请教如何在判定角色等级后不显示等级,而在菜单中显示预设的文字.(如LV1~10显示"学徒";LV11~20显示"见习骑士";LV21~30显示"骑士")
作者:
嗨。猪头
时间:
2013-4-23 07:34
LV1~10显示"学徒"; 职业 学徒 再弄个人物 名字也一样 LV11~20显示"见习骑士"; 职业 见习骑士 再弄个人物 LV21~30显示"骑士 职业 骑士
共 3个人物 。。。。队伍换人 不初始化人物 等级
作者:
gb68783568
时间:
2013-4-23 08:38
类似于转职吗?
作者:
a364774426
时间:
2013-4-23 08:55
需要MMO菜单的脚本
作者:
gb68783568
时间:
2013-4-23 09:30
#==============================================================================
# ■ Sprite_BasicWindow
#==============================================================================
class Sprite_BasicWindow < Sprite_Window
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(x = $game_variables[22], y = $game_variables[23])
super(x, y, MMO_BASIC)
self.visible = ($game_variables[21] == 1)
self.z = 180
@bitmap = Cache.system("基本信息")
self.bitmap = Bitmap.new(@bitmap.width, @bitmap.height)
@title_height = self.height # ウィンドウ全体をタイトルバー扱いにする
refresh
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
def update(mouse_x, mouse_y, obj)
return unless self.visible # 非表示なら終了
super(mouse_x, mouse_y, obj)
refresh if $game_temp.basewin_refresh # フラグが立っていれば再描画
end
#--------------------------------------------------------------------------
# ● 再描画
#--------------------------------------------------------------------------
def refresh
actor = $game_party.members[0]
self.bitmap.clear
self.bitmap.blt(0, 0, @bitmap, Rect.new(0, 0, self.width, self.height))
self.bitmap.font.size = 13
text = sprintf("%s", actor.name)
self.bitmap.draw_text(110, 18, 65, 18, text,1)
text = sprintf("%d", $game_party.gold)
nil while text.gsub!(/(.*\d)(\d\d\d)/, '\1,\2')
self.bitmap.draw_text(110, 36, 63, 16, text, 1)
text = sprintf("等级%d",actor.blevel)
self.bitmap.draw_text(18, 18, 54, 18, text,1)
text = sprintf("经验 %d%%", actor.bexp_rate)
self.bitmap.draw_text(18, 35, 60, 18, text,1)
text = sprintf("体力")
self.bitmap.draw_text(75, 1, 544, 18, text)
text = sprintf("%d/%d", actor.hp,actor.maxhp)
self.bitmap.draw_text(78, 1, 98, 18, text,1)
text = sprintf("魔法")
self.bitmap.draw_text(18, 1, 544, 18, text)
text = sprintf("%d/%d",actor.mp, actor.maxmp)
self.bitmap.draw_text(18, 1, 98, 18, text,1)
$game_temp.basewin_refresh = false # 再描画フラグを倒す
end
#--------------------------------------------------------------------------
# ● ウィンドウ位置の保存
#--------------------------------------------------------------------------
def save_pos
$game_variables[21] = self.visible ? 1 : 0
$game_variables[22] = self.x
$game_variables[23] = self.y
end
end
作者:
gb68783568
时间:
2013-4-23 09:52
判定等级已经研究出来了,求教显示血条````
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1