code này của bac mrken mình chỉ mod giống trên avatar và thêm cây trồng
chỉ cho bạn nào lười fix pro đừng chọi đá
tạo 1 shoutbox trong ttnd
ô1
{% if message_list=="" or message_list==null %}<br> {%if api.user_id==api.r.get('uid')%} <img src="http://chimbuom.us/files/885341/muadat.png"/> {% if api.r.get("uid")==api.user_id %} <br/><form action="main.php?id=ch_topic_h&uid=22004&uuid=[user_id]&back_url=%2Fuser_info.php%3Fuid%3D[user_id]%26view%3Dcharacter" style="display:inline" method="post"><input type="hidden" name="text" value="bare_land"/><small><input type="submit" class="nobutton" value="Mua" style="background:none;border:none;margin:0;padding:0;box-shadow:none;text-shadow:none;cursor:pointer;color:#ffcc33"/></form></small>{% endif %} {%endif%} {%else%} {{message_list}} {%endif%}
ô2
{# Tính thời gian trồng cây #} {% set time,date=message_date|split(" ")[1],message_date|split(" ")[0] %} {% set s,m,h,d,mo,y=time|split(":")[2],time|split(":")[1],time|split(":")[0],date|split("-")[2],date|split("-")[1],date|split("-")[0] %} {% set htg=post.published_at|date_modify("- "~y~" years - "~(mo-1)~" months - "~(d-1)~" days - "~h~" hours - "~m~" minutes - "~s~" seconds")|date("H:i:s d/m/Y") %} {% set atime,adate=htg|split(" ")[0],htg|split(" ")[1] %} {% set as,am,ah,ad,amo,ay=atime|split(":")[2],atime|split(":")[1],atime|split(":")[0],adate|split("/")[0],adate|split("/")[1],adate|split("/")[2] %} {% if ad < 2 and amo < 2 and ay < 1 %} {% set ktg = as+am*60+ah*3600 %} {% set tl=10800-ktg %} {% else %} {% set ktg = 999999 %} {% endif %} {# Ô đất trống #} {% if message=="bare_land" %} {% if api.r.get("uid")==api.user_id %}{# chính chủ #} <a href="/main.php?f=120121831&farm_id=22004&p=1" title="Trồng cây"> <img src="/files/885341/{{message}}.png" alt="Ô 1"/> </a><br/>{% if api.r.get("farm_id")=="22004"%}{%else%} {%endif%} {%else%} {# Khách cmnr #} <img src="http://chimbuom.us/files/885341/{{message}}.png" alt="Ô 1"/> {%endif%} {% endif %} {# Hiện ô đất, tên cây #} {% if ktg < 10800 and message!="bare_land" %} {% if message=="lua" %}<img src="http://chimbuom.us/files/885341/lua.jpg"/>{% endif %} {% if message=="hoa" %}<img src="http://chimbuom.us/files/885341/hoachua.jpg"/>{% endif %} {% if message=="khom" %}<img src="http://chimbuom.us/files/885341/khomchua.jpg"/>{% endif %} {% if message=="carot" %}<img src="http://chimbuom.us/files/885341/carotchua.jpg"/> {% endif %} {% if message=="tomato" %}<img src="http://chimbuom.us/files/885341/1-uong.png"/>{% endif %} {% if message=="thanhlong" %}<img src="http://chimbuom.us/files/885341/thanhlongchua.png"/>{% endif %} {% if message=="dualeo" %}<img src="http://chimbuom.us/files/885341/dualeochua.png"/>{% endif %} {% if message=="bap" %}<img src="http://chimbuom.us/files/885341/bapchua.png"/>{% endif %} {% if message=="catim" %}<img src="http://chimbuom.us/files/885341/catimchua.png"/> {% endif %} {% if message=="xoai" %}<img src="http://chimbuom.us/files/885341/xoaichua.png"/>{% endif %} {# Thời gian còn lại #} {% autoescape false %}{{ '<br/><small>[<font color="yellow">'~(tl//3600)~'h'~((tl-(tl//3600)*3600)//60)~'</font>]</small>'}} {% endautoescape %} {% endif %} {# Thu hoạch #} {% if (message=="khom" or message=="lua" or message=="hoa" or message=="carot" or message=="tomato" or message=="thanhlong" or message=="dualeo" or message=="bap" or message=="catim" or message=="xoai") and (ktg >= 10800) and (ktg < 21600) %} {% if api.r.get("uid")==api.user_id %}{# Chính cmn chủ #} <form action="main.php?id=ch_topic_h&uid=22004&uuid=[user_id]&back_url=%2Fmain.php%3Ff%3D120121836" style="display:inline" method="post"> <input type="hidden" name="text" value="bare_land"/> <input type="image" src="http://chimbuom.us/files/885341/{{message}}.png" alt="Thu" class="left4"> </form><br/> {%else%} {# Khách cmn rồi #} <img src="http://chimbuom.us/files/885341/{{message}}.png" alt="Thu" width="32" height="32"/><br/> {%endif%} {%endif%} {# Cây chết :v #} {%if ktg >21600 and message!="bare_land" %} {% if api.r.get("uid")==api.user_id %}{# Chính cmn chủ #} <a href="/main.php?f=120121831&farm_id=22004&p=1" title="Trồng cây"> <br> <img src="http://isharecode.wapego.net/files/154586/eggplant.png" width="20" height="20"> </a> {%else%}{# Khách #}<br><img src="http://isharecode.wapego.net/files/154586/eggplant.png" width="20" height="20"> {%endif%}<br><small>[<font color="ffcc00">chết</font>]</small> {% endif %}
tạo tập tin: mua cây
thêm code này vào
<form action="main.php?id=ch_topic_h&uid={{api.r.get("farm_id")}}&uuid=[user_id]&back_url=%2Fuser_info.php%3Fuid%3D[user_id]%26view%3Dcharacter" method="post"><input type="radio" name="text" value="thanhlong"/> Thanh long <img src="http://chimbuom.us/files/885341/iconthanhlong.gif"> <br/><input type="radio" name="text" value="dualeo"/> Dưa leo <img src="http://chimbuom.us/files/885341/icondualeo.gif"> <br/><input type="radio" name="text" value="bap"/> Bắp <img src="http://chimbuom.us/files/885341/iconbap.gif"> <br/><input type="radio" name="text" value="catim"/> Cà tím <img src="http://chimbuom.us/files/885341/iconcatim.gif"> <br/> <input type="radio" name="text" value="xoai"/> Xoài <img src="http://chimbuom.us/files/885341/iconxoai.gif"><br><input type="radio" name="text" value="hoa"/> Hoa tulip<img src="http://chimbuom.us/files/885341/iconhoa.jpg"> <br/><input type="radio" name="text" value="carot"/> Cà rót <img src="http://chimbuom.us/files/885341/iconcarot.jpg"> <br/><input type="radio" name="text" value="lua"/> Lúa <img src="http://chimbuom.us/files/885341/iconlua.jpg"> <br/><input type="radio" name="text" value="khom"/> Khớm <img src="http://chimbuom.us/files/885341/iconkhom.jpg"> <br/> <input type="radio" name="text" value="tomato"/>Cà chua <img src="http://chimbuom.us/files/885341/1.png"> <br/><input type="submit" value="Trồng"/></form>
tạo thêm tập tin: thu hoạch
thêm phần thưởng khối
<span>%points%<span> <style type="text/css">body{display:none!important}</style> <script type="text/javascript">window.location.replace("http://chimbuom.us/user_info.php?uid=[user_id]&view=character&farm_id=22003");</script> <meta http-equiv="refresh" content="0,url=http://chimbuom.us/user_info.php?uid=[user_id]&view=character&farm_id=22003"/>
tìm 22004 thay thành uid shoutbox trong ttnd, 120121831 thay uid trang mua cây, 120121836 thay thành uid trang thu hoạch
demo ảnh
Nguồn: http://trangmod.wap.sh