以下有兩種血棒的顯示版本,請按照您較喜歡的樣式安裝。
基本樣式(血條樣式與原本相同) 寫:開啟檔案wog/wog_class.php
in count() function
尋找
- 代碼: 選擇全部
if(($m[m_hp]-$temp_d)<=0)
{
下面,加上
- 代碼: 選擇全部
$hp1=round(($p[p_hp]/$p[p_hpmax])*150);
echo ","parent.wog_view.document.all.p_img.width=$hp1;parent.wog_view.document.all.m_img.width=0;"";
尋找
- 代碼: 選擇全部
if(($p[p_hp]-$temp_d)<=0)
{
下面,加上
- 代碼: 選擇全部
$hp1=round(($m[m_hp]/$m[m_hpmax])*150);
echo ","parent.wog_view.document.all.p_img.width=0;parent.wog_view.document.all.m_img.width=$hp1;"";
尋找
- 代碼: 選擇全部
if($sum>=$this->f_count)
{
下面,加上
- 代碼: 選擇全部
$hp1=round(($p[p_hp]/$p[p_hpmax])*150);
$hp2=round(($m[m_hp]/$m[m_hpmax])*150);
echo ","parent.wog_view.document.all.p_img.width=$hp1;parent.wog_view.document.all.m_img.width=$hp2;"";
雙BAR樣式(血條樣式與HP&EXPBAR外掛相同) 寫:開啟檔案wog/wog_class.php
in count() function
尋找
- 代碼: 選擇全部
if(($m[m_hp]-$temp_d)<=0)
{
下面,加上
- 代碼: 選擇全部
$hp1=round(($p[p_hp]/$p[p_hpmax])*150);
$hp2=150-$hp1;
echo ","parent.wog_view.document.all.p_img.width=$hp1;parent.wog_view.document.all.p_img2.width=$hp2;parent.wog_view.document.all.m_img.width=0;parent.wog_view.document.all.m_img2.width=150;"";
尋找
- 代碼: 選擇全部
if(($p[p_hp]-$temp_d)<=0)
{
下面,加上
- 代碼: 選擇全部
$hp1=round(($m[m_hp]/$m[m_hpmax])*150);
$hp2=150-$hp1;
echo ","parent.wog_view.document.all.p_img.width=0;parent.wog_view.document.all.p_img2.width=150;parent.wog_view.document.all.m_img.width=$hp1;parent.wog_view.document.all.m_img2.width=$hp2;"";
尋找
- 代碼: 選擇全部
if($sum>=$this->f_count)
{
下面,加上
- 代碼: 選擇全部
$hp1=round(($p[p_hp]/$p[p_hpmax])*150);
$hp2=150-$hp1;
$hp3=round(($m[m_hp]/$m[m_hpmax])*150);
$hp4=150-$hp3;
echo ","parent.wog_view.document.all.p_img.width=$hp1;parent.wog_view.document.all.p_img2.width=$hp2;parent.wog_view.document.all.m_img.width=$hp3;parent.wog_view.document.all.m_img2.width=$hp4;"";
開啟檔案wog/wog.js
將下列三個函式覆蓋至對應的舊函式
- 代碼: 選擇全部
function fire_date(p_at,p_df,p_mat,p_mdf,p_hp,p_hpmax,p_s,i_img,m_at,m_df,m_mat,m_mdf,m_hp,m_hpmax,m_s,m_name,m_img,f_status)
{
var view_name=parent.wog_view;
var p_name=get_name();
temp_p_hp=p_hp;
temp_p_hpmax=p_hpmax;
temp_m_hp=m_hp;
temp_m_hpmax=m_hpmax;
var temp_php_img=Math.round((temp_p_hp/temp_p_hpmax)*150);
var temp_mhp_img=Math.round((temp_m_hp/temp_m_hpmax)*150);
var temp_php2_img=150-temp_php_img;
var temp_mhp2_img=150-temp_mhp_img;
setup_mname(m_name);
message_cls();
p_s=s_status(p_s);
m_s=s_status(m_s);
if(m_img=="")
{
m_img="no_img.jpg";
}
if(f_status==1)
{
m_img=img+m_img+".gif";
m_img='<img id=g2 src="'+m_img+'" border="0" style="position: absolute;left: 60%;top: 220;Z-INDEX: -1">';
}else
{
m_img=mimg+m_img;
m_img='<img id=g2 src="'+m_img+'" border="0" style="position: absolute;left: 60%;top: 175;Z-INDEX: -1">';
}
view_name.document.write(fight_temp_table1+'<tr><td colspan="2">'+p_name+'</td><td colspan="2" >'+m_name+'</td></tr>');
view_name.document.write('<tr><td width="25%">HP</td><td class=b1 width="25%"><img src='+img+'bar/bxg.gif border="0" width="'+temp_php_img+'" id="p_img" name="p_img" height="9"><img src='+img+'bar/bhg.gif border="0" width="'+temp_php2_img+'" id="p_img2" name="p_img2" height="9"></td><td width="25%">HP</td><td class=b1 width="25%"><img src='+img+'bar/bxg.gif border="0" width="'+temp_mhp_img+'" id="m_img" name="m_img" height="9"><img src='+img+'bar/bhg.gif border="0" width="'+temp_mhp2_img+'" id="m_img2" name="m_img2" height="9"></td></tr>');
view_name.document.write('<tr><td>物理攻擊</td><td>'+p_at+'</td><td>物理攻擊</td><td>'+m_at+'</td></tr>');
view_name.document.write('<tr><td>物理防禦</td><td>'+p_df+'</td><td>物理防禦</td><td>'+m_df+'</td></tr>');
view_name.document.write('<tr><td>魔法攻擊</td><td>'+p_mat+'</td><td>魔法攻擊</td><td>'+m_mat+'</td></tr>');
view_name.document.write('<tr><td>魔法防禦</td><td>'+p_mdf+'</td><td>魔法防禦</td><td>'+m_mdf+'</td></tr>');
view_name.document.write('<tr><td>屬性</td><td>'+p_s+'</td><td>屬性</td><td>'+m_s+'</td></tr>');
view_name.document.write(temp_table2);
view_name.document.write('<table width="97%" border="0" cellspacing="0" cellpadding="0" align="center" >');
view_name.document.write('<tr><td width="50%" height="170" align="center"><img id=g1 src="'+img+i_img+'.gif" border="0" style="position: absolute;left: 23%;top: 220;Z-INDEX: -1"></td><td align="center" width="50%" height="170">'+m_img+'</td></tr>');
view_name.document.write('<tr><td colspan="2" align="center">'+hr+'<div align="center" id="a1"></td></tr>');
view_name.document.write(temp_table2);
}
function pact_date(temp_d,s,ss,hit)
{
var view_name=parent.wog_view;
temp_m_hp=temp_m_hp-temp_d;
var temp_mhp_img=Math.round((temp_m_hp/temp_m_hpmax)*150);
var temp_mhp2_img=150-temp_mhp_img;
view_name.document.all.m_img.width=temp_mhp_img;
view_name.document.all.m_img.alt=temp_m_hp+"/"+temp_m_hpmax;
view_name.document.all.m_img2.width=temp_mhp2_img;
view_name.document.all.m_img2.alt=temp_m_hp+"/"+temp_m_hpmax;
if(Math.abs(temp_mhp2_img)>=150)
{view_name.document.all.m_img2.width=150;}
view_fight(temp_d,s,ss,p_name,m_name,hit);
gf=view_name.document.all.g2.style.left;
gf=gf.replace("%","");
gt=view_name.document.all.g2.style.top;
shock_num=0;
temp_obj=view_name.document.all.g2.style;
shock_fight();
}
function mact_date(temp_d,s,ss,hit)
{
var view_name=parent.wog_view;
temp_p_hp=temp_p_hp-temp_d;
var temp_php_img=(temp_p_hp/temp_p_hpmax)*150;
var temp_php2_img=150-temp_php_img;
view_name.document.all.p_img.width=temp_php_img;
view_name.document.all.p_img.alt=temp_p_hp+"/"+temp_p_hpmax;
view_name.document.all.p_img2.width=temp_php2_img;
view_name.document.all.p_img2.alt=temp_p_hp+"/"+temp_p_hpmax;
if(Math.abs(temp_php2_img)>=150)
{view_name.document.all.p_img2.width=150;}
view_fight(temp_d,s,ss,m_name,p_name,hit);
gf=view_name.document.all.g1.style.left;
gf=gf.replace("%","");
gt=view_name.document.all.g1.style.top;
shock_num=0;
temp_obj=view_name.document.all.g1.style;
shock_fight();
}
完畢,有問題請提出。