hicTheOneTS nói:Thêm ts.SendEnd() vao đây
Cứ thêm lúc nào đánh tiếp thì thôi
có được đâu hả bác???
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hicTheOneTS nói:Thêm ts.SendEnd() vao đây
Cứ thêm lúc nào đánh tiếp thì thôi
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 == 26018 ||
oSlot.itemid == 26050 ||
oSlot.itemid == 26078 ||
oSlot.itemid == 26003 ||
oSlot.itemid == 26100 ||
oSlot.itemid == 26101 ||
oSlot.itemid == 46033 ||
oSlot.itemid == 46027 ||
oSlot.itemid == 26165 ||
oSlot.itemid == 46016 ||
oSlot.itemid == 46013 ||
oSlot.itemid == 46041 )
&& oSlot.num == 50)
{ts.SendItemTo(2176304,oSlot.slot,oSlot.num);} /// đây là send đồ
if((oSlot.itemid == 27047 ||
oSlot.itemid == 27005 ||
oSlot.itemid == 27035 ||
oSlot.itemid == 27032 )
&& oSlot.num == 50)
{ts.SendItemTo(2176336,oSlot.slot,oSlot.num);} /// đây là send đồ
}
}
bac' này` pots ho em cai scipit va comon sell di nha T_Tac4demy_07 nói:to Xích lô hông:
common send đồ cho 2 người thì bạn làm thế này( đây la common send đồ ở gate Triêu Chi của mình)
Mã: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 == 26018 || oSlot.itemid == 26050 || oSlot.itemid == 26078 || oSlot.itemid == 26003 || oSlot.itemid == 26100 || oSlot.itemid == 26101 || oSlot.itemid == 46033 || oSlot.itemid == 46027 || oSlot.itemid == 26165 || oSlot.itemid == 46016 || oSlot.itemid == 46013 || oSlot.itemid == 46041 ) && oSlot.num == 50) {ts.SendItemTo(2176304,oSlot.slot,oSlot.num);} /// đây là send đồ if((oSlot.itemid == 27047 || oSlot.itemid == 27005 || oSlot.itemid == 27035 || oSlot.itemid == 27032 ) && oSlot.num == 50) {ts.SendItemTo(2176336,oSlot.slot,oSlot.num);} /// đây là send đồ } }
Người ta thường dùng autosent đi kèm với autosell, có những cái bán ở Tạp hóa, có những cái bán ở Tiệm thuốc, thế nên chia ra làm 2 để bán hết. Ở Cự lộc thì Item bán ở Tiệm thuốc còn nhiều chứ ở cầu Triệu chi có mỗi thuốc Thông phổi, drop cho lànhXích lô hông nói:Phần send đồ trong file common mình chia ra gửi cho 2 id làm sao vậy các bạn ? Chỉ mình vớ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
byte pt1 = 0;
byte pt2 = 0;
byte pt3 = 0;
/***** Chinh sua ID chu Party o day *****/
uint idchupt = 01785385;
/*************************************/
/***** Chinh sua ID Member o day *****/
uint idmem1 = 01914061;
uint idmem2_sena = 02183553;
/*************************************/
public override void MyAttack()
{
CharacterInfo MyChar = ts.Character;
NPCCombatObject Monster = findMonster();
ts.SendAttack(MyChar.Row, MyChar.Col, Monster.Row, 2, 12003); //s? t? b?n con ? gi?a dù hàng trên hay du?i (By longkangta)
}
public override void MyPartnerAttack()
{
CharacterInfo MyWarrior = ts.CurrentPartner;
NPCCombatObject Monster = findMonster();
ts.SendAttack(MyWarrior.Row, MyWarrior.Col, Monster.Row, 2, 10000); // s? t? b?n con ? gi?a dù hàng trên hay du?i (By longkangta)
}
/********************* Battle Started **********************/
public override void BattleStarted()
{
}
/********************* Battle Stoped ***********************/
public override void BattleStoped()
{
ProcessInventoryAction();
AutoEatFood();
ProcessInventoryAction();
CheckDisconnect();
Stop();
debug(" FAI c?a d? : " + ts.CurrentPartner.CharName +" : " + ts.CurrentPartner.fai,0xFF0000) ;
}
/******************* 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);
}
public override void onNPCAppear(ushort npcmapid, int x, int y)
{
if(npcmapid == npcmapid){
ts.ClickOnNPC(npcmapid);
ts.ClickOnNPC(npcmapid);
}
}
/************************ On Timer *************************/
public override void OnTimer()
{
}
/************************* Start ***************************/
public override void Start()
{
ts.Walk(782, 495);
}
/************************** Stop ***************************/
public override void Stop()
{
}
public override void NpcDialogMenu(ushort DialogId)
{
debug("Dialog Menu ID="+DialogId.ToString());
}
public override void NpcDialog(ushort DialogId)
{
debug("Dialog ID="+DialogId.ToString());
}
/**************** Request Party Accept From ****************/
public override void RequestPartyAcceptFrom(uint playerid)
{
if (playerid == idmem1) {ts.delay(500);ts.AcceptParty(playerid); pt1 = 1;debug(playerid + " Tham Gia Ð?i Ngu !!!");}
if (playerid == idmem2_sena) {ts.delay(500);ts.AcceptParty(playerid);debug(play erid + " Gia nh?p d?i ngu");
ts.Sena(idmem2_sena);pt2 = 1; debug(playerid + " Làm Quân Su");}
if (pt1 ==1 && pt2 == 1) {ts.delay(500);debug("Ð?i ngu dã d?y -> Thi hành l?nh Start");Start();}
}
public override void PartyStop(uint playerid)
{
if (playerid == idmem1) {debug(playerid+" R?i Kh?i Ð?i Ngu !!!");ts.Disconnect();}
if (playerid == idmem2_sena) {debug(playerid+" R?i Kh?i Ð?i Ngu !!!");ts.Disconnect();}
}
/************************ Init Bot *************************/
public override void InitBot()
{
AddDropItemList("viênongm?t");
AddDropItemList("t?d u?ngthu?c");
AddDropItemList("viên công kích");
Stop();
ts.Walk(882, 355); // reco l?i thì di d?n ch? an toàn
ts.RequestParty(idchupt); // c?a mem thì thêm ph?n này
}
thanks bác. Sau khi thêm vào mấy chỗ nó chạy ngon rùi nhưng ăn ma nhiều qué. hic 1 đêm thức 5 lần thì lần nào ít cũng 8 anh BTQ lần nhiều thì ối chời 2 tiếng mà dính 121 anh BTQ. hu hu hu :whew: :cry: :cry: :cry:Katikate nói:hic
có được đâu hả bác???
Thank bạn nhiều lắm , vì mình ko dám thay đổi vài lệnh vì trong đầu chỉ có chút kiến thức về mấy cái này thôi ^^!ac4demy_07 nói:to Xích lô hông:
common send đồ cho 2 người thì bạn làm thế này( đây la common send đồ ở gate Triêu Chi của mình)
Mã: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 == 26018 || oSlot.itemid == 26050 || oSlot.itemid == 26078 || oSlot.itemid == 26003 || oSlot.itemid == 26100 || oSlot.itemid == 26101 || oSlot.itemid == 46033 || oSlot.itemid == 46027 || oSlot.itemid == 26165 || oSlot.itemid == 46016 || oSlot.itemid == 46013 || oSlot.itemid == 46041 ) && oSlot.num == 50) {ts.SendItemTo(2176304,oSlot.slot,oSlot.num);} /// đây là send đồ if((oSlot.itemid == 27047 || oSlot.itemid == 27005 || oSlot.itemid == 27035 || oSlot.itemid == 27032 ) && oSlot.num == 50) {ts.SendItemTo(2176336,oSlot.slot,oSlot.num);} /// đây là send đồ } }

void FindItemSale(uint Iid,byte num)
{
for(byte i=0;i< 25;i++)
{
Slot oSlot = (Slot)ts.MyItems[i];
if( oSlot.itemid == 0 )
{
continue;
}
if(oSlot.itemid == Iid && oSlot.num == num)
{
Item oItem = (Item)ts.ITEMS[oSlot.itemid.ToString()];
ts.Sell(oSlot.slot,num);
debug("Sell " + oItem + " amount " + num , 0xC08008);
}
}
}
double TimeSale = 0;
public override void OnTimer()
{
TimeSale++;
if (TimeSale % 200 == 0)
{
FindItemSale( 26018, 50);
FindItemSale( 26078, 50);
FindItemSale( 26003, 50);
FindItemSale( 46033, 50);
FindItemSale( 26050, 50);
FindItemSale( 26101, 50);
FindItemSale( 26100, 50);
FindItemSale( 26165, 50);
FindItemSale( 26085, 50);
FindItemSale( 46013, 50);
FindItemSale( 20729, 50);
FindItemSale( 46027, 50);
FindItemSale( 46041, 50);
FindItemSale( 46016, 50);
}
}
public override void NpcDialog(ushort DialogId)
{
debug("Dialog ID = "+ DialogId.ToString());
ts.SendEnd();
}
public override void NpcDialogMenu(ushort DialogId)
{
debug("Dialog Menu ID = "+ DialogId.ToString());
ts.SelectChoice(2);
ts.SendEnd();
}
public override void InitBot()
{
ts.SetTimerOnOff(true);
ts.ClickOnNPC(2);
}
double TimeSale = 0;
public override void OnTimer()
{
TimeSale++;
if (TimeSale % 200 == 0)
{
FindItemSale( 27047, 50);
FindItemSale( 27066, 50);
FindItemSale( 27005, 50);
FindItemSale( 27035, 50);
FindItemSale( 27032, 50);
FindItemSale( 27022, 50);
FindItemSale(27034, 50);
FindItemSale(27068, 50);
FindItemSale(27003, 50);
FindItemSale(27065, 50);
FindItemSale( 27029, 50);
}
}
public override void NpcDialog(ushort DialogId)
{
debug("Dialog ID = "+ DialogId.ToString());
ts.SendEnd();
}
public override void NpcDialogMenu(ushort DialogId)
{
debug("Dialog Menu ID = "+ DialogId.ToString());
ts.SelectChoice(2);
ts.SendEnd();
}
public override void InitBot()
{
ts.SetTimerOnOff(true);
ts.ClickOnNPC(1);
}