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. Quan Hưng

    Quan Hưng Guest

    Tham gia ngày:
    Bài viết:
    0
    Anh nào tốt bụng cho em cái Script đánh Võ An Quốc ở Bắc Hải được không.
    Đang rất cần . Cám ơn trước nhé .
     
  2. tutrungbuu

    tutrungbuu Youtube Master Race

    Tham gia ngày:
    20/1/05
    Bài viết:
    6
    anh may' bac oi giup minh 1 ti' voi' chi cho minh dwon cai' lg ve` voi' minh chua biet' lg nam` o~ dau de dwon ve` ne`
    choi TS lau lam' roi` ma`chua biet' bang bõ la` gi` ca~ mong cac' ban giup do~ dum` minh` voi'
    choi TS lau nhu vay ma` chua biet' bang bõ la` 1 su bat' loi cho minh` day
    mong cac' anh cac' giup' minh voi' minh` xin cam on nhieu` lam'
     
  3. tutrungbuu

    tutrungbuu Youtube Master Race

    Tham gia ngày:
    20/1/05
    Bài viết:
    6
    co' anh nao ranh~ chat' voi' toi de chi~ cho toi lam` cai' leg@ lam` xong toi se~ hau. ta
    maill yahoo cua la`; tinhanhbanchieu2009t do'
    mong cac' anh cac' bac' nao` ranh~ chi dan~ giup' minh` voi'
    lam xong minh se~ den` on = 1 car ts nha
     
  4. anhkhang

    anhkhang Youtube Master Race

    Tham gia ngày:
    24/3/06
    Bài viết:
    23
    sao cai cript nay 1 ga chay 2 ga ko chay. vay .Mong cac pro chinh gium

    ricp chu pt:
    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();
    }

    day la ga`:
    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;

    double mapid2 = 12815;
    byte warpid2 = 1;


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

    uint idchupt = 01501640;

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

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

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


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


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


    /************************ On Timer *************************/
    public override void OnTimer()
    {
    ts.RequestParty(idchupt);
    }


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


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


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


    /************************ Party Stop ***********************/
    public override void PartyStop(uint playerid)
    {
    if (playerid == idchupt){debug(idchupt+"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);}
    ts.delay(1000);
    AddDropItemList("viênongmật");
    AddDropItemList("Dâu đỏ");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("Mật Ý Nhân");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("viên công kích");
    ViewState();
    debug("Login Okie");
    }
     
  5. Shahatta

    Shahatta Mr & Ms Pac-Man

    Tham gia ngày:
    2/9/05
    Bài viết:
    100
    chi? can` chinh? cho~ nay` ne` byte pt1 = 0 ----> sua? so' 0 thanh`
    so' 1 rùi môt. hoi` danh' Id cac mem dung danh' vao` phân` uint idmem1 = 0
    la` ok 3 cai con` lai la` 3 mem + chu? pt la` 4 nguoi ru`i
     
  6. bigboy502

    bigboy502 Youtube Master Race

    Tham gia ngày:
    28/8/05
    Bài viết:
    15
    Bác Jet ơi làm ơn cho hỏi các số liệu về các skill đánh đi
    vd : def
    Đánh Thường :
    Hõa Tiễn :
    có gì thì liên hệ qua YH :daithieugia_nhagiau2005 nha Jet
     
  7. ut13

    ut13 Mr & Ms Pac-Man

    Tham gia ngày:
    22/5/03
    Bài viết:
    162
    eh cac' bac'...cho em hoi? khi copy cac' doan cript ve` may' rui` sao su? dung.
    copy no' vao` dau... can` may' nguoi` moi' bot dc....va` lam` sao de? tien' hanh` bot dc
     
  8. phuongpho

    phuongpho Youtube Master Race

    Tham gia ngày:
    19/2/06
    Bài viết:
    25
    ca'c anh chi. oi chi? cho em cach du`ng di.em chang biet du`ng script cua chu PT nhu nao va cua ga nhu nao thay cai gi cung giong nhau ah.copy scip roi lam ri nua ha
     
  9. XzRyanzX

    XzRyanzX Youtube Master Race

    Tham gia ngày:
    2/1/06
    Bài viết:
    3
    hic may' bac' pro oi cho ry hoi? ti'.Hic ry ga` lem' moi' bit' xai` leng@ tu` hom wa ah` ngoi` c? ngay` troi` sua? dc. cai' scpirt cua? dua' ban de? xai` thu? scpirt bot cu. loc. ah' chay cung? ok lam' nhung sao lau lau cu' díconnet hoai` ah` va? lai. con` hien hen bao' loi~ j` do' (co' hinh` em bdy cua? leng @) hic moi' nhac' dA? bi. roai` ne` may' bac' pro chi? cho ry lam` cach' nao` de? khac' fuc. nha cam' on may' bac' hic :(
     
  10. shumi_leon

    shumi_leon Mr & Ms Pac-Man

    Tham gia ngày:
    24/1/05
    Bài viết:
    121
    Nơi ở:
    kta
    Script cool nhất topic nè
    ko biết post khung pà kon xem đỡ
    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;

    uint sotrandanh = 0;

    byte songuoi = 00;

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

    uint mem1 = 1042426;
    uint mem2 = 1482965;
    uint mem3 = 2007137;
    uint quansu = 2212384;

    uint time = 0;

    uint mapid1 = 12012;
    uint mapid2 = 12011;
    byte warpid1 = 1;
    byte warpid2 = 11;

    byte dem = 0;

    bool bagoihon = false;

    public override void MyAttack()
    {
    CharacterInfo MyChar = ts.Character;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 12003);
    }

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

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

    public override void BattleStopped()
    {
    AutoEatFood();
    ProcessInventoryAction();
    sotrandanh++;
    debug("So Tran Danh : " + sotrandanh);
    if(ts.Character.ghost != 0)
    {
    debug("An con ma kia di giai thoi",0xFF0000);
    ts.Disconnect();
    }
    ts.delay(1);
    ts.ClickOnNPC(50);
    ts.delay(1);
    ts.ClickOnNPC(50);
    ts.delay(1);
    }

    public override void doRecvQuestion()
    {
    time = 0;
    ts.SetTimerOnOff(false);
    if(bagoihon == true)
    {
    dem++;
    }
    }

    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);
    if(dem == 3)
    {
    dem = 0;
    bagoihon = false;
    ts.SendEnd();
    }
    }

    public override void FinishAnswer()
    {
    ts.delay(1000);
    Start();
    }


    public override void NpcDialogMenu(ushort DialogId)
    {
    debug("Dialog Menu ID="+DialogId.ToString());
    if(DialogId==4)
    {
    ts.SelectChoice(1);
    ts.delay(1);
    ts.SendEnd();
    }
    }
    public override void NpcDialog(ushort DialogId)
    {
    debug("Dialog ID="+DialogId.ToString());
    if(DialogId==10183)
    {
    ts.SetTimerOnOff(true);
    time = 0;
    ts.delay(1);
    }
    else
    {
    if(DialogId==10140 || DialogId==12215 || DialogId==12119)
    {
    ts.SetTimerOnOff(true);
    time = 0;
    ts.SendEnd();
    }
    else
    {
    if(DialogId == 10750)
    {
    ts.SendEnd();
    ts.delay(1);
    ts.SendEnd();
    ts.delay(2000);
    ts.Disconnect();
    }
    else
    {
    ts.SendEnd();
    }
    }
    }
    }

    public override void onNPCAppear(ushort npcmapid, int x, int y)
    {
    }

    public override void OnTimer()
    {
    if(pt1 ==1 && pt2 == 1 && pt3 == 1 && pt4 == 1)
    {
    time++;
    if(time > 3)
    {
    Start();
    time = 0;
    ts.SetTimerOnOff(false);
    }
    }
    else
    {
    if (pt1 == 0) {ts.AcceptParty(mem1);}
    if (pt2 == 0) {ts.AcceptParty(mem2);}
    if (pt3 == 0) {ts.AcceptParty(mem3);}
    if (pt4 == 0) {ts.AcceptParty(quansu);}
    }
    }

    public override void warpFinish()
    {
    }

    void TruongGiac(){
    if(songuoi==4){
    ts.ClickOnNPC(50);
    }
    }

    void CheckMem(){
    if(songuoi==4){
    ts.ClickOnNPC(50);
    }
    else
    {
    debug("So thanh vien chua du ko the danh dc",0xFF0000);
    }
    }

    public override void RequestPartyAcceptFrom(uint PlayerId)
    {
    }

    public override void PartyStop(uint PlayerId)
    {
    if(PlayerId == mem1 || PlayerId == mem2 || PlayerId == mem3 || PlayerId == quansu)
    {
    debug(PlayerId + " da roi khoi party");
    time = 0;
    ts.SetTimerOnOff(false);
    ts.Disconnect();
    }
    }

    public override void AcceptedParty(uint playerid)
    {
    if (playerid == mem1)
    {
    debug(playerid + " gia nhap doi ngu");
    songuoi++;
    pt1 = 1;
    }
    if (playerid == mem2)
    {
    debug(playerid + " gia nhap doi ngu");
    songuoi++;
    pt2 = 1;
    }
    if (playerid == mem3)
    {
    debug(playerid + " gia nhap doi ngu");
    songuoi++;
    pt3 = 1;
    }
    if (playerid == quansu)
    {
    debug(playerid + " gia nhap doi ngu");
    songuoi++;
    pt4 = 1;
    ts.Sena(quansu);
    debug(playerid + " lam quan su");
    }
    if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1)
    {
    ts.SetTimerOnOff(false);
    ts.delay(1000);
    debug("Doi ngu da day",0xFF0000);
    Start();
    }
    }

    public override void Start()
    {
    CheckMem();
    }

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

    public override void PlayerOnline(uint playerid,ushort mapid)
    {
    if(playerid>101 && playerid<10000)
    {
    debug("Admin den roi chay thoi",0xFF0000);
    time = 0;
    ts.SetTimerOnOff(false);
    ts.Disconnect(false);
    }
    }

    public override void InitBot()
    {
    ts.SetReconnectTime(1);
    if(ts.Character.ghost != 0)
    {
    TuDongGiaiMa();
    }
    else
    {
    ts.SetTimerOnOff(true);
    if(ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    }
    }
    }

    void TuDongGiaiMa()
    {
    if(ts.Character.ghost != 0)
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Warp(warpid1);
    }
    else
    {
    if (ts.Character.mapid == mapid2)
    {
    ts.Walk(502,455);
    ts.delay(1000);
    bagoihon = true;
    ts.ClickOnNPC(9);
    }
    }
    }
    }
     
  11. shumi_leon

    shumi_leon Mr & Ms Pac-Man

    Tham gia ngày:
    24/1/05
    Bài viết:
    121
    Nơi ở:
    kta
    đây là mem
    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 = 2047766; //id chu pt

    uint time = 0;

    public override void MyAttack()
    {
    CharacterInfo MyChar = ts.Character;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0,2, 10000);
    }
    public override void MyPartnerAttack()
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
    }

    public override void BattleStarted()
    {
    }

    public override void BattleStopped()
    {
    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 uid, ushort x, ushort y)
    {
    if (uid > 1 && uid < 501) {
    debug("GM den roi chay thoi",0xFF0000);
    ts.Disconnect(false);
    }
    }

    public override void PlayerOnline(uint playerid,ushort mapid)
    {
    if(playerid>101 && playerid<10000)
    {
    debug("Admin den roi chay thoi",0xFF0000);
    time = 0;
    ts.SetTimerOnOff(false);
    ts.Disconnect(false);
    }
    }

    public override void PartyStop(uint playerid)
    {
    }

    public override void FinishAnswer()
    {
    }

    public override void InitBot()
    {
    ts.SetReconnectTime(1);
    ts.SetMaxIdleTime(20);
    ts.SetMaxIdleTime(20);
    AddDropItemList("viênongmật");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("viên công kích");
    AddDropItemList("NướcLiệuThương");
    debug(" Số con ma : " + ts.Character.ghost ,0xFF0000) ;
    }
     
  12. Rubin_Hot

    Rubin_Hot Dragon Quest

    Tham gia ngày:
    2/5/06
    Bài viết:
    1,421
    Nơi ở:
    Sao chổi
    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 = 1807284;

    uint tv1 = 2278854; //là QS luôn
    uint tv2 = 1807284;
    uint tv3 = 0;
    uint tv4 = 0;

    uint maxpt = 2; //so thanh vien


    public override void MyAttack()
    {
    CharacterInfo MyChar = ts.Character;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);
    }
    public override void MyPartnerAttack()
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
    }

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

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

    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 uid, ushort x, ushort y)
    {
    if (uid > 1 && 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()
    {
    }

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

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

    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) ;
    }
    mấy anh ơi đây là cái Script bot đốc Du Ác không biết đúng không mong mấy anh chỉ giúp em chỗ sai với em log hoài mà nó không vô
     
  13. VisihaSasuke

    VisihaSasuke C O N T R A

    Tham gia ngày:
    19/4/06
    Bài viết:
    1,525
    Nơi ở:
    Kế bên GF
    strip 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 = 90; // Faith of warrior to disconnect
    string state="";
    byte pt_count = 0;

    uint tv1 = 1; //là QS luôn
    uint tv2 = 0;
    uint tv3 = 0;
    uint tv4 = 0;

    uint maxpt = 1; //so thanh vien


    public override void MyAttack()
    {
    CharacterInfo MyChar = ts.Character;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);
    }
    public override void MyPartnerAttack()
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
    }

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

    public override void BattleStoped()
    {
    ProcessInventoryAction();
    AutoEatFood();
    ts.ClickOnNPC(1);
    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 uid, ushort x, ushort y)
    {
    if (uid > 1 && 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(1);
    }

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

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

    public override void NpcDialog(ushort DialogId)
    {
    debug("Dialog ID="+DialogId.ToString());
    if(DialogId==15657){
    ts.ClickOnNPC(1)
    ts.delay(2000)
    ts.ClickOnNPC(1)
    }else{
    ts.SendEnd();
    }

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

    Bac nao sua zum` em
     
  14. VisihaSasuke

    VisihaSasuke C O N T R A

    Tham gia ngày:
    19/4/06
    Bài viết:
    1,525
    Nơi ở:
    Kế bên GF
    ne em post sitrp ne sua zum` cai dai ca oi
    double DisconnectFlag = 0; // Disconnect when current HP is below 10%
    double hpFractionEat = 0; //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;
    /***** Chinh sua ID Member o day *****/
    uint idmem1 = ;
    uint idmem2 = ;
    uint idmem3 = ;
    uint idmem4_sena = ;
    /*************************************/
    /*********************** My Attack *************************/
    public override void MyAttack()
    {
    myturn++;
    if (myturn == 1)
    {
    CharacterInfo MyChar = ts.Character;
    //NPCCombatObject Monster = findMonster();
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);
    }
    if (myturn >=2)
    {
    CharacterInfo MyChar = ts.Character;
    //NPCCombatObject Monster = findMonster();
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);
    }
    }
    /******************* My Partner Attack *********************/
    public override void MyPartnerAttack()
    {
    peturn++;
    if (peturn == 1)
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    //NPCCombatObject Monster = findMonster();
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
    }
    if (peturn >= 2)
    {
    CharacterInfo MyWarrior = ts.CurrentPartner;
    //NPCCombatObject Monster = findMonster();
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);
    }
    }
    /********************* Battle Started **********************/
    public override void BattleStarted()
    {
    battle_count++;
    myturn = 0;
    peturn = 0;
    }

    public override void BattleStopped()
    {
    AutoEatFood();
    ProcessInventoryAction();
    CheckDisconnect();
    ViewState();
    BotTC();
    }
    void BotTC()
    {
    ts.ClickOnNPC(50);
    ts.ClickOnNPC(50);
    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.delay(3000);
    ts.Answer(ans_index);
    }
    /******************** NPC Dialog Menu **********************/
    public override void NpcDialogMenu(ushort DialogId)
    {
    debug("Dialog Menu ID = "+DialogId.ToString());
    if(DialogId==5) {ts.SelectChoice(1);ts.SendEnd();};
    }
    /********************* 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 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 ==1 && pt2 == 1 && pt3 == 1 && 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()
    {
    ts.ClickOnNPC(50);
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();
    }
    /************************** 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);
    ts.ClickOnNPC(50);
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();
    }
    /************************ Init Bot *************************/
    public override void InitBot()
    {
    ts.SetTimerOnOff(true);
    ViewState();
    }

    hix mong dai ca nao tot bung sua zum` em
     
  15. VisihaSasuke

    VisihaSasuke C O N T R A

    Tham gia ngày:
    19/4/06
    Bài viết:
    1,525
    Nơi ở:
    Kế bên GF
    strip la wa de ban hang
    Send Item

    void ProcessInventoryAction(){
    for(byte i=0;i<25;i++){
    Slot oSlot = (Slot)ts.MyItems;
    if( oSlot.itemid == 0){ continue; }
    Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
    if((oSlot.itemid == 46013 ||
    oSlot.itemid == 46033 ||
    oSlot.itemid == 46041 ||
    oSlot.itemid == 46027 ||
    oSlot.itemid == 26165 ||
    oSlot.itemid == 26050 ||
    oSlot.itemid == 26003 ||
    oSlot.itemid == 46016 ||
    oSlot.itemid == 26101 ||
    oSlot.itemid == 26078 ||
    oSlot.itemid == 27047 ||
    oSlot.itemid == 26100 ) && oSlot.num == 50)
    {ts.SendItemTo(72290,oSlot.slot,oSlot.num);}
    // 72290 la ID can send, sua lai ko la send het cho tui rang chiu nha
    }
    __________________

    bo tay bac nao chi zum` em
     
  16. bluesky2008

    bluesky2008 Youtube Master Race

    Tham gia ngày:
    19/12/05
    Bài viết:
    45
    may pac sua giup em cai scrip tieu chi voi tu nhien pt song cai dí ko danh ::(

    double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%

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

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

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

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

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

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

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

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

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


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



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


    /********************* Battle Stoped ***********************/
    public override void BattleStopped()
    {
    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());
    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.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(200);
    ts.Walk(1226,2488);
    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("======= Edit by Dong Trac =======",255) ;
    }


    /********************* Fishish Answer **********************/
    public override void FinishAnswer()
    {
    ts.delay(3000);
    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.SetReconnectTime(2);
    ts.SetMaxIdleTime(10);
    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("Thịt Dê khô");
    AddDropItemList("Bánh Lạc Hành");
    AddDropItemList("Nấm Rơm");
    AddDropItemList("Rượu Bạch Cang");
    AddDropItemList("ThuốcThôngPhổi");
    AddDropItemList("Táo đỏ");
    AddDropItemList("Bánh Lạc");
    ViewState();
    }
    double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%

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

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

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

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

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

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

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

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

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


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



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


    /********************* Battle Stoped ***********************/
    public override void BattleStopped()
    {
    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());
    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.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(200);
    ts.Walk(1226,2488);
    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("======= Edit by Dong Trac =======",255) ;
    }


    /********************* Fishish Answer **********************/
    public override void FinishAnswer()
    {
    ts.delay(3000);
    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.SetReconnectTime(2);
    ts.SetMaxIdleTime(10);
    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("Thịt Dê khô");
    AddDropItemList("Bánh Lạc Hành");
    AddDropItemList("Nấm Rơm");
    AddDropItemList("Rượu Bạch Cang");
    AddDropItemList("ThuốcThôngPhổi");
    AddDropItemList("Táo đỏ");
    AddDropItemList("Bánh Lạc");
    ViewState();
    }
    em xin cam on may pac truoc ;;)
     
  17. MãnhichLong

    MãnhichLong Youtube Master Race

    Tham gia ngày:
    1/1/06
    Bài viết:
    21
    Bác nào có thể cho em xin DialogID đánh với Dương Chu chổ từ làng chài qua bên Từ Châu ko vậy
    double mapid1 = ?
    double mapid2 = ?
    byte warpid1 = ?
    byte warpid2 = ?
     
  18. zzPhiHoZZ

    zzPhiHoZZ Youtube Master Race

    Tham gia ngày:
    1/5/06
    Bài viết:
    17
    Nơi ở:
    hcm
    PHP:
    mấy anh chỉ dùm em cách nào mà bot 1 người được đi EM coppy mấy cái scrip trên này về và sửa lại cái vn.... mà làm hoài vẫn không chạy được ai biết cách chỉ dùm em với .Em cám ơn rất nhiều/PHP
     
  19. ThieuNuAnhHung

    ThieuNuAnhHung Youtube Master Race

    Tham gia ngày:
    1/7/05
    Bài viết:
    60
    Ai chi? em cái sricp mem bot TrieuVan voi!!!!!!
     
  20. ghienchoigame

    ghienchoigame C O N T R A

    Tham gia ngày:
    26/7/04
    Bài viết:
    1,951
    Nơi ở:
    Địa ngục trần gian
    Bác nào chỉ dùm em, sao em cứ truy cập là báo lỗi khi nạp script: 'Legna_TS_Machine.LegnaExternalClass.BattleStoped()': no suitable method found to override
    Bác nào có lòng chỉ dùm, em còn noop >___<
     
Trạng thái chủ đề:
Không mở trả lời sau này.

Chia sẻ trang này