Hey all
With a lot of copy/paste from this code
https://code.google.com/p/hb-dev-sma...COD+Mail+2.xml
I've made my own ProfessionBuddy profile for sending mail automaticaly with C.O.D. to buyer
It takes an item ( Green Tea Leaf for exemple ) in all the mail, and send it with C.O.D.
It works ! But i need to start and stop the bot every times like this :
Start - 1st part 1st item - Stop - Start - 2nd part 1st item + 1st part 2nd item - Stop - Start 2nd part 2nd item + 1st part 3rd item - Stop .....
I think my problem is in this code :
Code:
<If Condition="MailCount > 0 && InbagCount (72234) < 10" IgnoreCanRun="True">
<GetMailAction GetMailType="Specific" ItemID="72234" CheckNewMail="True" MaxCODAmount="0g0s0c" MinFreeBagSlots="1" AutoFindMailBox="True" Location="0, 0, 0" />
</If>
<StackItemsAction />
<If Condition="(bool)Settings["COD"]" IgnoreCanRun="True">
<MoveToAction Location="-8861.501, 636.7444, 96.17851" MoveType="NearestMailbox" Pathing="Navigator" Entry="0" />
<While Condition="InbagCount (72234) >= 5" IgnoreCanRun="True">
<InteractionAction InteractType="GameObject" Entry="0" InteractDelay="0" GameObjectType="Mailbox" SpellFocus="Anvil" />
<CustomAction Code="Thread.Sleep(300); Lua.DoString("RunMacroText(\"/click MailFrameTab2\")"); Thread.Sleep(300);" />
<CustomAction Code="Lua.DoString("local j=0 local i=0 for b=0,4 do for s=1,GetContainerNumSlots(b) do local n=GetContainerItemLink(b,s) if n then if strfind(n,\"72234\") and i<12 then _,c=GetContainerItemInfo(b,s) j=j+c UseContainerItem(b,s) i=i+1 end end end end codprice=j*(1) SetSendMailCOD(codprice) SendMail(Calligraphe,\"Feuille de thé vert\",\"\") totalprice = totalprice+codprice DEFAULT_CHAT_FRAME:AddMessage(\"Sending \"..string.format(\"%.0f\",j)..\" Feuille de thé vert (\"..string.format(\"%.0f\",j/20)..\" stacks) C.O.D to \".. Calligraphe .. \" for \"..string.format(\"%.0f\",codprice)..\" gold.\"..\" Totally sent for \"..string.format(\"%.0f\",totalprice)..\" gold this session.\",0.0,1.0,0.0)"); Thread.Sleep(500);" />
</While>
</If>
And here is the files with full code :
COD3.xml
If someone can help me, it would be my god!
Thanks in advance !