Only Scrip TrueBot + Legn@

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

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

    LordRevenge Youtube Master Race

    Tham gia ngày:
    5/7/05
    Bài viết:
    38
    Không hiểu sao mình bot TG mà mỗi lần gặp BTQ là con chủPT dis làm ăn ma liên tục. Mọi người coi giùm xem script của mình có sai chỗ nào không. Chứ fải đi giải ma hoài mệt wá.
    Mã:
    double DisconnectFlag = 0.3;     // Disconnect when current HP is below 30% 
    
    double hpFractionEat = 0.8;    //Eat HP when current HP<= 80% 
    double spFractionEat = 0.8; 
    double hpFraction = 0.95;        //Eat until current HP >= 95 % 
    double spFraction = 0.95; 
    
    byte songuoi = 00; 
    byte DisconFai = 00; 
    byte battle_count = 00;
    byte myturn = 0;  
    byte peturn = 0;  
    byte NS_count = 00; 
    
    
    uint maxpt=5;
    uint idchupt=555203;
    
    /*********Member*********/ 
    uint idMem1=75850; 
    uint idMem2=1341278;                
    uint idMem3=1341268; 
    uint idMem4=533046;
    
    public override void MyAttack()  
    {  
    if (myturn == 1)  
    {  
    CharacterInfo MyChar = ts.Character;  
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 12003);  
    }  
    if (myturn > 1)  
    {  
    CharacterInfo MyChar = ts.Character;  
    ts.SendAttack(MyChar.Row, MyChar.Col, 1, 2, 17001);  
    }  
    }  
    
    public override void MyPartnerAttack()  
    {  
    if (peturn == 1)  
    {  
    CharacterInfo MyWarrior = ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);  
    }  
    if (peturn > 1)  
    {  
    CharacterInfo MyWarrior = ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 1, 2, 17001);  
    }  
    }  
    
    public override void BattleStarted()  
    {  
    myturn = 1;  
    peturn = 1;  
    ts.delay(1);
    }  
    
    public override void BattleStopped() 
    {     
    ts.delay(300);
    {
    ts.ClickOnNPC(50);
    ts.SendEnd();
    AutoEatFood(); 
    ProcessInventoryAction(); 
    battle_count++;
    viewState();
    Start();     
    }
    } 
    
    public override void doRecvQuestion() 
    { 
    NS_count++;
    } 
    
    public override void ResponseAnswer() 
    {
    int dtime=0;
    debug("Delay "+dtime.ToString()+" before answer.");
    ts.delay(dtime*0);
    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 NpcDialogMenu(ushort DialogId) 
    { 
    debug("Dialog Menu ID="+DialogId.ToString()); 
    } 
    
    public override void NpcDialog(ushort DialogId) 
    {     
    debug("Dialog ID="+DialogId.ToString()); 
                             if(DialogId == 10183)     {ts.SendEnd();} 
    else                     if(DialogId == 12249)     {ts.SendEnd();}
    else                     if(DialogId == 10140)     {ts.SendEnd();}
    else                     if(DialogId == 12215)     {ts.SendEnd();}
    else                     if(DialogId == 12119)     {ts.SendEnd();}
    }
    
     
    
    void TruongGiac(){ 
    if(songuoi==4){ 
    ts.ClickOnNPC(50); 
    ts.SendEnd(); 
    ts.delay(1);
    } 
    } 
    
    public override void RequestPartyAcceptFrom(uint PlayerId) 
    { 
    if(PlayerId == idMem1 || PlayerId == idMem2 || PlayerId == idMem3 || PlayerId == idMem4) 
    {  
    ts.AcceptParty(PlayerId); 
    ts.delay(1); 
    songuoi++; 
    if (songuoi == 4)
    {
    ts.AcceptParty(PlayerId);
    ts.delay(1);
    } 
    ts.Sena(idMem1);
    TruongGiac(); 
    } 
    } 
    
    public override void PartyStop(uint PlayerId) 
    { 
    if(PlayerId == idMem1 || PlayerId == idMem2 || PlayerId == idMem3 || PlayerId == idMem4) 
    {  
    ts.Disconnect(); 
    } 
    } 
     
    
    public override void Start() 
    {  
    ts.ClickOnNPC(50); 
    ts.SendEnd();  
    ts.delay(1);
    } 
     
    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);  
    }  
    } 
    
    public override void onPlayerWalk(uint uid, ushort x, ushort y) 
    { 
    if ((x < 0) && (y < 0)) 
    { 
    debug("Co nguoi"); 
    ts.Disconnect(); 
    } 
    }  
    
    public override void PlayerOnline(uint playerid,ushort mapid)
    {  
    if(playerid>101 && playerid<10000) 
    { 
    debug("Game Master Online"); 
    } 
    } 
    
    public override void FinishAnswer() 
    { 
    Start();
    }
    
    public override void InitBot() 
    {         
    ts.SetReconnectTime(3);
    ts.SetTimerOnOff(true); 
    }    
    
    
     
  2. kegayhoats

    kegayhoats Youtube Master Race

    Tham gia ngày:
    19/4/06
    Bài viết:
    0
    các bác cho tui hỏi vê` len@ tí
    sao tui truy cập vào roi` nó báo la chờ người điều khiên nhưng bản diêu khiển thì lại kô sài đuợc thì phải làm sao^^
     
  3. luunhatphong

    luunhatphong Mr & Ms Pac-Man

    Tham gia ngày:
    4/10/05
    Bài viết:
    146
    Mấy pác dơn cách nào vậy.Còn tui dơn thì khi nhân' vào chương trình bot thì no' lên hàng chữ gì đó tui cũng kô bít nữa. Mong chỉ giáo
     
  4. luunhatphong

    luunhatphong Mr & Ms Pac-Man

    Tham gia ngày:
    4/10/05
    Bài viết:
    146
    Mấy pác dơn cách nào vậy.Còn tui dơn thì khi nhân' vào chương trình bot thì no' lên hàng chữ gì đó tui cũng kô bít nữa. Mong chỉ giáo
     
  5. kho_vi_yeu

    kho_vi_yeu Mr & Ms Pac-Man

    Tham gia ngày:
    20/8/04
    Bài viết:
    104
    Mình mới chơi TS online, mình hiện nay chơi 3 con hệ thổ , thủy và hỏa. Vì mới biết chơi nên cũng mới biết dùng legna. Mình rất mong được các bạn giúp đỡ mình làm sao để cho 3 con dùng legna có thể party và đánh chung với nhau. Mình đã đọc nhiều bài viết về legna trên đây rồi nhưng vẫn không làm cho chúng party được. Có thể pm giúp đỡ mình qua đây hoặc qua nick chat yahoo : jame0302
     
  6. la`la'la

    la`la'la T.E.T.Я.I.S

    Tham gia ngày:
    7/2/04
    Bài viết:
    554
    Nơi ở:
    ¶«Џ˚˚†ε •^^•
    xin hỏi... trong trận đánh có thể dùng bìu tượng đầu heo được không
    níu đựoc thì xin hỏi luôn là action bao nhiu :D
     
  7. Angel_18

    Angel_18 Youtube Master Race

    Tham gia ngày:
    6/4/06
    Bài viết:
    33
    Cho hoi có cái Q nào đánh con phong hoặc hỏa lv khoảng 8x không mấy pác đánh solo đó . kiễu giống nhu bot han trung zay chỉ dùm nha thxz trước
     
  8. hieuloc

    hieuloc Youtube Master Race

    Tham gia ngày:
    13/7/05
    Bài viết:
    48
    đây la scrip bot tt full của jcreator,nhưng taon bị ăn ma khi gặp btq(do bị dis),ai có cách khắc phục ko vậy
    Mã:
    double DisconnectFlag = 0.3; 	
    double hpFractionEat = 0.8;	
    double spFractionEat = 0.8;
    double hpFraction = 0.95;		
    double spFraction = 0.95;
    byte DisconFai = 00;		
    int btCount = 00;
    int ptCount = 00;
    int leaderCount = 00;
    bool isWarp = false;
    uint mem1 = 00;
    uint mem2 = 00;
    uint mem3 = 00;
    uint mem_QS= 00;
    int intBTQ = 0;
    int battleCount = 0;
    public override void MyAttack()
    {   
    		leaderCount = 1 - leaderCount;
    		CharacterInfo MyChar = ts.Character; 
    		if(leaderCount = 1){
    			ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);	
    		}else{
    			ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);	
    		}
    }
    public override void MyPartnerAttack()
    {
    	btCount= 1- btCount;
    	CharacterInfo MyWarrior = ts.CurrentPartner; 
    	if(btCount == 1)	{
    		ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2,10000);
    	}else{
    		ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 4,10000);
    	}
    }
    public override void BattleStopped()
    {	
    	battleCount++;
    	leaderCount = 0;
    	btCount = 0;
    	AutoEatFood();
    	ProcessInventoryAction();
    	CheckDisconnect();	
    	//ViewState();
    }
    
    public override void doRecvQuestion()
    {
    }
    public override void ResponseAnswer()
    {		
    	string tmp=ts.LastQuestion.Replace("=?","");
    	int ans=ts.Eval(tmp);
    	byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);	
    	ts.Answer(ans_index);
    }
    public override void NpcDialogMenu(ushort DialogId)
    {
    	debug("Dialog Menu ID="+DialogId.ToString());
    }
    public override void NpcDialog(ushort DialogId)
    {	
    	debug("Dialog ID="+DialogId.ToString()); 
    	if(DialogId==13147){  
    		ts.ClickOnNPC(10);
    		ts.delay(500);
    		ts.Warp(2);
    		ts.SendEnd();
    	} 
    	else
    	{
    		ts.SendEnd();
    	}
    }
    public override void RequestPartyAcceptFrom(uint PlayerId)
    {
    	uint	num = PlayerId;
    	debug("Accept  " + PlayerId,0x00);
    	if(num == mem1) ts.AcceptParty(PlayerId);
    	if(num == mem2) ts.AcceptParty(PlayerId);
    	if(num == mem3) ts.AcceptParty(PlayerId);
    	if(num == mem_QS) ts.AcceptParty(PlayerId);
    }
    public override void AcceptedParty(uint playerid) 
    {
    	uint num = playerid;
    	if(num == mem1) {
    		ptCount ++;
    		
    	}
    	if(num == mem2) {
    		ptCount ++;
    	}
    	
    	if(num == mem_QS ) {
    		ptCount ++;
    		ts.Sena(mem_QS);
    	}
    	if(num == mem3 ) {
    		ptCount ++;
    		
    	}
    	if(ptCount == 4) {
    		Start();
    	}
     }
    
    
    public override void PartyStop(uint PlayerId)
    {
    	uint num = PlayerId;
    	if((num == mem1)||(num == mem2)||(num == mem3)||(num == mem_QS)) ts.Disconnect();
    	
    }
    public override void PlayerOnline(uint playerid,ushort mapid) 
    {
    }
    public override void BattleStarted()
    {
    }
    public override void onNPCAppear(ushort npcmapid, int x, int y)
    {	
    	
    }
    
    public override void OnTimer()
    {
    }
    public override void warpFinish()
    {
    }
    
    public override void Start()
    {
    	ts.Warp(2);
    	ts.SendEnd();
    }
    public override void Stop()
    {
    	
    }
    
    public override void FinishAnswer()
    {
    	intBTQ++;
    	AutoEatFood();
    	ts.Warp(2);
    	ts.SendEnd();
    }
    public override void InitBot()
    {	
    	ts.SetReconnectTime(15);
    	AutoEatFood();	
    	AddDropItemList("viênongmật");
    	AddDropItemList("tựđ uốngthuốc");
    	AddDropItemList("viên công kích");
    }
    
     
  9. victoryvn3

    victoryvn3 Fire in the hole! Lão Làng GVN

    Tham gia ngày:
    24/7/04
    Bài viết:
    2,870
    Nơi ở:
    Nhà má vợ
    Sorry vì cái Topic này nhìu trang wá nên mình đành liều xin thẳng:
    Cho mình xin cái Scrip tự bán Item; đoạn code tự send Item (Chỉ cho mình cái đoạn code này chèn vào khúc nào của scip) và IP của các món Item nha!


    -----Thân-----
     
  10. Robin_Forever

    Robin_Forever Youtube Master Race

    Tham gia ngày:
    4/4/06
    Bài viết:
    25
    :whew: Các pro giúp em với. scrip này mọi người bảo test rui seo em dùng hem được. Nó hông chịu pt hà. Các bác giúp em với. Đây la scrip của mem:

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

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

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

    byte battle_count = 0;

    byte myturn = 0;
    byte peturn = 0;

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

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

    uint idchupt = 01505630;

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

    /*********************** My Attack *************************/
    public override void MyAttack()
    {
    myturn++;
    if (myturn == 1)
    {
    CharacterInfo MyChar = ts.Character;
    //NPCCombatObject Monster = findMonster();
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 12003);
    }
    if (myturn >=2)
    {
    CharacterInfo MyChar = ts.Character;
    //NPCCombatObject Monster = findMonster();
    ts.SendAttack(MyChar.Row, MyChar.Col, 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, 1, 2, 12003);
    }
    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();
    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);
    }


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


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


    /************************** Stop ***************************/
    public override void Stop()
    {
    debug("************************************************** **********************",255) ;
    debug(" S? tr?n dánh : " + battle_count ,255) ;
    debug(" HP c?a "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255);
    debug(" HP c?a "+ts.CurrentPartner.CharName +" = " + ts.CurrentPartner.HP + " "+"/" +" "+ ts.CurrentPartner.MAXHP +" "+" FAI = " + ts.CurrentPartner.fai,255);
    debug(" S? con ma : " + ts.Character.ghost ,255) ;

    }
    /********************** Player Online **********************/
    public override void PlayerOnline(uint playerid)
    {
    if (playerid == idchupt) {debug(idchupt + " Is Now Online, RequestParty ......");ts.delay(500);ts.RequestParty(idchupt);}
    }

    /************************ Init Bot *************************/
    public override void InitBot()
    {
    AddDropItemList("viênongm?t");
    AddDropItemList("t?d u?ngthu?c");
    AddDropItemList("viên công kích");
    Stop();
    {debug("Login Okie, Request Party .......");ts.delay(500);ts.RequestParty(idchupt);}
    }

    Còn đây là của chủ pt

    Code:

    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 = 816793;
    uint idmem2 = 2233821;
    uint idmem3 = 00898439;
    uint idmem4_sena = 01692347;

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

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


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

    Giúp em đi mấy anh. :whew:
     
  11. Chutchutchut

    Chutchutchut Mr & Ms Pac-Man

    Tham gia ngày:
    29/10/05
    Bài viết:
    193
    không có cách nào khắc phuc được ah, chứ không cứ đứng đó mở hòm đồ chắc chết
    thế còn gọi gì là bôt nữa
     
  12. kho_vi_yeu

    kho_vi_yeu Mr & Ms Pac-Man

    Tham gia ngày:
    20/8/04
    Bài viết:
    104
    Cho xin code send đồ của legn@ đi và chỉ tui đặt nó vào trong script.cs . thanks so much
     
  13. KieuTieuPhong

    KieuTieuPhong Youtube Master Race

    Tham gia ngày:
    15/11/05
    Bài viết:
    25
    ai sửa dùm em cái script lư long khẩu cai này. đánh xong một trận lại bị dis hoài
    <code>
    double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%

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

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

    uint TurnRound = 0;
    uint pt_Leader = 1777766; // ID Leader
    uint pt_MageSena = 353288; // ID Mage
    uint pt_KoPET1 = 795601; // ID ko PET
    uint pt_KoPET2 = 232777; // ID ko PET
    uint pt_Noob = 2224950; // id ga`
    uint pt_Count = 0;

    ushort mapid1 = 12421;
    ushort mapid2 = 12815;
    ushort warpid1 = 2;
    ushort warpid2 = 1;
    ushort walk_x = 622;
    ushort walk_y = 455;

    uint TimeCount = 0;

    ushort sk = 10000; // Skill Attack

    public override void MyAttack()
    {
    TurnRound++;
    CharacterInfo MyChar = ts.Character;
    if ( TurnRound == 1 ) {
    sk = 10000;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 0, sk);
    } else {
    sk = 17001;
    ts.SendAttack(MyChar.Row, MyChar.Col, MyChar.Row, MyChar.Col, sk);
    }
    }

    public override void MyPartnerAttack()
    {
    }

    public override void BattleStoped()
    {
    AutoEatFood();

    ProcessInventoryAction();

    CheckDisconnect();
    }

    public override void doRecvQuestion()
    {
    }
    public override void ResponseAnswer()
    {
    string tmp=ts.LastQuestion.Replace("=?","");
    int ans=ts.Eval(tmp);
    byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
    ts.Answer(ans_index);
    }
    public override void NpcDialogMenu(ushort DialogId)
    {
    debug("Dialog Menu ID="+DialogId.ToString());
    }
    public override void NpcDialog(ushort DialogId)
    {
    debug("Dialog ID="+DialogId.ToString());
    }

    public override void RequestPartyAcceptFrom(uint playerid)
    {
    if (playerid == pt_MageSena | playerid == pt_KoPET1 | playerid == pt_KoPET2 | playerid == pt_Noob) {
    ts.AcceptParty(playerid);
    debug(playerid + " Johned team");
    pt_Count++;
    if (playerid == pt_MageSena) {
    ts.Sena(playerid);
    debug(playerid + " become Sena");
    }
    }
    if (pt_Count == 4) {
    pt_Count = 0;
    Start();
    }
    }

    public override void PartyStop(uint playerid)
    {
    if (playerid == pt_MageSena | playerid == pt_KoPET1 | playerid == pt_KoPET2 | playerid == pt_Noob) {
    debug(playerid + " Nó trốn trại rồi kìa");
    ts.Disconnect();
    }
    }

    public override void BattleStarted()
    {
    TurnRound = 0;
    }
    public override void onNPCAppear(ushort npcmapid, int x, int y)
    {
    }

    public override void OnTimer()
    {
    }

    public override void warpFinish()
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Walk(walk_x, walk_y);
    ts.delay(450);
    ts.Warp(warpid1);
    return;
    }
    else if (ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    return;
    }
    }

    public override void Start()
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Walk(walk_x, walk_y);
    ts.delay(450);
    ts.Warp(warpid1);
    return;
    }
    else if (ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    return;
    }
    }

    public override void PlayerOnline(uint playerid)
    {
    if (playerid < 1000 && playerid > 100 ) {
    debug("Công An tới " + playerid);
    // ts.Disconnect(false);
    }
    }

    public override void Stop()
    {
    }

    public override void FinishAnswer()
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Walk(walk_x, walk_y);
    ts.delay(450);
    ts.Warp(warpid1);
    return;
    }
    else if (ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    return;
    }
    }

    public override void InitBot()
    {
    AddDropItemList("viênongmật");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("viên công kích");
    AddDropItemList("Bành Bột Mì");
    AddDropItemList("Nhị Quoa đầu");
    AddDropItemList("Dâu đỏ");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("Thuốc khí Hành");
    pt_Count = 0;
    AutoEatFood();
    ts.Horse(); // Neu Chu PT ko co' ngua thi xoa dong nay di, neu ko bao loi
    }
    /<code>
     
  14. KieuTieuPhong

    KieuTieuPhong Youtube Master Race

    Tham gia ngày:
    15/11/05
    Bài viết:
    25
    <code> double DisconnectFlag = 0.3; // Disconnect when current HP is below 30%

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

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

    uint TurnRound = 0;
    uint pt_Leader = 1777766; // ID Leader
    uint pt_MageSena = 353288; // ID Mage
    uint pt_KoPET1 = 795601; // ID ko PET
    uint pt_KoPET2 = 232777; // ID ko PET
    uint pt_Noob = 2224950; // id ga`
    uint pt_Count = 0;

    ushort mapid1 = 12421;
    ushort mapid2 = 12815;
    ushort warpid1 = 2;
    ushort warpid2 = 1;
    ushort walk_x = 622;
    ushort walk_y = 455;

    uint TimeCount = 0;

    ushort sk = 10000; // Skill Attack

    public override void MyAttack()
    {
    TurnRound++;
    CharacterInfo MyChar = ts.Character;
    if ( TurnRound == 1 ) {
    sk = 10000;
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 0, sk);
    } else {
    sk = 17001;
    ts.SendAttack(MyChar.Row, MyChar.Col, MyChar.Row, MyChar.Col, sk);
    }
    }

    public override void MyPartnerAttack()
    {
    }

    public override void BattleStoped()
    {
    AutoEatFood();

    ProcessInventoryAction();

    CheckDisconnect();
    }

    public override void doRecvQuestion()
    {
    }
    public override void ResponseAnswer()
    {
    string tmp=ts.LastQuestion.Replace("=?","");
    int ans=ts.Eval(tmp);
    byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);
    ts.Answer(ans_index);
    }
    public override void NpcDialogMenu(ushort DialogId)
    {
    debug("Dialog Menu ID="+DialogId.ToString());
    }
    public override void NpcDialog(ushort DialogId)
    {
    debug("Dialog ID="+DialogId.ToString());
    }

    public override void RequestPartyAcceptFrom(uint playerid)
    {
    if (playerid == pt_MageSena | playerid == pt_KoPET1 | playerid == pt_KoPET2 | playerid == pt_Noob) {
    ts.AcceptParty(playerid);
    debug(playerid + " Johned team");
    pt_Count++;
    if (playerid == pt_MageSena) {
    ts.Sena(playerid);
    debug(playerid + " become Sena");
    }
    }
    if (pt_Count == 4) {
    pt_Count = 0;
    Start();
    }
    }

    public override void PartyStop(uint playerid)
    {
    if (playerid == pt_MageSena | playerid == pt_KoPET1 | playerid == pt_KoPET2 | playerid == pt_Noob) {
    debug(playerid + " Nó trốn trại rồi kìa");
    ts.Disconnect();
    }
    }

    public override void BattleStarted()
    {
    TurnRound = 0;
    }
    public override void onNPCAppear(ushort npcmapid, int x, int y)
    {
    }

    public override void OnTimer()
    {
    }

    public override void warpFinish()
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Walk(walk_x, walk_y);
    ts.delay(450);
    ts.Warp(warpid1);
    return;
    }
    else if (ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    return;
    }
    }

    public override void Start()
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Walk(walk_x, walk_y);
    ts.delay(450);
    ts.Warp(warpid1);
    return;
    }
    else if (ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    return;
    }
    }

    public override void PlayerOnline(uint playerid)
    {
    if (playerid < 1000 && playerid > 100 ) {
    debug("Công An tới " + playerid);
    // ts.Disconnect(false);
    }
    }

    public override void Stop()
    {
    }

    public override void FinishAnswer()
    {
    if (ts.Character.mapid == mapid1)
    {
    ts.Walk(walk_x, walk_y);
    ts.delay(450);
    ts.Warp(warpid1);
    return;
    }
    else if (ts.Character.mapid == mapid2)
    {
    ts.Warp(warpid2);
    return;
    }
    }

    public override void InitBot()
    {
    AddDropItemList("viênongmật");
    AddDropItemList("tựđ uốngthuốc");
    AddDropItemList("viên công kích");
    AddDropItemList("Bành Bột Mì");
    AddDropItemList("Nhị Quoa đầu");
    AddDropItemList("Dâu đỏ");
    AddDropItemList("Táo nhỏ");
    AddDropItemList("Thuốc khí Hành");
    pt_Count = 0;
    AutoEatFood();
    ts.Horse(); // Neu Chu PT ko co' ngua thi xoa dong nay di, neu ko bao loi
    }
    / <code>
     
  15. Nuub

    Nuub Legend of Zelda

    Tham gia ngày:
    18/5/05
    Bài viết:
    1,005
    mấy bác cho em hỏi nick đẻ klicl hòm của trương giác để khỏi bị ks thì làm như thế nào
     
  16. Nuub

    Nuub Legend of Zelda

    Tham gia ngày:
    18/5/05
    Bài viết:
    1,005
    Mã:
     double DisconnectFlag = 0.3;     // Disconnect when current HP is below 30% 
    
    double hpFractionEat = 0.8;    //Eat HP when current HP<= 80% 
    double spFractionEat = 0.8; 
    double hpFraction = 0.95;        //Eat until current HP >= 95 % 
    double spFraction = 0.95; 
    byte songuoi = 00; 
    byte DisconFai = 00; 
    byte myturn = 0;  
    byte peturn = 0;  
    byte gm=0; 
    uint mem1 = 1596006; 
    uint mem2 = 1282311; 
    uint mem3 = 388045	; 
    uint quansu = 490338; 
    
    public override void MyAttack()  
    {  
    myturn++;  
    if (myturn == 1)  
    {  
    CharacterInfo MyChar = ts.Character;  
    ts.SendAttack(MyChar.Row, MyChar.Col, 0, 2, 10000);  
    }  
    if (myturn >1)  
    {  
    CharacterInfo MyChar = ts.Character;  
    ts.SendAttack(MyChar.Row, MyChar.Col, 1, 2, 17001);  
    }  
    }  
    
    public override void MyPartnerAttack()  
    {  
    peturn++;  
    if (peturn == 1)  
    {  
    CharacterInfo MyWarrior = ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 0, 2, 10000);  
    }  
    if (peturn >1)  
    {  
    CharacterInfo MyWarrior = ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.Row, MyWarrior.Col, 1, 2, 17001);  
    }  
    }  
    
    public override void BattleStarted()  
    {  
    myturn=0;  
    peturn=0;  
    }  
    
    public override void BattleStoped() 
    {     
    ts.delay(1); 
    ts.ClickOnNPC(50); 
    ts.delay(1); 
    ts.ClickOnNPC(50); 
    ts.delay(1); 
    ts.SendEnd(); 
    AutoEatFood(); 
    ProcessInventoryAction(); 
    } 
    
    public override void doRecvQuestion() 
    { 
    } 
    public override void ResponseAnswer() 
    {         
        string tmp=ts.LastQuestion.Replace("=?",""); 
        int ans=ts.Eval(tmp); 
        byte ans_index=Convert.ToByte(ts.LastAnswers[ans.ToString()]);     
        ts.Answer(ans_index); 
    } 
    public override void NpcDialogMenu(ushort DialogId) 
    { 
        debug("Dialog Menu ID="+DialogId.ToString()); 
    } 
    public override void NpcDialog(ushort DialogId) 
    {     
        debug("Dialog ID="+DialogId.ToString()); 
        if(DialogId==10183) 
        { 
        ts.delay(1); 
        }  
        else 
        { 
        ts.SendEnd(); 
        } 
    } 
    
    public override void onNPCAppear(ushort npcmapid, int x, int y) 
    {     
    } 
    public override void OnTimer() 
    { 
    } 
    
    public override void warpFinish() 
    { 
    } 
    
    void TruongGiac(){ 
    if(songuoi==4){ 
    ts.ClickOnNPC(50); 
    ts.SendEnd(); 
    } 
    } 
    
    public override void RequestPartyAcceptFrom(uint PlayerId) 
    { 
    if(PlayerId == mem1 || PlayerId == mem2 || PlayerId == mem3 || PlayerId == quansu) 
    {  
    ts.AcceptParty(PlayerId); 
    ts.delay(500); 
    songuoi++; 
    ts.delay(1); 
    TruongGiac(); 
    ts.Sena(quansu); 
    } 
    } 
    
    public override void PartyStop(uint PlayerId) 
    { 
    if(PlayerId == mem1 || PlayerId == mem2 || PlayerId == mem3 || PlayerId == quansu) 
    {  
    ts.Disconnect(); 
    } 
    } 
    
    public override void AcceptedParty(uint playerid) 
    { 
    } 
    
    public override void Start() 
    { 
    } 
    
    public override void Stop() 
    { 
    } 
    public override void onPlayerWalk(uint uid, ushort x, ushort y) 
    { 
    if ((x < 0) && (y < 0)) 
    { 
    debug("Co nguoi"); 
    ts.Disconnect(); 
    } 
    }  
    public override void PlayerOnline(uint playerid) 
    {  
    if(playerid>101 && playerid<10000) 
    { 
    debug("Game Master Online"); 
    ts.Disconnect(); 
    } 
    } 
    
    public override void FinishAnswer() 
    { 
    ts.delay(1000); 
    TruongGiac(); 
    } 
    
    public override void InitBot() 
    {         
    ts.SetReconnectTime(4); 
    ts.SetMaxIdleTime(15); 
        AddDropItemList("viênongm?t"); 
        AddDropItemList("t?d u?ngthu?c"); 
        AddDropItemList("viên công kích"); 
    }  
    cho em hỏi sao cái script này thỉnh thaongr pt mới có 1 con đã đánh rùi
     
  17. thienquanii

    thienquanii Youtube Master Race

    Tham gia ngày:
    18/10/05
    Bài viết:
    27
    loi~ do' là lỗi gì vay may' pac' cho em hõi với
     
  18. SpinLove

    SpinLove Mr & Ms Pac-Man

    Tham gia ngày:
    9/4/05
    Bài viết:
    116
    sua ho em cai scrip truong bao di anh! no ko pt ah! ân F3 thi no oanh ! ma no ko pt co phai phan acceppt ! em cho no vao roi nhung ma no van ko pt! em po tay roi cac pac oi
    cho cai script vao trong khung ho em cai! em ko biet cho vao khung the nao ca? dau ah :(

    script ne cac anh

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

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

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

    byte battle_count = 0;

    byte myturn = 0;
    byte peturn = 0;

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

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

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

    uint idmem1 = 2009415; //chủ pt không cần điền Id vì đây là scip cảu chủ pt
    uint idmem2 = 637982;
    uint idmem3 = 619366;
    uint idmem4_sena = 667655;

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

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


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


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


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


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


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


    /********************* On NPC Appear ***********************/
    public override void onNPCAppear(ushort 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 == 12570) {
    ts.delay(200);
    ts.Warp(2);
    ts.SendEnd();
    ts.SendEnd();
    ts.SendEnd();
    return;
    } else
    if (ts.Character.mapid == 12566) {
    ts.Warp(2);
    return;
    }
    }



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

    /*********************** View State ************************/
    void ViewState()
    {
    debug("************************************************** **********************",255) ;
    debug(" S? tr?n dánh : " + battle_count ,255) ;
    debug(" HP c?a "+ts.Character.CharName+" = " + ts.Character.HP +" "+ "/" +" "+ ts.Character.MAXHP,255);
    debug(" HP c?a "+ts.CurrentPartner.CharName +" = " + ts.CurrentPartner.HP + " "+"/" +" "+ ts.CurrentPartner.MAXHP +" "+" FAI = " + ts.CurrentPartner.fai,255);
    debug(" S? con ma : " + ts.Character.ghost ,255) ;

    }


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


    /**************** 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(300);ts.Sena(playerid); pt4 = 1;debug(playerid + " Johned team, Qua^n Su = "+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("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();}
    }


    /********************* Accepted Party **********************/
    public override void AcceptedParty(uint playerid)
    {
    if (playerid == 2009415) {debug(playerid + " Gia nhập đội ngũ");pt1 = 1;}
    if (playerid == 637982) {debug(playerid + " Gia nhập đội ngũ");pt2 = 1;}
    if (playerid == 637982) {debug(playerid + " Gia nhập đội ngũ");pt3 = 1;}
    if (playerid == 667655) {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(100);debug("Đội ngũ đã đầy -> Start");Start();}
    }



    /************************ Init Bot *************************/
    public override void InitBot()
    {
    AddDropItemList("viênongm?t");
    AddDropItemList("t?d u?ngthu?c");
    AddDropItemList("viên công kích");
    Stop();
    }
     
  19. 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 = 1862552;
    uint idmem2 = 2215155;
    uint idmem3 = 430393;
    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, 2, 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, 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();
    }


    /******************* 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();
    }
    cho em hoi? em vao` con bdy no hien ra dong` chu? nay lam sao khac phuc vay:'legen_TS_machine.LegnaExternalClass.BattleStoped():no suitable method found to override
     
  20. nmt_l

    nmt_l Donkey Kong

    Tham gia ngày:
    3/9/05
    Bài viết:
    322
    Nếu dùng phiên bản mới thì các scrip cũ sửa đoạn này:
    ********************* Battle Stoped ***********************/
    public override void BattleStoped()
    {
    AutoEatFood();
    ProcessInventoryAction();
    CheckDisconnect();
    ViewState();
    }
    Sửa lại thành:
    ********************* Battle Stoped ***********************/
    public override void BattleStopped() <--- thêm 1 chữ p nữa
    {
    AutoEatFood();
    ProcessInventoryAction();
    CheckDisconnect();
    ViewState();
    }
     
Trạng thái chủ đề:
Không mở trả lời sau này.

Chia sẻ trang này