Share code game nông trại mod giống avatar cho wapego

17.09.2016 / 16:43
thanhtung698
Bài đăng: 687
Member
http://taolap.net

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

HTML5
  1. {% if message_list=="" or message_list==null %}<br>
  2. {%if api.user_id==api.r.get('uid')%}
  3. <img src="http://chimbuom.us/files/885341/muadat.png"/>
  4. {% if api.r.get("uid")==api.user_id %}
  5. <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 %}
  6. {%endif%}
  7. {%else%}
  8. {{message_list}}
  9. {%endif%}

ô2

HTML5
  1. {# Tính thời gian trồng cây #}
  2. {% set time,date=message_date|split(" ")[1],message_date|split(" ")[0] %}
  3. {% 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] %}
  4. {% 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") %}
  5. {% set atime,adate=htg|split(" ")[0],htg|split(" ")[1] %}
  6. {% 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] %}
  7. {% if ad < 2 and amo < 2 and ay < 1 %}
  8. {% set ktg = as+am*60+ah*3600 %}
  9. {% set tl=10800-ktg %}
  10. {% else %}
  11. {% set ktg = 999999 %}
  12. {% endif %}
  13. {# Ô đất trống #}
  14. {% if message=="bare_land" %}
  15. {% if api.r.get("uid")==api.user_id %}{# chính chủ #}
  16. <a href="/main.php?f=120121831&farm_id=22004&p=1" title="Trồng cây">
  17. <img src="/files/885341/{{message}}.png" alt="Ô 1"/>
  18. </a><br/>{% if api.r.get("farm_id")=="22004"%}{%else%} {%endif%}
  19. {%else%} {# Khách cmnr #}
  20. <img src="http://chimbuom.us/files/885341/{{message}}.png" alt="Ô 1"/>
  21. {%endif%}
  22. {% endif %}
  23. {# Hiện ô đất, tên cây #}
  24. {% if ktg < 10800 and message!="bare_land" %}
  25. {% if message=="lua" %}<img src="http://chimbuom.us/files/885341/lua.jpg"/>{% endif %}
  26. {% if message=="hoa" %}<img src="http://chimbuom.us/files/885341/hoachua.jpg"/>{% endif %}
  27. {% if message=="khom" %}<img src="http://chimbuom.us/files/885341/khomchua.jpg"/>{% endif %}
  28. {% if message=="carot" %}<img src="http://chimbuom.us/files/885341/carotchua.jpg"/> {% endif %}
  29. {% if message=="tomato" %}<img src="http://chimbuom.us/files/885341/1-uong.png"/>{% endif %}
  30.  
  31. {% if message=="thanhlong" %}<img src="http://chimbuom.us/files/885341/thanhlongchua.png"/>{% endif %}
  32. {% if message=="dualeo" %}<img src="http://chimbuom.us/files/885341/dualeochua.png"/>{% endif %}
  33. {% if message=="bap" %}<img src="http://chimbuom.us/files/885341/bapchua.png"/>{% endif %}
  34. {% if message=="catim" %}<img src="http://chimbuom.us/files/885341/catimchua.png"/> {% endif %}
  35. {% if message=="xoai" %}<img src="http://chimbuom.us/files/885341/xoaichua.png"/>{% endif %}
  36. {# Thời gian còn lại #}
  37. {% autoescape false %}{{ '<br/><small>[<font color="yellow">'~(tl//3600)~'h'~((tl-(tl//3600)*3600)//60)~'</font>]</small>'}} {% endautoescape %}
  38. {% endif %}
  39. {# Thu hoạch #}
  40. {% 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) %}
  41. {% if api.r.get("uid")==api.user_id %}{# Chính cmn chủ #}
  42. <form action="main.php?id=ch_topic_h&uid=22004&uuid=[user_id]&back_url=%2Fmain.php%3Ff%3D120121836" style="display:inline" method="post">
  43. <input type="hidden" name="text" value="bare_land"/>
  44. <input type="image" src="http://chimbuom.us/files/885341/{{message}}.png" alt="Thu" class="left4">
  45. </form><br/>
  46. {%else%} {# Khách cmn rồi #}
  47. <img src="http://chimbuom.us/files/885341/{{message}}.png" alt="Thu" width="32" height="32"/><br/>
  48. {%endif%}
  49. {%endif%}
  50. {# Cây chết :v #}
  51. {%if ktg >21600 and message!="bare_land" %}
  52. {% if api.r.get("uid")==api.user_id %}{# Chính cmn chủ #}
  53. <a href="/main.php?f=120121831&farm_id=22004&p=1" title="Trồng cây">
  54. <br> <img src="http://isharecode.wapego.net/files/154586/eggplant.png" width="20" height="20">
  55. </a>
  56. {%else%}{# Khách #}<br><img src="http://isharecode.wapego.net/files/154586/eggplant.png" width="20" height="20">
  57. {%endif%}<br><small>[<font color="ffcc00">chết</font>]</small>
  58. {% endif %}

tạo tập tin: mua cây

thêm code này vào

HTML5
  1. <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">
  2. <br/><input type="radio" name="text" value="dualeo"/> Dưa leo <img src="http://chimbuom.us/files/885341/icondualeo.gif">
  3. <br/><input type="radio" name="text" value="bap"/> Bắp <img src="http://chimbuom.us/files/885341/iconbap.gif">
  4. <br/><input type="radio" name="text" value="catim"/> Cà tím <img src="http://chimbuom.us/files/885341/iconcatim.gif">
  5. <br/>
  6. <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">
  7. <br/><input type="radio" name="text" value="carot"/> Cà rót <img src="http://chimbuom.us/files/885341/iconcarot.jpg">
  8. <br/><input type="radio" name="text" value="lua"/> Lúa <img src="http://chimbuom.us/files/885341/iconlua.jpg">
  9. <br/><input type="radio" name="text" value="khom"/> Khớm <img src="http://chimbuom.us/files/885341/iconkhom.jpg">
  10. <br/>
  11. <input type="radio" name="text" value="tomato"/>Cà chua <img src="http://chimbuom.us/files/885341/1.png">
  12. <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

HTML5
  1. <span>%points%<span>
  2. <style type="text/css">body{display:none!important}</style>
  3. <script type="text/javascript">window.location.replace("http://chimbuom.us/user_info.php?uid=[user_id]&view=character&farm_id=22003");</script>
  4. <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

[IMAGE]
[IMAGE]

Nguồn: http://trangmod.wap.sh

01.11.2016 / 20:01
Jichan
Bài đăng: 1028
Member
Mệt cứ nói, đừng cố....

like phát đã

12.11.2016 / 14:05
hoamuoigio
Bài đăng: 6
Member

Sao minh lam code nong trai nó ko hiện bạn ơi

12.11.2016 / 14:07
hoamuoigio
Bài đăng: 6
Member

Code có thiếu gì ko phan mua cây ko có uid topic ls ní ko hiện đâu p coi lai dum minh

12.11.2016 / 14:10
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

=)) có phiên bản của mrken nữa

12.11.2016 / 14:19
hoamuoigio
Bài đăng: 6
Member

Vao đâuđể xem pb cua mrken hả p

12.11.2016 / 14:22
thanhtung698
Bài đăng: 687
Member
http://taolap.net

Pkan mua cay la get uid từ uid trong nong trai ra

12.11.2016 / 14:24
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.
12.11.2016 / 14:24
hoamuoigio
Bài đăng: 6
Member

Bạn lam nó có giống vậy ko ạ.hay ban lam giup minh phan nay đc ko

12.11.2016 / 14:25
mad
Bài đăng: 2434
Member
Nhào vô cắn tao đi, tao sợ mày à cắn bừa.

đọc kĩ HDSD trước khi dùng