các bác vào xem thử

Thảo luận trong 'TS Online' bắt đầu bởi MasterDark, 6/5/06.

  1. MasterDark

    MasterDark Youtube Master Race

    Tham gia ngày:
    18/3/06
    Bài viết:
    10
    làm ơn cho tui xin cái bot ở Lu Long Khau 2 đi
     
  2. ac4demy_07

    ac4demy_07 Mr & Ms Pac-Man

    Tham gia ngày:
    23/12/05
    Bài viết:
    222
    ặc
    chả chịu tìm gì cả
    trong sc LegNa full có mà pa, vô đó mà tìm
    30 cục chả, 30 cục chả, 30 cục chả
     
  3. philiple

    philiple Youtube Master Race

    Tham gia ngày:
    24/11/05
    Bài viết:
    43
    double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%

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

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

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

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

    double mapid1 = 12421;
    double mapid2 = 12815;
    byte warpid1 = 2;
    byte warpid2 = 1;



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

    uint idmem1 = 2215155;
    uint idmem2 = ;
    uint idmem3 = ;
    uint idmem4_sena = 583117;

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

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

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


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

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


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


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


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


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


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


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


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


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


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


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

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


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

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

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


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

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

    Summon-Saint Donkey Kong

    Tham gia ngày:
    3/11/05
    Bài viết:
    310
    Nơi ở:
    Xóm trộm cướp=))
    Ôi giời, mấy ông này chuyên gia chơi kỉu nài-.-, hỏi có topic đàng hoàng hok hỏi lập ngoài này cho mấy bố câu cá, đã thế hok thèm QUOTE nữa
     
  5. mark_2000

    mark_2000 Donkey Kong

    Tham gia ngày:
    5/3/06
    Bài viết:
    341
    chịu khó tìm trước khi hỏi chứ riêng cai SC LLK cua 2 nay ko biết thấy bao nhiêu lần rồi
    hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr hix lại 30 charrrrrrrrrr
     
  6. meotheki

    meotheki T.E.T.Я.I.S Lão Làng GVN

    Tham gia ngày:
    24/10/05
    Bài viết:
    625
    Mấy cha câu bài hết biết , tui cũng vô câu nè , kém miếng khó chịu hehe :D
     
  7. Crystal*Liu

    Crystal*Liu Legend of Zelda

    Tham gia ngày:
    2/5/06
    Bài viết:
    1,121
    Nơi ở:
    Florence
    trong box ts này hình như có mà chẳng chịu tìm hiểu gì hết
     
  8. Gillian_ly

    Gillian_ly Donkey Kong

    Tham gia ngày:
    21/2/05
    Bài viết:
    356
    Nơi ở:
    Trác Quận
    chủ pt nè
    PHP:
    double DisconnectFlag 0.3// Disconnect when current HP is below 30%  

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

    byte DisconFai 00// Faith of warrior to disconnect  

    byte turna 0
    byte turnb 0;  

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

    double mapid1 12421;   
    double mapid2 12815;  
    byte warpid1 2;  
    byte warpid2 1;  

    uint idchupt 574875

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

    uint idmem1 2287175;  
    uint idmem2 2062558;
    uint idmem3 = 02103692; 
    uint idmem4_sena = 02058950;



    public 
    override void MyAttack() 
    {    
    turna++; 
    if (
    turna == 1
        { 
        
    CharacterInfo MyChar ts.Character;  
        
    //NPCCombatObject Monster = findMonster();     
        
    ts.SendAttack(MyChar.RowMyChar.Col0410000);     
        } 
    if (
    turna >=2
        { 
        
    CharacterInfo MyChar ts.Character;  
        
    //NPCCombatObject Monster = findMonster();     
        
    ts.SendAttack(MyChar.RowMyChar.Col0417001); 
        } 

    public 
    override void MyPartnerAttack() 

    turnb++; 
    if (
    turnb == 1
        { 
        
    CharacterInfo MyWarrior ts.CurrentPartner;  
        
    //NPCCombatObject Monster = findMonster();     
        
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0117001); 
        } 
    if (
    turnb >= 2
        { 
        
    CharacterInfo MyWarrior ts.CurrentPartner;  
        
    //NPCCombatObject Monster = findMonster();     
        
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0417001); 
        } 



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

    turnb=0
    turna=0


    public 
    override void PreBattleStopped() 

       
    ts.delay(2000); 


    /********************* Battle Stoped ***********************/  
    public override void BattleStopped()  
    {  
    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());  
    }  


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


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


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

    Start();   
    }  


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

    public override void RequestPartyAcceptFrom(uint playerid)  
    {  
    if (
    playerid == idmem1) {ts.delay(1000);ts.AcceptParty(playerid); pt1 1;debug(playerid " Johned team");}  
    if (
    playerid == idmem2) {ts.delay(1000);ts.AcceptParty(playerid); pt2 1;debug(playerid " Johned team");}  
    if (
    playerid == idmem3) {ts.delay(1000);ts.AcceptParty(playerid); pt3 1;debug(playerid " Johned team");}  
    if (
    playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(1000);ts.Sena(playerid); pt4 1;debug(playerid " Johned team, Qua^n Su = "+playerid);}  
    if (
    pt1 == && pt2 == && pt3 == && pt4 == 1) {ts.delay(1500);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("Dâu đỏ");  
    AddDropItemList("Táo nhỏ");  
    AddDropItemList("Mật Ý Nhân");  
    AddDropItemList("Nhị Quoa đầu");  
    AddDropItemList("tựđ uốngthuốc");  
    AddDropItemList("Táo nhỏ");  
    AddDropItemList("Bành Bột Mì");  
    AddDropItemList("viên công kích");  
    Stop();  
    }
    members
    PHP:
    double DisconnectFlag 0.3;     // Disconnect when current HP is below 30%

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

    byte DisconFai 00;        //    Faith of warrior to disconnect

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


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

    uint idchupt =574875;

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

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


    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (
    peturn == 1)
    {
    CharacterInfo MyWarrior ts.CurrentPartner
    //NPCCombatObject Monster = findMonster();    
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0212003);
    }
    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 BattleStopped()
    {    
    AutoEatFood();
    ProcessInventoryAction();
    CheckDisconnect();    
    ViewState();
    CheckGhost();
    }

    /********************* Check Ghost ***********************/
    void CheckGhost()
    {
    if (
    ts.Character.ghost >= && ts.Character.mapid == 12000) {ts.Disconnect();}
    }


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


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

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


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


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


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


    /************************** Stop ***************************/ 
    public override void Stop() 
    {  
    for(
    byte i=0;i<25;i++){  
    Slot oSlot = (Slot)ts.MyItems[i];  
    Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];  
    if(
    oSlot.itemid == 0){ continue; }   
    debug(oItem.itemname " at slot " oSlot.slot.ToString() + " with ID " oSlot.itemid.ToString(),0);  
    }  
    }  
    /*********************** View State ************************/
    void ViewState()
    {
    debug("**************************************************  **********************",255) ; 
    debug(" Số trận đánh : " battle_count ,255) ;
    debug(" HP của "+ts.Character.CharName+" = " ts.Character.HP +" ""/" +" "ts.Character.MAXHP,255);
    debug(" HP của "+ts.CurrentPartner.CharName +" = " ts.CurrentPartner.HP " "+"/" +" "ts.CurrentPartner.MAXHP +"   "+" FAI = " ts.CurrentPartner.fai,255); 
    debug(" Số lần gặp BTQ : "NS_count +"  Số con ma : " ts.Character.ghost ,255) ;
    debug("======= Script by Jet007 - Copy Right GameVN–™ =======",255) ;
    }

    /********************* Fishish Answer **********************/
    public override void FinishAnswer()
    {
    if (
    ts.Character.mapid==12441) {ProcessInventoryAction();
    ts.Warp(1);}   
    }

    /********************* Accepted Party **********************/
    public override void AcceptedParty(uint playerid)
    {
    if (
    playerid == idchupt) {debug("Join to  " playerid);}
    }

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


    /************************ Party Stop ***********************/
    public override void PartyStop(uint playerid)
    {
    if (
    playerid == idchupt) {debug(idchupt"  Giải tán đội ngũ ...");}
    if (
    ts.Character.mapid==13000) {ProcessInventoryAction();
    ts.Warp(1);}     
    }


    /************************ Init Bot *************************/
    public override void InitBot()
    {
    ts.SetReconnectTime(3);
    ts.SetMaxIdleTime(15);
    if (
    ts.Character.mapid==13000) {ProcessInventoryAction();
    ts.Warp(1);}     
    ts.delay(1000);    
    AddDropItemList("viênongmật");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("viên công kích");
    AddContributeItemList("Dâu đỏ ");
    AddContributeItemList("Táo nhỏ");
    AddDropItemList("Mật Ý Nhân");
    AddDropItemList("Nhị Quoa đầu");
    AddDropItemList("Bành Bột Mì");
    ViewState();
    debug("Login Okie");
    ProcessInventoryAction();
    AutoEatFood();
    if (
    ts.Character.ghost >= && ts.Character.mapid == 12000) {ts.Warp(6);}
    if (
    ts.Character.ghost == && ts.Character.== 462 && ts.Character.==515 && ts.Character.mapid == 12011) {ts.Warp(1);}
    }
      
    lần sau đừng lạp topic lung tung nữa nha, chịu khó tìm hiểu
     
  9. TrieuLua

    TrieuLua Youtube Master Race

    Tham gia ngày:
    7/5/06
    Bài viết:
    32
    Ráng tìm đi bạn ơi...Ráng tìm đi bạn ơi...Ráng tìm đi bạn ơi...Ráng tìm đi bạn ơi...Ráng tìm đi bạn ơi...
     
  10. hiphopunif

    hiphopunif Youtube Master Race

    Tham gia ngày:
    8/7/05
    Bài viết:
    37
    cái bot lư long này cũng được nhỉ
    bot ở cự lộc lag phải biết
    bot ở kia exp tầm bao nhiêu nhỉ bà con
    để em vô bot cho đỡ lag nào
     
  11. fire*and*Ro

    fire*and*Ro Mr & Ms Pac-Man

    Tham gia ngày:
    4/5/06
    Bài viết:
    134
    Nơi ở:
    =.^ Vũng Tàu ^.=
    bot o LLK nếu pt chỉ có 1 gà thì tầm 1k+/phut
    con 2 gà thì ngon hơn

    script dung cho cho~ LLK ne :

    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 turna = 0;
    byte turnb = 0;

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

    double mapid1 = 12421;
    double mapid2 = 12815;
    byte warpid1 = 2;
    byte warpid2 = 1;

    uint idchupt = 574875;

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

    uint idmem1 = 2287175;
    uint idmem2 = 2062558;
    uint idmem3 = 02103692;
    uint idmem4_sena = 02058950;



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


    /********************* Battle Started **********************/
    public override void BattleStarted()
    {
    turnb=0;
    turna=0;
    }

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

    /********************* Battle Stoped ***********************/
    public override void BattleStopped()
    {
    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());
    }


    /********************* On NPC Appear ***********************/
    public override void onNPCAppear(ushort npcmapid, int x, int 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(622,475);
    ts.Warp(warpid1);
    } else
    if (ts.Character.mapid == mapid2) {
    ts.Warp(warpid2);
    return;
    }
    }


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


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


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

    public override void RequestPartyAcceptFrom(uint playerid)
    {
    if (playerid == idmem1) {ts.delay(1000);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Johned team");}
    if (playerid == idmem2) {ts.delay(1000);ts.AcceptParty(playerid); pt2 = 1;debug(playerid + " Johned team");}
    if (playerid == idmem3) {ts.delay(1000);ts.AcceptParty(playerid); pt3 = 1;debug(playerid + " Johned team");}
    if (playerid == idmem4_sena) {ts.delay(500);ts.AcceptParty(playerid);ts.delay(1 000);ts.Sena(playerid); pt4 = 1;debug(playerid + " Johned team, Qua^n Su = "+playerid);}
    if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {ts.delay(1500);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("Dâu đỏ");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("Mật Ý Nhân");
    AddDropItemList("Nhị Quoa đầu");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("Bành Bột Mì");
    AddDropItemList("viên công kích");
    Stop();
    }

    dung cho chu pt do
    da test :hug: :hug: :hug:
     

Chia sẻ trang này