• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Wrote a script -> getting an error

    Discussion in 'Requests & Discussion' started by avocadowarrior, Nov 12, 2013.

    1. avocadowarrior

      avocadowarrior New Member

      Joined:
      Jun 17, 2012
      Messages:
      70
      Likes Received:
      0
      Trophy Points:
      0
      I'm writing a very basic script that I intend to use with HBRelog tasks to enable mailing items to a bank alt for AHing.

      So the purpose of this script is:

      1. Fly to ground and dismount
      2. Hearth
      3. Mail items to alt

      What I've written so far (and haven't tested as I'm at work):

      Code:
      <HBProfile>
      
      	<Name>Hearth and Mail</Name>
      		<MinLevel>85</MinLevel>
      		<MaxLevel>91</MaxLevel>
      		
      		<MinFreeBagSlots>60</MinFreeBagSlots>
      		
      		<MailGrey>False</MailGrey>
      		<MailWhite>True</MailWhite>
      		<MailGreen>True</MailGreen>
      		<MailBlue>True</MailBlue>
      		<MailPurple>True</MailPurple>
       
      		<SellGrey>True</SellGrey>
      		<SellWhite>True</SellWhite>
      		<SellGreen>False</SellGreen>
      		<SellBlue>False</SellBlue>
      		
      		<TargetElites>False</TargetElites>
      		
      		<Mailboxes>
      			<Mailbox  X="791.27" Y="296.38" Z="503.42" /> <!-- Shrine -->
      		</Mailboxes>
      		
      		<Vendors>
      			<Vendor Name="Sway Dish Chef" Entry="63013" Type="Food" X="776.9479" Y="270.2587" Z="503.4202" /> <!-- Shrine -->
      		</Vendors>
      		
      	<QuestOrder>
      		<Custom Behavior File="ForcedDismount">
      		<UseItem ItemId="6948" /> <!--Hearthstone-->
      		
      	</QuestOrder>
      	
      </HBProfile>
      What I'm hoping is that when I start the script, no matter where it is, it will fly to the ground and dismount (with the ForcedDismount behaviour) --> Hearth to Shrine (with UseItem set to the Hearthstone ID) and then realise the bags are "full" (with the very tight bag space allowance) and mail everything to the alt.

      What I'm actually getting is a HB error:

      The 'CustomBehavior' start tag on line 31 position 4 does not match the end tag of 'QuestOrder'. Line 34, position 4.

      Can someone please point me in the right direction?
       
    2. zakanator

      zakanator New Member Buddy Store Developer

      Joined:
      Feb 19, 2012
      Messages:
      676
      Likes Received:
      23
      Trophy Points:
      0
      You're not closing the tag for <Custom Behavior File="ForcedDismount">. You need to change it to <Custom Behavior File="ForcedDismount" />
       
    3. avocadowarrior

      avocadowarrior New Member

      Joined:
      Jun 17, 2012
      Messages:
      70
      Likes Received:
      0
      Trophy Points:
      0
      Starting the bot!
      Currently Using BotBase : Questing
      Warning: XML Error: Attribute QuestId of positive integral type was missing in "UseItem" tag. - On line 32
      Changing current profile to Hearth and Mail
      [Singular] attention: Pull Distance set to 100 yds by Questing, Plug-in, Profile, or User
      Bot Stopped! Reason: Nothing more to do.


      Hmm.. So I guess trying to get hearth to work based on "UseItem" didn't work.
       
    4. avocadowarrior

      avocadowarrior New Member

      Joined:
      Jun 17, 2012
      Messages:
      70
      Likes Received:
      0
      Trophy Points:
      0
      So I changed it to this:

      Code:
      <QuestOrder>
      		<CustomBehavior File="ForcedDismount" />
      		<CustomBehavior File="Misc\RunLua" Lua="UseItemByName(6948)" WaitTime="1000" />
      		
      </QuestOrder>
      And I got this:

      Starting the bot!
      Currently Using BotBase : Questing
      Changing current profile to Hearth and Mail
      Mounting Traveler's Tundra Mammoth to repair...
      Mounting Traveler's Tundra Mammoth to repair...


      I flew to the ground manually and it sold a few items from my bag. I stopped the bot, bought back the items, added them to the protected list in MrItemRemover and started it again - it did it again.

      Odd.
       
    5. avocadowarrior

      avocadowarrior New Member

      Joined:
      Jun 17, 2012
      Messages:
      70
      Likes Received:
      0
      Trophy Points:
      0
      Can anyone point me in the right direction?
       
    6. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi, Avocadowarrior,

      When Honorbuddy decides its time to make a vendor run (mail/sell/repair), the profile is suspended while Honorbuddy makes the vendor run. The profile is resumed again, once the vendor actions have been completed.

      Since you have MinFreeBagSlots set absurdly large, Honorbuddy is always going to want to sell/repair/mail when it is started, and your profile basically doesn't even get a chance to run.
      <MinFreeBagSlots>60</MinFreeBagSlots>

      What you want is to set MinFreeBagSlots to something like '1'. Then, bracket your profile directives to check for a 'higher value'.
      <If Condition="Me.FreeBagSlots &lt; 3">
      <CustomBehavior File="ForcedDismount" />
      <CustomBehavior File="Misc\RunLua" Lua="UseItemByName(6948)" WaitTime="1000" />​
      </If>​


      cheers,
      chinajade
       

    Share This Page