[問題]令裝備增加hp上限
發表於 : 2007-02-01 6:22 pm
令裝備增加hp上限
可行嗎
可行嗎
ALTER TABLE `wog_df` ADD `d_hp` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ;
$sql="select a.ch_pro,a.ch_id,a.d_df,a.d_mdf,a.d_agl,a.d_at,a.d_mat,a.d_name,a.d_type,a.d_g_str,a.d_g_smart,a.d_g_agl,a.d_g_life,a.d_g_vit,a.d_g_au,a.d_g_be,a.d_g_exp,a.d_g_bag
$sql="select a.ch_pro,a.ch_id,a.d_df,a.d_mdf,a.d_agl,a.d_at,a.d_mat,a.d_name,a.d_type,a.d_g_str,a.d_g_smart,a.d_g_agl,a.d_g_life,a.d_g_vit,a.d_g_au,a.d_g_be,a.d_g_exp,a.d_g_bag[color=red],a.d_hp[/color]
$sql="select a.d_df,a.d_mdf,a.d_agl,a.d_at,a.d_mat,a.d_id from wog_df a,wog_player b where b.".$a_id."=a.d_id and b.p_id=".$user_id." ";
$sql="select a.d_df,a.d_mdf,a.d_agl,a.d_at,a.d_mat,a.d_id[color=red],a.d_hp[/color] from wog_df a,wog_player b where b.".$a_id."=a.d_id and b.p_id=".$user_id." ";
if($pack2)
{
$DB_site->query("update wog_item set ".$a_id."='".$s."' where p_id=".$user_id." ");
$DB_site->query("update wog_player set ".$a_id."=".$adds.",p_df=p_df-".$pack2[d_df]."+".$pack[d_df]."
,p_mdf=p_mdf-".$pack2[d_mdf]."+".$pack[d_mdf].",p_agl=p_agl-".$pack2[d_agl]."+".$pack[d_agl]."
,p_at=p_at-".$pack2[d_at]."+".$pack[d_at].",p_mat=p_mat-".$pack2[d_mat]."+".$pack[d_mat]."
where p_id=".$user_id." ");
}else
{
$DB_site->query("update wog_item set ".$a_id."='".$s."' where p_id=".$user_id." ");
$DB_site->query("update wog_player set ".$a_id."=".$adds.",p_df=p_df+".$pack[d_df]."
,p_mdf=p_mdf+".$pack[d_mdf].",p_agl=p_agl+".$pack[d_agl]."
,p_at=p_at+".$pack[d_at].",p_mat=p_mat+".$pack[d_mat]."
where p_id=".$user_id." ");
}
if($pack2)
{
$DB_site->query("update wog_item set ".$a_id."='".$s."' where p_id=".$user_id." ");
$DB_site->query("update wog_player set ".$a_id."=".$adds.",p_df=p_df-".$pack2[d_df]."+".$pack[d_df]."
,p_mdf=p_mdf-".$pack2[d_mdf]."+".$pack[d_mdf].",p_agl=p_agl-".$pack2[d_agl]."+".$pack[d_agl]."
,p_at=p_at-".$pack2[d_at]."+".$pack[d_at].",p_mat=p_mat-".$pack2[d_mat]."+".$pack[d_mat]."[color=red],p_hp=p_hp-".$pack2['d_hp']."+".$pack['d_hp'].",p_hpmax=p_hpmax-".$pack2['d_hp']."+".$pack['d_hp']."[/color]
where p_id=".$user_id." ");
}else
{
$DB_site->query("update wog_item set ".$a_id."='".$s."' where p_id=".$user_id." ");
$DB_site->query("update wog_player set ".$a_id."=".$adds.",p_df=p_df+".$pack[d_df]."
,p_mdf=p_mdf+".$pack[d_mdf].",p_agl=p_agl+".$pack[d_agl]."
,p_at=p_at+".$pack[d_at].",p_mat=p_mat+".$pack[d_mat]."[color=red],p_hp=p_hp+".$pack['d_hp'].",p_hpmax=p_hpmax+".$pack['d_hp']."[/color]
where p_id=".$user_id." ");
}