Ai cho cái Script Cho con lvl 1 đào tẫu ỡ Cự Lộc với

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

NXuanVu

Dragon Quest
Tham gia ngày
31/8/04
Bài viết
1,201
Reaction score
222
híc Toàn là chạy không bị té hoài, ai cho cái script đễ cho nó đào tẫu với
 
Mã:
var state = "" 
var ghost_count = 0; 
var god_count = 0; 
var hpFraction = 1; 
var spFraction = 0.95;
var warp_back = 0;
var flag_stop = 0;
var turn1 = 0;
var turn2 = 0;
var time = 0;

//my vars
//Chinh sua o duoi !!!

var mapid1 = 12013;
var mapid2 = 12521;
var warpid1 = 1;
var warpid2 = 5;
var id_chupt = IDchupt;
var id_ptmem1 = ID1;
var id_ptmem2 = ID2;
var id_ptmem3 = ID3;
var id_ptmem4 = ID4;
var id_quansu = ID4;  {ID4 là quân sư)

function MyAttack(){ 
turn1++;
if (turn1 == 1) {
sk = SkillID("Attack"); 

ts.SendAttack( 
ts.Character.Row 
, ts.Character.Col 
, 0 
, 2 
, sk 
) 
}  
if (turn1 >= 2) {
sk = SkillID("Escape "); 

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

function MyPartnerAttack(){ 
turn2++;
if (turn2 == 1) {
sk = SkillID("Fire Arrow");

ts.SendAttack( 
ts.CurrentPartner.Row 
, ts.CurrentPartner.Col 
, 0 
, 2 
, sk 
) 
} 
if (turn2 >= 2) {
sk = SkillID("Defend");

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

function BattleStarted(){ 
turn1 = 0;
turn2 = 0;
warp_back = 0;
flag_stop = 0;
time = 0;
} 
function BattleStoped(){ 
SaveWarrior(); 
EatHP();
EatSP();
DoSendItem()
} 

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 SaveWarrior(){ 
if(ts.CurrentPartner.HP< 10){ 
frm.mnuEnableReconnect.Checked = false;
ts.Disconect(); 
debug(" Cuu nguoi tren het! Disconnect nha! : ",0x0000FF)
} 
} 


function onEvilGod(){ 
ghost_count++ 
debug("E V I L G O D."+"["+ghost_count+"]",0x0000FF) 
} 

function onLuckyGod(){ 
god_count++;
debug("LUCKY G O D.",0xFF0000) 
} 

function FinishAnswerFuckGod(){ 
if(ghost_count>=2){ 
debug("2 con ma rui! Disconnect thoi!",0x00aaaa) 
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 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 == "AutoAttackPill" 
    || itemname == "Honey pill" 
    || itemname == "AutoTonicPill" 
    || itemname == "Yellow wine" 
    || itemname == "ZhuoScroll" 
    || itemname == "HasteScroll") && oSlot.num ==50){ 
      ts.SendItemTo(IDsenddo1,oSlot.slot,oSlot.num); 
   } else { if ((itemname == "Blood tonic" 
               || oSlot.itemid == 27035
               || itemname == "ZhongYuanDew"
               || itemname == "RefreshPill") && oSlot.num ==50)
               {ts.SendItemTo(IDsenddo2,oSlot.slot,oSlot.num);} 
             }
} 
}

function PlayerOnline( playerid ){
if (playerid == id_chupt) {
if (ts.Character.mapid==12012) {ts.Warp(2);}
if (ts.Character.mapid==mapid2) {ts.warp(warpid2);}
}
}


function Start(){ 
} 

function Stop(){ 
} 
 
function InitBot(){ 
debug("login okie", 0x00FF00)
EatHP();
EatSP();
if (ts.Character.mapid==12012) {ts.Warp(2);}
if (ts.Character.mapid==mapid2) {ts.warp(warpid2);}
frm.mnuAutoEat.Checked = false;
Timer.Enabled = true;
} 

function OnTimer(){
if (ts.Character.mapid==12012) {time++; if (time ==5) {time = 0; ts.Warp(2);}}
if (ts.Character.mapid==mapid2) {time++; if (time ==5) {time = 0; ts.Warp(warpid2);}}
}
 
function warpFinish(){ 
if (ts.Character.mapid==10952) {ts.Walk(902,875);ts.delay(1000);ts.delay(1000);ts.warp(1);}
} 

InitBot()
debug("Ti`nh trang hien nay: " +ghost_count+ " con ma!",0xFF9933)
Forum KT7
 
Đề nghị mó vào close cái topic này đê , xin xỏ gì ở đây vậy , hy sinh 1 PM vì thằng này rùi =))
 
cái thằng noob chuyên câu bài biến khõi topic này cho đẹp đi, ỡ đây làm dơ cái topic cũa anh
 
người ta xin Script cũng đéo đc àh
 
Đến gai với cái ông Bo_Cap_Tuyet này, người ta xin script ông chả cho thì thôi cứ toàn nói nhãm X-(
 
Đến gai với cái ông Bo_Cap_Tuyet này, người ta xin script ông chả cho thì thôi cứ toàn nói nhãm X-(, muốn câu bài chăng???, chả hiểu lvl để làm gì khi tiếng nói của mình không có trọng lượng
 
có thể vào DDKP7 xem đầy đủ nhất :D
 
Vừa chuyển qua bot CỰ Lộc. Đây là sau 5 ngày chạy thử test lỗi. Ở đây mình bắt chước cách đánh của XCAB : Dánh con T2 từ trái sang trước(lev 59). DÙng đệ Tôn Trọng:
include("common.js")

var memturn = 0;
var pnturn = 0;
var state = "";
var hpFraction = 0.8;
var spFraction = 0.7;
var ghost_count = 0;

function InitBot()
{
ts.RequestParty(id chu pt)
CheckHSP()
}

function MyAttack()
{
if (memturn == 0)
{
sk = 10000;
ts.SendAttack( ts.Character.Row , ts.Character.Col , 0 , 3 , sk )
memturn = memturn + 1;
}
else
{
sk = 14002;
ts.SendAttack( ts.Character.Row , ts.Character.Col , ts.Character.Row , ts.Character.Col , sk )
}
}

function MyPartnerAttack()
{
if (pnturn == 0)
{
if (ts.CurrentPartner.SP > 15)
{
sk = 12003;
}
else
{
sk = 10000;
}
ts.SendAttack( ts.CurrentPartner.Row , ts.CurrentPartner.Col , 0 , 3 , sk )
pnturn = pnturn + 1;
}
else
{
sk = 17001;
ts.SendAttack( ts.CurrentPartner.Row , ts.CurrentPartner.Col , ts.CurrentPartner.Row , ts.CurrentPartner.Col , sk )
}
}

function BattleStarted()
{
memturn = 0
pnturn = 0
}

function BattleStoped()
{
CheckHSP()
}

function Start()
{
debug("Re pt...",0)
ts.RequestParty(id chu pt)
}

function Stop()
{
}

function CheckHSP()
{
if (ts.Character.HP < (ts.Character.MAXHP * hpFraction))
{
doEatHP(0, (ts.Character.MAXHP - ts.Character.HP))
}
if (ts.Character.SP < (ts.Character.MAXSP * spFraction))
{
doEatSP(0, (ts.Character.MAXSP - ts.Character.SP))
}
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFraction))
{
doEatHP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXHP - ts.CurrentPartner.HP))
}
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFraction))
{
doEatSP(ts.CurrentPartner.Order,(ts.CurrentPartner.MAXSP - ts.CurrentPartner.SP))
}
}

function PartyStop( playerid )
{
if( playerid == xx || playerid == yy || playerid == zz || playerid == kk || playerid == tt )
{
debug("Dis by " + playerid + "at" + Time(),0xFF0000) // luu y o day minh dung ham time() tu viet de xac dinh thoi gian bi dis.
Stop()
ts.Disconect();
}
}

function OnTimer()
{
}

InitBot()
ClearLog("Wrong.js")
 
Back
Top