• Visit Rebornbuddy
  • Help Please - How Do I Use ForceSetVendor to train a skill/spell

    Discussion in 'Archives' started by littlesten, Mar 23, 2011.

    1. littlesten

      littlesten Member

      Joined:
      Jan 17, 2011
      Messages:
      94
      Likes Received:
      0
      Trophy Points:
      6
      Hi ive been creating a quest profile for night elf,mainly for myself i may post it but theres seems to be alot of good quest profiles already on, Ive ran into a snag ive been trying to use
      ForceTrain to train a skill and no matter what i do it comes up with use ForceSetVendor ...
      So ive been trying to figure out how to do it, looked on wiki, that didnt work, is there any arguments i need to put in for it to work currently its this:
      ALL help will be appreciated and yes i have searched for over 30 mins trying to find my anwser :D
       
    2. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      The call you have shown us looks fine.

      It would help if you provided a log, or told us exactly how it was failing. Without this information, my guess is that QuestId 26947 is complete for you, and the ForceSetVendor is being skipped because of it. Here's the appropiate Wiki fragment:
      That's my only guess at the moment without more information.

      cheers & good luck with it,
      chinajade
       
    3. littlesten

      littlesten Member

      Joined:
      Jan 17, 2011
      Messages:
      94
      Likes Received:
      0
      Trophy Points:
      6

      one second and i shall upload/quote the problem

      ignore UserDefined thats getting changed when im up to it, it doesnt do anything wrong its Starts the quest, but skips out learning the spell then goes straight to trying to hit the dummy with the spell


      and here is the coding

      PHP:
      <If Condition="Me.Class == WoWClass.Hunter">
          <
      PickUp QuestName="Etched Sigil" GiverName="Ilthalaine" QuestId="3117" GiverId="2079" /> <!-- Etched Signil (level 3) -->
          <
      TurnIn QuestName="Etched Sigil" TurnInName="Ayanna Everstride" QuestId="3117" TurnInId="3596" />
          
          <
      PickUp QuestName="A Woodsman's Training" GiverName="Ayanna Everstride" QuestId="26947" GiverId="3596" X="10448.12" Y="777.9965" Z="1322.666" />
                      <If 
      Condition="!Styx.Logic.Combat.SpellManager.HasSpell(56641)">
                          <
      CustomBehavior File="ForceSetVendor" QuestId="26947" VendorType="Train"/>
                      /If>
                      <If 
      Condition="(HasQuest(26947)) &amp;&amp; (!IsQuestCompleted(26947))">
                          <
      CustomBehavior File="CastSpellOn" QuestId="26947" SpellId="56641" NpcId="44614" NumOfTimes="1" HpLeftAmount="100" MinRange="14" X="10454.93" Y="801.1702" Z="1322.547" />
                      /If>
                  <
      TurnIn QuestName="A Woodsman's Training" QuestId="26947" TurnInName="Anyanna Everstride" TurnInId="3596" X="10448.12" Y="777.9965" Z="1322.666" />
      /If>


      sorry i had to take all the "<" out so it would show
       
      Last edited: Mar 23, 2011
    4. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      So, it looks like there's two issues here...
      1) The quest does look complete, so the SetForcedVendor CB will be skipped.

      because it the QuestId was used as a 'qualifier':
      This should be read as "don't execute the behavior if this Quest 26947 is complete".

      and
      2) It looks like the toon already knows the spell...
      So your <If> condition prevents any attempt to execute the SetForcedVendor CB.

      So, from what you've shown, it looks like everything is working fine according to the profile's instructions.


      In short, if the quest is complete, the profile has two guards in place to prevent SetForcedVendor from being executed.

      chinajade
       
      Last edited: Mar 23, 2011
    5. Kickazz006

      Kickazz006 Well-Known Member Moderator

      Joined:
      Jan 15, 2010
      Messages:
      20,567
      Likes Received:
      302
      Trophy Points:
      83
      littlestein, on dev forums, use the php instead of code and it will show

      PHP:
      like so :)
       
    6. littlesten

      littlesten Member

      Joined:
      Jan 17, 2011
      Messages:
      94
      Likes Received:
      0
      Trophy Points:
      6
      I see what your saying however it hasnt been completed before as its a new character and i havnt got that spell, i shall creat a new hunter and see how it goes

      PHP:
      Ahhh thanks bud much appreciated!
       
    7. littlesten

      littlesten Member

      Joined:
      Jan 17, 2011
      Messages:
      94
      Likes Received:
      0
      Trophy Points:
      6
      tried it with a new guy and nothging ... hmm



      ARGHHHHH!!! WHAT A NOOB MISTAKE!!!!!!!

      I forgot to put TrainClass="Hunter" on the vendor bit ?.?
      ARGHHHHH!!!! Im so sorry for waisting your time
       
      Last edited: Mar 23, 2011

    Share This Page