script chủ pt toàn đánh 1 mình là sao

mẫu_sơn

Donkey Kong
Tham gia ngày
3/5/06
Bài viết
443
Reaction score
2
Mã:
 double DisconnectFlag = 0.3;     // Disconnect when current HP is below 30% 

double hpFractionEat = 0.8;    //Eat HP when current HP<= 80% 
double spFractionEat = 0.8; 
double hpFraction = 0.95;        //Eat until current HP >= 95 % 
double spFraction = 0.95; 

byte DisconFai = 00;        //    Faith of warrior to disconnect 

byte battle_count = 0; 
byte NS_count = 0; 
byte myturn = 0; 
byte peturn = 0; 

byte pt1 = 0; 
byte pt2 = 0; 
byte pt3 = 0; 
byte pt4 = 0; 

double mapid1 = 12013;  
double mapid2 = 12521; 
byte warpid1 = 1; 
byte warpid2 = 5; 

/***** Chinh sua ID Member o day *****/ 

uint idmem1 = 565349; 
uint idmem2 = 2277115; 
uint idmem3 = 2294142; 
uint idmem4_sena = 1220759; 

/*************************************/ 

/*********************** My Attack *************************/ 
public override void MyAttack() 
{    
myturn++; 
if (myturn == 1) 
{ 
CharacterInfo MyChar = ts.Character;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyChar.Row, MyChar.Col, 1, 2, 12003);     
} 
if (myturn >=2) 
{ 
CharacterInfo MyChar = ts.Character;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 0, 10000); 
} 
} 


/******************* My Partner Attack *********************/ 
public override void MyPartnerAttack() 
{ 
peturn++; 
if (peturn == 1) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 3, 12003); 
} 
if (peturn >= 2) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 17001); 
} 
} 


/********************* Battle Started **********************/ 
public override void BattleStarted() 
{ 
battle_count++; 
myturn = 0; 
peturn = 0; 
} 


/********************* Battle Stopped ***********************/ 
public override void BattleStopped() 
{     
AutoEatFood(); 
ProcessInventoryAction(); 
CheckDisconnect();     
ViewState(); 
} 


/******************* Receive Question *********************/ 
public override void doRecvQuestion() 
{ 
NS_count++; 
} 


/******************** Response Answer **********************/ 
public override void ResponseAnswer() 
{         
string tmp=ts.LastQuestion.Replace("=?",""); 
int ans=ts.Eval(tmp); 
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);     
ts.Answer(ans_index); 
} 


/******************** NPC Dialog Menu **********************/ 
public override void NpcDialogMenu(ushort DialogId) 
{ 
debug("Dialog Menu ID = "+DialogId.ToString()); 
} 


/********************* NPC Dialog ID ***********************/ 
public override void NpcDialog(ushort DialogId) 
{     
debug("Dialog ID = "+DialogId.ToString()); 
} 


/********************* On NPC Appear ***********************/ 
public override void onNPCAppear(ushort npcmapid, int x, int y) 
{     
} 


/************************ On Timer *************************/ 
public override void OnTimer() 
{ 
if (pt1 == 0) {ts.AcceptParty(idmem1);} 
if (pt2 == 0) {ts.AcceptParty(idmem2);} 
if (pt3 == 0) {ts.AcceptParty(idmem3);} 
if (pt4 == 0) {ts.AcceptParty(idmem4_sena);} 
} 


/********************* Accepted Party **********************/ 
public override void AcceptedParty(uint playerid) 
{ 
if (playerid == idmem1)       {debug(playerid + "  Gia nhập đội ngũ");pt1 = 1;} 
if (playerid == idmem2)       {debug(playerid + "  Gia nhập đội ngũ");pt2 = 1;} 
if (playerid == idmem3)       {debug(playerid + "  Gia nhập đội ngũ");pt3 = 1;} 
if (playerid == idmem4_sena)  {debug(playerid + "  Gia nhập đội ngũ");pt4 = 1; 
                               ts.Sena(idmem4_sena);debug(playerid + "  Làm Quân Sư");} 
if (pt1 ==1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {ts.SetTimerOnOff(false);ts.delay(1000);debug("Đội ngũ đã đầy -> Start");Start();} 
} 


/*********************** Party Stop ************************/ 
public override void PartyStop(uint playerid) 
{ 
if (playerid == idmem1)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.Disconnect();} 
if (playerid == idmem2)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.Disconnect();} 
if (playerid == idmem3)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.Disconnect();} 
if (playerid == idmem4_sena) {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.Disconnect();} 
} 


/********************** Warp Finish ************************/ 
public override void warpFinish() 
{ 
Start(); 
} 


/************************* Start ***************************/ 
public override void Start() 
{  
if (ts.Character.mapid == mapid1) {  
ts.Walk(1542,180);   
ts.Warp(warpid1); 
return; 
} else 
if (ts.Character.mapid == mapid2) {  
ts.Warp(warpid2); 
return; 
}  
}  


/************************** Stop ***************************/ 
public override void Stop() 
{ 
} 

/*********************** View State ************************/ 
void ViewState() 
{ 
debug("**************************************************    **********************",255) ;  
debug(" Số trận đánh : " + battle_count ,255) ; 
debug(" HP của "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255); 
debug(" HP của "+ts.CurrentPartner.CharName +" = " + ts.CurrentPartner.HP + " "+"/" +" "+ ts.CurrentPartner.MAXHP +"   "+" FAI = " + ts.CurrentPartner.fai,255);  
debug(" Số lần gặp BTQ : "+ NS_count +"  Số con ma : " + ts.Character.ghost ,255) ; 
debug("======= Script by Jet007 - Copy Right GameVN–™ =======",255) ; 
} 


/********************* Fishish Answer **********************/ 
public override void FinishAnswer() 
{ 
ts.delay(2000); 
Start(); 
} 


/**************** Request Party Accept From ****************/ 

//public override void RequestPartyAcceptFrom(uint playerid) 
//{ 
//if (playerid == idmem1) {ts.delay(500);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Johned team");} 
//if (playerid == idmem2) {ts.delay(500);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Johned team");} 
//if (playerid == idmem3) {ts.delay(500);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Johned team");} 
//if (playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(5    00);ts.Sena(playerid); pt4 = 1;debug(playerid + " Johned team, Quân Sư = "+playerid);} 
//if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {debug("Party Full -> Start ");Start();} 
//} 


/************************ Init Bot *************************/ 
public override void InitBot() 
{     
ts.SetTimerOnOff(true);     
if (ts.Character.mapid == mapid2) {ts.Warp(warpid2);} 
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("Măng hô");
AddDropItemList("thần hành");
AddDropItemList("ThuốcNhấtĐiểm");
AddDropItemList("Thuốc Bổ Huyết");
AddDropItemList("Thuốc Lục Vị");
AddDropItemList("viên công kích");

ViewState(); 
}

xin cái hàm chủ pt dis thì mem dis theo
( để nó còn biết quay lại chỗ ban đầu)
ko thì khi chủ dis thì nó tự động về chỗ ban đầu
chứ cái hàm
Mã:
if (ts.Character.mapid==12521) {ts.Warp(5);}
thì dis nó mới quay lại
 
Cho cái này vô mem (chi chu pt dis thì mem mới dis, mem này dis thì mem kia ko dis cho đỡ tốn công log lại)

PHP:
public override void PartyStop(uint playerid) 
{ 
if (playerid == idchupt)      {InitBot();}
}

Thân!
 
Sửa cái này nữa thì 100% ko bị đánh 1 mình
PHP:
public override void Start() 
{  
if (ts.Character.mapid == mapid1 && (pt1 + pt2 + pt3 + pt4 == 4)) {  
ts.Walk(1542,180);   
ts.Warp(warpid1); 
return; 
} else 
if (ts.Character.mapid == mapid2) {  
ts.Warp(warpid2); 
return; 
}  
}
Thân!
 
trời xài mấy cái legn@ này khó quá qua xài xcab đi cho lẹ
 
thế ko có cách sao cho chủ pt dis thì nó tự động quay lại chỗ ban đầu hả bạn
Mã:
 cám ơn DVT nhiều 

+ 1000 MP
 
Rubin_Hot nói:
trời xài mấy cái legn@ này khó quá qua xài xcab đi cho lẹ

tiền đâu mà xài hả cu với lại dùng Xcab như có người bón vào tận miệng ko thích
dùng legna thì đã nấu sẵn rồi chỉ việc húp thôi

#>:) #>:) #>:) #>:) #>:)


Mã:
 xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào xin tí MP nào
 
Back
Top