Script chủ pt o thành tuyết nè các bạn

Thảo luận trong 'TS Online' bắt đầu bởi shinichi2005, 14/4/06.

  1. shinichi2005

    shinichi2005 Youtube Master Race

    Tham gia ngày:
    4/12/05
    Bài viết:
    23
    scrpit ne


    double DisconnectFlag = 0.2; // Disconnect when current HP is below 20%

    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; // khi fai pet=0 thi dis

    byte battle_count = 0;
    byte NS_count = 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;

    /***** ID Member *****/

    uint idmem1 = 123456;
    uint idmem2 = 1234568;
    uint idmem3 = 9564821;
    uint idmem4_sena = 754215;

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

    /*********************** My Attack *************************/
    public override void MyAttack()
    {
    CharacterInfo MyChar = ts.Character;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 4, 17001);
    }


    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (peturn == 1)
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 1, 12003);
    }
    if (peturn >= 2)
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 17001);
    }
    }


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


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


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


    /******************** Response Answer **********************/
    public override void ResponseAnswer()
    {
    string tmp=ts.LastQuestion.Replace("=?","");
    int ans=ts.Eval(tmp);
    byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
    ts.delay(2500);
    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.delay(500);
    //ts.Walk(602,475);
    ts.Warp(warpid1);
    } else
    if (ts.Character.mapid == mapid2) {
    ts.Warp(warpid2);
    return;
    }
    }

    /************************** Stop ***************************/
    public override void Stop()
    {
    if (ts.Character.mapid == 12815) {ts.Warp(1);}
    }

    /*********************** View State ************************/
    void ViewState()
    {
    debug("======= -----------------------Summary----------------------- =======",255) ;
    debug(" Số trận đánh : " + battle_count ,255) ;
    debug(" HP của Char : "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255);
    debug(" HP của Pet : "+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(1000);
    Start();
    }


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

    public override void RequestPartyAcceptFrom(uint playerid)
    {
    }
    /************************ Init Bot *************************/
    public override void InitBot()
    {
    ts.SetTimerOnOff(true);
    ts.SetReconnectTime(3);
    ts.SetMaxIdleTime(15);
    AddDropItemList("viênongmật");
    AddDropItemList("Dâu đỏ");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("Bành Bột Mì");
    AddDropItemList("viên công kích");
    ViewState();
    }


    ca scrpit ga luon



    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;



    /***** ID chu Party *****/

    uint id_chupt = 123456;

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

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


    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (peturn == 1)
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 1, 12003);
    }
    if (peturn >= 2)
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4, 17001);
    }
    }


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


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


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


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


    /************************ On Timer *************************/
    public override void OnTimer()
    {
    if (ts.CurrentParty==0) ts.RequestParty(id_chupt);
    }


    /************************* Start ***************************/
    public override void Start()
    {
    debug("Party ..........again!!");
    ts.RequestParty(id_chupt);
    if (ts.Character.mapid == 12521) {ts.Warp(5);}
    }


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


    /*********************** View State ************************/
    void ViewState()
    {
    debug("======= -----------------------Summary----------------------- =======",255) ;
    debug(" Số trận đánh : " + battle_count ,255) ;
    debug(" HP của Char : "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255);
    debug(" HP của Pet : "+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) ;
    }


    /********************* Accepted Party **********************/
    public override void AcceptedParty(uint playerid)
    {
    if (playerid == id_chupt) {debug("Join to ..... " + playerid);}
    }
    /*********************CancelParty**************************/
    public override void AcceptedPartyFrom(uint playerid)
    {
    if (playerid != id_chupt) {ts.StopParty();debug("Cancel party.........");}
    }

    /************************ Party Stop ***********************/
    public override void PartyStop(uint playerid)
    {
    InitBot();
    }

    /************************ Init Bot *************************/
    public override void InitBot()
    {
    if (ts.Character.mapid == 12815) {ts.Warp(1);}
    ts.RequestParty(id_chupt);
    ts.SetReconnectTime(3);
    ts.SetMaxIdleTime(15);
    AddDropItemList("viênongmật");
    AddDropItemList("Dâu đỏ");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("Bành Bột Mì");
    AddDropItemList("viên công kích");
    AutoEatFood();
    ViewState();
    }


    hehe bot len cho mấy bạn mới biết bot , mà muốn ăn kô
     
  2. **Asakura Hao**

    **Asakura Hao** C O N T R A

    Tham gia ngày:
    13/9/05
    Bài viết:
    1,820
    Nơi ở:
    Địa Ngục @_@
    nói gì thì nói :
    cha này dễ ăn sẹo lắm ;;)
     

Chia sẻ trang này