Script Legn@ Full !

Status
Không mở trả lời sau này.
common của acc bàn hàng
PHP:
 void FindItemSale(uint Iid,byte num) 
{  
    for(byte i=0;i< 25;i++) 
    {  
        Slot oSlot = (Slot)ts.MyItems[i];  
        if( oSlot.itemid == 0 ) 
        { 
            continue; 
        } 
        if(oSlot.itemid == Iid && oSlot.num == num) 
        { 
            Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
            ts.Sell(oSlot.slot,num); 
            debug("Sell " + oItem + " amount " + num , 0xC08008);  
        } 
    } 
}

sc tạp hóa ở TQ nha
PHP:
double TimeSale = 0; 

public override void OnTimer() 
{ 
    TimeSale++; 
    if (TimeSale % 100 == 0) 
    { 
        FindItemSale( 26018, 50); 

        FindItemSale( 26116, 50); 
        FindItemSale( 26050, 50); 
        FindItemSale( 26066, 50); 
        FindItemSale( 26033, 50); 
        FindItemSale( 26158, 50); 
        FindItemSale( 26078, 50); 
        FindItemSale( 26020, 50); 
        FindItemSale( 26003, 50); 
        FindItemSale( 26100, 50); 
        FindItemSale( 26101, 50); 
        FindItemSale( 46033, 50); 
        FindItemSale( 46027, 50); 
        FindItemSale( 26165, 50); 
        FindItemSale( 46041, 50); 
        FindItemSale( 46013, 50); 
        FindItemSale( 46016, 50); 
    } 
} 

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

public override void NpcDialogMenu(ushort DialogId)  
{  
    debug("Dialog Menu ID = "+ DialogId.ToString()); 
    ts.SelectChoice(2); 
    ts.SendEnd(); 
} 
public override void Stop()
{ 
for(byte i=0;i<25;i++){ 
Slot oSlot = (Slot)ts.MyItems[i]; 
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
if(oSlot.itemid == 0){ continue; }  
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0); 
} 
}  
public override void InitBot() 
{ 
    ts.SetTimerOnOff(true); 
    ts.ClickOnNPC(7); 
}

còn đây là sc ở tiệm thuốc
PHP:
double TimeSale = 0; 

public override void OnTimer() 
{ 
    TimeSale++; 
    if(TimeSale % 200 == 0)
{
 FindItemSale( 27029, 50); 
FindItemSale( 27005, 50); 
FindItemSale( 27035, 50); 
FindItemSale( 27022, 50); 
FindItemSale( 27068, 50); 
FindItemSale( 27004, 50); 
FindItemSale( 27034, 50);
FindItemSale( 27003, 50); 
FindItemSale( 27032, 50); 
FindItemSale( 27047, 50); 

 

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

public override void NpcDialogMenu(ushort DialogId)  
{  
    debug("Dialog Menu ID = "+ DialogId.ToString()); 
    ts.SelectChoice(2); 
    ts.SendEnd(); 
} 
public override void Stop()
{ 
for(byte i=0;i<25;i++){ 
Slot oSlot = (Slot)ts.MyItems[i]; 
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
if(oSlot.itemid == 0){ continue; }  
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0); 
} 
}  
public override void InitBot() 
{ 
    ts.SetTimerOnOff(true); 
    ts.ClickOnNPC(1); 
}
 
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; 
double TimeSale = 0;  

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

byte battle_count = 0;  

byte myturn = 0;  
byte peturn = 0;  


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

uint idchupt = 75740;  

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

/*********************** My Attack *************************/  
public override void MyAttack()  
{     
myturn++;  
if (myturn == 1)  
{  
CharacterInfo MyChar = ts.Character;   
//NPCCombatObject Monster = findMonster();      
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 13002);      
}  
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, 10000);  
}  
if (peturn >= 2)  
{  
CharacterInfo MyWarrior = ts.CurrentPartner;   
//NPCCombatObject Monster = findMonster();      
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);  
}  
}  


/********************* 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()  
{ 
   TimeSale++;  
    if (TimeSale % 200 == 0)  
    {  
           FindItemSale (46027, 50); 
        FindItemSale (26168, 50);  
    FindItemSale (46016, 50);  
    FindItemSale (46027, 50);  
    FindItemSale (26082, 50); 
    FindItemSale (48005, 50); 
    FindItemSale (46013, 50); 
    } 
}  

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

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

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


/************************** Stop ***************************/  
public override void Stop()  
{   
for(byte i=0;i<25;i++){   
Slot oSlot = (Slot)ts.MyItems[i];   
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];   
if(oSlot.itemid == 0){ continue; }    
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0);   
}   
}   

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

/*********************** Party Stop ************************/ 
public override void PartyStop(uint playerid) 
{ 
if (playerid == idchupt) {debug("Dis by "+playerid+" dis");ts.Disconnect();} 
} 

/************************ Init Bot *************************/  
public override void InitBot()  
{          
    ts.SetTimerOnOff(true);  
    ts.ClickOnNPC(2); 
AddDropItemList("Măng khô"); 
AddDropItemList("Thuốc Bổ Huyết "); 
AddDropItemList("tựđ uốngthuốc");  
AddDropItemList("viên công kích");  
AddDropItemList("ThuốcNhấtĐiểm");   
AutoEatFood(); 
Stop();  
{debug("Login Okie, Request Party .......");ts.delay(500);ts.RequestParty(idchupt);}  
}
ai bảo cái này ko xài được , cứ copy rồi paste thì ko có cái nào xài được đâu
 
BÁC NÀO CÓ THỂ SHARE CÁI SCRIPT HỨA CHU BÊN THÀNH HỨA SƯƠNG EM XIN CẢM ƠN NHIỀU LẮM , CON HỨA CHU EM NGHIỀN QUÁ TÌM VÀ HỎI BAO NGƯỜI MÀ HỌ CHẢ CHO, CÁC BÁC PRO CÓ THỂ CHO EM XIN 1 BẢN SCRIPT ĐƯỢC KHÔNG VẬY, MÀ TẠI SAO CÁC BÁC LẠI CỮ GIỮ CÁI SC HỨA CHỦ VÀ TÀO THÁO VẬY, HIX CỨ HỎI VỀ TÀO THÁO VÀ HỨA CHU LÀ KHÔNG CÓ THẤY ĐƯỢC HỒI ÂM
 
to: #lucky#
Bạn ơi trong SC phải có tọa dộ cho nó chạy nha.
Mình không biết bạn train ở đâu, VD như ở LLK thì bạn phải có thêm như sau:

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 *****/

Cái chỗ Double mapid1, double map2, byte warpid1 và byte warpid 2 là khác nhau cho từng vị trí train nhé.
Have fun with TSVN.
 
:(( mấy pác ơi hôm wa tự nhiên down sever xong cái Len@ nó hết party luôn òi :( ai bít cách cho nó pảty thì chỉ em với
 
có cái script nào cho mem ở turn 2 cất tôn trọng vào ko ???? đi 2 gà 3 tôn trọng thử coi được nhiêu điểm :D :D
 
ac4demy_07 nói:
common của acc bàn hàng
PHP:
 void FindItemSale(uint Iid,byte num) 
{  
    for(byte i=0;i< 25;i++) 
    {  
        Slot oSlot = (Slot)ts.MyItems[i];  
        if( oSlot.itemid == 0 ) 
        { 
            continue; 
        } 
        if(oSlot.itemid == Iid && oSlot.num == num) 
        { 
            Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
            ts.Sell(oSlot.slot,num); 
            debug("Sell " + oItem + " amount " + num , 0xC08008);  
        } 
    } 
}

sc tạp hóa ở TQ nha
PHP:
double TimeSale = 0; 

public override void OnTimer() 
{ 
    TimeSale++; 
    if (TimeSale % 100 == 0) 
    { 
        FindItemSale( 26018, 50); 

        FindItemSale( 26116, 50); 
        FindItemSale( 26050, 50); 
        FindItemSale( 26066, 50); 
        FindItemSale( 26033, 50); 
        FindItemSale( 26158, 50); 
        FindItemSale( 26078, 50); 
        FindItemSale( 26020, 50); 
        FindItemSale( 26003, 50); 
        FindItemSale( 26100, 50); 
        FindItemSale( 26101, 50); 
        FindItemSale( 46033, 50); 
        FindItemSale( 46027, 50); 
        FindItemSale( 26165, 50); 
        FindItemSale( 46041, 50); 
        FindItemSale( 46013, 50); 
        FindItemSale( 46016, 50); 
    } 
} 

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

public override void NpcDialogMenu(ushort DialogId)  
{  
    debug("Dialog Menu ID = "+ DialogId.ToString()); 
    ts.SelectChoice(2); 
    ts.SendEnd(); 
} 
public override void Stop()
{ 
for(byte i=0;i<25;i++){ 
Slot oSlot = (Slot)ts.MyItems[i]; 
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
if(oSlot.itemid == 0){ continue; }  
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0); 
} 
}  
public override void InitBot() 
{ 
    ts.SetTimerOnOff(true); 
    ts.ClickOnNPC(7); 
}

còn đây là sc ở tiệm thuốc
PHP:
double TimeSale = 0; 

public override void OnTimer() 
{ 
    TimeSale++; 
    if(TimeSale % 200 == 0)
{
 FindItemSale( 27029, 50); 
FindItemSale( 27005, 50); 
FindItemSale( 27035, 50); 
FindItemSale( 27022, 50); 
FindItemSale( 27068, 50); 
FindItemSale( 27004, 50); 
FindItemSale( 27034, 50);
FindItemSale( 27003, 50); 
FindItemSale( 27032, 50); 
FindItemSale( 27047, 50); 

 

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

public override void NpcDialogMenu(ushort DialogId)  
{  
    debug("Dialog Menu ID = "+ DialogId.ToString()); 
    ts.SelectChoice(2); 
    ts.SendEnd(); 
} 
public override void Stop()
{ 
for(byte i=0;i<25;i++){ 
Slot oSlot = (Slot)ts.MyItems[i]; 
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
if(oSlot.itemid == 0){ continue; }  
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0); 
} 
}  
public override void InitBot() 
{ 
    ts.SetTimerOnOff(true); 
    ts.ClickOnNPC(1); 
}
ko có cố ý khi trích dẫn dài như vậy làm rối mắt anh em , nhưng muốn hỏi là đây là con nhận đồ và bán phải ko ?? Vạy bên con chủ send qua thì chỉnh sủa sao vậy ???
 
tui send cho ban cái common này bạn cú copy vào common của bản bot
là oki thôi
đây là common send đồ ne` cứ copy dè lên common bạn đang dùng là oki
NPCCombatObject findMonster()
{
int maxhp = 0;
string mi = "";
foreach (NPCCombatObject onpc in ts.oNPCCombat.Values)
{
if (onpc.HP > 0)
{
if (onpc.MAXHP > maxhp)
{
maxhp = onpc.MAXHP;
mi = onpc.Row.ToString() + onpc.Col.ToString();
}
}
}
return ts.oNPCCombat[mi] as NPCCombatObject;
}
void doEatSP(ushort order,int difSp){
for(byte i = 0;i< 25 ;i++){
Slot oSlot = (Slot)ts.MyItems;
if (oSlot.itemid == 0) { continue; }
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];

if(oItem.isSPItem()){
int itemvalue=oItem.getSPValue();
if (itemvalue > difSp){ continue; }
byte eatSpAmt = (byte)((difSp - (difSp % itemvalue)) / itemvalue);
if (eatSpAmt> 0){
if (eatSpAmt > oSlot.num){
eatSpAmt = oSlot.num;
}
ts.EatItem((byte)(i+1),eatSpAmt,order) ;
debug(oItem.itemname+" SP "+itemvalue+" at slot "+((byte)(i+1)).ToString()+" decrease"+eatSpAmt ,0xC08008 );
difSp = difSp - eatSpAmt * itemvalue ;
}
}
}
ts.delay(500);
}
void doEatHP(ushort order,int difHp){
for(byte i = 0;i< 25 ;i++){
Slot oSlot = (Slot)ts.MyItems;
if (oSlot.itemid == 0) { continue; }
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];

if(oItem.isHPItem()){
int itemvalue=oItem.getHPValue();
if (itemvalue > difHp){ continue; }
byte eatHpAmt = (byte)((difHp - (difHp % itemvalue)) / itemvalue );
if (eatHpAmt> 0){
if (eatHpAmt > oSlot.num){
eatHpAmt = oSlot.num;
}
ts.EatItem((byte)(i+1),eatHpAmt,order);
debug(oItem.itemname + " HP " + itemvalue.ToString() + " at slot " + ((byte)(i+1)).ToString() + " decrease " + eatHpAmt.ToString() ,0xC08008 );
difHp = difHp - eatHpAmt * itemvalue ;
}
}
}
ts.delay(500);
}

void FindItemContribute(string ItemName){
Slot s = FindItemInSlot(ItemName);
if(s != null){
ts.Contribute(s.slot);
}
}

void FindItemDrop(string ItemName){
Slot s = FindItemInSlot(ItemName);
if(s != null){
ts.DropItem(s.slot,s.num);
}
}

Slot FindItemInSlot(string ItemName){
for(byte i=0;i<25;i++){
Slot oSlot = (Slot)ts.MyItems;
if( oSlot.itemid == 0){ continue; }
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
if(oItem.itemname == ItemName){
return oSlot;
}
}
return null;
}

void AutoEatFood(){
if (ts.Character.HP < (ts.Character.MAXHP * hpFractionEat)){
doEatHP(0,(int)((ts.Character.MAXHP * hpFraction)-ts.Character.HP));
}
if (ts.Character.SP < (ts.Character.MAXSP * spFractionEat)){
doEatSP(0,(int)((ts.Character.MAXSP * spFraction)-ts.Character.SP));
}
if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFractionEat)){
doEatHP((ushort)ts.CurrentPartner.Order,(int)((ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP));
}
if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFractionEat)){
doEatSP((ushort)ts.CurrentPartner.Order,(int)((ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP));
}
}


int get_random(int min,int max)
{
System.Random rd=new System.Random();
int ranNum= rd.Next(min,max);
return ranNum;
}


void Disconnect(string msg) {
debug(msg,0x0000FF);
ts.Disconnect();
}

void CheckDisconnect(){
if(ts.Character.HP< (DisconnectFlag * ts.Character.MAXHP)){
Disconnect("Disconnected : Character HP is low !!");
}

if(ts.CurrentPartner.HP< (DisconnectFlag * ts.CurrentPartner.MAXHP)){
Disconnect("Disconnected : Warrior HP is low !!");
}

if(ts.CurrentPartner.fai < DisconFai){
Disconnect("Disconnected : Warrior faith is below faith flag !!");
}
}

System.Collections.ArrayList DropItemList = new System.Collections.ArrayList();
System.Collections.ArrayList ContributeItemList = new System.Collections.ArrayList();

void AddDropItemList(string itemname) {
if (!DropItemList.Contains(itemname)) {
DropItemList.Add(itemname);
}
}

bool InDropItemList(string itemname) {
if (DropItemList.Contains(itemname))
return true;
else
return false;
}

void AddContributeItemList(string itemname) {
if (!ContributeItemList.Contains(itemname)) {
ContributeItemList.Add(itemname);
}
}

bool InContributeItemList(string itemname) {
if (ContributeItemList.Contains(itemname))
return true;
else
return false;
}

void ProcessInventoryAction(){
for(byte i=0;i<25;i++){
Slot oSlot = (Slot)ts.MyItems;
if( oSlot.itemid == 0){ continue; }
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
if((oSlot.itemid == 46041 ||
oSlot.itemid == 46013 ||
oSlot.itemid == 46033 ||
oSlot.itemid == 46027 ||
oSlot.itemid == 26082 ||
oSlot.itemid == 46069 ||
oSlot.itemid == 46016 ||
oSlot.itemid == 26168 ) && oSlot.num == 50)
ts.SendItemTo(*******,oSlot.slot,oSlot.num); // nha` buon


if((oSlot.itemid == 27035 ||
oSlot.itemid == 27066 ||
oSlot.itemid == 27005 ||
oSlot.itemid == 27032 ||
oSlot.itemid == 27022 ||
oSlot.itemid == 27029 ) && oSlot.num == 50)
ts.SendItemTo(*******,oSlot.slot,oSlot.num); // tiem. thuoc

if((oSlot.itemid == 26157 ) && oSlot.num == 50)
ts.SendItemTo(*******,oSlot.slot,oSlot.num); // id nguoi nhan thu 3

}
for(byte i=0;i<25;i++){
Slot oSlot = (Slot)ts.MyItems;
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
if(oSlot.itemid == 0){ continue; }
debug("Item " + oItem.itemname + " at " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0xC08008);
}
}

bạn chú ý khi sửa ******* là ID của người nhận nha là con bán hàng đó
còn ID người nhận là phần bạn send sp cho con QS
bạn hãy sửa lại ID đồ mà bạn send cho con bán đồ nha
bạn copy common này vào rồi
đánh thử mấy trận trên màn hình legan sẽ hiện lên ID của đồ vật bạn hãy đánh những ID đồ vật muốn send vào các số ID đồ vật send ở trên chúc bạn thành công mong các bạn có những khoản tiền bán hàng lớn như tôi ^^
 
Có bạn nào sửa dùm mình cái Script TV này ko, no pt xong rồi nhưng ko đánh bị đứng yên 1 chỗ à
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 = 1; 
byte pt4 = 0; 

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

uint idmem1 = ; 
uint idmem2 = ; 
uint idmem3 = ; 
uint idmem4_sena = ; 

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

/*********************** 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, 10000);     
} 
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, 10000); 
} 
if (peturn >= 2) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner;  
//NPCCombatObject Monster = findMonster();     
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 12003); 
} 
} 


/********************* 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.delay(2000); 
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()); 
     if(DialogId==15429) {ts.SendEnd();} 
else if(DialogId==15661) {ts.ClickOnNPC(4);}  
else if(DialogId==15657) {ts.ClickOnNPC(4);} 
} 


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


/************************** 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 SsKokichisS - Hoang Cai server =======",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) {ts.delay(1500);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"); 
AddDropItemList("Mật Ý Nhân "); 
AddDropItemList("Rượu Đại Khúc "); 
AddDropItemList("Táo đỏ ");
AddDropItemList("ThuốcĐịnhNguyên "); 
AutoEatFood(); 
ViewState(); 
}
 
*Jet007* nói:
:(( hic hic mọi người ko cho tui post kìa
Páo chù = 1 script Bot Trương Hợp :D
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 = 317770;

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

/*********************** 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, 14002);	
}
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, 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 **********************/
public override void NpcDialogMenu(ushort DialogId)
{
debug("Dialog Menu ID = "+DialogId.ToString());
if(DialogId==1) {ts.SelectChoice(3);ts.SendEnd();}
}


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

}


/********************* 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.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}
if (playerid == idmem2)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}
if (playerid == idmem3)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}
if (playerid == idmem4_sena) {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}
}


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


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


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



/**************** 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(500);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.SetReconnectTime(3);
ts.SetMaxIdleTime(15);
ts.SetTimerOnOff(true);		
AddDropItemList("viênongmật");
AddDropItemList("tựđ uốngthuốc");
AddDropItemList("viên công kích");
AutoEatFood();
ViewState();
}
Với script này thì sau khi gắp BTQ sẽ dis, sau đó auto RC lại bem típ :D


Nhưng sao không chạy được vậy. Bạn vui lòng xem lại di
 
PHP:
 tưởng kham + đổng trạc cùng 1 chỗ 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 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 = 15000;  
double mapid2 = 18801; 
byte warpid1 = 25; 
byte warpid2 = 1; 

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

uint idmem1 = 11111111; 
uint idmem2 = 22222222; 
uint idmem3 = 22222222;
uint idmem4_sena = 33333333; 

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

/*********************** 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, 2, 2, 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, 10000); 
} 
if (peturn >= 2) 
{ 
CharacterInfo MyWarrior = ts.CurrentPartner; 
//NPCCombatObject Monster = findMonster(); 
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 0, 10000); 
} 
} 


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


/********************* Battle Stoped ***********************/ 
public override void BattleStoped() 
{ 
AutoEatFood(); 
ProcessInventoryAction(); 
CheckDisconnect(); 
ViewState(); 
ts.SendEnd();
} 


/******************* 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(idmem2);} 
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(1588,1975);
ts.Warp(warpid1); 
ts.SendEnd();
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); 
ts.delay(1000);
if (ts.Character.mapid == mapid2) {ts.Warp(warpid2);} 
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("viên công kích"); 
ViewState(); 
}
 
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 = 30; // 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; 


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

uint idmem1 = ; 
uint idmem2 = ; 
uint idmem3 = ; 
uint idmem4_sena = ; 

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

/*********************** 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, 10000); 
} 
if (myturn >=2) 
{ 
CharacterInfo MyChar = ts.Character; 
//NPCCombatObject Monster = findMonster(); 
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 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, 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 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()); 
if(DialogId == 12130) 
{ 
ts.ClickOnNPC(50); 
ts.ClickOnNPC(50); 
ts.SendEnd(); 
return; 
}
if(DialogId == 10183) 
{ 
ts.ClickOnNPC(50); 
ts.ClickOnNPC(50); 
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);} 
} 

/************* Click on NPC *********************/
void TruongGiac(){ 
ts.ClickOnNPC(50); 
ts.delay(500);
ts.SendEnd(); 
} 

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


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


/************************** 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 DKQV (Develop form Gamevn) =======",255) ; 
} 


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


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


/************************ Init Bot *************************/ 
public override void InitBot() 
{ 
ts.SetReconnectTime(3); 
ts.SetMaxIdleTime(10);
ts.SetTimerOnOff(true); 
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("viên công kích"); 
ViewState(); 
}
Mình đang sài cái Script này mà gặp BTQ thì chủ pt bị dis ==> chủ pt ăn ma còn 4 mem thì ko sao ai chỉ mình sửa lại cho nó gặp BTQ thì ko dis nữa..
 
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 songuoi = 00; 
byte DisconFai = 00; 
byte myturn = 0;  
byte peturn = 0;  
byte gm=0;
byte pt1 = 0; 
byte pt2 = 0; 
byte pt3 = 0; 
byte pt4 = 0; 
uint mem1 = 2179081; 
uint mem2 = 83548; 
uint mem3 = 1489632; 
uint quansu = 383400; 

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

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 BattleStopped() 
{ 
ts.delay(1); 
ts.ClickOnNPC(50); 
ts.delay(1); 
ts.ClickOnNPC(50); 
ts.delay(1); 
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); 
} 
} 

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() 
{
ts.ClickOnNPC(50); 
} 

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

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

public override void InitBot() 
{ 
AddDropItemList("viênongmật"); 
AddDropItemList("tựđ uốngthuốc"); 
AddDropItemList("viên công kích");
AddDropItemList("Quả Đào");
AddDropItemList(" NướcLiệuThương"); 

}
Cái này của legna cũ hay mới vậy bạn
 
Script gate Tưởng Khăm, Đinh Phụng, Lữ Phạm:
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 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 = 15000;  
double mapid2 = 18000; 
byte warpid1 = 26; 
byte warpid2 = 30;  

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

uint idmem1 = 111111111;
uint idmem2 = 11111111;
uint idmem3 = 1111111;
uint idmem4_sena = 1111111;

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

/*********************** 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, 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, 2, 12003);
}
if (peturn >= 2)
{
CharacterInfo MyWarrior = ts.CurrentPartner; 
//NPCCombatObject Monster = findMonster();    
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 10000);
}
}


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


/********************* Battle Stoped ***********************/
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(819,2594);
ts.Warp(warpid1); 
return; 
} else 
if (ts.Character.mapid == mapid2) {  
ts.Warp(warpid2); 
return; 
}  
}  



/************************** Stop ***************************/
public override void Stop()
{
for(byte i=0;i<25;i++){  
Slot oSlot = (Slot)ts.MyItems[i];  
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];  
if(oSlot.itemid == 0){ continue; }   
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0);  
}  

}

/*********************** 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 zFantasy - 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(500);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);    
ViewState();
}
 
Trương Giác good

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 count=0;// Thêm dòng này vào <------------------------------------------------------------------ 
byte NS_count = 0;    
byte battle_count = 0;  

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

uint idchupt = 01027156;  

/***** Chinh sua ID Member o day *****/   
uint idmem1 = 873280;   
uint idmem2 = 1035539;   
uint idmem3 = 382438;   
uint idmem4_sena = 607017;   

public override void MyAttack()  
{     
    CharacterInfo MyChar = ts.Character;   
    //NPCCombatObject Monster = findMonster();      
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 17001);      
}  

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


/********************* Battle Started **********************/   
public override void BattleStarted()  
{      
    battle_count++; 
}  


/********************* Battle Stopped ***********************/   
public override void BattleStopped()  
{   
    AutoEatFood(); 
    count=0;// Thêm dòng này vào <--------------------------------------------------------------- 

    ProcessInventoryAction();   

    ViewState(); 
     
    ts.ClickOnNPC(50);ts.ClickOnNPC(50); 

             //ts.Chat(4, "G M ơi, tôi đang bot TG nè"); // Nhớ xóa cái này <----------------------------------- 
} 


/******************* 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());  
    if(DialogId == 10140){ts.SendEnd();} 
    if(DialogId == 12215){ts.SendEnd();} 
    if(DialogId == 12119){ts.SendEnd();}    
}   

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

void ViewState()    
{    
    debug("*********************************************************************",255) ;     
    debug(" Số trận đánh : " + battle_count ,255) ;       
    debug(" Số lần gặp BTQ : "+ NS_count +"  Số con ma : " + ts.Character.ghost ,255) ;    
    debug("======= Edit by Son Hai - http://diendankp7.net =======",255) ;     
} 

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

/**************** Request Party Accept From ****************/  
public override void RequestPartyAcceptFrom(uint playerid)  
{  
    if (playerid == idmem1) {ts.delay(500);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Mời Gia Nhập Đội Ngũ");}  

    if (playerid == idmem2) {ts.delay(500);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Mời Gia Nhập Đội Ngũ");}  

    if (playerid == idmem3) {ts.delay(500);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Mời Gia Nhập Đội Ngũ");}  

    if (playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.Sena(playerid); pt4 = 1;debug(playerid + " Mời Gia Nhập Đội Ngũ và được làm QS");}  

    if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {ts.delay(500);debug("Đủ gùi Bem thui");Start();}  
}   

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

/*********************** Party Stop ************************/  
public override void PartyStop(uint playerid)  
{ 
    if (playerid == idmem1) {debug(playerid+ "Rời khởi đội ngũ");ts.Disconnect();}  

    if (playerid == idmem2) {debug(playerid+ "Rời khởi đội ngũ");ts.Disconnect();}  

    if (playerid == idmem3) {debug(playerid+ "Rời khởi đội ngũ");ts.Disconnect();}  

    if (playerid == idmem4_sena) {debug(playerid+ "Rời khởi đội ngũ");ts.Disconnect();}  
}  
// Dòng sau đây có nghĩa là trong 10s sẽ click vào thùng 1 lần <------------------------------------------- 

public override void OnTimer(){ 
            if (count%10==0) // <~~~~ Sửa thành 10 nha. 10s click 1lần
                     Start(); 
} 

/************************ Init Bot *************************/   
public override void InitBot()   
{  
     
    ts.SetReconnectTime(1);  
    OnTimer(); //<~~~~~~Đây. mở OnTimer lên
    ts.SetMaxIdleTime(5);       
     
    ViewState(); 

    Stop(); 
}
 
ai cho em hỏi thuật đào tẩu mã la so mấy vậy
PHP:
ID = 10000:"Attack":SP = 0 
ID = 10001:"Throw Stone":SP = 9 
ID = 10002:"Trunk Charge":SP = 13 
ID = 10003:"Trap":SP = 14 
ID = 10004:"Wood Spirit":SP = 18 
ID = 10005:"Shooting Stone":SP = 22 
ID = 10006:"Grim Tooth":SP = 28 
ID = 10007:"Rolling Stone":SP = 34 
ID = 10008:"Sand Storm":SP = 38 
ID = 10009:"Deactivate Shield":SP = 10 
ID = 10010:"Activate Shield":SP = 33 
ID = 10011:"Mountain Press":SP = 40 
ID = 10012:"Earthquake":SP = 50 
ID = 10013:"Stampede":SP = 45 
ID = 10014:"Deactivate Reflect":SP = 10 
ID = 10015:"Reflect":SP = 40 
ID = 11001:"Drown":SP = 8 
ID = 11002:"Ice Wall":SP = 11 
ID = 11003:"Ice Scimitar":SP = 12 
ID = 11004:"Healing Stream":SP = 22 
ID = 11005:"Power Geyser":SP = 18 
ID = 11006:"SP Recovery":SP = 35 
ID = 11007:"Heal":SP = 35 
ID = 11008:"Flood ":SP = 26 
ID = 11009:"Full SP Recovery":SP = 40 
ID = 11010:"Full Heal":SP = 42 
ID = 11011:"Hailstone":SP = 32 
ID = 11012:"Esuna":SP = 15 
ID = 11013:"Resurrection ":SP = 40 
ID = 11014:"Freeze":SP = 40 
ID = 11015:"Defrost":SP = 10 
ID = 12001:"Start Fire":SP = 9 
ID = 12002:"Flame":SP = 12 
ID = 12003:"Fire Arrow":SP = 15 
ID = 12004:"Fire Ball":SP = 22 
ID = 12005:"Fire Wheel":SP = 22 
ID = 12006:"Deathblow":SP = 24 
ID = 12007:"Flamedance":SP = 30 
ID = 12008:"Flame Tornado":SP = 30 
ID = 12009:"Flame Saber":SP = 30 
ID = 12010:"Drake Inferno":SP = 37 
ID = 12011:"Inferno Wheel":SP = 37 
ID = 12012:"Flame Strike":SP = 46 
ID = 12013:"Breath of Fire":SP = 50 
ID = 12014:"Reign of Fire":SP = 60 
ID = 12015:"Nova":SP = 50 
ID = 13001:"Wind":SP = 9 
ID = 13002:"Whirlwind":SP = 15 
ID = 13003:"Wind Walk":SP = 13 
ID = 13004:"Violent Gale":SP = 23 
ID = 13005:"Invisibility":SP = 22 
ID = 13006:"Typhoon":SP = 30 
ID = 13007:"Stun Strike":SP = 31 
ID = 13008:"Replication":SP = 38 
ID = 13009:"Tornado":SP = 40 
ID = 13010:"Combo Attack":SP = 40 
ID = 13011:"Mini":SP = 33 
ID = 13012:"Magnify":SP = 33 
ID = 13013:"Random Hit":SP = 49 
ID = 13014:"Healing Breeze":SP = 45 
ID = 14001:"Scan ":SP = 0 
ID = 14002:"Flee":SP = 10 //Ðào t?u
ID = 14003:"Bazaar":SP = 0 
ID = 14004:"Excavation":SP = 0 
ID = 14005:"Alchemy":SP = 0 
ID = 14006:"Shout":SP = 20 
ID = 14007:"Awakening":SP = 5 
ID = 14008:"Slumber":SP = 15 
ID = 14009:"Recruit":SP = 0 
ID = 14010:"Mining":SP = 0 
ID = 14011:"Forging":SP = 0 
ID = 14012:"Cooperate":SP = 36 
ID = 14013:"Cheer":SP = 36 
ID = 14014:"Antidote":SP = 8 
ID = 14015:"Envenom ":SP = 25 
ID = 14016:"Trade":SP = 0 
ID = 14017:"Sit":SP = 0 
ID = 14018:"Deep Prospecting":SP = 0 
ID = 14019:"Creation":SP = 0 
ID = 14020:"Confuse":SP = 30 
ID = 14021:"Blind":SP = 25 
ID = 14022:"Eye Drops":SP = 10 
ID = 14023:"Riding":SP = 0 
ID = 14024:"Hocus Pokus":SP = 20 
ID = 14025:"Mug":SP = 0 
ID = 10016:"Golem":SP = 120 
ID = 11016:"Shiva ":SP = 120 
ID = 12016:"Phoenix":SP = 120 
ID = 13015:"Wood Dragon":SP = 120 
ID = 14026:"Summon":SP = 0 
ID = 14027:"Mentor":SP = 0 
ID = 14028:"Teamwork":SP = 0 
ID = 14029:"Gypsy's Bomb":SP = 60 
ID = 14030:"Gypsy's Crush":SP = 80 
ID = 10017:"Stone Golem":SP = 120 
ID = 10018:"Rock Golem":SP = 120 
ID = 10019:"Golem":SP = 120 
ID = 11017:"Lady of Lake":SP = 120 
ID = 11018:"Goddess of Stream":SP = 120 
ID = 11019:"Shiva ":SP = 120 
ID = 12017:"Pyro Fly":SP = 120 
ID = 12018:"Fire Bird":SP = 120 
ID = 12019:"Phoenix":SP = 120 
ID = 13016:"Leaf Lizard":SP = 120 
ID = 13017:"Grass Serpeant":SP = 120 
ID = 13018:"Wood Dragon":SP = 120 
ID = 15001:"Capture":SP = 0 
ID = 15002:"Net":SP = 0 
ID = 15003:"Net Success":SP = 0 
ID = 16001:"Arrow Tower":SP = 0 
ID = 17001:"Defend":SP = 0 
ID = 18001:"Escape ":SP = 0 // <----- dao tau
ID = 18002:"Escape Fail":SP = 0 
ID = 19001:"Item":SP = 0 
ID = 20001:"Vampiric Tree":SP = 0 
ID = 20002:"Poisoned":SP = 0 
ID = 20003:"Deflect Harm":SP = 0 
ID = 20004:"Disastrous Phantom":SP = 0 
ID = 20005:"God of Luck":SP = 0 
ID = 20006:"Protect":SP = 0 
ID = 20007:"Deactivate Protect":SP = 0 
ID = 20008:"Amulet ":SP = 0 
ID = 20009:"Siege Ram":SP = 0 
ID = 20010:"Blade Truck":SP = 0 
ID = 20011:"Arbalest ":SP = 0 
ID = 20012:"Catapult":SP = 0 
ID = 20013:"Fence/ Arrow Tower":SP = 0 
ID = 20014:"Quad Darkness":SP = 60 
ID = 20015:"Quad Esuna":SP = 60 
ID = 20016:"Head of Dragon":SP = 40 
ID = 20017:"Right Claw":SP = 40 
ID = 20018:"Left Talon ":SP = 40
:hug: :hug:
 
đây nè chỉ cần đổi chỗ đó thôi
/* Cu Loc */
var mapid1 = 12521;
var mapid2 = 12013;
var warpid1 = 5;
var warpid2 = 1;

/* TrieuChi */
var mapid1 = 11000; //Demo
var mapid2 = 12000;
var warpid1 = 1;
var warpid2 = 30;

/* lu long khau cua trong */
var mapid1 = 12815; //Demo
var mapid2 = 12421;
var warpid1 = 1;
var warpid2 = 2;

/* lu long khau cua ngoai */
var mapid1 = 12421; //Demo
var mapid2 = 12000;
var warpid1 = 1;
var warpid2 = 10;

/* hung no */
var mapid1 = 12432; //Demo
var mapid2 = 12431;
var warpid1 = 1;
var warpid2 = 4;

/* HCDT */
var mapid1 = 12301; //Demo
var mapid2 = 12063;
var warpid1 = 1;
var warpid2 = 2;

/*cua 1 Nha Quan*/
var mapid1 = 12431; //Demo
var mapid2 = 12000;
var warpid1 = 1;
var warpid2 = 11;

/*Ma Thang*/
var mapid1 = 14412; //Demo
var mapid2 = 14411;
var warpid1 = 1;
var warpid2 = 2;

/*Gioi Kieu*/
var mapid1 = 12431; //Demo
var mapid2 = 12000;
var warpid1 = 1;
var warpid2 = 16;

/*Lang Trieu Van*/ (danh 1 minh TV)
var mapid1 = 12431; //Demo
var mapid2 = 12000;
var warpid1 = 1;
var warpid2 = 7;
 
chài script TrieuChi có dày kìa bạn , sãn dây cho luôn
PHP:
double DisconnectFlag = 0.1;     // 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 time = 0;  

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

double mapid1 = 12000;  
double mapid2 = 11000; 
byte warpid1 = 30; 
byte warpid2 = 1; 

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

uint idmem1 = 2301861;  
uint idmem2 = 2351884;  
uint idmem3 = 2351874;  
uint idmem4_sena = 830692;  

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

/*********************** My Attack *************************/  
public override void MyAttack()  
{     
myturn++;  
if (myturn == 1)  
{  
CharacterInfo MyChar = ts.Character;   
//NPCCombatObject Monster = findMonster();      
ts.SendAttack(MyChar.Row, MyChar.Col, 0, 0, 10000);      
}  
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, 10000);  
}  
}  


/********************* Battle Started **********************/  
public override void BattleStarted()  
{  
if (ts.Character.ghost >= 2) {ts.Disconnect();}  
battle_count++;  
myturn = 0;  
peturn = 0;  
time = 0;  
NS_count = 0;  
}  


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


/******************* 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()]);      
if (NS_count == 3) {ts.Answer(ans_index);ts.SendEnd();ts.SendEnd();}  
ts.Answer(ans_index);  
}  
public override void UnGhostFinished()  
{  
ts.Warp(1);  
}  


/******************** NPC Dialog Menu **********************/  
public override void NpcDialogMenu(ushort DialogId)  
{  
debug("Dialog Menu ID = "+DialogId.ToString());  
if (DialogId == 4) {ts.SelectChoice(1);ts.SendEnd();}  
}  


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


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


/************************ On Timer *************************/  
public override void OnTimer()  
{  
time++;  
if (time == 60) {ts.Disconnect();}  
}  


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

public override void RequestPartyAcceptFrom(uint playerid)  
{  
if (playerid == idmem1 && ts.Character.ghost <= 1)      {ts.AcceptParty(playerid);}  
if (playerid == idmem2 && ts.Character.ghost <= 1)      {ts.AcceptParty(playerid);}  
if (playerid == idmem3 && ts.Character.ghost <= 1)      {ts.AcceptParty(playerid);}  
if (playerid == idmem4_sena && ts.Character.ghost <= 1) {ts.AcceptParty(playerid);}  
}  


/********************* 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.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}  
if (playerid == idmem2)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}  
if (playerid == idmem3)      {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}  
if (playerid == idmem4_sena) {debug(playerid+"  Rời khỏi đội ngủ -> Disconnect !!!");ts.SetTimerOnOff(false);ts.delay(500);ts.Disconnect();}  
}  


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


/************************** Stop ***************************/  
public override void Stop()  
{   
for(byte i=0;i<25;i++){   
Slot oSlot = (Slot)ts.MyItems[i];   
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];   
if(oSlot.itemid == 0){ continue; }    
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0);   
}   
}    


/*********************** 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 ProAcMa - Server HuaChu–™ =======",255) ;  
}  


/********************** Warp Finish ************************/  
public override void warpFinish()  
{  
if (ts.Character.ghost >= 2 && ts.Character.mapid == 12011) {ts.Walk(462,515);ts.ClickOnNPC(9);}  
if (ts.Character.ghost >= 2 && ts.Character.mapid == 12000) {ts.Warp(6);}  
if (pt1 ==1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {Start();}  
if (ts.Character.ghost == 0 && ts.Character.mapid == 12000 && ts.Character.x == 830 && ts.Character.y == 1490) {ts.SetTimerOnOff(true);}  
}  


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



/************************ Init Bot *************************/  
public override void InitBot()  
{      
ts.SetReconnectTime(3);  
ts.SetMaxIdleTime(15);  
if (ts.Character.mapid == 11000) {ts.Warp(1);}  
ts.SetTimerOnOff(true);  
AddDropItemList("viênongmật");  
AddDropItemList("tựđ uốngthuốc");  
AddDropItemList("viên công kích");  
AddDropItemList("Thịt Dê khô");  
AddDropItemList("Táo đỏ");  
AddDropItemList("Bánh Lạc");  
AddDropItemList("Nấm Rơm");  
AddDropItemList("Rượu Bạch Cang");  
ViewState();  
if (ts.Character.ghost >= 2 && ts.Character.mapid == 12000) {ts.Warp(6);}  
if (ts.Character.ghost == 0 && ts.Character.x == 462 && ts.Character.y ==515 && ts.Character.mapid == 12011) {ts.Warp(1);}  
}  

public override void Disconnected()  
{  
ts.SetTimerOnOff(false);  
}
 
mem tụ dộng giai ma nè
PHP:
double DisconnectFlag = 0.1;     // 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 time = 0;  

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


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

uint idchupt = 289563;  


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

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


/******************* 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, 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()  
{  
CheckGhost();  
battle_count++;  
myturn = 0;  
peturn = 0;  
time = 0;  
}  


/********************* Battle Stoped ***********************/  
public override void BattleStopped()  
{      
AutoEatFood();  
ProcessInventoryAction();  
//CheckDisconnect();  
NS_count = 0;  
time = 0;  
}  

void CheckGhost()  
{  
if (ts.Character.ghost >= 1) {ts.Disconnect();}  
}  

/******************* 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()]);      
if (NS_count == 3) {ts.Answer(ans_index);ts.SendEnd();ts.SendEnd();}  
ts.Answer(ans_index);  
}  
public override void UnGhostFinished()  
{  
ts.Warp(1);  
}  
/******************** NPC Dialog Menu **********************/  
public override void NpcDialogMenu(ushort DialogId)  
{  
debug("Dialog Menu ID = "+DialogId.ToString());  
if (DialogId == 4) {ts.SelectChoice(1);ts.SendEnd();}  
}  


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


/************************ On Timer *************************/  
public override void OnTimer()  
{  
time++;if (time == 60) {ts.Disconnect();}  
ts.RequestParty(idchupt);  
}  


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


/************************** Stop ***************************/  
public override void Stop()  
{   
for(byte i=0;i<25;i++){   
Slot oSlot = (Slot)ts.MyItems[i];   
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];   
if(oSlot.itemid == 0){ continue; }    
debug(oItem.itemname + " at slot " + oSlot.slot.ToString() + " with ID " + oSlot.itemid.ToString(),0);   
}   
}    


/*********************** 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 ProAcMa - Server HuaChu–™ =======",255) ;  
}  





/********************** Warp Finished **********************/  
public override void warpFinish()  
{  
if (ts.Character.ghost >= 1 && ts.Character.mapid == 12011) {ts.Walk(462,515);ts.ClickOnNPC(9);}  
if (ts.Character.ghost >= 1 && ts.Character.mapid == 12000) {ts.Warp(6);}  
if (ts.Character.ghost == 0 && ts.Character.mapid == 12000) {ts.SetTimerOnOff(true);}  
}  


/********************** Disconnected ***********************/  
public override void Disconnected()  
{  
ts.SetTimerOnOff(false);  
}  





/************************ Init Bot *************************/  
public override void InitBot()  
{  
if (ts.Character.mapid==11000 && ts.Character.ghost == 0) {ts.Warp(1);ts.SetTimerOnOff(true);}      
if (ts.Character.mapid==11000 && ts.Character.ghost >= 1) {ts.Warp(1);}      
ts.SetReconnectTime(3);  
ts.SetMaxIdleTime(15);  
ViewState();  
debug("Login Okie");  
if (ts.Character.ghost >= 1 && ts.Character.mapid == 12000) {ts.Warp(6);}  
if (ts.Character.ghost == 0 && ts.Character.x == 462 && ts.Character.y ==515 && ts.Character.mapid == 12011) {ts.Warp(1);ts.SetTimerOnOff(true);}  
if (ts.Character.ghost == 0 && ts.Character.mapid == 12000) {ts.SetTimerOnOff(true);}  
AddDropItemList("viênongmật");  
AddDropItemList("tựđ uốngthuốc");  
AddDropItemList("viên công kích");  
AddDropItemList("Thịt Dê khô");  
AddDropItemList("Táo đỏ");  
AddDropItemList("Bánh Lạc");  
AddDropItemList("Nấm Rơm");  
AddDropItemList("Rượu Bạch Cang");  
AddDropItemList("ThuốcThôngPhổi");  
AddDropItemList("Bánh Lạc Hành");  
}
 
Status
Không mở trả lời sau này.
Back
Top