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 doRecvQuestion(){
if(QA.Exists(ts.LastQuestion)){
ans = QA.Item(ts.LastQuestion)
ans2 = ans.replace("-"," ");
if(ts.LastAnswers.Exists(ans)){
ans_index = ts.LastAnswers.Item(ans);
}else if(ts.LastAnswers.Exists(ans2)){
ans = ans2
ans_index = ts.LastAnswers.Item(ans);
}else{
e = new Enumerator(ts.LastAnswers.Keys)
}
}
}
function ResponseAnswer()
{
ts.Answer(ans_index);
debug("Ans = "+ans_index,0);
}
Anh thiet la bon em dau co gioi ve` khoan nay` anh giup em can ke dc ko a?Neu' dc pm letternear yahoo voi em nha ! Chan thanh` cam on anh.micral nói:Theo kết quả bình chọn từ topic này việc phổ biến bot được nhiệt liệt ủng hộ do đó từ hôm nay tui sẽ post dần dần những thông tin liên quan đến truebot mà tui biết được. lưu ý ai muốn share full scripts thì welcome nhưng riêng tui sẽ ko post full script mà chỉ post các gợi ý, info tham khảo -> khuyến khích tự tìm hiểu.
Credits:
- mr. truebot
- Computer_Angel
- tscafe posters
ps: nếu được nhờ mod nào tạo 1 cái sub-forum dành riêng cho bot discussion để dễ trao đổi
var state = "";
var ghost_count = 0;
var DisconnectFlag = 0.9;
var isAutoRegenOK = 0;
var pt_count=0;
var max_count=1;
var turn = 0;
var petTurn = 0;
ts.Character.MAXSP = 100;
ts.Character.MAXHP = 100;
ts.CurrentPartner.MAXSP = 300;
ts.CurrentPartner.MAXHP = 100;
function InitBot()
{
Timer.Enabled = true;
}
function WaitAcceptParty(playerid)
{
if(playerid == xxxxxxxxx)
{
ts.AcceptParty(playerid);
}
}
function AcceptedParty(playerid)
{
pt_count++;
if(playerid == getPlayerId("xxxxxxxxx"))
{
ts.sena(playerid) //set Sena
}
if (pt_count==max_count)
{
if(ts.Character.mapid==12815)
{
ts.delay(1000);
ts.Warp(1)
return
}
else if(ts.Character.mapid==12421)
{
ts.delay(1000);
ts.Warp(2)
return
}
}
}
function PartyStop( playerid )
{
if(playerid == xxxxxxx)
{
debug("Dis by " + playerid + " dis",0xFF0000)
ts.Disconect();
}
}
function MyAttack()
{
ts.delay(300);
turn++;
if (turn == 1)
{
sk = 10000;
ts.SendAttack(ts.Character.Row, ts.Character.Col, 0, 1, sk)
}
if (turn >= 2)
{
sk = 10000;
ts.SendAttack(ts.Character.Row , ts.Character.Col , 0, 2, sk)
}
}
function MyPartnerAttack()
{
ts.delay(400);
petTurn++;
if (petTurn == 1)
{
sk = 12003;
ts.SendAttack(ts.CurrentPartner.Row, ts.CurrentPartner.Col, 0, 1, sk)
}
if (petTurn >= 2)
{
sk = 10000;
ts.SendAttack(ts.CurrentPartner.Row , ts.CurrentPartner.Col , 0, 2, sk)
}
}
//call start to warp in
function Start()
{
if(ts.Character.mapid==12815)
{
ts.delay(1000);
ts.Warp(1)
return
}
else if(ts.Character.mapid==12421)
{
ts.delay(1000);
ts.Warp(2)
return
}
}
//call start to warp out
function Stop()
{
}
function autoSendItem()
{
for(var i=1;i<=25;i++)
{
var oSlot = ts.MyItems(i)
var oItem = ITEMS.Item(oSlot.itemid)
var itemname = oItem.getName()
if(oSlot.itemid == 0)
{
continue;
}
if(oSlot.itemid != 0 && oSlot.num >= 50)
{
ts.SendItemTo(getPlayerId("BanTapHoa"),oSlot.slot,oSlot.num);
}
}
}
function BattleStarted()
{
turn = 0;
petTurn = 0;
}
function BattleStoped()
{
autoSendItem();
CheckDisconnect();
}
function onEvilGod()
{
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF)
msg = "Wrong.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
}
function onLuckyGod()
{
debug("LUCKY G O D.",0xFF0000)
if(!QA.Exists(ts.LastQuestion))
{
ts.delay(6000);
QA.Add(ts.LastQuestion,ts.LastResponseAnswer)
msg = "QA.Add(\""+ts.LastQuestion+"\",\""+ts.LastResponseAnswer+"\")"
}
ts.delay(1000);
}
function OnTimer()
{
}
function FinishAnswerFuckGod()
{
if(ts.Character.mapid==12301)
{
debug("Cont",0xFF0000)
ts.delay(1000);
ts.Warp(1)
return
}
else if(ts.Character.mapid==12063)
{
ts.delay(1000);
ts.Warp(2)
return
}
if(ghost_count>=1)
{
debug("Dis by Ghost",0xFF0000)
ts.Disconect();
}
}
function CheckDisconnect()
{
if(ts.Character.HP < 20|| ts.CurrentPartner.HP < 20 )
{
debug("Dis by lost HP",0xFF0000)
ts.Disconect();
}
if(ts.Character.SP < 12|| ts.CurrentPartner.SP < 15 )
{
debug("Dis by lost SP",0xFF0000)
ts.Disconect();
}
}
function NpcDialogMenu(DialogId)
{
if(DialogId==1)
{
ts.delay(500);
ts.SelectChoice(1);
ts.SendEnd();
}
}
function NpcDialog(DialogId)
{
if(DialogId==14305)
{
ts.SendEnd();
}
if(DialogId==10021)
{
ts.SendEnd();
}
}
function onAnswerWrong(q,a)
{
}
function warpFinish()
{
if(ts.Character.mapid==12815)
{
ts.delay(500);
ts.Warp(1)
return
}
else if(ts.Character.mapid==12421)
{
ts.delay(500);
ts.Warp(2)
return
}
}
function OnChat(PlayerName , Msg)
{
}
InitBot()
ClearLog("Wrong.js")
LeLongVu nói:Theo mình biết thì đây là đoạn code tự động trả lời btq của truebot nhưng tại sao khi mình copy nó qua cái của xcab để sử dụng thì nó lại o hoạt động hay nói đúng hơn là DÍNH MA LIÊN TỤC .
MIRCAL xem giúp mình cái được hông vây.
QA.Exists : là cái gì vậy.
mấy cái hàm này nữa
ts.LastQuestion
QA.Item
ans2 = ans.replace("-"," ");<<-- dòng này nghĩa là sao
Enumerator: cái này nữa
XinhKieu nói:Có ai có thể share mình đoạn code mà khi chủpt party đủ 4 mem mới call hàm start không vậy? nhiều lúc dis ra vô lại nó chưa pt đủ nó đã xông thẳng vào HC đánh rùi , pet gần chạy hết rùi!Cám ơn nhìu !!!!!
đừng trừ mp mà