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. PhThanhTai

    PhThanhTai Mr & Ms Pac-Man

    Tham gia ngày:
    26/6/06
    Bài viết:
    122
    Nơi ở:
    TP.HCM
    script TruongGiac ne`ban.
    PHP:
     double DisconnectFlag 0.3// Disconnect when current HP is below 30% 

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

    byte DisconFai 00

    uint sotrandanh 0

    byte songuoi 00

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

    uint mem1 0
    uint mem2 0
    uint mem3 0
    uint quansu 0

    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.RowMyChar.Col0117001);  
    }  
    public 
    override void MyPartnerAttack()  
    {  
    CharacterInfo MyWarrior ts.CurrentPartner;  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0210000);  
    }  

    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.ClickOnNPC(50); 
    ts.ClickOnNPC(50); 




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


    Start(); 



    public 
    override void NpcDialogMenu(ushort DialogId

    debug("Dialog Menu ID="+DialogId.ToString()); 
    if(
    DialogId==4

    ts.SelectChoice(1); 

    ts.SendEnd(); 


    public 
    override void NpcDialog(ushort DialogId
    {  
    debug("Dialog ID="+DialogId.ToString()); 
    if(
    DialogId==10183

    ts.SetTimerOnOff(true);  
    time 0


    else  

    if(
    DialogId==10140 || DialogId==12215 || DialogId==12119

    ts.SetTimerOnOff(true);  
    time 0;  
    ts.SendEnd(); 
    }  
    else 

    if(
    DialogId == 10750
    {  
    ts.SendEnd(); 

    ts.SendEnd(); 

    ts.Disconnect(); 

    else 

    ts.SendEnd(); 





    public 
    override void onNPCAppear(ushort npcmapidint xint y
    {  


    public 
    override void OnTimer() 

    if(
    pt1 ==&& pt2 == && pt3 == && 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() 
    {  
    if(
    ts.Character.ghost == 0


    ts.Walk(342,255); 

    CheckMem(); 

    else 

    TuDongGiaiMa(); 



    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 == && pt2 == && pt3 == && pt4 == 1)  

    ts.SetTimerOnOff(false); 

    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[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 uidushort xushort y

    }  

    public 
    override void PlayerOnline(uint uid,ushort mapid
    {  
    if(
    uid>101 && uid<10000)  
    {  
    debug("Game Master Online");  
    ts.Disconnect(); 


    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(382,355); 

    bagoihon true
    ts.ClickOnNPC(9); 



    }  
     
  2. PhThanhTai

    PhThanhTai Mr & Ms Pac-Man

    Tham gia ngày:
    26/6/06
    Bài viết:
    122
    Nơi ở:
    TP.HCM
    script Gioi Kièu nè chạy gà hoi phê à nghên
    PHP:
    double DisconnectFlag 0.3;     // Disconnect when current HP is below 30% 

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

    byte DisconFai 00;        //    Faith of warrior to disconnect 

    byte 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 12441
    byte warpid1 16
    byte warpid2 1

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

    uint idmem1 2301861
    uint idmem2 2336285
    uint idmem3 2336284
    uint idmem4_sena 830692

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

    /*********************** My Attack *************************/ 
    public override void MyAttack() 
    {    
    myturn++; 
    if (
    myturn == 1

    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();     
    ts.SendAttack(MyChar.RowMyChar.Col0010000);     

    if (
    myturn >=2

    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();     
    ts.SendAttack(MyChar.RowMyChar.Col1217001); 




    /******************* My Partner Attack *********************/ 
    public override void MyPartnerAttack() 

    peturn++; 
    if (
    peturn == 1

    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();     
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0417001); 

    if (
    peturn >= 2

    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();     
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0410000); 




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

    battle_count++; 
    myturn 0
    peturn 0



    /********************* Battle Stopped ***********************/ 
    public override void BattleStopped() 
    {     
    AutoEatFood(); 
    ProcessInventoryAction(); 
    CheckDisconnect();     



    /******************* 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 npcmapidint xint 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 ==&& pt2 == && pt3 == && 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(); 



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


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



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

    ts.delay(100); 
    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(500);ts.Sena(playerid); pt4 = 1;debug(playerid + " Johned team, Quân Su = "+playerid);} 
    //if (pt1 == 1 && pt2 == 1 && pt3 == 1 && pt4 == 1) {debug("Party Full -> Start ");Start();} 
    //} 


    /************************ Init Bot *************************/ 
    public override void InitBot() 
    {     
    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");  

     
  3. anhkhang

    anhkhang Youtube Master Race

    Tham gia ngày:
    24/3/06
    Bài viết:
    23
    day la phan common send do ne
    Mã:
    NPCCombatObject findMonster()
    {
    	int maxhp = 0;
    	string mi = "";
    	foreach (NPCCombatObject onpc in ts.oNPCCombat.Values)
        {
         	if (onpc.HP > 0)
            {
            	if (onpc.MAXHP > maxhp)
                {
                	maxhp = onpc.MAXHP;
                    mi = onpc.Row.ToString() + onpc.Col.ToString();
                 }
             }
    	}
    	return ts.oNPCCombat[mi] as NPCCombatObject;
    }
    void doEatSP(ushort order,int difSp){ 
    	for(byte i = 0;i< 25 ;i++){ 
    		Slot oSlot = (Slot)ts.MyItems[i];				
    		if (oSlot.itemid == 0) { continue; } 
    		Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
    		
    		if(oItem.isSPItem()){ 
    			int itemvalue=oItem.getSPValue();
    			if (itemvalue > difSp){ continue; } 
    			byte eatSpAmt = (byte)((difSp - (difSp % itemvalue)) / itemvalue);
    			if (eatSpAmt> 0){ 
    				if (eatSpAmt > oSlot.num){ 
    					eatSpAmt = oSlot.num; 
    				} 
    				ts.EatItem((byte)(i+1),eatSpAmt,order) ;
    				debug(oItem.itemname+"  SP "+itemvalue+" at slot "+((byte)(i+1)).ToString()+" decrease"+eatSpAmt ,0xC08008 );
    				difSp = difSp - eatSpAmt * itemvalue ;
    			} 
    		} 
    	} 
    	ts.delay(500);
    }
    void doEatHP(ushort order,int difHp){ 
    	for(byte i = 0;i< 25 ;i++){ 
    		Slot oSlot = (Slot)ts.MyItems[i];				
    		if (oSlot.itemid == 0) { continue; } 
    		Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
    				
    		if(oItem.isHPItem()){ 
    			int itemvalue=oItem.getHPValue();
    			if (itemvalue > difHp){ continue; } 
    			byte eatHpAmt = (byte)((difHp - (difHp % itemvalue)) / itemvalue );
    			if (eatHpAmt> 0){ 
    				if (eatHpAmt > oSlot.num){ 
    					eatHpAmt = oSlot.num; 
    				} 
    				ts.EatItem((byte)(i+1),eatHpAmt,order);
    				debug(oItem.itemname + "  HP  " + itemvalue.ToString() + " at slot " + ((byte)(i+1)).ToString() + "  decrease " + eatHpAmt.ToString() ,0xC08008 );
    				difHp = difHp - eatHpAmt * itemvalue ;
    			} 
    		} 
    	} 	
    	ts.delay(500);
    } 
    
    void FindItemContribute(string ItemName){
    	Slot s = FindItemInSlot(ItemName);
    	if(s != null){
           ts.Contribute(s.slot);
    	}
    }
    
    void FindItemDrop(string ItemName){
    	Slot s = FindItemInSlot(ItemName);
    	if(s != null){
    		ts.DropItem(s.slot,s.num);
    	}
    }
    
    Slot FindItemInSlot(string ItemName){
    	for(byte i=0;i<25;i++){
    		Slot oSlot = (Slot)ts.MyItems[i];
    		if( oSlot.itemid == 0){ continue; } 
    		Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
    			if(oItem.itemname == ItemName){
    				return oSlot;
    			}
    	}
    	return null;
    }
    
    void AutoEatFood(){		
    	if (ts.Character.HP < (ts.Character.MAXHP * hpFractionEat)){ 
           		doEatHP(0,(int)((ts.Character.MAXHP * hpFraction)-ts.Character.HP));       		
      	} 
      	if (ts.Character.SP < (ts.Character.MAXSP * spFractionEat)){ 	
             		doEatSP(0,(int)((ts.Character.MAXSP * spFraction)-ts.Character.SP));
       	}
        if (ts.CurrentPartner.HP < (ts.CurrentPartner.MAXHP * hpFractionEat)){ 
           		doEatHP((ushort)ts.CurrentPartner.Order,(int)((ts.CurrentPartner.MAXHP * hpFraction)-ts.CurrentPartner.HP));
      	} 
        if (ts.CurrentPartner.SP < (ts.CurrentPartner.MAXSP * spFractionEat)){ 
           		doEatSP((ushort)ts.CurrentPartner.Order,(int)((ts.CurrentPartner.MAXSP * spFraction)-ts.CurrentPartner.SP));
      	}   
    }
    
    
    int get_random(int min,int max)
    {
    	System.Random rd=new System.Random();
    	int ranNum= rd.Next(min,max);
    	return ranNum;
    }
    
    
    void Disconnect(string msg) {
    	debug(msg,0x0000FF);
    	ts.Disconnect(); 
    }
    
    void CheckDisconnect(){     
    	if(ts.Character.HP< (DisconnectFlag * ts.Character.MAXHP)){   		
    		Disconnect("Disconnected : Character HP is low !!");
    	}
    
    	if(ts.CurrentPartner.HP< (DisconnectFlag * ts.CurrentPartner.MAXHP)){   		
    		Disconnect("Disconnected : Warrior HP is low !!");
    	}
    
    	if(ts.CurrentPartner.fai < DisconFai){   
    		Disconnect("Disconnected : Warrior faith is below faith flag !!");
    	}
    }
    
    System.Collections.ArrayList DropItemList  = new System.Collections.ArrayList(); 
    System.Collections.ArrayList ContributeItemList  = new System.Collections.ArrayList(); 
    
    void AddDropItemList(string itemname) {	
    	if (!DropItemList.Contains(itemname)) {
    		DropItemList.Add(itemname);
    	}	
    }
    
    bool InDropItemList(string itemname) {
    	if (DropItemList.Contains(itemname))
    		return true;
    	else
    		return false;
    }
    
    void AddContributeItemList(string itemname) {	
    	if (!ContributeItemList.Contains(itemname)) {
    		ContributeItemList.Add(itemname);
    	}	
    }
    
    bool InContributeItemList(string itemname) {
    	if (ContributeItemList.Contains(itemname))
    		return true;
    	else
    		return false;
    }
    
    void ProcessInventoryAction(){
    	for(byte i=0;i<25;i++){
    Slot oSlot = (Slot)ts.MyItems[i];
    if( oSlot.itemid == 0){ continue; } 
    Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
    if((oSlot.itemid == 27019 || 
        oSlot.itemid == 27003 || 
        oSlot.itemid == 27047 ||
        oSlot.itemid == 46041 ||
        oSlot.itemid == 26165 ||
        oSlot.itemid == 46013 ||
        oSlot.itemid == 27031 ||
        oSlot.itemid == 46016 ||
        oSlot.itemid == 26101 ||
        oSlot.itemid == 26098 ||
        oSlot.itemid == 27047 ||
        oSlot.itemid == 26100 ) && oSlot.num == 50)
    {ts.SendItemTo(2339161,oSlot.slot,oSlot.num);}  
    // 2339161 la ID can send, sua lai ko la send het cho tui rang chiu nha 
    }
    }
    
     
  4. anhkhang

    anhkhang Youtube Master Race

    Tham gia ngày:
    24/3/06
    Bài viết:
    23
    no ban o tap hoa voi tiem thuoc luon do'
    Mã:
    double Time = 0;
    
    void bando()
    {
    if (ts.Character.mapid == 12001){ts.ClickOnNPC(100);ts.Chat(2,"Mình vào tiê.m thuô'c de bán dô` dây, chào ca? nhà");ts.delay(100);ts.Warp(10);}
    else
    if (ts.Character.mapid == 12223){ts.ClickOnNPC(100);ts.Chat(2,"Mình ra chô~ ta.p hóa de bán dô` dây, chào ca? nhà");ts.delay(100);ts.Warp(1);}
    }
    
    public override void warpFinish()
    {
    if (ts.Character.mapid == 12001){
    debug("Đã vào chỗ quầy tạp hóa",0x01a001);
    ts.Walk(1782,695);
    ts.ClickOnNPC(7);
    }
    if (ts.Character.mapid == 12223){
    debug("Đã vào tiệm thuốc",0x01a001);
    ts.ClickOnNPC(1);
    }
    }
    
    public override void OnTimer() 
    {    
        Time++;
        if (Time % 25 == 0) {ProcessInventoryAction();}
        else
        if (Time % 60 == 0) {bando();Time = 0;} 
    }
    
    public override void NpcDialogMenu(ushort DialogId)  
    {  
    debug("Menu ID="+DialogId.ToString());  
    ts.SelectChoice(2); 
    ts.SendEnd();
    }  
    
    public override void NpcDialog(ushort DialogId)  
    {  
    debug("Dialog ID="+DialogId.ToString());   
    } 
    
    void ProcessInventoryAction(){
        for(byte i=0;i<25;i++){
            Slot oSlot = (Slot)ts.MyItems[i];
            if( oSlot.itemid == 0){ continue; } 
            Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
    
            if(oSlot.num >=1)
            {ts.Sell(oSlot.slot,oSlot.num);
            debug("Đã bán được "+oSlot.num+" cái "+oItem.itemname,0xFF0101);
    debug("ID nó là : " +oSlot.itemid ,0xff01c8);}
    }
    }
    
    public override void InitBot() 
    { 
    if (ts.Character.mapid == 12003){ts.Warp(1);}
    if (ts.Character.mapid == 12002){ts.Warp(2);}
    if (ts.Character.mapid == 12001){ts.Warp(10);}
    if (ts.Character.mapid == 12223){ts.Warp(1);}
      
    ts.SetTimerOnOff(true);
    ts.SetReconnectTime(1);
    debug("Đăng nhập thành công 100%",0xff6e01); 
    }  
    
    
     
  5. DocCuuKiem

    DocCuuKiem Mega Man

    Tham gia ngày:
    13/9/05
    Bài viết:
    3,089
    Script của bạn vn1038227 đã chỉnh sửa rồi đây, have fun !!!

    PHP:
    double DisconnectFlag 0.3// Disconnect when current HP is below 30% 

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

    byte DisconFai 25// 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 12000
    byte warpid1 1
    byte warpid2 10

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

    uint idmem1 2322327;  
    uint idmem2 2322335;  
    uint idmem4_sena 1038327;  

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

    /*********************** My Attack *************************/ 
    public override void MyAttack() 
    {  
    myturn++; 
    if (
    myturn == 1

    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyChar.RowMyChar.Col0212003);  

    if (
    myturn ==2

    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyChar.RowMyChar.Col0210000); 

    if (
    myturn >=3

    CharacterInfo MyChar ts.Character;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyChar.RowMyChar.Col0410000); 




    /******************* My Partner Attack *********************/ 
    public override void MyPartnerAttack() 

    peturn++; 
    if (
    peturn == 1

    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0212003); 

    if (
    peturn == 2

    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0410000); 

    if (
    peturn >= 3

    CharacterInfo MyWarrior ts.CurrentPartner;  
    //NPCCombatObject Monster = findMonster();  
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0410000); 




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

    battle_count++; 
    myturn 0
    peturn 0



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



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

    NS_count++; 


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


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

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



    /******************** NPC Dialog Menu **********************/ 
    public override void NpcDialogMenu(ushort DialogId

    debug("Dialog Menu ID = "+DialogId.ToString()); 



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



    /********************* On NPC Appear ***********************/ 
    public override void onNPCAppear(ushort npcmapidint xint y
    {  



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

    if (
    pt1 == 0) {ts.AcceptParty(idmem1);} 
    if (
    pt2 == 0) {ts.AcceptParty(idmem2);} 
    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 == idmem4_sena) {debug(playerid " Gia nhập đội ngũ");pt4 1
    ts.Sena(idmem4_sena);debug(playerid " Làm Quân Sư");} 
    if (
    pt1 ==&& pt2 == && pt4 == 1) {ts.SetTimerOnOff(false);ts.delay(1000);debug("Ð?i ngu dã d?y -> Start");Start();} }  


    public 
    override void InitBot(){     
    if (
    ts.Character.mapid==mapid2) {ts.Warp(warpid2);}     
    AutoEatFood(); 
        
    ts.SetReconnectTime(10); 
        
    ts.SetMaxIdleTime(15); 
       
        
    AddDropItemList("viênongmật");   
    AddDropItemList("tựđ uốngthuốc");   
    AddDropItemList("ThuốcĐịnhNguyên");   
    AddDropItemList("viên công kích");  
    AddDropItemList("ThuốcNhấtĐiểm");   
    AddDropItemList("Thuốc Bổ Huyết");   
    AddDropItemList("Măng khô");   
    AddDropItemList("Thuốc Tỉnh Não");   
    AddDropItemList("Rượu vàng");  
    AddDropItemList("Thuốc Lục Vị");  
    AddDropItemList("thần hành");  
    AddDropItemList("trụccuốn TQ");  
    AddDropItemList("ThuốcThươngDược");  
    AddDropItemList("Mật Ý Nhân ");  
    AddDropItemList("Táo nhỏ");  
    AddDropItemList("Dâu đỏ");  
    AddDropItemList("Táo đỏ");  
    AddDropItemList("Bánh Lạc");  
    AddDropItemList("ThuốcThôngPhổi");  
    AddDropItemList("Bánh Lạc Hành");  
    AddDropItemList("Nước Xuyênquýt");  
    AddDropItemList("T.ThươngDược");     
    }  

     
  6. Silverwings_nt

    Silverwings_nt Youtube Master Race

    Tham gia ngày:
    19/5/06
    Bài viết:
    3

    ID skill ném đá = 10005
    nên bạn sửa thành thế nay`
    PHP:
    ts.SendAttack(MyWarrior.RowMyWarrior.Col0110005);
    hi vọng mình đã giúp được bạn ^_^
     
  7. Silverwings_nt

    Silverwings_nt Youtube Master Race

    Tham gia ngày:
    19/5/06
    Bài viết:
    3

    ID Skill mà bạn cần nè bigboy
    def = 17001
    đánh thường (đấu vật) = 10000
    hỏa tiễn = 12003
    hi vọng giúp được bạn :hug:
     
Trạng thái chủ đề:
Không mở trả lời sau này.

Chia sẻ trang này