• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Quest Behavior] Natfoth's QB MegaThread

    Discussion in 'Archives' started by Natfoth, Dec 17, 2010.

    1. Natfoth

      Natfoth Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,446
      Likes Received:
      37
      Trophy Points:
      0
      This is a system that was put in place to expand the realm of quests, These are all the official HB scripts and have been created and maintained by myself. The Wiki now describes all of these. I will post updates on this thread and supply the latest scripts.

      All Donations are accepted and help fund work.
      [​IMG]

      V2.0.4
      - Updated to work with the new behavior changes again
      - Fixed more combat bugs
      - Fix a few bugs with MyCTM and various other ones that had Mounting.
      V2.0
      - Massive Massive changes to the behaviors, They are all now fully converted to use a new far fast and use better methods then what was used in the past
      - All behaviors now use a Progressive Scanning feature like HB does rather then just searching nearby once you reach the location. This will make all behaviors faster
      - All behaviors now go off a new timer system so that they will always defend themselves, Except the NoCombat behaviors that are designed not to engage combat
      - All behaviors are rewritten, however very few changes to the profiles should occure
      - NoCombatVehicle has been merged so it should now use SpellIndex rather then the SpellID, so that you can just do the Button Bar Number For easier use
      - Greatly Updated the logic of all behaviors to be far smarter and more advanced then they were before
      - Documentation has been added to every behavior
      - Updated all Status and Goal Messages to match that of HB's and to include better information
      - All Behaviors that use item now use the HB API to do so
      - Will spit out the Name of the item being used, Npcs that it is attacking, and spells being casted for easier understanding
      - All behaviors will now work far faster and way more improved then they were before.

      This is just a test release, please report all and any bugs to this thread and I will fix them up ASAP. Thanks ~ Natfoth.



      V1.2.0
      - Updated all of the behaviors to use the Arg Checking system
      - NoControlVehicle Cannons now have a 4th option, Will use a spell then click an npc location.
      - UseItemOn now has a Range as optional
      - NoCombatVehicle will redo the quest if it was not completed on the first round
      - Added a Kill Mob X Times behavior for those pesky kill any mob quests (Supports up to 3 Mobs)
      - UseItemTargetLocation now has Multiple Times
      - UseItemTargetLocation now has a Min Range (Optional)
      - UseItemOn can now support dead targets (Optional)
      - CombatUseItem is no longer Hard coded to my worgen profile
      - Vehicle Behavior LUA should be working fully again
      - UseItemOn can now be used to "Capture" mobs or used when mob is at x% HP
      - UseItemOn will now support Ranged Targets, Such as Shooting Birds down.
      - WaitTimer will now accept an Optional QuestID
      - Added GoalText and StatusText to all of the behaviors
      - Lots of behaviors will repeat now if QuestID > 0, leave the QuestID out if you only want it do it once.
      V1.1.0.0
      - Added Quest Log Completion and Accepting Behaviors. Now Uses QuestID.
      - Updated a lot of the behaviors to use Navigator.MoveTo rather then the older system
      - Added a UseItemTargetLocation behavior for those pesky quests that require you to use an item and target a spot while not in a vehicle.
      V1.0.0.9
      - Hopefully fixed GameObject
      - Added a basic Escort NPC behavior: Should engage in combat if the npc enters combat also.
      - A few more small fixes
      V1.0.0.8
      - Updated scripts to work with the new Args system again. Will work with HB 2.0.0.3956.
      - Updated many of the scripts for small errors, Navigation problems, and various other fixes.
      - Added a TalkNow script which will just active that messages already on the screen for a few object/item scripts.
      V1.0.0.7
      -Updated ForceTrain so that it will auto-find trainers
      -Updated CastSpellOnTarget so it should work much better now, hopefully this will fix a lot of the issues with the trainers
      V1.0.0.6
      -Added more quest checks to make sure things do not repeat or go on longer then needed
      -Fixed a few quests errors that had some wrong quest IDs and some duplicates
      -Fixed all of the logs on the behaviors so that they are correct now
      -Updated some of the smaller behaviors
      V1.0.0.5
      -Fixed More Conversion issues
      -Fixed more behaviors
      V1.0.0.4
      -Fixed Many conversion errors
      -Fixed the CastSpellOnTarget
      -Fixed A few of the behaviors that didn't even work
      -Changed the coord system to use X="0" Y ="0" Z = "0" to allow for easier to understand profiles and less errors when creating new ones
      -Added lots of quest objective complete checks on the behaviors
      V1.0.0.3
      -Added the new CastSpellOnTarget that will allow you to set a min distance and will stop when it gets to that distance regardless if its running to the location or to the npc
      -Updated the Profile to support the new CastSpellOn Changes
      -Changed the BasicMoveTo and renamed it to NoCombatMoveTo so it is easier to understand what the behavior does and changed the behavior to support the change
      -UseItemOn now checks to see if the quest is completed now
      V1.0.0.2
      -Added support for the new Args, this will drastically change the way we look at profiles so that we can understand them far better
      - Added the new ForceTrain
      V1.0.0.1
      -Fixed Cast Spell
      V1.0.0.0
      -Release


      Code:
      int npcID;
                  if (!GetAttributeAsInteger("NpcId", true, "1", 0, int.MaxValue, out npcID))
                      Logging.Write("Parsing NpcId in Escort behavior failed! please check your profile!");
      This is the new way to handle Args within the profile. The args will show up the same on the behavior that has not changed. But this new system allows you to lock the args into place for more secure profiles. Let me explain what each one does.

      Code:
      "NpcId"
      This is the arg name that shows up on the profile such as
      Code:
      NpcID="1231"
      Code:
      true
      The next thing is a BOOL, this will tell us if the arg is Required or if the user is able to leave it out. Things such as NPCID that are essential should always be True.

      Code:
      "1"
      This is a string that will tell the user what they should put in the value if they put in an invalid arg. Kind of like giving them a hint. In this case I tell them it has to be a number by saying 1, but in other cases such as a name it would be "Natfoth".

      Code:
      0
      This is the min value that the Arg will accept. If the user puts in another less the script will error out, stop HB, and post a message saying what your default should be.

      Code:
      int.MaxValue
      This is the same above but the max. When doing a NPC, Object, or Quest. This should be the MaxValue. If this is something such as BehaviorType that I use in my Vehicle scripts they can only put a value of 3 since there is only 3 options.

      Arg Types

      Code:
      GetAttributeAsBoolean
      GetAttributeAsFloat
      GetAttributeAsInteger
      GetAttributeAsSpecificString
      GetAttributeAsString
      GetXYZAttributeAsWoWPoint
      GetXYZAttributeAsWoWPoint
      
      Examples:

      Code:
      int npcID;
                  if (!GetAttributeAsInteger("NpcId", true, "1", 0, int.MaxValue, out npcID))
                      Logging.Write("Parsing NpcId in Escort behavior failed! please check your profile!");
      Code:
      WoWPoint location;
                  if (!GetXYZAttributeAsWoWPoint("X", "Y", "Z", true, new WoWPoint(0, 0, 0), out location))
                      Logging.Write("Parsing location in Escort behavior failed! please check your profile!");
      Code:
      int TypeID;
                  if (!GetAttributeAsInteger("TypeId", true, "1", 0, 3, out TypeID))
                      Logging.Write("Parsing TypeId in NoControlVehicle behavior failed! please check your profile!");
      Code:
      int questId;
                  if (!GetAttributeAsInteger("QuestId", true, "1", 0, int.MaxValue, out questId))
                      Logging.Write("Parsing questid in NoControlVehicle behavior failed! please check your profile!");
      
                  QuestId = (uint)questId;
       

      Attached Files:

      Last edited: Mar 4, 2011
    2. Spartanmfot

      Spartanmfot New Member

      Joined:
      Aug 29, 2010
      Messages:
      346
      Likes Received:
      1
      Trophy Points:
      0
      Wow Natfoth... Just wow! Thanks very much for this QB's mate will make things alot easier from now on xD

      Also have you previously coded prior to using HB/GB or have you just learned it since?
       
    3. Natfoth

      Natfoth Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,446
      Likes Received:
      37
      Trophy Points:
      0
      Professionally I am a Game Programmer for a smaller studio. I also have done a lot of HB work just spread out over time.
       
      laurence2410 likes this.
    4. asdfowkw

      asdfowkw Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      263
      Likes Received:
      0
      Trophy Points:
      16
      Forgot to thank you in the thread too ^^ !
       
    5. cowdude

      cowdude Active Member

      Joined:
      Feb 17, 2010
      Messages:
      337
      Likes Received:
      27
      Trophy Points:
      28
      Great work :)
       
    6. laria

      laria Well-Known Member

      Joined:
      Jan 15, 2010
      Messages:
      5,386
      Likes Received:
      36
      Trophy Points:
      48
      I think ForceTrain should check wether the character has trained with the hb core feature "train new spells", once it sees the behaviour tag.
      I noticed that if i get lucky in kills, and ding before the forcetrain tag is read, hb can have trained spells before.
      Could save a little time at the trainer and the open trainerwindow that stays a while then ;)
       
      Last edited: Dec 18, 2010
    7. Natfoth

      Natfoth Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,446
      Likes Received:
      37
      Trophy Points:
      0
      The ForceTrain is totally being rewritten right now, I put that in the post hehe
       
    8. laria

      laria Well-Known Member

      Joined:
      Jan 15, 2010
      Messages:
      5,386
      Likes Received:
      36
      Trophy Points:
      48
      Well, i cant mind read, so i post my issues and hope they will disappear soon ;)
       
    9. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Absolutely amazing, it's a shame that HB doesn't have anything like this yet, maybe all they need is more coders :)
       
    10. laria

      laria Well-Known Member

      Joined:
      Jan 15, 2010
      Messages:
      5,386
      Likes Received:
      36
      Trophy Points:
      48
      I wouldnt call it shame, the questbehaviours are something which was made possible by the team. I think it will be merged into "mainline" hb one day
       
    11. UndiluteD

      UndiluteD New Member

      Joined:
      Oct 31, 2010
      Messages:
      389
      Likes Received:
      0
      Trophy Points:
      0
      Great work will have a play around with these later!
       
    12. Woodi

      Woodi Banned

      Joined:
      Dec 13, 2010
      Messages:
      67
      Likes Received:
      0
      Trophy Points:
      0
      Do you have a quest behavior that will run to a XYZ position without attacking any mobs?
       
    13. Natfoth

      Natfoth Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,446
      Likes Received:
      37
      Trophy Points:
      0
      The basic move to will do just that
       
    14. laria

      laria Well-Known Member

      Joined:
      Jan 15, 2010
      Messages:
      5,386
      Likes Received:
      36
      Trophy Points:
      48
      There was a ne HB release , so until QBs are updated, they wont work and fill your log with compile errors.
       
    15. Natfoth

      Natfoth Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,446
      Likes Received:
      37
      Trophy Points:
      0
      Updated to work with the new args and included the new ForceTrain
       
    16. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      <CustomBehavior File="BasicInteractWith" QuestId="14069" NpcId="34830" MoveTo="1" />

      Cant get it too work just spams invlaid argument
       

      Attached Files:

    17. Natfoth

      Natfoth Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,446
      Likes Received:
      37
      Trophy Points:
      0
      I see what the problem is, Fixing it now.
       
    18. Nuok

      Nuok Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      975
      Likes Received:
      28
      Trophy Points:
      28
      Thanks :)

      any chance you could do a force vendor one?
       
    19. Woodi

      Woodi Banned

      Joined:
      Dec 13, 2010
      Messages:
      67
      Likes Received:
      0
      Trophy Points:
      0
    20. moujoohoo

      moujoohoo New Member

      Joined:
      Apr 29, 2010
      Messages:
      448
      Likes Received:
      1
      Trophy Points:
      0

    Share This Page