Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

function DoSendItem() {
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if( oSlot.itemid == 0){ continue; }
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName();
if( (itemname == "Roborant pill"
|| itemname == "Baohe pill"
|| itemname == "HasteScroll") && oSlot.num ==50){
ts.SendItemTo("giumau",oSlot.slot,oSlot.num);
} else { if ((itemname == "PainKiller"
|| itemname == "Morale pill"
|| itemname == "HerbalPill") && oSlot.num ==50)
{ts.SendItemTo("giudo",oSlot.slot,oSlot.num);}
}
}
}
micral nói:Mã:var state = "" function NpcDialogMenu(DialogId){ debug("Menu "+DialogId,0x0000FF) if (DialogId==7) { ts.SelectChoice(1); ts.SendEnd(); } else { ts.SendEnd(); } } function Start(){ ts.ClickOnNPC(13); } function Stop(){ } function InitBot(){ Start(); } function OnTimer(){ } InitBot()
nhm0901 nói:ko hoạt động MC à, chỉ hiện lên Menu 7 rồi đứng yên, reload script thì nó báo :" run-time error'13': Type mismatch" ! Ko hiểu là ko khớp cái gì !!???
Fix dùm tôi nha, thanks !!
var state = "stand"
var ghost_count = 0;
var die_count = 0;
var battle_count = 0;
var pt_count = 1;
//********** MAKE PARTY **********//
//*****Tao bang gom cac ID cua nhom*****//
var myParty = new Array(11111,22222,33333,44444,55555); // Các ID trong nhóm Party
pt_leader = myParty[0]; // ID chu Party
pt_sena = myParty[4]; // ID quân su
//*****Hàm chap nhan party cua cac thanh vien*****//
function WaitAcceptParty(playerid){
for (var i=0; i<myParty.length;i++){
if(playerid == myParty[i]){
ts.AcceptParty(playerid);
}
}
}
//*****Hàm set ID pt_sena lam quân su*****//
function AcceptedParty(playerid){
if (playerid == pt_sena){
ts.sena(playerid) // Set quân su
debug("SET QUAN SU",0xFF0000)
}
if(pt_count == 4){
Start() // du nguoi --> danh
}
pt_count++;
}
//*****Hàm DIS khi 1 thanh vien DIS*****
function PartyStop(playerid){
for (var i=0; i<myParty.length;i++) {
if (playerid == myParty[i]){
ts.Disconect();
}
}
}
//********** ATTACK **********//
//*****Hàm attack cua nguoi choi*****//
function MyAttack(){
var MyChar = ts.Character
MyChar.MAXSP = 300 // Tùy theo moi nguoi co so SP khác nhau
Monster = findMonster() // Su dung findMonter: hieu don gian la TDCK F1
BasicAttack(MyChar, Monster, "Fire Arrow"); // Attack là đánh bình thuong, neu ban tên se la Fire Arrow
}
//****Hàm attack cua PET*****//
function MyPartnerAttack(){
var Warrior = ts.CurrentPartner
Warrior.MAXSP = 400 // Tùy theo moi nguoi co so SP khác nhau
Monster = findMonster() // Su dung findMonter: hieu don gian la TDCK F1
BasicAttack(Warrior, Monster, "Attack"); // Attack là đánh bình thuong, neu ban tên se la Fire Arrow
}
//********** EAT, DROP ITEM **********//
//*****Hàm tu dong vut cai Item không can*****//
function DoDropItem() {
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if(oSlot.itemid == 0){
continue;
}
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName();
if( itemname == "AutoAttackPill" ||
itemname == "AutoTonicPill" ||
itemname == "DaQuWine" ||
itemname == "Cleardewwine" ||
itemname == "PainKiller" ||
itemname == "Red date" ||
itemname == "Morale pill" ||
itemname == "Honey pill" ||
itemname == "HerbalPill" ||
itemname == "Small apple" ||
itemname == "Strawberry") ts.DropItem(oSlot.slot,oSlot.num);
}
}
//**********TRA LOI BTQ**********//
function onEvilGod(){
ghost_count++
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("Wrong.js",msg)
WarpLink( 12063 ,2 , 12301 ,1)
}
function onLuckyGod(){
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion)){
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("QA.js",msg)
}
WarpLink( 12063 ,2 , 12301 ,1)
}
//*****Hàm tra loi BTQ xong thì đánh tiep*****//
function FinishAnswerFuckGod(){
if(ghost_count>=3){
ts.Disconect();
}
if(state=="warp"){
ts.delay(10000)
WarpLink( 12063 ,2 , 12301 ,1)
}
}
//************** HOANG CUNG DIEP THANH **************//
// Kiem tra xem nhân vat đang đung o dâu ? Trong hay Ngoai HC //
// (1). Trong: đi ra ngoài. //
// (2). Ngoài: đi toi, nói chuyên roi đánh. //
// (3). Quay lai buoc (1). //
//******************************************************//
//state: gom 2 trang thái: stand & warp
function warpFinish(){
if(state=="warp"){
if(ts.Character.mapid == 12301){ // Trong Hoàng Cung
WarpLink(12063 ,2 , 12301 ,1)
}
else if(ts.Character.mapid==12063){ // Ngoài Hoàng Cung
ts.delay(10000)
ts.Walk(562,315)
WarpLink(12063 ,2 , 12301 ,1)
}
}
}
//********** MAIN **********//
//****Hàm hiên trang thái sau tran đánh*****//
function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}
//*****Hàm tra loi NPC*****//
function NpcDialogMenu(DialogId){
ts.SelectChoice(1);
ts.SendEnd();
}
function NpcDialog(DialogId){
ts.SendEnd();
}
//*****Hàm Dis khi HP cua PET het*****//
function SaveWarrior(){
if(ts.CurrentPartner.HP == 1){
ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}
//*****Hàm neu chet 3 lan thì Dis*****//
function CheckDisconnect(){
if(ts.Character.HP == 1){
die_count++
}
if(die_count>3){
ts.Disconect();
}
}
//*****Hàm BOT*****//
function InitBot(){
state= "stand"
debug("***** BOT HCDT *****", 0x00FF00)
}
//*****Hàm bat dau tran đánh*****//
function BattleStarted(){
battle_count++;
}
//****Hàm khi tran đánh ket thúc*****//
function BattleStoped(){
SaveWarrior();
CheckDisconnect();
DoDropItem();
ViewState();
}
//*****Hàm OnTime*****//
function OnTimer(){
if(ts.Character.mapid == 12301){ // Trong Hoàng Cung
WarpLink(12063 ,2 , 12301 ,1)
}
if(ts.Character.mapid == 12062){ // Out of map
WarpLink(12062 ,2 , 12301 ,1)
}
}
//*****Hàm Start****//
function Start(){
state="warp"
WarpLink(12063, 2, 12301, 1)
}
//*****Hàm Stop*****//
function Stop(){
state="stand"
}
InitBot()
var ghost_count = 0;
var die_count = 0;
var battle_count = 0;
//*****Hàm attack cua nguoi choi*****//
function MyAttack(){
var MyChar = ts.Character
MyChar.MAXSP=300
Monster = findMonster() // Su dung findMonter: hieu don gian la TDCK F1
BasicAttack(MyChar, Monster, "Fire Arrow"); // Attack là đánh bình thuong, neu ban tên se la Fire Arrow
}
//****Hàm attack cua PET*****//
function MyPartnerAttack(){
var Warrior = ts.CurrentPartner
Warrior.MAXSP=400
Monster = findMonster() // Su dung findMonter: hieu don gian la TDCK F1
BasicAttack(Warrior, Monster, "Attack"); // Attack là đánh bình thuong, neu ban tên se la Fire Arrow
}
//*****Hàm tu dong vut cai Item không can*****//
function DoDropItem() {
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if(oSlot.itemid == 0){
continue;
}
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName();
if( itemname == "AutoAttackPill" ||
itemname == "DaQuWine" ||
itemname == "Cleardewwine" ||
itemname == "AutoTonicPill" ||
itemname == "PainKiller" ||
itemname == "Red date" ||
itemname == "Morale pill" ||
itemname == "Honey pill" ||
itemname == "HerbalPill" ||
itemname == "Small apple" ||
itemname == "Strawberry") ts.DropItem(oSlot.slot,oSlot.num);
}
}
//**********TRA LOI BTQ**********//
function onEvilGod(){
ghost_count++
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("Wrong.js",msg)
}
function onLuckyGod(){
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion)){
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("QA.js",msg)
}
}
//********** MAIN **********//
//****Hàm hiên trang thái sau tran đánh*****//
function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}
//*****Hàm Dis khi HP cua PET het*****//
function SaveWarrior(){
if(ts.CurrentPartner.HP == 1){
ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}
//*****Hàm tra loi BTQ xong thì đánh tiep*****//
function FinishAnswerFuckGod(){
if(ghost_count>=3){
ts.Disconect();
}
}
//*****Hàm neu chet 3 lan thì Dis*****//
function CheckDisconnect(){
if(ts.Character.HP == 1){
die_count++
}
if(die_count>3){
ts.Disconect();
}
}
//*****Hàm BOT*****//
function InitBot(){
debug("INIT BOT", 0x00FF00)
}
//*****Hàm bat dau tran đánh*****//
function BattleStarted(){
battle_count++;
}
//****Hàm khi tran đánh ket thúc*****//
function BattleStoped(){
SaveWarrior();
CheckDisconnect();
DoDropItem();
ViewState();
}
//*****Hàm OnTime*****//
function OnTimer(){
if(ts.Character.mapid == 12301){ // Trong Hoàng Cung --> Di ra ngoai
WarpLink(12063 ,2 , 12301 ,1)
}
if(ts.Character.mapid == 12062){ // Out of MAP
WarpLink(12062 ,2 , 12301 ,1)
}
if (ts.CurrentParty == 0) ts.RequestParty(11111);
}
//*****Hàm Start****//
function Start(){
}
//*****Hàm Stop*****//
function Stop(){
}
InitBot()
tquang nói:Không biết điền đúng không mà sao nó không send nhỉ :
Mã:function DoSendItem() { for(var i=1;i<=25;i++){ var oSlot = ts.MyItems(i); if( oSlot.itemid == 0){ continue; } var oItem = ITEMS.Item(oSlot.itemid); var itemname = oItem.getName(); if( (itemname == "Roborant pill" || itemname == "Baohe pill" || itemname == "HasteScroll") && oSlot.num ==50){ ts.SendItemTo("giumau",oSlot.slot,oSlot.num); } else { if ((itemname == "PainKiller" || itemname == "Morale pill" || itemname == "HerbalPill") && oSlot.num ==50) {ts.SendItemTo("giudo",oSlot.slot,oSlot.num);} } } }
ZzDreamzZ nói:Thanhtv oi , minh lam theo script cua ban nhung login vao no khong pt duoc
day la script sua cua minh
var state = "stand"
var ghost_count = 0;
var die_count = 0;
var battle_count = 0;
var pt_count = 1;
var myParty = new Array(vn1554053,vn1007347,vn1000730,vn1000682,vn738336);
pt_leader = myParty[vn1554053];
pt_sena = myParty[vn1000682];
function WaitAcceptParty(playerid){
for (var i=0; i<myParty.length;i++){
if(playerid == myParty){
ts.AcceptParty(playerid);
}
}
}
function AcceptedParty(playerid){
if (playerid == pt_sena){
ts.sena(vn1000682)
debug("SET QUAN SU",0xFF0000)
}
if(pt_count == 4){
Start()
}
pt_count++;
}
function PartyStop(playerid){
for (var i=0; i<myParty.length;i++) {
if (playerid == myParty){
ts.Disconect();
}
}
}
function MyAttack(){
var MyChar = ts.Character
MyChar.MAXSP = 300
Monster = findMonster()
BasicAttack(MyChar, Monster, "Attack");
}
function MyPartnerAttack(){
var Warrior = ts.CurrentPartner
Warrior.MAXSP = 400
Monster = findMonster()
BasicAttack(Warrior, Monster, "Attack");
}
function DoDropItem() {
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if(oSlot.itemid == 0){
continue;
}
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName();
if( itemname == "AutoAttackPill" ||
itemname == "AutoTonicPill" ||
itemname == "DaQuWine" ||
itemname == "Cleardewwine" ||
itemname == "PainKiller" ||
itemname == "Red date" ||
itemname == "Morale pill" ||
itemname == "Honey pill" ||
itemname == "HerbalPill" ||
itemname == "Small apple" ||
itemname == "Strawberry") ts.DropItem(oSlot.slot,oSlot.num);
}
}
function onEvilGod(){
ghost_count++
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("Wrong.js",msg)
WarpLink( 12063 ,2 , 12301 ,1)
}
function onLuckyGod(){
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion)){
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("QA.js",msg)
}
WarpLink( 12063 ,2 , 12301 ,1)
}
function FinishAnswerFuckGod(){
if(ghost_count>=3){
ts.Disconect();
}
if(state=="warp"){
ts.delay(10000)
WarpLink( 12063 ,2 , 12301 ,1)
}
}
function warpFinish(){
if(state=="warp"){
if(ts.Character.mapid == 12301){
WarpLink(12063 ,2 , 12301 ,1)
}
else if(ts.Character.mapid==12063){
ts.delay(10000)
ts.Walk(562,315)
WarpLink(12063 ,2 , 12301 ,1)
}
}
}
function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}
function NpcDialogMenu(DialogId){
ts.SelectChoice(1);
ts.SendEnd();
}
function NpcDialog(DialogId){
ts.SendEnd();
}
function SaveWarrior(){
if(ts.CurrentPartner.HP == 1){
ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}
function CheckDisconnect(){
if(ts.Character.HP == 1){
die_count++
}
if(die_count>3){
ts.Disconect();
}
}
function InitBot(){
state= "stand"
debug("***** BOT HCDT *****", 0x00FF00)
}
function BattleStarted(){
battle_count++;
}
function BattleStoped(){
SaveWarrior();
CheckDisconnect();
DoDropItem();
ViewState();
}
function OnTimer(){
if(ts.Character.mapid == 12301){
WarpLink(12063 ,2 , 12301 ,1)
}
if(ts.Character.mapid == 12062){
WarpLink(12062 ,2 , 12301 ,1)
}
}
function Start(){
state="warp"
WarpLink(12063, 2, 12301, 1)
}
function Stop(){
state="stand"
}
InitBot()
=== sao nó không chịu party vay bạn , lam ơn giúp mình , ah bạn cho mình hỏi là mình login chu pt bằng truebot và 4 id kia login binh thường vậy truebot có work không , hay la mình phai login bằng 5 cai truebot , mà khi login bằng 5 truebot thì mình co phải chạy 5 cai wpe pro không ? hay như thế nào bạn chỉ giúp mình nhé !! thankz ...
TGF nói:Cho em hoi hỏi cái này mấy anh "trùm Truebot"
Lúc mà đánh NPC , ví dụ Giản Dung , tại sao Truebot bị ma ( ghost ) mà Excab lại ko bị.
Ai mà làm được cái tránh ma này cho TB thì 100% trùm TB.
ps. TB better because it's an open source program ^^
)QA.Add("Before Liao Hua joined Liu Bei, he lead the troop of:","Yellow Turban")
QA.Add("0+0=?","0")
QA.Add("0+1=?","1")
QA.Add("0+2=?","2")
QA.Add("0+3=?","3")
QA.Add("0+4=?","4")
QA.Add("0+5=?","5")
QA.Add("0+6=?","6")
QA.Add("0+7=?","7")
QA.Add("0+8=?","8")
QA.Add("0+9=?","9")
QA.Add("0+10=?","10")
QA.Add("1+0=?","1")
QA.Add("1+1=?","2")
QA.Add("1+2=?","3")
QA.Add("1+3=?","4")
QA.Add("1+4=?","5")
QA.Add("1+5=?","6")
QA.Add("1+6=?","7")
QA.Add("1+7=?","8")
QA.Add("1+8=?","9")
QA.Add("1+9=?","10")
QA.Add("1+10=?","11")
QA.Add("2+0=?","2")
QA.Add("2+1=?","3")
QA.Add("2+2=?","4")
QA.Add("2+3=?","5")
QA.Add("2+4=?","6")
QA.Add("2+5=?","7")
QA.Add("2+6=?","8")
QA.Add("2+7=?","9")
QA.Add("2+8=?","10")
QA.Add("2+9=?","11")
QA.Add("2+10=?","12")
QA.Add("3+0=?","3")
QA.Add("3+1=?","4")
QA.Add("3+2=?","5")
QA.Add("3+3=?","6")
QA.Add("3+4=?","7")
QA.Add("3+5=?","8")
QA.Add("3+6=?","9")
QA.Add("3+7=?","10")
QA.Add("3+8=?","11")
QA.Add("3+9=?","12")
QA.Add("3+10=?","13")
QA.Add("4+0=?","4")
QA.Add("4+1=?","5")
QA.Add("4+2=?","6")
QA.Add("4+3=?","7")
QA.Add("4+4=?","8")
QA.Add("4+5=?","9")
QA.Add("4+6=?","10")
QA.Add("4+7=?","11")
QA.Add("4+8=?","12")
QA.Add("4+9=?","13")
QA.Add("4+10=?","14")
QA.Add("5+0=?","5")
QA.Add("5+1=?","6")
QA.Add("5+2=?","7")
QA.Add("5+3=?","8")
QA.Add("5+4=?","9")
QA.Add("5+5=?","10")
QA.Add("5+6=?","11")
QA.Add("5+7=?","12")
QA.Add("5+8=?","13")
QA.Add("5+9=?","14")
QA.Add("5+10=?","15")
QA.Add("6+0=?","6")
QA.Add("6+1=?","7")
QA.Add("6+2=?","8")
QA.Add("6+3=?","9")
QA.Add("6+4=?","10")
QA.Add("6+5=?","11")
QA.Add("6+6=?","12")
QA.Add("6+7=?","13")
QA.Add("6+8=?","14")
QA.Add("6+9=?","15")
QA.Add("6+10=?","16")
QA.Add("7+0=?","7")
QA.Add("7+1=?","8")
QA.Add("7+2=?","9")
QA.Add("7+3=?","10")
QA.Add("7+4=?","11")
QA.Add("7+5=?","12")
QA.Add("7+6=?","13")
QA.Add("7+7=?","14")
QA.Add("7+8=?","15")
QA.Add("7+9=?","16")
QA.Add("7+10=?","17")
QA.Add("8+0=?","8")
QA.Add("8+1=?","9")
QA.Add("8+2=?","10")
QA.Add("8+3=?","11")
QA.Add("8+4=?","12")
QA.Add("8+5=?","13")
QA.Add("8+6=?","14")
QA.Add("8+7=?","15")
QA.Add("8+8=?","16")
QA.Add("8+9=?","17")
QA.Add("8+10=?","18")
QA.Add("9+0=?","9")
QA.Add("9+1=?","10")
QA.Add("9+2=?","11")
QA.Add("9+3=?","12")
QA.Add("9+4=?","13")
QA.Add("9+5=?","14")
QA.Add("9+6=?","15")
QA.Add("9+7=?","16")
QA.Add("9+8=?","17")
QA.Add("9+9=?","18")
QA.Add("9+10=?","19")
QA.Add("10-9=?","1")
QA.Add("10-10=?","0")
QA.Add("9-0=?","9")
QA.Add("9-1=?","8")
QA.Add("9-2=?","7")
QA.Add("9-3=?","6")
QA.Add("9-4=?","5")
QA.Add("9-5=?","4")
QA.Add("9-6=?","3")
QA.Add("9-7=?","2")
QA.Add("9-8=?","1")
QA.Add("9-9=?","0")
QA.Add("9-10=?","-1")
QA.Add("10+10=?","20")
QA.Add("10-0=?","10")
QA.Add("10-1=?","9")
QA.Add("10-2=?","8")
QA.Add("10-3=?","7")
QA.Add("10-4=?","6")
QA.Add("10-5=?","5")
QA.Add("10-6=?","4")
QA.Add("10-7=?","3")
QA.Add("10-8=?","2")
QA.Add("10+0=?","10" )
QA.Add("10+1=?","11")
QA.Add("10+2=?","12")
QA.Add("10+3=?","13")
QA.Add("10+4=?","14")
QA.Add("10+5=?","15")
QA.Add("10+6=?","16")
QA.Add("10+7=?","17")
QA.Add("10+8=?","18")
QA.Add("10+9=?","19")
QA.Add("8-0=?","8")
QA.Add("8-1=?","7")
QA.Add("8-2=?","6")
QA.Add("8-3=?","5")
QA.Add("8-4=?","4")
QA.Add("8-5=?","3")
QA.Add("8-6=?","2")
QA.Add("8-7=?","1")
QA.Add("8-8=?","0")
QA.Add("8-9=?","-1")
QA.Add("8-10=?","-2")
QA.Add("7-0=?","7")
QA.Add("7-1=?","6")
QA.Add("7-2=?","5")
QA.Add("7-3=?","4")
QA.Add("7-4=?","3")
QA.Add("7-5=?","2")
QA.Add("7-6=?","1")
QA.Add("7-7=?","0")
QA.Add("7-8=?","-1")
QA.Add("7-9=?","-2")
QA.Add("7-10=?","-3")
QA.Add("6-0=?","6")
QA.Add("6-1=?","5")
QA.Add("6-2=?","4")
QA.Add("6-3=?","3")
QA.Add("6-4=?","2")
QA.Add("6-5=?","1")
QA.Add("6-6=?","0")
QA.Add("6-7=?","-1")
QA.Add("6-8=?","-2")
QA.Add("6-9=?","-3")
QA.Add("6-10=?","-4")
QA.Add("5-0=?","5")
QA.Add("5-1=?","4")
QA.Add("5-2=?","3")
QA.Add("5-3=?","2")
QA.Add("5-4=?","1")
QA.Add("5-5=?","0")
QA.Add("5-6=?","-1")
QA.Add("5-7=?","-2")
QA.Add("5-8=?","-3")
QA.Add("5-9=?","-4")
QA.Add("5-10=?","-5")
QA.Add("4-0=?","4")
QA.Add("4-1=?","3")
QA.Add("4-2=?","2")
QA.Add("4-3=?","1")
QA.Add("4-4=?","0")
QA.Add("4-5=?","-1")
QA.Add("4-6=?","-2")
QA.Add("4-7=?","-3")
QA.Add("4-8=?","-4")
QA.Add("4-9=?","-5")
QA.Add("4-10=?","-6")
QA.Add("3-0=?","3")
QA.Add("3-1=?","2")
QA.Add("3-2=?","1")
QA.Add("3-3=?","0")
QA.Add("3-4=?","-1")
QA.Add("3-5=?","-2")
QA.Add("3-6=?","-3")
QA.Add("3-7=?","-4")
QA.Add("3-8=?","-5")
QA.Add("3-9=?","-6")
QA.Add("3-10=?","-7")
QA.Add("2-0=?","2")
QA.Add("2-1=?","1")
QA.Add("2-2=?","0")
QA.Add("2-3=?","-1")
QA.Add("2-4=?","-2")
QA.Add("2-5=?","-3")
QA.Add("2-6=?","-4")
QA.Add("2-7=?","-5")
QA.Add("2-8=?","-6")
QA.Add("2-9=?","-7")
QA.Add("2-10=?","-8")
QA.Add("1-0=?","1")
QA.Add("1-1=?","0")
QA.Add("1-2=?","-1")
QA.Add("1-3=?","-2")
QA.Add("1-4=?","-3")
QA.Add("1-5=?","-4")
QA.Add("1-6=?","-5")
QA.Add("1-7=?","-6")
QA.Add("1-8=?","-7")
QA.Add("1-9=?","-8")
QA.Add("1-10=?","-9")
QA.Add("0-0=?","0")
QA.Add("0-1=?","-1")
QA.Add("0-2=?","-2")
QA.Add("0-3=?","-3")
QA.Add("0-4=?","-4")
QA.Add("0-5=?","-5")
QA.Add("0-6=?","-6")
QA.Add("0-7=?","-7")
QA.Add("0-8=?","-8")
QA.Add("0-9=?","-9")
QA.Add("0-10=?","-10")
var ghost_count = 0;
var die_count = 0;
var battle_count = 0;
//*****Hàm attack cua nguoi choi*****//
function MyAttack(){
var MyChar = ts.Character
MyChar.MAXSP=300
Monster = findMonster() // Su dung findMonter: hieu don gian la TDCK F1
BasicAttack(MyChar, Monster, "Fire Arrow"); // Attack là đánh bình thuong, neu ban tên se la Fire Arrow
}
//****Hàm attack cua PET*****//
function MyPartnerAttack(){
var Warrior = ts.CurrentPartner
Warrior.MAXSP=400
Monster = findMonster() // Su dung findMonter: hieu don gian la TDCK F1
BasicAttack(Warrior, Monster, "Attack"); // Attack là đánh bình thuong, neu ban tên se la Fire Arrow
}
//*****Hàm tu dong vut cai Item không can*****//
function DoDropItem() {
for(var i=1;i<=25;i++){
var oSlot = ts.MyItems(i);
if(oSlot.itemid == 0){
continue;
}
var oItem = ITEMS.Item(oSlot.itemid);
var itemname = oItem.getName();
if( itemname == "AutoAttackPill" ||
itemname == "DaQuWine" ||
itemname == "Cleardewwine" ||
itemname == "AutoTonicPill" ||
itemname == "PainKiller" ||
itemname == "Red date" ||
itemname == "Morale pill" ||
itemname == "Honey pill" ||
itemname == "HerbalPill" ||
itemname == "Small apple" ||
itemname == "Strawberry") ts.DropItem(oSlot.slot,oSlot.num);
}
}
//**********TRA LOI BTQ**********//
function onEvilGod(){
ghost_count++
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("Wrong.js",msg)
}
function onLuckyGod(){
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion)){
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
WriteLog("QA.js",msg)
}
}
//********** MAIN **********//
//****Hàm hiên trang thái sau tran đánh*****//
function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}
//*****Hàm Dis khi HP cua PET het*****//
function SaveWarrior(){
if(ts.CurrentPartner.HP == 1){
ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}
//*****Hàm tra loi BTQ xong thì đánh tiep*****//
function FinishAnswerFuckGod(){
if(ghost_count>=3){
ts.Disconect();
}
}
//*****Hàm neu chet 3 lan thì Dis*****//
function CheckDisconnect(){
if(ts.Character.HP == 1){
die_count++
}
if(die_count>3){
ts.Disconect();
}
}
//*****Hàm BOT*****//
function InitBot(){
debug("INIT BOT", 0x00FF00)
}
//*****Hàm bat dau tran đánh*****//
function BattleStarted(){
battle_count++;
}
//****Hàm khi tran đánh ket thúc*****//
function BattleStoped(){
SaveWarrior();
CheckDisconnect();
DoDropItem();
ViewState();
}
//*****Hàm OnTime*****//
function OnTimer(){
if(ts.Character.mapid == 12301){ // Trong Hoàng Cung --> Di ra ngoai
WarpLink(12063 ,2 , 12301 ,1)
}
if(ts.Character.mapid == 12062){ // Out of MAP
WarpLink(12062 ,2 , 12301 ,1)
}
if (ts.CurrentParty == 0) ts.RequestParty(11111);
}
//*****Hàm Start****//
function Start(){
}
//*****Hàm Stop*****//
function Stop(){
}
InitBot()
Trong function BattleStop bạn thêm 1 dòng DoSendItem();tquang nói:Không biết điền đúng không mà sao nó không send nhỉ :
Mã:function DoSendItem() { for(var i=1;i<=25;i++){ var oSlot = ts.MyItems(i); if( oSlot.itemid == 0){ continue; } var oItem = ITEMS.Item(oSlot.itemid); var itemname = oItem.getName(); if( (itemname == "Roborant pill" || itemname == "Baohe pill" || itemname == "HasteScroll") && oSlot.num ==50){ ts.SendItemTo("giumau",oSlot.slot,oSlot.num); } else { if ((itemname == "PainKiller" || itemname == "Morale pill" || itemname == "HerbalPill") && oSlot.num ==50) {ts.SendItemTo("giudo",oSlot.slot,oSlot.num);} } } }
