Truebot & linh tinh[Cấm chat nhảm]

  • Thread starter Thread starter micral
  • Ngày gửi Ngày gửi

Có nên lập 1 subbox bot discussion không ?


  • Total voters
    61
  • Poll closed .
Status
Không mở trả lời sau này.
Tất cả các script muốn người khác đọc thì vui lòng đưa vào thẻ
Mã:
 dùm. Nhìn như vậy chẳng ai thèm trả lời cho các bạn đâu. Đọc nhức cả mắt ai mà đọc.
 
zmeomiZ nói:
j0cksk.jpg

ai bít mình bị lỗi gì ko, sao chạy 1 chút là bị báp lỗi này
Chạy một cái Wpe cho 5 cửa sổ aglogin, chạy nhiều quá làm gì thế. Trong khi dang chạy BOT mà chạy tiếp các chương trình khác cũng dễ bị dis, tắt luôn cái cửa sổ aglogin đi, đế máy đó mà đí ngủ sáng dậy coi đánh được 15 minutes :D
 
Ai có đoạn scip chỉnh lại skill đánh, ví dụ như back center, hay left, hay right share cho có được không, :p
 
anh tiến ra yahoo em nhờ tý nếu cóa đọc thấy đoạn này nhanh nhé anh
 
hi'x có ai sài bản 2.2.4 ko sao mình đang sài thì bị disconet rui vào lại ko được nhưng nếu sai lai ban 2.1.1 thi vào bình thường.Nhưng mỏi tội Srip viết cho 2.2.4 dem wa cho 2.1.1 thì no ko pt ("hinh nhu ko chay") ai co thể giúp mình được ko .
 
ai cho tui cai sctipr đánh hang cự lộc với!!!!!30 char
ai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 charai cho tui cai sctipr đánh hang cự lộc với!!!!!30 char
 
bác micral cho hỏi chút , cái code tự động uống thuốc của em như này mà sao con đệ tử nó uống SP nhu uống nuớc lã vậy ::( , trung bình 1 trận nó làm đến 4 -5 bình SP ah, nếu đệ tử ko mất SP thì lại không bị sao cả :-/
Mã:
ts.Character.MAXHP = 80
ts.Character.MAXSP = 140
ts.CurrentPartner.MAXHP = 80
ts.CurrentPartner.MAXSP = 140
em ko dùng các hàm
Mã:
function doEatHP
function doEatSP
function CheckHP
 
HoaManLau_TV nói:
bác micral cho hỏi chút , cái code tự động uống thuốc của em như này mà sao con đệ tử nó uống SP nhu uống nuớc lã vậy ::( , trung bình 1 trận nó làm đến 4 -5 bình SP ah, nếu đệ tử ko mất SP thì lại không bị sao cả :-/
Mã:
ts.Character.MAXHP = 80
ts.Character.MAXSP = 140
ts.CurrentPartner.MAXHP = 80
ts.CurrentPartner.MAXSP = 140
em ko dùng các hàm
Mã:
function doEatHP
function doEatSP
function CheckHP
cái hàm mà bạn đang xài là dùng để tăng sp và hp bản thân lên cao ví dụ như sp bạn là 100 mà bạn khi là ts.CurrentPartner.MAXSP = 140 thì sp con đệ bạn là 140 trong khi thực ra có 100 thì nó sẽ ăn hết số sp có trên người
cái này ko phải là hàm để TDUT mà là hàng tự động ăn hết SP và HP để tránh full thùng cho nên bạn ko nên xài hàm này và có thể chọn Auto Eat ở trên Opiton của truebot hoặc có thể dùng fuction eatsp & Hp của script TB
 
cho mình hỏi sau khi gặp BTQ nó trả lời xong là đứng yên. như vậy phải thêm dòng gi trong hàm "function FinishAnswerFuckGod()" mong nhận được trả lời gấp thời gian là lv ma` :D
 
$KiemSiDaTinh$ nói:
cái hàm mà bạn đang xài là dùng để tăng sp và hp bản thân lên cao ví dụ như sp bạn là 100 mà bạn khi là ts.CurrentPartner.MAXSP = 140 thì sp con đệ bạn là 140 trong khi thực ra có 100 thì nó sẽ ăn hết số sp có trên người
cái này ko phải là hàm để TDUT mà là hàng tự động ăn hết SP và HP để tránh full thùng cho nên bạn ko nên xài hàm này và có thể chọn Auto Eat ở trên Opiton của truebot hoặc có thể dùng fuction eatsp & Hp của script TB
cho mình xin cái đoạn code đó đi KSDT, mình đã thử dùng hàm fuction doEatHP và fuction doEatSP nhưng mà ko được ::(
 
cái hàm mà bạn đang xài là dùng để tăng sp và hp bản thân lên cao ví dụ như sp bạn là 100 mà bạn khi là ts.CurrentPartner.MAXSP = 140 thì sp con đệ bạn là 140 trong khi thực ra có 100 thì nó sẽ ăn hết số sp có trên người
cái này ko phải là hàm để TDUT mà là hàng tự động ăn hết SP và HP để tránh full thùng cho nên bạn ko nên xài hàm này và có thể chọn Auto Eat ở trên Opiton của truebot hoặc có thể dùng fuction eatsp & Hp của script TB

ọe cái khúc đầu thì còn đúng chứ cái phần sau ai bảo đây là hàm ăn hết HP với SP, tui toàn xài hàm này, hp với sp có mất gì đâu,ngược lại còn đầy thùng :D pa test lại đi
 
Các bác coi dùm tại sao con leader nó chẳng chịu phong QS nhỉ ?Xin chỉ dùm :D

Mã:
var state = "" 
var ghost_count = 0; 
var god_count = 0; 
var die_count = 0; 
var pet_die_count = 0; 
var battle_count = 0; 
var DisconnectFlag = 0.3; 
var HealingFlag = 0.5; 
var hpFraction = 0.8; 
var spFraction = 0.7; 

var mapid1 = 12000; //inside
var mapid2 = 12421;
var warpid1 = 1;
var warpid2 = 2;
var warp_pos_x = 662;
var warp_pos_y = 475;
var battle_round;

var myParty = new Array(858817,1663327,0,0); //ca'c id trong pt
var pt_leader = myParty[708276]; //id chu pt
var pt_sena = myParty(1663327); //id quan su

function MyAttack(){ 

m = SelectF1Target(); 
// hoac:
// m = findMonster(); (nhu tdck thuo`ng)

battle_round++;

sk = 12003; //skill

ts.SendAttack( 
ts.Character.Row 
, ts.Character.Col 
, m.Row 
, m.Col 
, sk 
);

} 


function MyPartnerAttack(){ 
m = SelectF1Target(); 
sk = SkillID("Attack"); 

ts.SendAttack( 
ts.CurrentPartner.Row 
, ts.CurrentPartner.Col 
, m.Row 
, m.Col 
, sk 
) 
} 

function BattleStarted(){ 
battle_count++; 
battle_round=0;
} 

function BattleStoped(){ 
EatHP();
EatSP();
ViewState();
} 

function EatHP(){ 
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction)){ 
doEatHP(0,(ts.Character.MAXHP * hpFraction)-ts.Character.HP) 
} 
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction)){ 
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP) 
} 
} 

function EatSP(){ 
if (ts.Character.SP < (ts.Character.MAXSP * spFraction)){ 
doEatSP(0,(ts.Character.MAXSP * spFraction)-ts.Character.SP) 
} 
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFraction)){ 
doEatSP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP) 
} 
} 

function ViewState(){ 
debug("************************************",0xFF0000) 
debug(" Battle Count : " + battle_count ,0xFF0000) 
debug(" Dead Count : " + die_count ,0xFF0000) 
debug(" Pet KO Count : " + pet_die_count, 0xFF0000) 
debug(" Lucky Count : " + god_count, 0xFF0000) 
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000) 
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000) 
debug("************************************",0xFF0000) 
} 

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) 
} 
} 

function onNPCAppear( npcmapid , x , y ){ 
//debug(npcmapid,0) 
if(npcmapid == npcmapid){ 
ts.ClickOnNPC(npcmapid) 
ts.ClickOnNPC(npcmapid) 
} 
} 

function FinishAnswerFuckGod(){ 
cdelay(3)
god_count++; 
if(ghost_count>=3){ 
debug("3 ghost, disconnect now",0x00aaaa) 
frm.mnuEnableReconnect.Checked = false;
ts.Disconect(); 
} 
} 

function doEatHP(order,difHp){ 
for(var i = 1;i<= 25 ;i++){ 
var oSlot = ts.MyItems.Item(i) 
var oItem = ITEMS.Item(oSlot.itemid) 
if (oSlot.itemid == 0){ continue; } 
if(oItem.isHPItem()){ 
if (oItem.itemvalue > difHp){ continue; } 
var eatHpAmt = (difHp - (difHp % oItem.itemvalue)) / oItem.itemvalue 
if (eatHpAmt> 0){ 
if (eatHpAmt > oSlot.num){eatHpAmt = oSlot.num; } 
ts.EatItem(i,eatHpAmt,order) 
debug( "?"+oItem.itemname+" HP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 ) 
difHp = difHp - eatHpAmt * oItem.itemvalue 
} 
} 
} 
} 

function doEatSP(order,difSp){ 
for(var i = 1;i<= 25 ;i++){ 
var oSlot = ts.MyItems.Item(i) 
var oItem = ITEMS.Item(oSlot.itemid) 
if (oSlot.itemid == 0){ continue; } 

if(oItem.isSPItem()){ 
   if (oItem.itemvalue > difSp){ continue; } 
   var eatSpAmt = (difSp - (difSp % oItem.itemvalue)) / oItem.itemvalue 
   if (eatSpAmt> 0){ 
      if (eatSpAmt > oSlot.num){eatSpAmt = oSlot.num; } 
      ts.EatItem(i,eatSpAmt,order); 
      debug( "?"+oItem.itemname+" SP "+oItem.itemvalue+"at slot "+i+" decrease "+eatSpAmt+"?" ,0xC08008 ); 
      difSp = difSp - eatSpAmt * oItem.itemvalue ;
   } 
}

} 
} 

function Start(){ 
debug("Moving to battlefield...",0);
state="autowarp";

var x = get_random(warp_pos_x_min,warp_pos_x_max)
ts.Walk(x,warp_pos_y);
WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
} 

function Stop(){ 

} 

function CheckDisconnect(){ 
   if(ts.Character.HP < (DisconnectFlag * ts.Character.MAXHP)
   || ts.CurrentPartner.HP <(DisconnectFlag * ts.CurrentPartner.MAXHP)
   ){
      frm.mnuEnableReconnect.Checked = false;
      ts.Disconect();
   }
} 

function OnPrivateMsg(PlayerName , Msg){
debug(PlayerName + ": " + Msg,0);
} 


function InitBot() { 
   debug("my bot" , 0x00FF00 );
   EatHP();
   EatSP();

   Timer.Enabled=true;   
} 

function OnTimer(){
} 

function WaitAcceptParty(playerid){ 
for (var i=0; i<myParty.length;i++) {
   if (playerid == myParty[i]) { ts.AcceptParty(playerid); }
}
} 

function AcceptedParty(playerid){ 
//pname = getPlayerName(playerid) 

   if(playerid == pt_sena)  
   { 
      ts.sena(playerid) //set strategist 
   } 

pt_count++;
if (pt_count==2) { //full pt 5 nguoi
      Start();
}

} 

function RequestPartyAcceptFrom(PlayerId ){ 
} 

function PartyStop( playerid ){ 
for (var i=0; i<myParty.length;i++) {
   if (playerid ==myParty[i]) { ts.Disconect(); }
}
}
 
function onPlayerWalk( uid , x , y ){ 
//debug("uid = " + uid + " x = " + x + " y = " + y,0);
} 

function warpFinish(){
if(state=="autowarp"){
   if(ts.Character.mapid == mapid1){
      ts.Walk(warp_pos_x_B,warp_pos_y_B);
      ts.Delay(2000);
      WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
   }else if(ts.Character.mapid==mapid2){
      var x = get_random(warp_pos_x_min,warp_pos_x_max)
      ts.Walk(x,warp_pos_y);
      ts.Delay(2000);
      WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
   } 
}
}

InitBot() 
debug(ts.Character.Ghost,0x0000FF)
 
sau khi login rồi enable fliter,
cái này là sao.
Ai chỉ giùm cái
thanks.
 
AnhHungThoiChien nói:
Các bác coi dùm tại sao con leader nó chẳng chịu phong QS nhỉ ?Xin chỉ dùm :D

Mã:
var state = "" 
var ghost_count = 0; 
var god_count = 0; 
var die_count = 0; 
var pet_die_count = 0; 
var battle_count = 0; 
var DisconnectFlag = 0.3; 
var HealingFlag = 0.5; 
var hpFraction = 0.8; 
var spFraction = 0.7; 

var mapid1 = 12000; //inside
var mapid2 = 12421;
var warpid1 = 1;
var warpid2 = 2;
var warp_pos_x = 662;
var warp_pos_y = 475;
var battle_round;

var myParty = new Array(858817,1663327,0,0); //ca'c id trong pt
var pt_leader = myParty[708276]; //id chu pt
var pt_sena = myParty(1663327); //id quan su

function MyAttack(){ 

m = SelectF1Target(); 
// hoac:
// m = findMonster(); (nhu tdck thuo`ng)

battle_round++;

sk = 12003; //skill

ts.SendAttack( 
ts.Character.Row 
, ts.Character.Col 
, m.Row 
, m.Col 
, sk 
);

} 


function MyPartnerAttack(){ 
m = SelectF1Target(); 
sk = SkillID("Attack"); 

ts.SendAttack( 
ts.CurrentPartner.Row 
, ts.CurrentPartner.Col 
, m.Row 
, m.Col 
, sk 
) 
} 

function BattleStarted(){ 
battle_count++; 
battle_round=0;
} 

function BattleStoped(){ 
EatHP();
EatSP();
ViewState();
} 

function EatHP(){ 
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction)){ 
doEatHP(0,(ts.Character.MAXHP * hpFraction)-ts.Character.HP) 
} 
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction)){ 
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP) 
} 
} 

function EatSP(){ 
if (ts.Character.SP < (ts.Character.MAXSP * spFraction)){ 
doEatSP(0,(ts.Character.MAXSP * spFraction)-ts.Character.SP) 
} 
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFraction)){ 
doEatSP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP) 
} 
} 

function ViewState(){ 
debug("************************************",0xFF0000) 
debug(" Battle Count : " + battle_count ,0xFF0000) 
debug(" Dead Count : " + die_count ,0xFF0000) 
debug(" Pet KO Count : " + pet_die_count, 0xFF0000) 
debug(" Lucky Count : " + god_count, 0xFF0000) 
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000) 
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000) 
debug("************************************",0xFF0000) 
} 

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) 
} 
} 

function onNPCAppear( npcmapid , x , y ){ 
//debug(npcmapid,0) 
if(npcmapid == npcmapid){ 
ts.ClickOnNPC(npcmapid) 
ts.ClickOnNPC(npcmapid) 
} 
} 

function FinishAnswerFuckGod(){ 
cdelay(3)
god_count++; 
if(ghost_count>=3){ 
debug("3 ghost, disconnect now",0x00aaaa) 
frm.mnuEnableReconnect.Checked = false;
ts.Disconect(); 
} 
} 

function doEatHP(order,difHp){ 
for(var i = 1;i<= 25 ;i++){ 
var oSlot = ts.MyItems.Item(i) 
var oItem = ITEMS.Item(oSlot.itemid) 
if (oSlot.itemid == 0){ continue; } 
if(oItem.isHPItem()){ 
if (oItem.itemvalue > difHp){ continue; } 
var eatHpAmt = (difHp - (difHp % oItem.itemvalue)) / oItem.itemvalue 
if (eatHpAmt> 0){ 
if (eatHpAmt > oSlot.num){eatHpAmt = oSlot.num; } 
ts.EatItem(i,eatHpAmt,order) 
debug( "?"+oItem.itemname+" HP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 ) 
difHp = difHp - eatHpAmt * oItem.itemvalue 
} 
} 
} 
} 

function doEatSP(order,difSp){ 
for(var i = 1;i<= 25 ;i++){ 
var oSlot = ts.MyItems.Item(i) 
var oItem = ITEMS.Item(oSlot.itemid) 
if (oSlot.itemid == 0){ continue; } 

if(oItem.isSPItem()){ 
   if (oItem.itemvalue > difSp){ continue; } 
   var eatSpAmt = (difSp - (difSp % oItem.itemvalue)) / oItem.itemvalue 
   if (eatSpAmt> 0){ 
      if (eatSpAmt > oSlot.num){eatSpAmt = oSlot.num; } 
      ts.EatItem(i,eatSpAmt,order); 
      debug( "?"+oItem.itemname+" SP "+oItem.itemvalue+"at slot "+i+" decrease "+eatSpAmt+"?" ,0xC08008 ); 
      difSp = difSp - eatSpAmt * oItem.itemvalue ;
   } 
}

} 
} 

function Start(){ 
debug("Moving to battlefield...",0);
state="autowarp";

var x = get_random(warp_pos_x_min,warp_pos_x_max)
ts.Walk(x,warp_pos_y);
WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
} 

function Stop(){ 

} 

function CheckDisconnect(){ 
   if(ts.Character.HP < (DisconnectFlag * ts.Character.MAXHP)
   || ts.CurrentPartner.HP <(DisconnectFlag * ts.CurrentPartner.MAXHP)
   ){
      frm.mnuEnableReconnect.Checked = false;
      ts.Disconect();
   }
} 

function OnPrivateMsg(PlayerName , Msg){
debug(PlayerName + ": " + Msg,0);
} 


function InitBot() { 
   debug("my bot" , 0x00FF00 );
   EatHP();
   EatSP();

   Timer.Enabled=true;   
} 

function OnTimer(){
} 

function WaitAcceptParty(playerid){ 
for (var i=0; i<myParty.length;i++) {
   if (playerid == myParty[i]) { ts.AcceptParty(playerid); }
}
} 

function AcceptedParty(playerid){ 
//pname = getPlayerName(playerid) 

   if(playerid == pt_sena)  
   { 
      ts.sena(playerid) //set strategist 
   } 

pt_count++;
if (pt_count==2) { //full pt 5 nguoi
      Start();
}

} 

function RequestPartyAcceptFrom(PlayerId ){ 
} 

function PartyStop( playerid ){ 
for (var i=0; i<myParty.length;i++) {
   if (playerid ==myParty[i]) { ts.Disconect(); }
}
}
 
function onPlayerWalk( uid , x , y ){ 
//debug("uid = " + uid + " x = " + x + " y = " + y,0);
} 

function warpFinish(){
if(state=="autowarp"){
   if(ts.Character.mapid == mapid1){
      ts.Walk(warp_pos_x_B,warp_pos_y_B);
      ts.Delay(2000);
      WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
   }else if(ts.Character.mapid==mapid2){
      var x = get_random(warp_pos_x_min,warp_pos_x_max)
      ts.Walk(x,warp_pos_y);
      ts.Delay(2000);
      WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1);
   } 
}
}

InitBot() 
debug(ts.Character.Ghost,0x0000FF)

sửa lại chúc

var myParty = new Array(858817,1663327,0,0,0); //ca'c id trong pt
var pt_leader = myParty[0]; //id chu pt
var pt_sena = myParty[1]; //id quan su
 
cho mình xin cái đoạn code đó đi KSDT, mình đã thử dùng hàm fuction doEatHP và fuction doEatSP nhưng mà ko được
trong function BattleStoped(){
thêm vào
EatHP();
EatSP();
thì nó mới ăn hp và sp
to hunter2001 : tui đang nói cái hàm này dùng vào mục đích cho sp và hp khỏi full thùng chứ ko ai lại đi ăn hp và sp theo kiểu này cả :D
 
var state = ""
var ghost_count = 0;
var god_count = 0;
var die_count = 0;
var pet_die_count = 0;
var battle_count = 0;
var DisconnectFlag = 0.3;
var HealingFlag = 0.5;
var hpFraction = 0.8

function MyAttack(){
m = SelectF1Target()
if (ts.Character.SP > 15){
sk = SkillID("Fire Arrow");
}else{
debug("Depend",0xAA00AA)
sk = SkillID("attack");
}

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, m.Row
, m.Col
, sk
)
}


function MyPartnerAttack(){
m = SelectF1Target()
if (ts.CurrentPartner.SP > 15){
sk = SkillID("Fire Arrow");
}else{
debug("Depend",0xAA00AA)
sk = SkillID("attack");
}

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, m.Row
, m.Col
, sk
)
}

function BattleStarted(){
battle_count++;
}
function BattleStoped(){
/* Just safty first. for Warrior not leave you call function SaveWarrior() every end battle. */
SaveWarrior();
CheckDisconnect();
EatHP()
ViewState()
//ts.ClickOnNPC(1)
}

function EatHP(){
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction)){
doEatHP(0,(ts.Character.MAXHP * hpFraction)-ts.Character.HP)
}
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction)){
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP)
}
}

function ViewState(){
debug("************************************",0xFF0000)
debug(" Battle Count : " + battle_count ,0xFF0000)
debug(" Dead Count : " + die_count ,0xFF0000)
debug(" Pet KO Count : " + pet_die_count, 0xFF0000)
debug(" Lucky Count : " + god_count, 0xFF0000)
debug(" Ghost Count : " + ts.Character.Ghost ,0xFF0000)
debug(" Warrior's FAI : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000)
debug("************************************",0xFF0000)
}

function SaveWarrior(){
if(ts.CurrentPartner.HP< ((0.20) * ts.CurrentPartner.MAXHP)){
//ts.Disconect();
debug(" SAVE THE FAI DISCONNECT NOW! : ",0x0000FF);
}
}
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)
}
}
function onNPCAppear( npcmapid , x , y ){
//debug(npcmapid,0)
if(npcmapid == npcmapid){
ts.ClickOnNPC(npcmapid)
ts.ClickOnNPC(npcmapid)
}
}
function RemoveGhost(){
ErasingGhost = true
ts.ClickOnNPC(21)
}
function NpcDialogMenu(DialogId){
debug("Menu "+DialogId,0x0000FF)
ts.SelectChoice(1);
ts.SendEnd();
}
function NpcDialog(DialogId){
debug("Dialog "+DialogId,0x0000FF)
if(DialogId == 12077){
ts.ClickOnNPC(1)

///***********************
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 == "RefreshPill"
|| itemname == "Morale pill"
|| itemname == "PainKiller"
)
&& oSlot.num ==50){
ts.Contribute(0,oSlot.slot);
}else if((itemname == "RefreshPill--"
|| itemname == "Morale pill--"
|| itemname == "PainKiller--"
)
&& oSlot.num ==50){
// ts.SendItemTo(153163,oSlot.slot,oSlot.num)
}
}
//*************************************/


ts.ClickOnNPC(1)
}else{
ts.SendEnd();
}
}
function onAnswerWrong(q,a){
//ts.ClickOnNPC(21)
//RemoveGhost()
}

function FinishAnswerFuckGod(){
god_count++;
if(ghost_count>=3){
debug("3 ghost, disconnect now",0x00aaaa)
ts.Disconect();
}
ts.ClickOnNPC(1)
}

function doEatHP(order,difHp){
for(var i = 1;i<= 25 ;i++){
var oSlot = ts.MyItems.Item(i)
var oItem = ITEMS.Item(oSlot.itemid)
if (oSlot.itemid == 0){ continue; }
if(oItem.isHPItem()){
if (oItem.itemvalue > difHp){ continue; }
var eatHpAmt = (difHp - (difHp % oItem.itemvalue)) / oItem.itemvalue
if (eatHpAmt> 0){
if (eatHpAmt > oSlot.num){eatHpAmt = oSlot.num; }
ts.EatItem(i,eatHpAmt,order)
debug( "?"+oItem.itemname+" HP "+oItem.itemvalue+"at slot "+i+" decrease "+eatHpAmt+"?" ,0xC08008 )
difHp = difHp - eatHpAmt * oItem.itemvalue
}
}
}
}

function Start(){
// no remove this function
fx = ts.Character.x
fy = ts.Character.y
state = "HoneyPill"
HoneyPill()
}
function Stop(){
state= "stop"
// no remove this function
}
function CheckDisconnect(){
if(ts.CurrentPartner.HP == 0){
pet_die_count++
}
if(ts.Character.HP <= 0){
die_count++
}
if(die_count>3){
ts.Disconect();
}

}

function OnChat(PlayerName , Msg){
//debug(PlayerName + " " + Msg , 0 )
}

function OnTimer(){
Move(822,1195)
}

function InitBot(){
ts.RequestParty(111111)
}

function AcceptedParty(playerid){
}

function PartyStop( playerid ){
if(playerid == 111111){
ts.Disconect();
}
}

function onPlayerWalk( uid , x , y ){
if(uid == 111111 ){

}else{
//ts.Disconect()
}
}
function OnTimer(){
if(state=="autowarp"){
ts.Chat(3,"ok.",86269)
}
}
function warpFinish(){
//state="autowarp"
}

//state="autowarp"

InitBot()
debug(ts.Character.Ghost,0x0000FF)
scrip cua em the nay da chinh xac chua
mac sao no ko ko ban hoa tien vay
 
function MyAttack(){
m = SelectF1Target()
if (ts.Character.SP > 15){
sk = SkillID("Fire Arrow");
}else{
debug("Depend",0xAA00AA)
sk = SkillID("attack");
}

ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, m.Row
, m.Col
, sk
)
}


function MyPartnerAttack(){
m = SelectF1Target()
if (ts.CurrentPartner.SP > 15){
sk = SkillID("Fire Arrow");
}else{
debug("Depend",0xAA00AA)
sk = SkillID("attack");
}

ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, m.Row
, m.Col
, sk
)
}

sữa cái này thành

function MyAttack(){
m = SelectF1Target();
battle_round++;
sk = SkillID("Fire Arrow");
ts.SendAttack(
ts.Character.Row
, ts.Character.Col
, m.Row
, m.Col
, sk
);
}


function MyPartnerAttack(){
m = SelectF1Target();
sk = SkillID("Fire Arrow");
ts.SendAttack(
ts.CurrentPartner.Row
, ts.CurrentPartner.Col
, m.Row
, m.Col
, sk
)
}

tui đang nói cái hàm này dùng vào mục đích cho sp và hp khỏi full thùng chứ ko ai lại đi ăn hp và sp theo kiểu này cả
Đâu phải tui cũng dùng cái này để ăn hp và sp mà,đâu có xài mấy cái auto eat hp or doeat hp đâu
 
sao ma` no' cu;' hien. len run time error"7" la` seo vay. NgoaiTinh
 
Status
Không mở trả lời sau này.
Back
Top