• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [ProfessionBuddy+] COD Cash on Delivery

    Discussion in 'Archives' started by Zurtrogx, May 5, 2012.

    1. Zurtrogx

      Zurtrogx New Member

      Joined:
      Mar 13, 2012
      Messages:
      5
      Likes Received:
      0
      Trophy Points:
      0
      Hey,

      I've been looking around the forums but can't seem to find a cash on delivery mail plugin that does what I want. So, I've edited the "MailItemAction" command of ProfessionBuddy.

      Changes include:
      • Fixing the "amount" parameter, so it will now send the correct amount. It was sending too many before. Every time it reach the limit of the mail attachments, it would remove the last item from the amount left to send, thus giving an extra 20 items for each mail load sent. (i.e. 2 mails, would be 20 extra, 10 mails would be 180 extra).
      • It will now attach 12 items to each mail instead of 11. Not sure if it was meant to be 11 on purpose or a coding mistake?
      • Added a recipient name parameter (i.e. who you're sending to). If left blank, it will use whoever is in your HonorBuddy settings.
      • Added a item price parameter. Will calculate the total price of the items (not stacks) attached and COD the appropriate amount. Set all values to 0 if you don't want to COD.

      Known issue (Read this if you're planning on using it):
      If you are trying to send mail to several different people or for different values, it will send an incorrect amount. To resolve this, add a wait timer between each MailItemAction. I recommend at least 5000ms (any less and it still has issues, according to my testing).


      Potential uses for this enchancement:
      1. Being able to send the correct amount and attaching 12 items instead of 11 to each mail
      2. Mass COD of items to one or more players
      3. Implement it with an Auction House bot, so you can now COD items instead of just posting everything on the Auction House
      4. Keep X items and COD the rest to whoever you're selling to

      Installation:
      To make this work, you'll need ProfessionBuddy (obviously).

      Once you have ProfessionBuddy installed, replace the following files with my files:
      yourHonorBuddyDirectory\Bots\ProfessionBuddy\Composites\MailItemAction.cs
      yourHonorBuddyDirectory\Bots\ProfessionBuddy\Localization\Strings.xml


      I don't actually know what I'm doing, so if I am an idiot and have made some terrible mistake by making these changes, please let me know. Don't be too harsh. :(

      Otherwise, enjoy!
       

      Attached Files:

    2. MadDog

      MadDog Well-Known Member

      Joined:
      Nov 5, 2011
      Messages:
      1,249
      Likes Received:
      38
      Trophy Points:
      48
      This is awesome, thanks heaps
       
    3. Zurtrogx

      Zurtrogx New Member

      Joined:
      Mar 13, 2012
      Messages:
      5
      Likes Received:
      0
      Trophy Points:
      0
      No problem.

      Also, to everyone that is downloading it and using it:
      If you could post some feedback it would be appreciated. .
       

    Share This Page