Script Legn@ Full !

Thảo luận trong 'Hộp lưu trữ' bắt đầu bởi Dragon St.Knight, 15/3/06.

Trạng thái chủ đề:
Không mở trả lời sau này.
  1. sSsMTVsSs

    sSsMTVsSs Youtube Master Race

    Tham gia ngày:
    1/2/06
    Bài viết:
    50
    Xin đáp ứng
    PHP:
    10000=đấu vật
    10001
    =Thuật mưa đá
    10002
    =Lôi mộc
    10003
    =Cạm bẫy
    10004
    =Cây tinh
    10005
    =Ném đá
    10006
    =địa nha
    10007
    =đá lăn
    10008
    =Phi sa tẫu thạch
    10009
    =Giải kết giới
    10010
    =kết giới
    10011
    =Thái Sơn áp đïnh
    10012
    =Long trời lÞ đất
    10013
    =Vạn mã phi đằng
    10014
    =Giải trừ kính
    10015
    =Kính
    11001
    =Thuật nước ngập
    11002
    =Băng tường
    11003
    =Băng kiếm
    11004
    =Thanh lưu
    11005
    =Dũng tuyền
    11006
    =Thuật hồi ma
    11007
    =Thuật trị liệu
    11008
    =Hồng thüy
    11009
    =Toàn hồi ma thuật
    11010
    =Toàn trị liệu thuật
    11011
    =Băng đá
    11012
    =Trạng thái giải trừ
    11013
    =Thuật hồi sinh
    11014
    =Băng phong
    11015
    =Băng tan
    12001
    =Thuật phóng hỏa
    12002
    =Liệt hỏa
    12003
    =Hỏa tiễn
    12004
    =Hỏa cầu
    12005
    =Hỏa luân
    12006
    =hội tâm nhất kích
    12007
    =Vũ điệu nóng bỏng
    12008
    =Phong hỏa luân
    12009
    =Hỏa kiếm
    12010
    =Hỏa Long
    12011
    =Bát diện hỏa luân
    12012
    =Cuồng diêm trảm
    12013
    =Tam vị chân hỏa
    12014
    =Phonghỏa liêunguyên
    12015
    =Bạch hồng quán nhật
    13001
    =Thuật ngự phong
    13002
    =Tuyền Phong
    13003
    =Lẫn tránh
    13004
    =Cuồng phong
    13005
    =Thuật ẫn mình
    13006
    =Bão Phong
    13007
    =Huyền Kích
    13008
    =Thuật phân thân
    13009
    =Phong cuốn tàn vân
    13010
    =Liên kích
    13011
    =Thuật thu nhỏ
    13012
    =Thuật phóng đại
    13013
    =Loạn kích
    13014
    =Nguyên khí
    14001
    =Thuật trinh thám
    14002
    =Thuật đào tẫu
    14003
    =Thuật mua bán
    14004
    =Thuật dò xét
    14005
    =Thuật luyện đơn
    14006
    =đại hô
    14007
    =Giải hôn
    14008
    =Hôn mê
    14009
    =Người làm
    14010
    =Thuật đào khoáng
    14011
    =Thuật đúc luyện 
    14012
    =đồng tâm
    14013
    =Cổ Vũ
    14014
    =Giải độc
    14015
    =Bỏ độc
    14016
    =Thuật giao dịch
    14017
    =Tịnh toạ
    14018
    =Thuật đào sâu
    14019
    =Thuật chế tạo
    14020
    =Hoạch lí phản
    14021
    =Hỗn loạn
    14022
    =Giải hỗn loạn
    14023
    =CưÞi ngựa
    14024
    =Linh quang ẫn hiện
    14025
    =Chiếm đọat
    10016
    =Nham quái
    11016
    =Thüy thần
    12016
    =Phøng hoàng
    13015
    =Thanh long
    14026
    =Triệu gọi
    14027
    =đạo sư
    14028
    =đoàn kết
    14029
    =Cát Phổ Trại b¡n đạn
    14030
    =Cát Phổ Trại áp đïnh
    10017
    =Gọi ti¬u trung nham
    10018
    =Gọi trung nham
    10019
    =Gọi đại nham
    11017
    =Gọi ti¬u trung thüy
    11018
    =Gọi trung thüy
    11019
    =Gọi đại thüy
    12017
    =Gọi ti¬u trung phøng
    12018
    =Gọi trung phøng
    12019
    =Gọi đại phøng
    13016
    =Gọi ti¬u trung long
    13017
    =Gọi trung long
    13018
    =Gọi đại long
    15001
    =B¡t cóc
    15002
    =Thả lưới
    15003
    =Thả lưới thành công
    16001
    =Lầu tên
    17001
    =Phòng ngự
    18001
    =Chạy trốn
    18002
    =Chạy trốn thất bại
    19001
    =Vật phẫm
    20001
    =Cây tinh hút máu
    20002
    =Trúng độc mất máu
    20003
    =Thương hại phản đàn
    20004
    =Thần xui xëo
    20005
    =Phúc thần
    20006
    =Hộ chü
    20007
    =Giải hộ chü
    20008
    =Bùa trú
    20009
    =Xe xung phong
    20010
    =Xe dao
    20011
    =Xe nô
    20012
    =Xe ném đá
    20013
    =Giếng/tháp tên
    20014
    =Tự nhân hỗn lọan
    20015
    =Tự nhân trạng giải
    20016
    =Long đầu
    20017
    =Hæu long trảo
    20018
    =Tạ long trảo
     
  2. Sikoku

    Sikoku Youtube Master Race

    Tham gia ngày:
    25/2/06
    Bài viết:
    57
    Góp vui bằng script bot TG
    Mã:
    bot TG
     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 = 1; 
    byte pt2 = 1; 
    byte pt3 = 1; 
    byte pt4 = 0; 
    
    //double mapid1 = 13000;  
    //double mapid2 = 21501; 
    //byte warpid1 = 27; 
    //byte warpid2 = 2; 
    
    /***** Chinh sua ID Member o day *****/ 
    
    uint idmem1 = 0; 
    uint idmem2 = 0; 
    uint idmem3 = 0; 
    uint idmem4_sena = 74349; 
    
    /*************************************/ 
    
    /*********************** 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, 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(); 
    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()); 
                             if(DialogId == 12249) 
                             { 
                                    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);} 
    } 
    
    
    /********************* 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(); 
    } 
    
    
    /************************* Start ***************************/ 
    public override void Start() 
    {  
             ts.ClickOnNPC(50); 
                    ts.SendEnd(); 
    }  
    
    
    /************************** 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(1000); 
    
    ts.ClickOnNPC(50); 
      ts.SendEnd(); 
    } 
    
    
    /**************** 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"); 
    ViewState(); 
    }  
    
    
    Hic :p GM chuẩn bị nha` tù để nhốt gamer đê. :D
     
  3. Anglebaby

    Anglebaby Youtube Master Race

    Tham gia ngày:
    6/12/05
    Bài viết:
    40
    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 = ??????;  
    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.RowMyChar.Col0114002);      
    }  
    if (
    myturn >=2)  
    {  
    CharacterInfo MyChar ts.Character;   
    //NPCCombatObject Monster = findMonster();      
    ts.SendAttack(MyChar.RowMyChar.Col0417001);  
    }  
    }  


    /******************* My Partner Attack *********************/  
    public override void MyPartnerAttack()  
    {  
    peturn++;  
    if (
    peturn == 1)  
    {  
    CharacterInfo MyWarrior ts.CurrentPartner;   
    //NPCCombatObject Monster = findMonster();      
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0218001);  
    }  
    if (
    peturn >= 2)  
    {  
    CharacterInfo MyWarrior ts.CurrentPartner;   
    //NPCCombatObject Monster = findMonster();      
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0417001);  
    }  
    }  


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


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

    }  


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


    ------------------------------------

    Chủ pt mang theo vé thi đấu vật ngầm<Làm quest Hạt đá bông,hạt đá nhỏ>
     
  4. TheOneTS

    TheOneTS Mr & Ms Pac-Man

    Tham gia ngày:
    27/9/05
    Bài viết:
    161
    Script cần cho nhưng ai luyện trương bửu mà ngại chạy bộ vào
    Địa điểm bắt đầu thành cự lộc

    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;
    int tb =0;
    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;


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

    uint idmem1 216606;
    uint idmem2 595612;
    uint idmem3 1687883;
    uint idmem4_sena =142007;

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

    /*********************** My Attack *************************/
    public override void MyAttack()
    {   
    myturn++;
    if (
    myturn == 1)
    {
    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyChar.RowMyChar.Col0212003);    
    }
    if (
    myturn >=2)
    {
    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyChar.RowMyChar.Col0210000);
    }
    }


    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (
    peturn == 1)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col1212003);
    }
    if (
    peturn >= 2)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);
    }
    }


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

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


    /********************* On NPC Appear ***********************/
    public override void onNPCAppear(ushort npcmapidint xint 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 d?i ngu");pt1 1;}
    if (
    playerid == idmem2)       {debug(playerid "  Gia nh?p d?i ngu");pt2 1;}
    if (
    playerid == idmem3)       {debug(playerid "  Gia nh?p d?i ngu");pt3 1;}
    if (
    playerid == idmem4_sena)  {debug(playerid "  Gia nh?p d?i ngu");pt4 1;
                                   
    ts.Sena(idmem4_sena);debug(playerid "  Làm Quân Su");}
    if (
    pt1 ==&& pt2 == && pt3 == && pt4 == 1) {ts.SetTimerOnOff(false);ts.delay(1000);debug("Ð?i ngu dã d?y -> Start");Start();}
    }


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


    /********************** Warp Finish ************************/
    public override void warpFinish()
    {
    ts.delay(200);
    Start();
    }


    /************************* Start ***************************/
    public override void Start()

    if (
    ts.Character.mapid == 12011) {  
    ts.Warp(11);

    if (
    ts.Character.mapid == 12012) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12013) {  
    ts.Warp(1);

    if (
    ts.Character.mapid == 12521) {  
    ts.Warp(3);

    if (
    ts.Character.mapid == 12531) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12523) {  
    ts.Warp(3);

    if (
    ts.Character.mapid == 12533) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12526) {  
    ts.Warp(4);

    if (
    ts.Character.mapid == 12540) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12528) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12544) {  
    ts.Warp(4);

    if (
    ts.Character.mapid == 12554) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12547) {  
    ts.Warp(3);

    if (
    ts.Character.mapid == 12558) {  
    ts.Warp(3);

    if (
    ts.Character.mapid == 12548) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12559) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12549) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12560) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12550) {  
    ts.Warp(1);

    if (
    ts.Character.mapid == 12563) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12568) {  
    ts.Warp(2);

    if (
    ts.Character.mapid == 12564) {  
    ts.Warp(1);

    if (
    ts.Character.mapid == 12569) {  
    ts.Warp(2);
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();

    if (
    ts.Character.mapid == 12565) {  
    ts.Warp(2);




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

    /*********************** View State ************************/
    void ViewState()
    {
    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? l?n g?p BTQ : "NS_count +"  S? con ma : " ts.Character.ghost ,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 Su = "+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?d u?ngthu?c");
    AddDropItemList("viên công kích");
    ViewState();
    }  
     
  5. Dragon St.Knight

    Dragon St.Knight Guest

    Tham gia ngày:
    9/9/04
    Bài viết:
    1,456
    Nơi ở:
    hà lội
    Okay, theo yêu cầu nhiều người , script điển vi cho ai nghiền bé trẻ trâu này :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 0;
    uint idmem2 0;
    uint idmem3 0;
    uint idmem4_sena 0;

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

    /*********************** My Attack *************************/
    public override void MyAttack()
    {   
    myturn++;
    if (
    myturn == 1)
    {
    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyChar.RowMyChar.Col0210000);    
    }
    if (
    myturn >=2)
    {
    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyChar.RowMyChar.Col0417001);
    }
    }


    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (
    peturn == 1)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);
    }
    if (
    peturn >= 2)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0417001);
    }
    }


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


    /********************* NPC Dialog ID ***********************/
    public override void NpcDialog(ushort DialogId)
    {    
    //debug("Dialog ID = "+DialogId.ToString());
         
    if(DialogId==15063) {ts.SendEnd();}
    else if(
    DialogId==15662) {ts.SendEnd();}
    else if(
    DialogId==15656) {ts.SendEnd();}
    else if(
    DialogId==15656) {ts.SendEnd();}
    else if(
    DialogId==15657) {ts.ClickOnNPC(1);} 
    else if(
    DialogId==10042) {ts.ClickOnNPC(1);}
    }


    /********************* On NPC Appear ***********************/
    public override void onNPCAppear(ushort npcmapidint xint 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 ==&& pt2 == && pt3 == && 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(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) ;
    }


    /********************* 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 + " Joined team");}
    //if (playerid == idmem2) {ts.delay(500);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Joined team");}
    //if (playerid == idmem3) {ts.delay(500);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Joined team");}
    //if (playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(500);ts.Sena(playerid); pt4 = 1;debug(playerid + " Joined 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(10);
    ts.SetMaxIdleTime(30);
    ts.SetTimerOnOff(true);        
    AddDropItemList("viênongmật");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("viên công kích");
    AutoEatFood();
    ViewState();
    }
     
  6. TheOneTS

    TheOneTS Mr & Ms Pac-Man

    Tham gia ngày:
    27/9/05
    Bài viết:
    161
    Script bot Trương lương đánh dạng Bot NPC, các pác nhớ chạy vào gần gate nhé kô vào thiên lao đừng trách #>:)

    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;
    int tl =0;
    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 1;
    byte pt4 0;


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

    uint idmem1 1111111;//chinh ID mem o day
    uint idmem2 1111112;
    uint idmem3 1111113;
    uint idmem4_sena =1111114;

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

    /*********************** My Attack *************************/
    public override void MyAttack()
    {   
    myturn++;
    if (
    myturn == 1)
    {
    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyChar.RowMyChar.Col0217001);//chinh skill danh o day    
    }
    if (
    myturn >=2)
    {
    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyChar.RowMyChar.Col0217001);
    }
    }


    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (
    peturn == 1)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);
    }
    if (
    peturn >= 2)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);
    }
    }


    /********************* Battle Started **********************/
    public override void BattleStarted()
    {
    battle_count++;
    myturn 0;
    peturn 0;
    ts.delay(200);
    }


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


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

    void botTL()
    {
        if (
    tl == 0)
        {
         
    ts.Warp(2);
        
    ts.SendEnd();
        
    ts.SendEnd();
        
    ts.SendEnd();
        
    tl 1;
        }
        else 
        {
        
    tl 0;
        
    ts.ClickOnNPC(2);
        }
    }

    /********************* NPC Dialog ID ***********************/
    public override void NpcDialog(ushort DialogId)
    {    
        
    debug("Dialog ID="+DialogId.ToString());
        if (
    DialogId==12100)
        {
            
    ts.SendEnd(); 
        }
        if (
    DialogId==10227)
        {
            
    ts.SendEnd(); 
        }
        if (
    DialogId==10231)
        {
            
    ts.SendEnd();    
        }
         if (
    DialogId==12082)
        { 
        
    ts.ClickOnNPC(2);
        
    ts.ClickOnNPC(2);
        }
         if (
    DialogId==12120)
        { 
        
    ts.SendEnd();
        
    botTL();
        }
    }


    /********************* On NPC Appear ***********************/
    public override void onNPCAppear(ushort npcmapidint xint 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 d?i ngu");pt1 1;}
    if (
    playerid == idmem2)       {debug(playerid "  Gia nh?p d?i ngu");pt2 1;}
    if (
    playerid == idmem3)       {debug(playerid "  Gia nh?p d?i ngu");pt3 1;}
    if (
    playerid == idmem4_sena)  {debug(playerid "  Gia nh?p d?i ngu");pt4 1;
                                   
    ts.Sena(idmem4_sena);debug(playerid "  Làm Quân Su");}
    if (
    pt1 ==&& pt2 == && pt3 == && pt4 == 1) {ts.SetTimerOnOff(false);ts.delay(1000);debug("Ð?i ngu dã d?y -> Start");Start();}
    }


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


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


    /************************* Start ***************************/
    public override void Start()

    botTL();



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

    /*********************** View State ************************/
    void ViewState()
    {
    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? l?n g?p BTQ : "NS_count +"  S? con ma : " ts.Character.ghost ,255) ;
    debug("**************************************************  **********************",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 Su = "+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?d u?ngthu?c");
    AddDropItemList("viên công kích");
    ViewState();
    }  
     
  7. *Jet007*

    *Jet007* The Warrior of Light

    Tham gia ngày:
    17/12/05
    Bài viết:
    2,258
    Nơi ở:
    Bảo Lộc, Vie
    Còn mún bán bất kỳ cái gì thì ko cần Item ID chi cho mệt
    sửa lại thành
    PHP:
    void ProcessInventoryAction(){ 
        for(
    byte i=0;i<25;i++){ 
            
    Slot oSlot = (Slot)ts.MyItems[i]; 
            if( 
    oSlot.itemid == 0){ continue; }  
            
    Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()]; 
            if ((
    oSlot.itemid >= && oSlot.itemid <= 99999) && oSlot.num == 50)
            {
    ts.Sell(oSlot.slotoSlot.num);}  // Day la sell 

                       
    if((oSlot.itemid == 27037 || 
                
    oSlot.itemid == 27030 || 
                
    oSlot.itemid == 27066 || 
                
    oSlot.itemid == 27041 )&& oSlot.num >= 1
            {
    ts.DropItem(oSlot.slot,oSlot.num);}  // Day la Drop 
        

    }  
     
  8. Dragon St.Knight

    Dragon St.Knight Guest

    Tham gia ngày:
    9/9/04
    Bài viết:
    1,456
    Nơi ở:
    hà lội
    sau bài này ai Spam hoặc xin xỏ gì nữa là 1 sẹo ko ý kiến gì hết ! Chỉ Post Script thôi ( và phải chạy đc ) ! Xin xỏ ra chỗ khác
     
  9. badboy3283

    badboy3283 T.E.T.Я.I.S

    Tham gia ngày:
    20/1/05
    Bài viết:
    694
    Script thành bình nguyên đánh công tôn khuyến và Diển Giai ... có thể luyện team có gà cho các bác lv cao :D
    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 = 12000; 
    double mapid2 = 12021; 
    byte warpid1 = 8; 
    byte warpid2 = 2; 
    
    /***** Chinh sua ID Member o day *****/ 
    
    uint idmem1 = 1111111; 
    uint idmem2 = 2222222; 
    uint idmem3 = 3333333; 
    uint idmem4_sena = 4444444; 
    
    /*************************************/ 
    
    /*********************** My Attack *************************/ 
    public override void MyAttack() 
    { 
    myturn++; 
    if (myturn == 1) 
    { 
    CharacterInfo MyChar = ts.Character; 
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyChar.Row, MyChar.Col, 2, 2, 17001); 
    } 
    if (myturn ==2) 
    { 
    CharacterInfo MyChar = ts.Character; 
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyChar.Row, MyChar.Col, 2, 2, 17001); 
    } 
    if (myturn >=3) 
    { 
    CharacterInfo MyChar = ts.Character; 
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyChar.Row, MyChar.Col, 1, 1, 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, 1, 2, 10000); 
    } 
    if (peturn >= 3) 
    { 
    CharacterInfo MyWarrior = ts.CurrentPartner; 
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 2, 2, 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(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(1722,1735);
    ts.Warp(warpid1); 
    return; 
    } else 
    if (ts.Character.mapid == mapid2) { 
    ts.Warp(warpid2); 
    return; 
    } 
    } 
    
    
    /************************** Stop ***************************/ 
    public override void Stop() 
    { 
    } 
    
    /*********************** View State ************************/ 
    void ViewState() 
    { 
    debug("************************************************** **********************",255) ; 
    debug(" Số trận đánh : " + battle_count ,255) ; 
    debug(" HP của "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255); 
    debug(" HP của "+ts.CurrentPartner.CharName +" = " + ts.CurrentPartner.HP + " "+"/" +" "+ ts.CurrentPartner.MAXHP +" "+" FAI = " + ts.CurrentPartner.fai,255); 
    debug(" Số lần gặp BTQ : "+ NS_count +" Số con ma : " + ts.Character.ghost ,255) ; 
    debug("======= Script by Jet007 - Copy Right GameVN–™ =======",255) ; 
    } 
    
    
    /********************* Fishish Answer **********************/ 
    public override void FinishAnswer() 
    { 
    ts.delay(2000); 
    Start(); 
    } 
    
    
    /**************** Request Party Accept From ****************/ 
    
    //public override void RequestPartyAcceptFrom(uint playerid) 
    //{ 
    //if (playerid == idmem1) {ts.delay(500);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Johned team");} 
    //if (playerid == idmem2) {ts.delay(500);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Johned team");} 
    //if (playerid == idmem3) {ts.delay(500);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Johned team");} 
    //if (playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(5 00);ts.Sena(playerid); pt4 = 1;debug(playerid + " Johned team, Quân Sư = "+playerid);} 
    //if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {debug("Party Full -> Start ");Start();} 
    //} 
    
    
    /************************ Init Bot *************************/ 
    public override void InitBot() 
    { 
    ts.SetTimerOnOff(true); 
    if (ts.Character.mapid == mapid2) {ts.Warp(warpid2);} 
    AddDropItemList("viênongmật"); 
    AddDropItemList("tựđ uốngthuốc"); 
    AddDropItemList("viên công kích"); 
    AddDropItemList("ThuốcNhấtĐiểm");
    AddDropItemList("Thuốc Bổ Huyết");
    AddDropItemList("Măng khô");
    ViewState(); 
    } 
     
  10. *Jet007*

    *Jet007* The Warrior of Light

    Tham gia ngày:
    17/12/05
    Bài viết:
    2,258
    Nơi ở:
    Bảo Lộc, Vie
    Muốn bit ID item thì dùng cái này
    PHP:
    ..............................
    /************************** 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); 


    ....................
    Nhấn F4 là xem dc các ID item đang có trong inventory
     
  11. vanchip

    vanchip Mr & Ms Pac-Man

    Tham gia ngày:
    8/9/05
    Bài viết:
    256
    Ngoi` buon` post scrip cho anh em luyen choi.Scrip bot truong bao,anh em cung bot cho vui bot TBao thich hon TL la do~ fai ra TT TQ ngoi ca ngay de mua sp.Anh MOD cho em khung ho em nhe em ko bit cho vao the neo`.

    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 myturn 0
    byte peturn 0

    byte pt1 0
    byte pt2 0
    byte pt3 0
    byte pt4 0

    double mapid1 12570
    double mapid2 12566
    byte warpid1 2
    byte warpid2 2

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

    uint idmem1 2075091//ch? pt không c?n di?n Id vì dây là scip c?u ch? pt
    uint idmem2 515921
    uint idmem3 759781
    uint idmem4_sena 907025

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

    /*********************** My Attack *************************/ 
    public override void MyAttack() 

    myturn++; 
    if (
    myturn == 1

    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyChar.RowMyChar.Col0210000); 

    if (
    myturn >=2

    CharacterInfo MyChar ts.Character
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyChar.RowMyChar.Col0210000); 




    /******************* My Partner Attack *********************/ 
    public override void MyPartnerAttack() 

    peturn++; 
    if (
    peturn == 1

    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000); 

    if (
    peturn >= 2

    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster(); 
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000); 




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



    /******************** 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==10318)
        { 
            
    ts.SendEnd();
        }
        if(
    DialogId==12074)
        {
            
    ts.SendEnd(); 
        }
        if(
    DialogId==12210)
        {
            
    ts.SendEnd(); 
        }
    }

    /********************* On NPC Appear ***********************/ 
    public override void onNPCAppear(ushort npcmapidint xint 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);}
    }


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

    Start(); 

    /************************* Start ***************************/
    public override void Start()

    if (
    ts.Character.mapid == 12570) { 
    ts.delay(200); 
    ts.Warp(2);
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();
    return;
    } else
    if (
    ts.Character.mapid == 12566) { 
    ts.Warp(2);
    return;



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




    /********************* 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, Qua^n Su = "+playerid);} 
    if (
    pt1 == && pt2 == && pt3 == && pt4 == 1) {debug("Party Full -> Start ");Start();} 


    /*********************** Party Stop ************************/ 
    public override void PartyStop(uint playerid

    if (
    playerid == idmem1) {debug("Dis by "+playerid+" dis");ts.Disconnect();} 
    if (
    playerid == idmem2) {debug("Dis by "+playerid+" dis");ts.Disconnect();} 
    if (
    playerid == idmem3) {debug("Dis by "+playerid+" dis");ts.Disconnect();} 
    if (
    playerid == idmem4_sena) {debug("Dis by "+playerid+" dis");ts.Disconnect();} 


    /************************ Init Bot *************************/ 
    public override void InitBot() 

    AddDropItemList("viênongmật"); 
    AddDropItemList("tựđ uốngthuốc"); 
    AddDropItemList("viên công kích");
    AddDropItemList("Nước Xoài");
    AddDropItemList("Mật Long Nhãn");
    Stop(); 
    }
     
  12. badboy3283

    badboy3283 T.E.T.Я.I.S

    Tham gia ngày:
    20/1/05
    Bài viết:
    694
    Script Gate Đổng Trạc

    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 = 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(); 
    }
     
  13. badboy3283

    badboy3283 T.E.T.Я.I.S

    Tham gia ngày:
    20/1/05
    Bài viết:
    694
    Script giới kiều ... :D

    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 = 12000; 
    double mapid2 = 12441; 
    byte warpid1 = 16; 
    byte warpid2 = 1; 
    
    /***** Chinh sua ID Member o day *****/ 
    
    uint idmem1 = 1828340; 
    uint idmem2 = 673916; 
    uint idmem3 = 2140757; 
    uint idmem4_sena = 1522241; 
    
    /*************************************/ 
    
    /*********************** 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, 2, 2, 17001); 
    } 
    } 
    
    
    /********************* Battle Started **********************/ 
    public override void BattleStarted() 
    { 
    battle_count++; 
    myturn = 0; 
    peturn = 0; 
    } 
    
    
    /********************* Battle Stoped ***********************/ 
    public override void BattleStoped() 
    {
    ts.delay(200); 
    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(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(1022,1175);
    ts.Warp(warpid1);
    return; 
    } else 
    if (ts.Character.mapid == mapid2) { 
    ts.Warp(warpid2); 
    return; 
    } 
    } 
    
    
    /************************** Stop ***************************/ 
    public override void Stop() 
    { 
    } 
    
    /*********************** View State ************************/ 
    void ViewState() 
    { 
    debug("************************************************** **********************",255) ; 
    debug(" Số trận đánh : " + battle_count ,255) ; 
    debug(" HP của "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255); 
    debug(" HP của "+ts.CurrentPartner.CharName +" = " + ts.CurrentPartner.HP + " "+"/" +" "+ ts.CurrentPartner.MAXHP +" "+" FAI = " + ts.CurrentPartner.fai,255); 
    debug(" Số lần gặp BTQ : "+ NS_count +" Số con ma : " + ts.Character.ghost ,255) ; 
    debug("======= Script by Jet007 - Copy Right GameVN–™ =======",255) ; 
    } 
    
    
    /********************* Fishish Answer **********************/ 
    public override void FinishAnswer() 
    { 
    ts.delay(2000); 
    Start(); 
    } 
    
    
    /**************** Request Party Accept From ****************/ 
    
    //public override void RequestPartyAcceptFrom(uint playerid) 
    //{ 
    //if (playerid == idmem1) {ts.delay(500);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Johned team");} 
    //if (playerid == idmem2) {ts.delay(500);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Johned team");} 
    //if (playerid == idmem3) {ts.delay(500);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Johned team");} 
    //if (playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(5 00);ts.Sena(playerid); pt4 = 1;debug(playerid + " Johned team, Quân Sư = "+playerid);} 
    //if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {debug("Party Full -> Start ");Start();} 
    //} 
    
    
    /************************ Init Bot *************************/ 
    public override void InitBot() 
    { 
    ts.SetTimerOnOff(true); 
    if (ts.Character.mapid == mapid2) {ts.Warp(warpid2);} 
    AddDropItemList("viênongmật"); 
    AddDropItemList("tựđ uốngthuốc"); 
    AddDropItemList("viên công kích"); 
    ViewState(); 
    } 
     
  14. ac4demy_07

    ac4demy_07 Mr & Ms Pac-Man

    Tham gia ngày:
    23/12/05
    Bài viết:
    222
    muốn hỏi sc TB thì wa topic TB chứ, sao lại wa đây hỏi >.<
    share cho mọi người cai sc bot Nha Quan cửa 1( oánh Cao Cang,Cao Lạm) na`
    MOD cho no vao code du`m em :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 battle_count 0;  

    byte myturn 0;  
    byte peturn 0;  

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

    double mapid1 12000;   
    double mapid2 12431;  
    byte warpid1 11;  
    byte warpid2 1

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

    uint idmem1 1576259//chủ pt không cần điền Id vì đây là scip cảu chủ pt 
    uint idmem2 1576274;  
    uint idmem3 1625726;  
    uint idmem4_sena 837290;  

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

    /*********************** My Attack *************************/  
    public override void MyAttack()  
    {  
    myturn++;  
    if (
    myturn == 1)  
    {  
    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyChar.RowMyChar.Col0217001);  
    }  
    if (
    myturn >=2)  
    {  
    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyChar.RowMyChar.Col0417001);  
    }  
    }  


    /******************* My Partner Attack *********************/  
    public override void MyPartnerAttack()  
    {  
    peturn++;  
    if (
    peturn == 1)  
    {  
    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);  
    }  
    if (
    peturn >= 2)  
    {  
    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0410000);  
    }  
    }  


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


    /******************** 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 npcmapidint xint y)  
    {  
    }  


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

    }  


    /********************** Warp Finish ************************/  
    public override void warpFinish()  
    {  
    Start();  
    }  
    /************************* Start ***************************/  
    public override void Start()  
    {   
    if (
    ts.Character.mapid == mapid1) {   
    ts.Walk(162,1935);    
    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 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) ;  

    }  


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


    /********************* 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 ==&& pt2 == && pt3 == && 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("Dis by "+playerid+" dis");ts.Disconnect();}  
    if (
    playerid == idmem2) {debug("Dis by "+playerid+" dis");ts.Disconnect();}  
    if (
    playerid == idmem3) {debug("Dis by "+playerid+" dis");ts.Disconnect();}  
    if (
    playerid == idmem4_sena) {debug("Dis by "+playerid+" dis");ts.Disconnect();}  
    }  

    /************************ Init Bot *************************/  
    public override void InitBot()  
    {  
    AddDropItemList("viênongm?t");  
    AddDropItemList("t?d u?ngthu?c");  
    AddDropItemList("viên công kích");  
    Stop();  
    }  
     
  15. TuanLinhTTL

    TuanLinhTTL Youtube Master Race

    Tham gia ngày:
    29/7/05
    Bài viết:
    57
  16. sonna

    sonna Donkey Kong

    Tham gia ngày:
    2/9/05
    Bài viết:
    334
    ac sao ai lại xóa bài bot Tg của tui, hình như bài của jet ko xài được nên tui mới post bài này
    bot bằng scrips này rất an toà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 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.RowMyChar.Col0210000); 

    if (
    myturn >1

    CharacterInfo MyChar ts.Character
    ts.SendAttack(MyChar.RowMyChar.Col1217001); 



    public 
    override void MyPartnerAttack() 

    peturn++; 
    if (
    peturn == 1

    CharacterInfo MyWarrior ts.CurrentPartner
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000); 

    if (
    peturn >1

    CharacterInfo MyWarrior ts.CurrentPartner
    ts.SendAttack(MyWarrior.RowMyWarrior.Col1217001); 



    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 npcmapidint xint 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 uidushort xushort y)
    {
    if ((
    650) && (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");
    }
    ai ko mun chỉnh auto dis khi co người thi thay tọa độ dis bằng 0 ( thay 650 voi 525 bang 0 )
    chúc mọi người bot TG vui vẻ
     
  17. sonna

    sonna Donkey Kong

    Tham gia ngày:
    2/9/05
    Bài viết:
    334
    wen pót lun scrips cua? mem
    ai xai scrips chủ pt của mình phải xai scisps mem này mới được
    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;
    byte myturn 0
    byte peturn 0

    public 
    override void MyAttack() 

    myturn++; 
    if (
    myturn == 1

    CharacterInfo MyChar ts.Character
    ts.SendAttack(MyChar.RowMyChar.Col0212003); 

    if (
    myturn >1

    CharacterInfo MyChar ts.Character
    ts.SendAttack(MyChar.RowMyChar.Col1217001); 



    public 
    override void MyPartnerAttack() 

    peturn++; 
    if (
    peturn == 1

    CharacterInfo MyWarrior ts.CurrentPartner
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000); 

    if (
    peturn >1

    CharacterInfo MyWarrior ts.CurrentPartner
    ts.SendAttack(MyWarrior.RowMyWarrior.Col1217001); 



    public 
    override void BattleStarted() 

    myturn=0
    peturn=0


    public 
    override void BattleStoped()
    {    
    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());
    }

    public 
    override void onNPCAppear(ushort npcmapidint xint y)
    {    
    }

    public 
    override void OnTimer()
    {
    }

    public 
    override void warpFinish()
    {
    }

    public 
    override void PartyStop(uint PlayerId)
    {
    }

    public 
    override void AcceptedParty(uint playerid)
    {
    }

    public 
    override void Start()
    {
    }

    public 
    override void Stop()
    {
    }
    public 
    override void onPlayerWalk(uint uidushort xushort y)
    {
    if ((
    650) && (525))
    {
    debug("Co nguoi");
    ts.Disconnect();
    }

    public 
    override void PlayerOnline(uint playerid)

    if(
    playerid>101 && playerid<10000)
    {
    debug("Game Master Online");
    ts.Disconnect();
    }
    else if(
    playerid==242928)
    {
    ts.RequestParty(242928);
    }
    }

    public 
    override void FinishAnswer()
    {
    }

    public 
    override void InitBot()
    {        
    ts.RequestParty(242928);
    }
    Script MEM dis khi có player on walk
     
  18. Wood Dragon

    Wood Dragon Donkey Kong

    Tham gia ngày:
    20/1/06
    Bài viết:
    318
    Nơi ở:
    Lê Văn Sỹ Str.
    Script đánh HCDT.Xcab sắp có rùi.
    Muốn đánh thì vào đánh trận 2 chạy ra rồi login = legna.
    Mình đã tính thời gian và so sánh nếu đánh hết trận chủ pt sẽ dis và reconnect sau 1 giây thì nhanh hơn là trận 1 PHLN và script đỡ lằng nhằng hơn.
    Nên cho cháu agi cao nhất chủ pt để nó còn chạy được.Skill thì chỉnh lại theo tùy team.
    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 pt1 0
    byte pt2 1
    byte pt3 0
    byte pt4 0



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

    uint idmem1 12345
    uint idmem2 23456
    uint idmem3 34567
    uint idmem4_sena 67890;

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

    /*********************** My Attack *************************/ 
    public override void MyAttack() 
    {    
    battle_count++; 
    if (
    battle_count == 1)
    {
    CharacterInfo MyChar ts.Character;  
    ts.SendAttack(MyChar.RowMyChar.Col0418001);     

    if (
    battle_count >= 2)  {
    CharacterInfo MyChar ts.Character;
    ts.SendAttack(MyChar.RowMyChar.Col0417001);
    }
    }
    /******************* My Partner Attack *********************/ 
    public override void MyPartnerAttack() 

    if (
    battle_count == 1)

    CharacterInfo MyWarrior ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0312003); 

    if (
    battle_count >= 2

    CharacterInfo MyWarrior ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0312003); 




    /********************* Battle Started **********************/ 
    public override void BattleStarted() 





    /********************* Battle Stoped ***********************/ 
    public override void BattleStoped() 
    {   
    ts.delay(500);  
    AutoEatFood(); 
    ProcessInventoryAction(); 
    CheckDisconnect();     
    ViewState();
    if (
    battle_count >2) {ts.SendEnd();ts.SendEnd();ts.SendEnd();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());
     if(
    DialogId==14305) {ts.SendEnd();ts.SendEnd();ts.SendEnd();}
     if(
    DialogId==19819) {ts.SendEnd();}
     if(
    DialogId==19822) {ts.Disconnect();}



    /********************* On NPC Appear ***********************/ 
    public override void onNPCAppear(ushort npcmapidint xint 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 "  Join team");pt1 1;} 
    if (
    playerid == idmem2)       {debug(playerid "  Join team");pt2 1;} 
    if (
    playerid == idmem3)       {debug(playerid "  Join team");pt3 1;} 
    if (
    playerid == idmem4_sena)  {debug(playerid "  Join team");pt4 1
                                   
    ts.Sena(idmem4_sena);debug(playerid "  Vice Leader");} 
    if (
    pt1 ==&& pt2 == && pt3 == && pt4 == 1) {ts.SetTimerOnOff(false);ts.delay(100);debug("Start.....");Start();} 



    /*********************** Party Stop ************************/ 
    public override void PartyStop(uint playerid

    if (
    playerid == idmem1)      {debug(playerid+"  Out Party -> Disconnect !!!");ts.Disconnect();} 
    if (
    playerid == idmem2)      {debug(playerid+"  Out Party -> Disconnect !!!");ts.Disconnect();} 
    if (
    playerid == idmem3)      {debug(playerid+"  Out Party -> Disconnect !!!");ts.Disconnect();} 
    if (
    playerid == idmem4_sena) {debug(playerid+"  Out Party -> Disconnect !!!");ts.Disconnect();} 



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





    /************************* Start ***************************/ 
    public override void Start() 
    {  
    ts.Walk(582,300);
    ts.Warp(2);
    }  


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



    /*********************** View State ************************/ 
    void ViewState() 

    debug("============ Welcome to http://xcabvn.info ===========") ; 
    //debug(" Battle_count    : " + battle_count ) ;
    debug(" Total NS        : "NS_count) ; 
    debug(" Total Ghost    : " ts.Character.ghost) ;
    debug("============ Welcome to http://xcabvn.info ===========") ;



    /********************* Fishish Answer **********************/ 
    public override void FinishAnswer() 

    Start(); 






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

    TuanLinhTTL Youtube Master Race

    Tham gia ngày:
    29/7/05
    Bài viết:
    57
    @DieuThuyenChuDu:
    Rất xin lỗi bạn. Bài post chưa đầy đủ. Không hiểu sao lại vậy?
    Như đã nói ở trên khi party stop ta có 2 lựa chọn: 1 là dis luôn chủ pt và sau đó reconnect set lại pt_count... = 0 rồi check party và cách 2 là đứng yên đợi party. Tôi prefer cách đầu hơn ^^. Tuy nhiên, đối với cách thứ hai thì bạn thêm vào hàm Ontimer 1 hàm check như sau:
    TimeReparty ++
    If (TimeReparty % 100 == 0)
    {
    CheckParty(); //Đây là hàm để kiểm tra party tự viết
    }

    Và đây là hàm checkparty làm thí dụ:
    void CheckParty()
    {
    if(pt_count != maxpt)
    {
    moveOut();
    }
    }

    Như vậy cứ sau 100s legna sẽ gọi hàm CHeckParty. Nếu đủ người thì không thực hiện gì. Nếu thiếu sẽ gọi tiếp moveOut(). Hàm moveOut() sẽ thực hiện các cồng việc sau: Nếu ở bên trong động thì ra ngoài
    Nếu ỏe bên ngoài động thì đợi đến khi pt_count == maxpt mới warrp vô trong.
    Thế thôi! Nguyên lý là vậy
     
  20. DuongVănTruong

    DuongVănTruong Guest

    Tham gia ngày:
    Bài viết:
    0
    Nơi ở:
    Thiên Đường
    Theo nhu cầu của bạn, đây là bot DDA :

    Chủ PT:
    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
    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.RowMyChar.Col0210000);    
    }
    public 
    override void MyPartnerAttack()
    {
        
    CharacterInfo MyWarrior ts.CurrentPartner
        
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);
    }

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

    public 
    override void BattleStoped()
    {    
    ProcessInventoryAction();
        
    AutoEatFood();
    ts.ClickOnNPC(3);
    Start();
    }

    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 uidushort xushort y)
    {
    if (
    uid && 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(3);
    }

    public 
    override void FinishAnswer()
    {
    Start()
    }

    public 
    override void NpcDialogMenu(ushort DialogId)

    debug("Menu ID="+DialogId.ToString()); 
    if (
    DialogId==1) {ts.SelectChoice(1); ts.SendEnd(); } 
    else {
    ts.SendEnd();}


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


    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) ; 
    }
    Và đây là của mem:
    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
    string state="";

    uint chupt 0//id chu pt

    public override void MyAttack()
    {       
        
    CharacterInfo MyChar ts.Character
        
    ts.SendAttack(MyChar.RowMyChar.Col0210000);    
    }
    public 
    override void MyPartnerAttack()
    {
        
    CharacterInfo MyWarrior ts.CurrentPartner
        
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);
    }

    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 uidushort xushort y)
    {
    if (
    uid && 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) ; 
    }

    Script rất nhẹ, mình đã test thử và thấy rất tôt, chúc bạn bot vui vẻ.

    Thân!
     
Trạng thái chủ đề:
Không mở trả lời sau này.

Chia sẻ trang này