Script Legn@ Full !

Status
Không mở trả lời sau này.
Cho mình biết cách sài legn@ được không vậy
mình có bản legn@ rồi nhưng hổng biết cách sài sao hết, Sript mấy Pro viết copy xong chép vào đâu , và mở chương trình Legn@ như thế nào vậy. Hic luyện bình thường lên được 8x chịu hết nổi, plzzzzzzzzzzzz help me vớiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
Sao kô ai giúp mình hết vậy nè trời ơi

Cho mình xin cái Scrip tự bán Item; đoạn code tự send Item (Chỉ cho mình cái đoạn code này chèn vào khúc nào của scip) và IP của các món Item nha!
 
Gửi Boynoob, đây là cái bạn cần
PHP:
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 NS_count = 0; 
byte battle_count = 0; 
byte die_count = 0;  
byte pet_die_count = 0;  

byte myturn = 0; 
byte peturn = 0; 

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

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

uint idmem1 = 757543; 
uint idmem2 = 1995909; 
uint idmem3 = 2056387; 
uint idmem4_sena = 1557035; 

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

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


/******************* 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, 2, 18001); 
} 
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 Stoped ***********************/ 
public override void BattleStoped() 
{     
AutoEatFood(); 
ProcessInventoryAction(); 
CheckDisconnect(); 
ViewState(); 
Start();     
} 


/******************* 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.delay(2000); 
ts.Answer(ans_index); 
} 


/******************** NPC Dialog Menu **********************/ 
debug("Menu ID="+DialogId.ToString());     
if(DialogId==5){ ts.SelectChoice(1); ts.SendEnd(); }

/********************* NPC Dialog ID ***********************/ 
public override void NpcDialog(ushort DialogId) 
{     
			debug("Dialog ID="+DialogId.ToString()); 
                         if(DialogId == 12385) 
                         { 
                                ts.ClickOnNPC(1); 
                                ts.ClickOnNPC(1); 
                                ts.SendEnd(); 
                                return;  
                         } 
                         ts.SendEnd(); 
} 
/********************* 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 ***************************/ 
public override void Start() 
{  
ts.ClickOnNPC(1); 
}  


/************************** 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(5000); 
Start(); 
ts.delay(500); 
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);         
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("viên công kích"); 
AutoEatFood(); 
ViewState(); 
}
Đây là cái bot Giản Dung bên Trục Quận. Chúc vui vẻ
 
ai chỉ mình cách khắc phục bị dis gặp btq--> ăn ma o đoạn scrip nay ko vậy


Mã:
// cac daon code ko wan trong


public override void BattleStopped()
{	
AutoEatFood(); 
ts.delay(1000);
Start();
ProcessInventoryAction();
	CheckDisconnect();	

}

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

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


public override void NpcDialog(ushort DialogId)
{    
debug("Dialog ID = "+DialogId.ToString());
     if(DialogId==12080) {ts.SendEnd();}
if(DialogId==10318){  ts.SendEnd();} 
if(DialogId==10427){  ts.SendEnd();} 
if(DialogId==12256){  
		ts.ClickOnNPC(9);
		
} 
}
********************** Warp Finish ************************/
public override void warpFinish()
{
ts.delay(200);
}


public override void Start()
{
	

ts.Warp(3);
	ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
ts.SendEnd();
}

public override void FinishAnswer()
{
ts.delay(1000); 
ts.Disconnect(); 

}
 
mọi người ơi cho tui hỏi cái scrip tui viết như thế này bot lưu bích thiếu cái gì sao nó kô chịu đánh mọi người chỉ dùm tui cho nào sai nha
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_sena = 667227; 

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

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

public override void MyPartnerAttack() 
{ 
peturn++; 
if (peturn == 1) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000); 
} 
if (peturn >= 2) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000); 
} 
} 


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


/********************* Battle Stoped ***********************/ 
public override void BattleStoped() 
{     
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());
ts.SelectChoice(1);  
ts.SendEnd();  
} 


/********************* NPC Dialog ID ***********************/ 
public override void NpcDialog(ushort DialogId) 
{     
debug("Dialog ID = "+DialogId.ToString()); 
if (DialogId == 12121)  
{  
ts.ClickOnNPC(14);  
ts.ClickOnNPC(14);  
}  
else{ ts.SendEnd(); }  
} 


/********************* 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_sena);} 
} 


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


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


/********************** Warp Finish ************************/ 
public override void warpFinish() 
{ 
if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {debug("Party Full -> Start ");Start();} 
} 


/************************* Start ***************************/ 
public override void Start() 
{  
ts.ClickOnNPC(14);  
} 


/************************** 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 bot luu bich edit by giap hong linh - Copy Right GameVN–™ =======",255) ; 
} 


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


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

//public override void RequestPartyAcceptFrom(uint playerid) 
//{ 
//if (playerid == idmem1_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(500);ts.Sena(playerid); pt1 = 1;debug(playerid + " Johned team, Quân Sư = "+playerid);} 
//if (pt1 == 1 ) {debug("Party Full -> Start ");Start();} 
//} 


/************************ Init Bot *************************/ 
public override void InitBot() 
{
ts.SetTimerOnOff(true);
ts.SetReconnectTime(1); 
ts.SetMaxIdleTime(10);      
ts.SetTimerOnOff(true);     
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("viên công kích"); 
ViewState(); 
}  



còn dưới đây là của mem
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 myturn = 0;
byte peturn = 0;

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

/***** Chinh sua ID chu Party o day *****/

uint idchupt = 1728654;


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

public override void MyPartnerAttack()
{
peturn++;
if (peturn == 1)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 1, 2, 10000);
}
if (peturn >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}

public override void BattleStarted()
{
battle_count++;
myturn = 0;
peturn = 0;
}

public override void BattleStoped()
{
AutoEatFood();
ProcessInventoryAction();
CheckDisconnect();
Stop();
}

public override void doRecvQuestion()
{
}
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);
}
public override void NpcDialogMenu(ushort DialogId)
{
debug("Dialog Menu ID="+DialogId.ToString());
}
public override void NpcDialog(ushort DialogId)
{
debug("Dialog ID="+DialogId.ToString());
}
/*********************** Party Stop ************************/
public override void PartyStop(uint playerid)
{
if (playerid == idchupt) {debug("Dis by "+playerid+" dis");ts.Disconnect();}
}


public override void onNPCAppear(ushort npcmapid, int x, int y)
{
}

public override void OnTimer()
{
}
public override void warpFinish()
{
}

public override void Start()
{
debug("Request Party ..........");
ts.RequestParty(idchupt);
}
public override void Stop()
{
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ố con ma : " + ts.Character.ghost ,255) ;
debug("======= Script edit by DucHoang - Copy Right GameVN =======",255) ;
}

public override void PlayerOnline(uint playerid)
{
if (playerid == idchupt) {debug(idchupt + " Is Now Online, RequestParty ......");ts.delay(500);ts.RequestParty(idchupt);}
}

public override void FinishAnswer()
{
}

public override void InitBot()
{
ts.SetReconnectTime(3);
ts.SetMaxIdleTime(15);
AddDropItemList("ThuốcNhấtĐiểm");
AddDropItemList("viênongmật");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
if (ts.Character.mapid==mapid2) {ts.Warp(warpid2);}
Stop();
{debug("Login Okie, Request Party .......");ts.delay(500);ts.RequestParty(idchupt);}
}

mọi người chỉ dùm tui sao nó kô chịu đánh :o :o :o
 
Mã:
[QUOTE=nhocbaton]ko can common van chay dc ban ah`.
[COLOR=Red]cua chu pt.[/COLOR]
neu can vat ko nhat thiet can common ban co the viet ca vao` sprsit cua minh` ^^
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 
string state=""; 
byte pt_count = 0; 

uint tv1 = 0; //là QS luôn 
uint tv2 = 0; 
uint tv3 = 0; 
uint tv4 = 0; 

uint maxpt = 0; //so thanh vien 


public override void MyAttack() 
{ 
CharacterInfo MyChar = ts.Character; 
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000); 
} 
public override void MyPartnerAttack() 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner; 
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 11005); 
} 

public override void BattleStarted() 
{ 
ts.SetTimerOnOff(false); 
} 

public override void BattleStoped() 
{ 
ProcessInventoryAction(); 
AutoEatFood(); 
} 

public override void doRecvQuestion() 
{ 
state="BTQ"; 
} 
public override void ResponseAnswer() 
{ 
int dtime=get_random(1,5); 
debug("Delay "+dtime.ToString()+" before answer."); 
ts.delay(dtime*1000); 
string tmp=ts.LastQuestion.Replace("=?",""); 
int ans=ts.Eval(tmp); 
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]); 
debug("Answer choice:"+ans_index.ToString()); 
ts.Answer(ans_index); 
} 

public override void onPlayerWalk(uint uid, ushort x, ushort y) 
{ 
if (uid > 1 && uid < 501) { 
debug("GM den roi chay thoi",0xFF0000); 
ts.Disconnect(false); 
} 
} 


public override void PartyStop(uint playerid) 
{ 
if (playerid == tv1 || playerid == tv2 || playerid == tv3 || playerid == tv4) {ts.Disconnect();} 
} 


public override void Start() 
{ 
ts.ClickOnNPC(1); 
} 

public override void FinishAnswer() 
{ 
Start(); 
} 

public override void NpcDialogMenu(ushort DialogId) 
{ 
debug("Menu ID="+DialogId.ToString()); 
ts.SendEnd(); 
} 

public override void NpcDialog(ushort DialogId) 
{ 
debug("Dialog ID="+DialogId.ToString()); 
if (DialogId == 12077) 
{ 
ts.ClickOnNPC(1); 
ts.ClickOnNPC(1); 
} 
else {ts.SendEnd();} 
} 

public override void OnTimer() 
{ 
ts.AcceptParty(tv1); 
ts.AcceptParty(tv2); 
ts.AcceptParty(tv3); 
ts.AcceptParty(tv4); 
} 

public override void AcceptedParty(uint playerid) 
{ 
if(playerid == tv1) {ts.Sena(playerid);} 
pt_count++; 
if(pt_count==maxpt){ 
debug(" So thanh vien la : " + pt_count ,0x0000FF); 
Start();} 
else{ 
debug(" So thanh vien la : " + pt_count ,0x0000FF); 
} 
} 

public override void InitBot() 
{ 
ts.SetTimerOnOff(true); 
ts.SetReconnectTime(1); 
ts.SetMaxIdleTime(20); 
debug(" S? con ma : " + ts.Character.ghost ,0xFF0000) ; 
} 

[COLOR=Yellow]MEMDAY[/COLOR]
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 
string state=""; 

uint chupt = 0; //id chu pt 

public override void MyAttack() 
{ 
CharacterInfo MyChar = ts.Character; 
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000); 
} 
public override void MyPartnerAttack() 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner; 
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000); 
} 

public override void BattleStarted() 
{ 
} 

public override void BattleStoped() 
{ 
ProcessInventoryAction(); 
AutoEatFood(); 
} 

public override void doRecvQuestion() 
{ 
state="BTQ"; 
} 
public override void ResponseAnswer() 
{ 
int dtime=get_random(1,5); 
debug("Delay "+dtime.ToString()+" before answer."); 
ts.delay(dtime*1000); 
string tmp=ts.LastQuestion.Replace("=?",""); 
int ans=ts.Eval(tmp); 
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]); 
debug("Answer choice:"+ans_index.ToString()); 
ts.Answer(ans_index); 
} 

public override void onPlayerWalk(uint uid, ushort x, ushort y) 
{ 
if (uid > 1 && uid < 501) { 
debug("GM den roi chay thoi",0xFF0000); 
ts.Disconnect(false); 
} 
} 


public override void PartyStop(uint playerid) 
{ 
if (playerid == chupt) {ts.Disconnect();} 
} 

public override void FinishAnswer() 
{ 
} 

public override void InitBot() 
{ 
ts.SetReconnectTime(1); 
ts.SetMaxIdleTime(20); 
debug(" Số con ma : " + ts.Character.ghost ,0xFF0000) ; 
}[/QUOTE]


cái này của bạn viết ra test thử kô chay được 
các bạn hãy cố gắng viết xong test dùm luôn đi
cứ đinh ninh là chay tốt nhưng mà có chạy đưộc đâu

mà các bác pro cho em hỏi chút xíu
thé bót NPC có phải chỉnh sửa thế nào trong common kô
và chỉnh sửa như thế nào mong các bác chỉ giúp em
hiện tai em muốn bót thang hàn trung và lưu bích
các bác chỉ dùm giúp em Thx  ::)
 
Các pro giúp em với. scrip này mọi người bảo test rui seo em dùng hem được. Nó hông chịu pt hà. Các bác giúp em với. Đây la scrip của mem:

Code :
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 myturn = 0;
byte peturn = 0;

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

/***** Chinh sua ID chu Party o day *****/

uint idchupt = 01505630;

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

/*********************** My Attack *************************/
public override void MyAttack()
{
myturn++;
if (myturn == 1)
{
CharacterInfo MyChar = ts.Character;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 12003);
}
if (myturn >=2)
{
CharacterInfo MyChar = ts.Character;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 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, 1, 2, 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 Stoped ***********************/
public override void BattleStoped()
{
AutoEatFood();
ProcessInventoryAction();
CheckDisconnect();
Stop();
}


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


/******************** 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);
}


/************************ On Timer *************************/
public override void OnTimer()
{
}


/************************* Start ***************************/
public override void Start()
{
debug("Request Party ..........");
ts.RequestParty(idchupt);
}


/************************** Stop ***************************/
public override void Stop()
{
debug("************************************************** **********************",255) ;
debug(" S? tr?n dá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? con ma : " + ts.Character.ghost ,255) ;

}
/********************** Player Online **********************/
public override void PlayerOnline(uint playerid)
{
if (playerid == idchupt) {debug(idchupt + " Is Now Online, RequestParty ......");ts.delay(500);ts.RequestParty(idchupt);}
}

/************************ Init Bot *************************/
public override void InitBot()
{
AddDropItemList("viênongm?t");
AddDropItemList("t?d u?ngthu?c");
AddDropItemList("viên công kích");
Stop();
{debug("Login Okie, Request Party .......");ts.delay(500);ts.RequestParty(idchupt);}
}

Còn đây là của chủ pt

Code:

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 = 12421;
double mapid2 = 12815;
byte warpid1 = 2;
byte warpid2 = 1;



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

uint idmem1 = 816793;
uint idmem2 = 2233821;
uint idmem3 = 00898439;
uint idmem4_sena = 01692347;

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

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

/******************* 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, 2, 17001);
}
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 Stoped ***********************/
public override void BattleStoped()
{
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(500);debug("Đội ngũ đã đầy -> Start");Start();}
}


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


/************************* Start ***************************/
public override void Start()
{
if (ts.Character.mapid == mapid1) {
ts.Walk(622,475);
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("======= Edit by Dong Trac =======",255) ;
}


/********************* Fishish Answer **********************/
public override void FinishAnswer()
{
Start();
}

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

//public override void RequestPartyAcceptFrom(uint playerid)
//{
//if (playerid == idmem1) {ts.delay(300);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Johned team");}
//if (playerid == idmem2) {ts.delay(300);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Johned team");}
//if (playerid == idmem3) {ts.delay(300);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Johned team");}
//if (playerid == idmem4_sena) {ts.delay(300);ts.AcceptParty(playerid);ts.delay(3 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();}
//}


/*********************** 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();}
}

/************************ Init Bot *************************/
public override void InitBot()
{
ts.SetTimerOnOff(true);
if (ts.Character.mapid == mapid2) {ts.Warp(warpid2);}
AddDropItemList("viênongmật");
AddDropItemList("Dâu đỏ");
AddDropItemList("Táo nhỏ");
AddDropItemList("Mật Ý Nhân");
AddDropItemList("Nhị Quoa đầu");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("Táo nhỏ");
AddDropItemList("Bành Bột Mì");
AddDropItemList("viên công kích");
ViewState();
}

Giúp emddi mấy bác.
 
Hu Hu :(( Sao kô ai giúp mình thế này

Cho mình xin cái scrip gà tự bá đồ đi mà


-----Thân-----

Hu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế nàyHu Hu Sao kô ai giúp mình thế này
 
Cho hỏi một chút, tại sao con mình hệ thủy chỉnh skill 11002 xài "Băng Tường" không được, bạn nào biết giúp dùm mình
 
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 songuoi = 00; 
byte DisconFai = 00; 
byte myturn = 0;  
byte peturn = 0;  
byte gm=0; 
uint mem1 = 243045; 
uint mem2 = 99102; 
uint mem3 = 2100835; 
uint quansu = 2064614; 

public override void MyAttack()  
{  
myturn++;  
if (myturn == 1)  
{  
CharacterInfo MyChar = ts.Character;  
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);  
}  
if (myturn >1)  
{  
CharacterInfo MyChar = ts.Character;  
ts.SendAttack(MyChar.Row, MyChar.Col, 1, 2, 17001);  
}  
}  

public override void MyPartnerAttack()  
{  
peturn++;  
if (peturn == 1)  
{  
CharacterInfo MyWarrior = ts.CurrentPartner;  
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);  
}  
if (peturn >1)  
{  
CharacterInfo MyWarrior = ts.CurrentPartner;  
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 1, 2, 17001);  
}  
}  

public override void BattleStarted()  
{  
myturn=0;  
peturn=0;  
}  

public override void BattleStoped() 
{     
ts.delay(1); 
ts.ClickOnNPC(50); 
ts.delay(1); 
ts.ClickOnNPC(50); 
ts.delay(1); 
ts.SendEnd(); 
AutoEatFood(); 
ProcessInventoryAction(); 
} 

public override void doRecvQuestion() 
{ 
} 
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); 
} 
public override void NpcDialogMenu(ushort DialogId) 
{ 
    debug("Dialog Menu ID="+DialogId.ToString()); 
} 
public override void NpcDialog(ushort DialogId) 
{     
    debug("Dialog ID="+DialogId.ToString()); 
    if(DialogId==10183) 
    { 
    ts.delay(1); 
    }  
    else 
    { 
    ts.SendEnd(); 
    } 
} 

public override void onNPCAppear(ushort npcmapid, int x, int y) 
{     
} 
public override void OnTimer() 
{ 
} 

public override void warpFinish() 
{ 
} 

void TruongGiac(){ 
if(songuoi==4){ 
ts.ClickOnNPC(50); 
ts.SendEnd(); 
} 
} 

public override void RequestPartyAcceptFrom(uint PlayerId) 
{ 
if(PlayerId == mem1 || PlayerId == mem2 || PlayerId == mem3 || PlayerId == quansu) 
{  
ts.AcceptParty(PlayerId); 
ts.delay(2000); 
songuoi++; 
ts.delay(1); 
TruongGiac(); 
ts.Sena(quansu); 
} 
} 

public override void PartyStop(uint PlayerId) 
{ 
if(PlayerId == mem1 || PlayerId == mem2 || PlayerId == mem3 || PlayerId == quansu) 
{  
ts.Disconnect(); 
} 
} 

public override void AcceptedParty(uint playerid) 
{ 
} 

public override void Start() 
{ 
} 

public override void Stop() 
{ 
} 
public override void onPlayerWalk(uint uid, ushort x, ushort y) 
{ 
if ((x < 650) && (y < 525)) 
{ 
debug("Co nguoi"); 
ts.Disconnect(); 
} 
}  
public override void PlayerOnline(uint playerid) 
{  
if(playerid>101 && playerid<10000) 
{ 
debug("Game Master Online"); 
ts.Disconnect(); 
} 
} 

public override void FinishAnswer() 
{ 
ts.delay(1000); 
TruongGiac(); 
} 

public override void InitBot() 
{         
    AddDropItemList("viênongmật"); 
    AddDropItemList("tựđ uốngthuốc"); 
    AddDropItemList("viên công kích"); 
}
cho tui hoi-r cai sciprt nay thỉnh thoang pt mới có 2 thằng là nó đánh lun roài
với lại thỉnh thoảng dialog =12215 or 10140 là nó ko đánh nữa
 
Cho xin code send đồ của legn@ đi và chỉ tui đặt nó vào trong script.cs . thanks so much
 
honglinhanh nói:
Mã:
cái này của bạn viết ra test thử kô chay được 
các bạn hãy cố gắng viết xong test dùm luôn đi
cứ đinh ninh là chay tốt nhưng mà có chạy đưộc đâu

mà các bác pro cho em hỏi chút xíu
thé bót NPC có phải chỉnh sửa thế nào trong common kô
và chỉnh sửa như thế nào mong các bác chỉ giúp em
hiện tai em muốn bót thang hàn trung và lưu bích
các bác chỉ dùm giúp em Thx  ::)[/QUOTE]
 moa no cai thang ga` nay`
me may` sao may lai copy ca cai mem vao la tao viet sai mk
tao sai tao bot len chi
 
honglinhanh nói:
mọi người ơi cho tui hỏi cái scrip tui viết như thế này bot lưu bích thiếu cái gì sao nó kô chịu đánh mọi người chỉ dùm tui cho nào sai nha
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_sena = 667227; 

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

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

public override void MyPartnerAttack() 
{ 
peturn++; 
if (peturn == 1) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000); 
} 
if (peturn >= 2) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000); 
} 
} 


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


/********************* Battle Stoped ***********************/ 
public override void BattleStoped() 
{     
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());
ts.SelectChoice(1);  
ts.SendEnd();  
} 


/********************* NPC Dialog ID ***********************/ 
public override void NpcDialog(ushort DialogId) 
{     
debug("Dialog ID = "+DialogId.ToString()); 
if (DialogId == 12121)  
{  
ts.ClickOnNPC(14);  
ts.ClickOnNPC(14);  
}  
else{ ts.SendEnd(); }  
} 


/********************* 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_sena);} 
} 


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


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


/********************** Warp Finish ************************/ 
public override void warpFinish() 
{ 
if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {debug("Party Full -> Start ");Start();} 
} 


/************************* Start ***************************/ 
public override void Start() 
{  
ts.ClickOnNPC(14);  
} 


/************************** 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 bot luu bich edit by giap hong linh - Copy Right GameVN–™ =======",255) ; 
} 


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


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

//public override void RequestPartyAcceptFrom(uint playerid) 
//{ 
//if (playerid == idmem1_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(500);ts.Sena(playerid); pt1 = 1;debug(playerid + " Johned team, Quân Sư = "+playerid);} 
//if (pt1 == 1 ) {debug("Party Full -> Start ");Start();} 
//} 


/************************ Init Bot *************************/ 
public override void InitBot() 
{
ts.SetTimerOnOff(true);
ts.SetReconnectTime(1); 
ts.SetMaxIdleTime(10);      
ts.SetTimerOnOff(true);     
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("viên công kích"); 
ViewState(); 
}  



còn dưới đây là của mem
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 myturn = 0;
byte peturn = 0;

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

/***** Chinh sua ID chu Party o day *****/

uint idchupt = 1728654;


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

public override void MyPartnerAttack()
{
peturn++;
if (peturn == 1)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 1, 2, 10000);
}
if (peturn >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner;
//NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}

public override void BattleStarted()
{
battle_count++;
myturn = 0;
peturn = 0;
}

public override void BattleStoped()
{
AutoEatFood();
ProcessInventoryAction();
CheckDisconnect();
Stop();
}

public override void doRecvQuestion()
{
}
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);
}
public override void NpcDialogMenu(ushort DialogId)
{
debug("Dialog Menu ID="+DialogId.ToString());
}
public override void NpcDialog(ushort DialogId)
{
debug("Dialog ID="+DialogId.ToString());
}
/*********************** Party Stop ************************/
public override void PartyStop(uint playerid)
{
if (playerid == idchupt) {debug("Dis by "+playerid+" dis");ts.Disconnect();}
}


public override void onNPCAppear(ushort npcmapid, int x, int y)
{
}

public override void OnTimer()
{
}
public override void warpFinish()
{
}

public override void Start()
{
debug("Request Party ..........");
ts.RequestParty(idchupt);
}
public override void Stop()
{
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ố con ma : " + ts.Character.ghost ,255) ;
debug("======= Script edit by DucHoang - Copy Right GameVN =======",255) ;
}

public override void PlayerOnline(uint playerid)
{
if (playerid == idchupt) {debug(idchupt + " Is Now Online, RequestParty ......");ts.delay(500);ts.RequestParty(idchupt);}
}

public override void FinishAnswer()
{
}

public override void InitBot()
{
ts.SetReconnectTime(3);
ts.SetMaxIdleTime(15);
AddDropItemList("ThuốcNhấtĐiểm");
AddDropItemList("viênongmật");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
if (ts.Character.mapid==mapid2) {ts.Warp(warpid2);}
Stop();
{debug("Login Okie, Request Party .......");ts.delay(500);ts.RequestParty(idchupt);}
}

mọi người chỉ dùm tui sao nó kô chịu đánh :o :o :o
ban thử dùng crip này xem sao mình đã chỉnh lại rùi nè:
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
string state="";
byte pt_count = 0;

uint tv1 = 0; //là QS luôn
uint tv2 = 0;
uint tv3 = 0;
uint tv4 = 0;

uint maxpt = 0; //so thanh vien


public override void MyAttack()
{
CharacterInfo MyChar = ts.Character;
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);
}
public override void MyPartnerAttack()
{
CharacterInfo MyWarrior = ts.CurrentPartner;
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 11005);
}

public override void BattleStarted()
{
ts.SetTimerOnOff(false);
}

public override void BattleStoped()
{
ProcessInventoryAction();
AutoEatFood();
}

public override void doRecvQuestion()
{
state="BTQ";
}
public override void ResponseAnswer()
{
int dtime=get_random(1,5);
debug("Delay "+dtime.ToString()+" before answer.");
ts.delay(dtime*1000);
string tmp=ts.LastQuestion.Replace("=?","");
int ans=ts.Eval(tmp);
byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
debug("Answer choice:"+ans_index.ToString());
ts.Answer(ans_index);
}

public override void onPlayerWalk(uint uid, ushort x, ushort y)
{
if (uid > 1 && uid < 501) {
debug("GM den roi chay thoi",0xFF0000);
ts.Disconnect(false);
}
}


public override void PartyStop(uint playerid)
{
if (playerid == tv1 || playerid == tv2 || playerid == tv3 || playerid == tv4) {ts.Disconnect();}
}


public override void Start()
{
ts.ClickOnNPC(14);
}

public override void FinishAnswer()
{
Start();
}

public override void NpcDialogMenu(ushort DialogId)
{
debug("Menu ID="+DialogId.ToString());
ts.SelectChoice(1);
ts.SendEnd();
}

public override void NpcDialog(ushort DialogId)
{
debug("Dialog ID="+DialogId.ToString());
if (DialogId == 12121)
{
ts.ClickOnNPC(14);
ts.ClickOnNPC(14);
}
else{ ts.SendEnd(); }
}

public override void OnTimer()
{
ts.AcceptParty(tv1);
ts.AcceptParty(tv2);
ts.AcceptParty(tv3);
ts.AcceptParty(tv4);
}

public override void AcceptedParty(uint playerid)
{
if(playerid == tv1) {ts.Sena(playerid);}
pt_count++;
if(pt_count==maxpt){
debug(" So thanh vien la : " + pt_count ,0x0000FF);
Start();}
else{
debug(" So thanh vien la : " + pt_count ,0x0000FF);
}
}

public override void InitBot()
{
ts.SetTimerOnOff(true);
ts.SetReconnectTime(1);
ts.SetMaxIdleTime(20);
debug(" S? con ma : " + ts.Character.ghost ,0xFF0000) ;
}
 
em dowe dc mà ko bít chỗ dánh pass và vn xin chị dowe hình lên để chỉ em chỗ gõ vn và pass nhé
cám ơn trước nha
 
cho em xin lại cái script bắn tên cho 1 đội gồm 2 người: chủ pt và ws, them 1 script cho 1 acc danh riêng nữa ( danh bình thường với đệ tử) thx nhiu, đừng xóa bài em ^_^
 
Status
Không mở trả lời sau này.
Back
Top