What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Quest Behavior]CODMail

AknA

Well-Known Member
Joined
Feb 11, 2012
Messages
1,794
FAQ!

What is CODMail?
CODMail is a Quest Behavior that gives you the ability to send selected items to selected people (with or without COD).

What does CODMail do?
CODMail will first find the nearest mailbox, if you have one close to you, it will move to it.
Then it will stack all your items you have in your bags.
After that it will split one stack (if needed) to the amount it should send.
It will then open the mailbox, fill in the information (name/subject/cod) and add the item and send it.

How do I use this?
In a quest profile use these commands.
Name = Name of the one you want to send the mail to (REQUIRED)
ItemID = The itemID of the item you want to send (REQUIRED)
Amount = Amount of the item you want to send (OPTIONAL, default = 1)
CodGold = Gold for the COD (OPTIONAL, default = 0)
CodSilver = Silver for the COD (OPTIONAL, default = 0)
CodCopper = Copper for the COD (OPTIONAL, default = 0)
Note that the COD you set is for everything you send in that mail, it's NOT / stack.

Examples:
This would send 1 full stack of Windwool Cloth with COD 1 gold, 2 silver, 3 copper to AknA
PHP:
<CustomBehavior File="Misc\CODMail" Name="AknA" ItemID="72988" Amount="20" CodGold="1" CodSilver="2" CodCopper="3" />
This would send 1 stack of 1 Windwool Cloth without COD to AknA
PHP:
<CustomBehavior File="Misc\CODMail" Name="AknA" ItemID="72988" />
This would send 2 full stacks and one stack of 7 of Windwool Cloth without COD to AknA
PHP:
<CustomBehavior File="Misc\CODMail" Name="AknA" ItemID="72988" Amount="47" />

This doesn't work?
Then please write a post and include a log and explain what isn't working.

I love this, do you accept donations?
Yes, at the bottom of the post you can see a link if you have a coin to spare.

Special thanks?
HighVoltz for the stacking method, it was more clean than the one I made.
chinajade for all the help with Behavior Tree programming questions.

Current issues?
None that I know of.

How do I install this?
You either download the file included in this post and copy it to your 'HB\Quest Behaviors\Misc' library.
Or you can use this SVN Link
 

Attachments

Last edited:
Thanks a looooooooot for creating it AknA !!!!

I test it now

EDIT: Okay, after 1st test here is my result :

It moves perfectly to the nearest mailbox

I have 11 stack of 20 Ghost Iron Ore in my bags

I use this line

<CustomBehavior File="Misc\CODMail" Name="Sowsix" ItemID="72092" Amount="20" CodGold="35"/>

It sending the 11 stack in one mail for 35 Gold ^^ So it is not sending item one stack at a time

Testing now with 22 x 20 ghost iron .. same line

He try to send all the stack in one mail, i've a red message like "you can't sent more than 12 stack in 1 mail" but it has successfully sending the 12 stacks
 
Last edited:
Thanks a looooooooot for creating it AknA !!!!

I test it now

EDIT: Okay, after 1st test here is my result :

It moves perfectly to the nearest mailbox

I have 11 stack of 20 Ghost Iron Ore in my bags

I use this line

<CustomBehavior File="Misc\CODMail" Name="Sowsix" ItemID="72092" Amount="20" CodGold="35"/>

It sending the 11 stack in one mail for 35 Gold ^^ So it is not sending item one stack at a time

Testing now with 22 x 20 ghost iron .. same line

He try to send all the stack in one mail, i've a red message like "you can't sent more than 12 stack in 1 mail" but it has successfully sending the 12 stacks
Hmm ??? it shouldn't attach more than one item / mail, have to check the code then.
 
mabey a stupid question, but can i use this in profession-buddy profiles?

btw, nice work and thanks for the share :)
 
FAQ!

What is CODMail?
CODMail is a Quest Behavior that gives you the ability to send selected items to selected people (with or without COD).

What does CODMail do?
CODMail will first find the nearest mailbox, if you have one close to you, it will move to it.
Then it will stack all your items you have in your bags.
After that it will split one stack (if needed) to the amount it should send.
It will then open the mailbox, fill in the information (name/subject/cod) and add the item and send it.
In the current version, you can only attach ONE item / mail, so NEVER set the Amount bigger than the biggest stacksize of the item.
So if you want to send all stacks of a certain item then you have to make a loop in your Quest Profile.

How do I use this?
In a quest profile use these commands.
Name = Name of the one you want to send the mail to (REQUIRED)
ItemID = The itemID of the item you want to send (REQUIRED)
Amount = Stacksize of the item you want to send (OPTIONAL, default = 1)
CodGold = Gold for the COD (OPTIONAL, default = 0)
CodSilver = Silver for the COD (OPTIONAL, default = 0)
CodCopper = Copper for the COD (OPTIONAL, default = 0)

Examples:
This would send 1 stack of Windwool Cloth with COD 1 gold, 2 silver, 3 copper to AknA
PHP:
<CustomBehavior File="Misc\CODMail" Name="AknA" ItemID="72988" Amount="20" CodGold="1" CodSilver="2" CodCopper="3" />
This would send 1 Windwool Cloth (not 1 stack but 1 cloth) without COD to AknA
PHP:
<CustomBehavior File="Misc\CODMail" Name="AknA" ItemID="72988" />

This doesn't work?
Then please write a post and include a log and explain what isn't working.

I love this, do you accept donations?
Yes, at the bottom of the post you can see a link if you have a coin to spare.

Special thanks?
HighVoltz for the stacking method, it was more clean than the one I made.
chinajade for all the help with Behavior Tree programming questions.

How do I install this?
You either download the file included in this post and copy it to your 'HB\Quest Behaviors\Misc' library.
Or you can use this SVN Link

the issue is in your lua

Code:
            Lua.DoString(
                string.Format(
                "local item = {0} ", ItemID) +
                string.Format(
                "local amount = {0} ", Amount) +
                "attachDone = 0 " +
                "for b=0,4 do " +
                    "for s=1,GetContainerNumSlots(b) do " +
                        "if ((GetContainerItemID(b,s) == item) and (select(2, GetContainerItemInfo(b,s)) == amount)) then " +
                            "UseContainerItem(b,s) " +
                            "attachDone = 1 " +
                        "end " +
                    "end " +
                "end"
this iterate through all your bags and attach everything with the correct item (id) and the correct stackcount (stacked by amount number), without counting how much items are attached and so on...
for example u have 14 stacks of an ore with an StackSize of 20 ... it loops through all your 14 stacks and attach'em (well wow denies the last 3, but the code will try it^^), u need a bit more failsafety here .... for example at the place where u do attachDone=1, u also need to raise a var as multiplier for the COD-Value, or something like that
 
the issue is in your lua

Code:
            Lua.DoString(
                string.Format(
                "local item = {0} ", ItemID) +
                string.Format(
                "local amount = {0} ", Amount) +
                "attachDone = 0 " +
                "for b=0,4 do " +
                    "for s=1,GetContainerNumSlots(b) do " +
                        "if ((GetContainerItemID(b,s) == item) and (select(2, GetContainerItemInfo(b,s)) == amount)) then " +
                            "UseContainerItem(b,s) " +
                            "attachDone = 1 " +
                        "end " +
                    "end " +
                "end"
this iterate through all your bags and attach everything with the correct item (id) and the correct stackcount (stacked by amount number), without counting how much items are attached and so on...
for example u have 14 stacks of an ore with an StackSize of 20 ... it loops through all your 14 stacks and attach'em (well wow denies the last 3, but the code will try it^^), u need a bit more failsafety here .... for example at the place where u do attachDone=1, u also need to raise a var as multiplier for the COD-Value, or something like that
Thanks Stormchasing :)
Yes, that would work. But then it wouldn't work as I intend it to.
Actually, how it works now was a thing I didn't think of but still a good thing, simple way to only attach 1 item would be to add "and attachDone ~= 1" to the if case to use the item. But as it worked in a way I didn't think of I think I might as well change it so it uses one more local variable in the lua that is amount, then just have a "amount = amount - GetStackinfo()" yes, I know I can't call that C# method in the code, but you get the point :)
 
u could also precalc how many stacks u have and calc the amount of mails u will need, the amount of COD and so on within the c# code aswell
there are of course multiple possible solutions possible :)
 
Well, I'm working on so you can set any amount you want to send now instead, hopefully I get it done tomorrow.
 
Fully working now, however, I couldn't upload the file due to issues with webserver, use SVN to get the file.
 
Akna, is there a way to send all of what you have in your bags of a specific id? Something like "Amount="*" " or all?
 
Sorry for asking this again, but I can't find a working alternative cod plugin (except for MailMan which in turn only works with combat-botbase). So does this work with Profession/Gatherbuddy? Maybe it hasn't been answered because of really being a dumb question. But me not knowing if these botbases also use the Quest Behaviours :<
Thanks in advance!

P.S.:
Akna, is there a way to send all of what you have in your bags of a specific id? Something like "Amount="*" " or all?
Upvote! :>
 
Sorry for asking this again, but I can't find a working alternative cod plugin (except for MailMan which in turn only works with combat-botbase). So does this work with Profession/Gatherbuddy? Maybe it hasn't been answered because of really being a dumb question. But me not knowing if these botbases also use the Quest Behaviours :<
Thanks in advance!

P.S.:

Upvote! :>
QuestBehaviors work with Questing botbase and a profile that calls the behavior, can't swear on any other botbases, Gatherbuddy I'm 99% sure it won't work with as it's only locations in that and I'm not sure you can call QB's in Professionbuddy.

And I haven't had time to look at adding a * ammount (actually forgot about that) but I'll try to look into it after work tonight (just home for lunch atm)
 
Sadly that's what I expected and so the plugin is useless for me. Unless I could make the bot gather in questing botbase.. Hm I can't be the only one looking for such an plugin making the bot sending gathered things via cod to others..
Thanks anyway!
 
On what line do I put this code?
<CustomBehavior File = "Misc \ CODMail" Name = "Gaulêz" ItemID = "72092" Amount = "5" CodGold = "35" />
You could add 1 picture for best view I?
 
Back
Top