$atkrand=rand(0,10);$defrand=rand(0,10);$atktemp=($members[mypetatk]+$members[item1]+$members[item2]+2+$level1)-($user2pet[mypetdef]+$userpet[item3]+$userpet[item4]+$userpet[item5]+3+$level2);$atktmp=round($atktemp+$atktemp*($atkrand/5));if ($atktmp<1){$atk=$atkrand;}else if ($atktmp>$userpet[mypetmaxhp]){$atk=$userpet[mypetmaxhp];}else {$atk=$atktmp;}$exp=intval($atk/10);$atktemp2=($userpet[mypetatk]+$userpet[item1]+$userpet[item2]+2+$level2)-($members[mypetdef]+$members[item3]+$members[item4]+$members[item5]+3+$level1);$atktmp2=round($atktemp2+$atktemp2*($defrand/5));if ($atktmp2<1){$atk2=$defrand;}else if ($atktmp2>$members[mypetmaxhp]){$atk2=$members[mypetmaxhp];}else {$atk2=$atktmp2;}$exp2=intval($atk2/10);$petlevel = pow (log10 ($members[mypetexp]), 3);$petshowlevel = floor ($petlevel + 1);$userpetlevel = pow (log10 ($userpet[mypetexp]), 3);$userpetshowlevel = floor ($userpetlevel + 1); if ($userpet[mypethp]-$atk<1){ $userhp=0;$mypetdead=1;$hispetdead=1;}else { $userhp=$userpet[mypethp]-$atk; $mypetdead=0; $hispetdead=0;}$query = $db->query("UPDATE cdb_mypetdata SET mypetexp=mypetexp+$exp2,mypetlevel=$userpetshowlevel,mypethp=$userhp,mypetdead=$mypetdead WHERE username='$atkname'"); if ($pethp-$atk2<1){ $pethp=0; $mypetdead=1;}else { $pethp=$pethp-$atk2; $mypetdead=0;}
下面是引用cutebird于2004-07-28 12:38 PM发表的 :给¥先
下面是引用cutebird于2004-07-28 12:41 PM发表的 :好象是我比你穷吧
下面是引用狗狗于2004-07-28 1:40 PM发表的 :不如叫开发者指南吧
下面是引用爱水的鱼于2004-07-28 1:39 PM发表的 :我不明白啊~小神干吗换头像啊~