Discuz Thai

 ลืมรหัสผ่าน
 สมัครสมาชิก

ข้อตกลงการใช้งานกระดานข่าวดิสคัสไทย DiscuzThai Agreement (English Version) ประกาศดิสคัสไทย - ทำเนียบดิสคัสภาษาไทย

Discuz! X3.5 Thai R20231001 Rev.8 (NEW) [วิดีโอช่วยสอน] อัปเกรด Discuz! X3.4 เป็น X3.5 Discord ของ Discuz! Thai Community อย่างเป็นทางการ

Discuz! X3.4 Thai R20220811 (REV.75) สิ้นสุดการสนับสนุน Discuz! X3.4 ภาษาไทยตั้งแต่วันนี้เป็นต้นไป (ขอแนะนำให้อัปเกรดเป็น X3.5 แทน)

ค้นหา
แท็กยอดนิยม: ดิสคัสภาษาไทย Discuz Thai
เจ้าของ: acaz

[A/M/H6.0] Mod Pet Display viewthread

[คัดลอกลิงก์]
sendomsit47 โพสต์ 2009-6-23 11:11:08
ค้นหา $post['attachments'] = array();
คัดลอกโค๊ดเพิ่มโคดนี้ไปด้านบน

if ($post[mypet]){

@include DISCUZ_ROOT.'./forumdata/cache/plugin_pet.php';

$petdir = $_DPLUGIN['pet']['vars']['imgdir'];

$petsettings = $_DPLUGIN['pet']['vars'];

$post['petusername'] =  rawurlencode($post['username']);

$t=time();

$today = gmdate ("Ymd",$t);

$post['petdiff'] = time() - $post['petregdate'];

$post['petregdate']=gmdate ("Ymd",$post['petregdate']);

$post['pett'] = $today-$post['petregdate'];

$post['petlevel'] = pow (log10 ($post['mypetexp']), 3);

$post['petshowlevel'] = floor ($post['petlevel'] + 1);

$post['levelpic']=intval($post['petshowlevel']/10);

$post['levelpic'] = $post['levelpic'] > '10' ? '11' : $post['levelpic'];

$post['level1']=intval($post['petshowlevel']/2);

$post['level2']=intval($post['petshowlevel']/2);

$post['petpic']=$post['mypetname'];

$post['pethp']=$post['mypethp'];

$post['petatk']=$post['mypetatk']+$post['item1']+$post['item2']+2+$post[level1];

$post['petdef']=$post['mypetdef']+$post['item3']+$post['item4']+$post['item5']+3+$post['level1'];

if($post['petshowlevel']<2){$post['petmaxhp']=$petsettings['basichp'];}

else{$post['petmaxhp']=$petsettings['basichp']+$post['petshowlevel']*5;}

$post['petsp']=$post['mypetsp']-$post['pett']*$petsettings['basicsp2'];

if($post['petsp']>$petsettings['basicsp']){$post['petsp']=$petsettings['basicsp'];}

$post['hpf']= floor (100 * ($post['pethp'] / $post['petmaxhp']));

$post['spf']= floor (100 * ($post['petsp'] / $petsettings['basicsp']));



$post['pethp'] = $post['pethp'] < '0' ? '0' : $post['pethp'];

$post['petsp'] = $post['petsp'] < '0' ? '0' : $post['petsp'];

$post['petdead'] = $post['pethp'] < '1' || $post['petsp'] < '1' ? 'ตาย' : 'มีชีวิต';

$post['petsex'] = $post['mypetsex'] < '2' ? 'เพศผู้' : 'เพศเมีย';

$post['petpk'] = $post['openpk'] < '2' ?  'พร้อมรบ' : 'ไม่พร้อมรบ';

$post['hpf'] = $post['hpf'] >= '100' ? '100' : $post['hpf'];

$post['spf'] = $post['spf'] >= '100' ? '100' : $post['spf'];

}
คัดลอกโค๊ด



แล้วมันทำให้ เวลาโพสตอบแล้วมันไม่รัเฟรส น่ะครับ แก้ไขอย่างไงหรือ
rimbuang1 โพสต์ 2009-7-10 21:05:34
ยอมทรับว่าลงยากมากๆเลยครับผม
masterdmty โพสต์ 2009-8-26 01:44:59
ผมทำยังไม่ได้เลยครับ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

รายชื่อผู้กระทำผิด|Archiver|ดิสคัส ไทย Follow us: Become a fan on facebook. Follow us on Twitter.

GMT+7, 2024-5-6 10:40

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้