MC hay các bác nào khác biết xin chỉ dùm .
Trích dẫn:
HÕ H¥u Tôn Exp+ 624
mid id = 12301
Finish
************************************
Battle Count : 3
Dead Count : 0
Pet KO Count : 0
Lucky Count : 0
Ghost Count : 0
Warrior's FAI : HÕ H¥u Tôn : 91
************************************
mid id = 12063
Lay Chua Xin Dung Dis >_<
Start battle
Wen Chou Level=117 HP=1298/1298
Evil Guard Level=2 HP=27/27
FengJi Level=82 HP=627/627
Evil Guard Level=2 HP=27/27
Combat request.
Connection Closed.
Tại sao cứ đánh khoảng 3,4 trận là Dis không hiểu lí do ?Mình đang sử dụng TB ver 2.2.0.4 ,có lẽ do script ?
Đây là Code của Leader
Code:
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 MyMapID = 15802; var mapid1 = 12301; //inside var mapid2 = 12063; var warpid1 = 1; var warpid2 = 2; var warp_pos_x_min = 502; var warp_pos_x_max = 622; var warp_pos_y = 335; var warp_pos_x_B = 202; var warp_pos_y_B = 555; var battle_round; var myParty = new Array(708276,858817,912359,1663327,697735); //ca'c id trong pt pt_leader = myParty[0]; //id chu pt pt_sena = myParty[1]; //id quan su function MyAttack(){ m = SelectF1Target(); // hoac: // m = findMonster(); (nhu tdck thuo`ng) battle_round++; sk = SkillID("Fire Arrow"); //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(); } if(state=="autowarp"){ //cdelay(3); WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1); } } 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 NpcDialogMenu(DialogId){ ts.SelectChoice(1); debug("Cau chua di coan "+DialogId,0x0000FF) ts.SendEnd(); } function NpcDialog(DialogId){ ts.SendEnd(); } 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(){ state=""; } 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) { ts.AcceptParty(playerid); } } } function AcceptedParty(playerid){ //pname = getPlayerName(playerid) if(playerid == pt_sena) { ts.sena(playerid) //set strategist } pt_count++; if (pt_count==4) { //full pt 5 nguoi state=""; Start(); } } function RequestPartyAcceptFrom(PlayerId ){ } function PartyStop( playerid ){ for (var i=0; i<myParty.length;i++) { if (playerid ==myParty) { 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(4000); 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(4000); WarpLink( mapid2 ,warpid2 , mapid1 ,warpid1); } } } InitBot() debug(ts.Character.Ghost,0x0000FF)
Còn đây là của Mem
Code:
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.7; var spFraction = 0.4; var MyMapID = 15802; var battle_round; var myParty = new Array(11111,708276,33333,44444,55555); //ca'c id trong pt pt_leader = myParty[1]; //id chu pt pt_sena = myParty[0]; //id quan su function MyAttack(){ m = SelectF1Target(); // hoac: // m = findMonster(); (nhu tdck thuo`ng) battle_round++; sk = 12003; //skillhkick 13007 lkich13010 ts.SendAttack( ts.Character.Row , ts.Character.Col , m.Row , m.Col , sk ); } function MyPartnerAttack(){ m = SelectF1Target(); sk = 10000; 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(){ } 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){ } function InitBot() { debug("my bot" , 0x00FF00 ); EatHP(); EatSP(); Timer.Enabled=true; } function OnTimer(){ if (ts.CurrentParty==0) ts.RequestParty(pt_leader); } function WaitAcceptParty(playerid){ for (var i=0; i<myParty.length;i++) { if (playerid ==myParty) { ts.AcceptParty(playerid); } } } function AcceptedParty(playerid){ } function RequestPartyAcceptFrom(PlayerId ){ } function PartyStop( playerid ){ for (var i=0; i<myParty.length;i++) { if (playerid ==myParty) { ts.Disconect(); } } } function onPlayerWalk( uid , x , y ){ //debug("uid = " + uid + " x = " + x + " y = " + y,0); } function warpFinish(){ //debug("Enter to map id: " + ts.Character.mapid + " by portal id: " + ts.LastWarpId ,0) } InitBot() debug(ts.Character.Ghost,0x0000FF)
Xin giúp dùm !!