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

help with hearthstone cooldown and free bag slots for a questing profile

Clu

New Member
Joined
Jun 22, 2011
Messages
54
Reaction score
11
I'm trying to write a questing profile for the alliance that:

- uses the questing botbase and contains zone specific subprofiles (not done with the subprofile tag) to harvest minerals and herbs TO DO, is there any drawback in using the questing botbase as a gathering bot?

- navigates through continents to cataclysm zones (tbc and wrath too maybe once I got it working) and back to stormwind; stepping through the twilight highlands portal is done, uldum+vashjir hearthstoning works, need to complete tol barad, hyjal and deepholm portals

- has a centralized repair/mail hub in stormwind to use after a minimum inventory space is left; repairing and mailing are DONE (force vendor and force mail are easy :) )

- chooses based on a chance a random profile to farm and goes through the portal leading to that zone; TO DO


I'd like your help for a couple of issues:

- is there any way to check how many bag slots are empty and react by that information? for example <GrindTo Condition="Me.INSERT SOMETHING HERE" &lt; 10 />

- is there a more elegant way to use an hearthstone instead of running a macro with this line?
<CustomBehavior File="RunMacro" Macro="/use hearthstone" NumOfTimes="1" />

- is there any way to check for an item cooldown (said hearthstone) and add a delay until cooldown is zero? hearthstoning back to stormwind would be much more failsafe


I guess those questions are rather easy for an experienced profile writer, but I couldn't figure them and didn't find anything on the wiki.
Thanks in advance.
 
1) StyxWoW.Me.FreeBagSlots
2) var hearthstone = ObjectManager.GetObjectsOfType<WoWItem>(false).FirstOrDefault(i => i.Entry == 6948);
3) hearthstone.Cooldown


new Wait(30*60, ret=>hearthstone.Cooldown <= 0, CreateMyLogic())
 
Thanks for helping but I feel like I stepped out of my league;

1) can't find FreeBagSlots in the documentation, closest thing I've found is Styx.Logic.Inventory Namespace-->InventoryManager Class-->InventoryManager Poperties-->FreeSlots Property

2-3) you have absolutely lost me here, can I declare variables inside xml profiles? this looks like more of a custom behaviour

I know that I'm lacking the basics, but I hope to accomplish my goal even if it's a bumpy ride, if I'm successful the profile will be shared.
 
Apoc your code (var hearthstone=..) give me the error
"The type argument for metod 'Styx.WoWInternals.ObjectManager.GetObjectsOfType<T>(bool)' cannot be inferred from usage. Try specifying the type arguments explictly".
What does that mean and how can i solve it? :D
EDIT: Found the solution
Code:
var hearthstone = ObjectManager.GetObjectsOfType Styx.WoWInternals.WoWObjects.WoWItem (false).FirstOrDefault(i => i.Entry=6948);
Work fine if you put the minus and major around styx,wowinternals.wowobjects.wowitem, if you try to put something inside minus and major the forum will not show you that text.. this is strange! <>
 
Last edited:
Yea, its just vBulletin cutting out the stuff. :(
 
I was getting mad to understand why your code didn't worked :P damned vBulletin! ^__^
 
Back
Top