bot Truong Giacc ?

Thảo luận trong 'TS Online' bắt đầu bởi noobwadi, 28/3/06.

  1. noobwadi

    noobwadi Youtube Master Race

    Tham gia ngày:
    21/3/06
    Bài viết:
    25
    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.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(); 
    } 
    
    
    /************************* 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(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"); 
    ViewState(); 
    }  
    
    
    Hic  GM chuẩn bị nha` tù để nhốt gamer đê. 
    __________________
    +5 Mp 
    Các bác cho hỏi đây có phải là script bot TrươngGiac không ? nếu phải thì tại sao mình chạy nó không đánh ? Mấy cái dialog id có chính xác không vậy ?
    thx nhiều
     
  2. dieorlive

    dieorlive Mr & Ms Pac-Man

    Tham gia ngày:
    18/11/05
    Bài viết:
    104
    Nơi ở:
    Thành phố Sao Băng
    admin mo? hop rui lay dau ra ma danh' TG nua :cool: . Pa nay cau bai ha?
     

Chia sẻ trang này