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

Quest Behavior: CastSpellOn (Help)

Megser

Well-Known Member
Joined
Apr 17, 2010
Messages
1,389
Reaction score
73
So I'm trying to make the warrior use Charge on a training dummy. I'm using the CastSpellOn.cs behavior. But I get this:

[CastSpellOn(info) @line 155]: Behavior sees 'done'. Skipping behavior.

Code:

PHP:
<If Condition="Me.Class == WoWClass.Hunter">
		<TurnIn QuestName="Etched Note" QuestId="3092" TurnInName="Harutt Thunderhorn" TurnInId="3059" />
                <PickUp QuestName="The Hunter's Path" QuestId="27021" GiverName="Lanka Farshot" GiverId="3061" />

<If Condition="!HasSpell(56641)">
			<CustomBehavior File="ForceSetVendor" QuestId="27021" VendorType="Train" />
		</If>

		<CustomBehavior File="CastSpellOn" QuestId="27021" SpellId="56641" MobId="44848" NumOfTimes="5" HpLeftAmount="100" MinRange="7" X="-2869.347" Y="-249.1271" Z="59.95384" />
		<TurnIn QuestName="The Hunter's Path" QuestId="27021" TurnInName="Lanka Farshot" TurnInId="3061" />
                
	<ElseIf Condition="Me.Class == WoWClass.Paladin">
		<TurnIn QuestName="Consecrated Note" QuestId="27015" TurnInName="Sunwalker Helaku" TurnInId="37737" />
                 <PickUp QuestName="The Way of the Sunwalkers" QuestId="27023" GiverName="Sunwalker Helaku" GiverId="37737" />

<If Condition="!HasSpell(20271)">
			<CustomBehavior File="ForceSetVendor" QuestId="27020" VendorType="Train" />
		</If>

		<CustomBehavior File="CastSpellOn" QuestId="27015" SpellId="20271" MobId="44848" NumOfTimes="1" HpLeftAmount="100" MinRange="8" X="-2869.347" Y="-249.1271" Z="59.95384" />
		<TurnIn QuestName="The Way of the Sunwalkers" QuestId="27023" TurnInName="Sunwalker Helaku" TurnInId="37737" />
	</ElseIf>

	<ElseIf Condition="Me.Class == WoWClass.Priest">
		<TurnIn QuestName="Hallowed Note" QuestId="27014" TurnInName="Seer Ravenfeather" TurnInId="37724" />
                <PickUp QuestName="Healing in a Flash" QuestId="27066" GiverName="Seer Ravenfeather" GiverId="37724" />

<If Condition="!HasSpell(2061)">
			<CustomBehavior File="ForceSetVendor" QuestId="27066" VendorType="Train" />
		</If>

		<CustomBehavior File="CastSpellOn" QuestId="27066" SpellId="2061" MobId="45199" NumOfTimes="5" HpLeftAmount="100" MinRange="8" X="-2880.177" Y="-225.9676" Z="61.34525" />
		<TurnIn QuestName="Healing in a Flash" QuestId="27066" TurnInName="Seer Ravenfeather" TurnInId="37724" />
	</ElseIf>

	<ElseIf Condition="Me.Class == WoWClass.Warrior">
		<TurnIn QuestName="Simple Note" QuestId="3091" TurnInName="Harutt Thunderhorn" TurnInId="3059" />
                <PickUp QuestName="The First Lesson" QuestId="27020" GiverName="Harutt Thunderhorn" GiverId="3059" />

<If Condition="!HasSpell(100)">
			<CustomBehavior File="ForceSetVendor" QuestId="27020" VendorType="Train" />
		</If>

		<CustomBehavior File="CastSpellOn" QuestId="27021" SpellId="100" MobId="44848" NumOfTimes="1" HpLeftAmount="100" MinRange="8" X="-2869.347" Y="-249.1271" Z="59.95384" />
		<TurnIn QuestName="The First Lesson" QuestId="27020" TurnInName="Harutt Thunderhorn" TurnInId="3059" />

	</ElseIf>

	<ElseIf Condition="Me.Class == WoWClass.Druid">
                <TurnIn QuestName="Verdant Note" QuestId="3094" TurnInName="Gart Mistrunner" TurnInId="3060" />
                <PickUp QuestName="Rejuvenating Touch" QuestId="27067" GiverName="Gart Mistrunner" GiverId="3060" />

<If Condition="!HasSpell(2061)">
			<CustomBehavior File="ForceSetVendor" QuestId="27066" VendorType="Train" />
		</If>

		<CustomBehavior File="CastSpellOn" QuestId="27066" SpellId="774" MobId="45199" NumOfTimes="1" HpLeftAmount="100" MinRange="8" X="-2880.177" Y="-225.9676" Z="61.34525" />
		<TurnIn QuestName="Rejuvenating Touch" QuestId="27067" TurnInName="Gart Mistrunner" TurnInId="3060" />
	</ElseIf>

	<ElseIf Condition="Me.Class == WoWClass.Shaman">
		<TurnIn QuestName="Rune-Inscribed Note" QuestId="3093" TurnInName="Meela Dawnstrider" TurnInId="3062" />
                <PickUp QuestName="Primal Strike" QuestId="27027" GiverName="Meela Dawnstrider" GiverId="3062" />

<If Condition="!HasSpell(73899)">
			<CustomBehavior File="ForceSetVendor" QuestId="27027" VendorType="Train" />
		</If>

		<CustomBehavior File="CastSpellOn" QuestId="27066" SpellId="774" MobId="44848" NumOfTimes="3" HpLeftAmount="100" MinRange="1" X="-2880.177" Y="-225.9676" Z="61.34525" />
		<TurnIn QuestName="Primal Strike" QuestId="27027" TurnInName="Meela Dawnstrider" TurnInId="3062" />
	</ElseIf>
                </If>


Thanks for any help.
 

Attachments

Last edited:
Mesger said:
So I'm trying to make the warrior use Charge on a training dummy. I'm using the CastSpellOn.cs behavior. But I get this:

[CastSpellOn(info) @line 155]: Behavior sees 'done'. Skipping behavior.

Hi, Mesger,

When you supply a QuestId to a behavior, the quest must be 1) in the toon's log, and 2) not complete. If these conditions are not met, the behavior reports "Behavior sees 'done'". When this happens, the behavior doesn't execute because it is not needed.

The settings can be altered by 1) Omitting the QuestId from the behavior (and bracketing it with an appropriate &lt;If&gt;, or 2) providing the optional QuestCompleteRequirement or QuestInLogRequirement attributes, described here...
[wiki]Honorbuddy Programming Cookbook: QuestId for Custom Behaviors[/wiki]


Stopping/starting Honorbuddy is a frequent cause of seeing such messages--especially during profile development. The profile writer will start the profile, complete the quest, then stop Honorbuddy to check something or fix something in the profile. When the profile writer clicks 'start' again, the quest is already done, so the behavior is skipped.

From the profile fragment you provide (which is appreciated), I can't tell what line number is 155. But, I can tell you that the log you attached does not match the profile fragment you're showing us. It could be a minor discrepancy, but it also means that we don't know what 'state' the toon was actually in when the profile ran. Since the "Behavior sees 'done'" could also be caused by falling into the wrong section of a profile (e.g., a mis-typed &lt;If&gt; condition), we have to rule that out, also.

I'm also a little uncertain about using CastSpellOn for the Charge quest. InteractWith, BasicInteractWith, KillUntilComplete, or another behavior may be appropriate for a melee class. (I know the Wiki lists Charge as an example of CastSpellOn, but it could easily be wrong.)

Would you be so kind to re-run the profile and attach it, and also attach the log from that same run?

thanks,
chinajade
 
Last edited:
Hi Chinajade. Just wanted to thank you for the awesome Wiki we have, and the help. I'm running the profile right now.

But I also want to ask you another thing while it runs anyways. Is it possible to make it class specific for a class to go and train at a certain level? Some cloth wearers are too squishy to kill a "boss" for a quest. So I was wondering if it could go and learn a healing spell which is available for that level, so It could survive and do the quest instead of grinding.


Kind Regards, Megser
 
Mesger said:
Is it possible to make it class specific for a class to go and train at a certain level? Some cloth wearers are too squishy to kill a "boss" for a quest. So I was wondering if it could go and learn a healing spell which is available for that level, so It could survive and do the quest instead of grinding.

The ForceSetVendor behavior was designed for training as one of its purposes. The documentation is a little stale--but what's described still works. I'm walking through the behaviors and updating dox now, but its very slow. :D

You can use &lt;If&gt;s to bracket what class, level, and maybe whether the toon is missing certain spells to decide whether or not you want to make the training journey. Also, be sure you have enough coin to purchase the spells. I believe HB has some internal limits that you have to have 1.5g or somesuch for things like this to work.


You've hit upon one of the hardest choices a profile designer has to make. Do you write the profile so all classes can do it, or tailor it to squishies only, or crunchies only? Do you go for the zone achievements, or design the profile to level a toon in the minimum amount of time? Do you design for large hunting areas for toons that may be harvesters, or smaller hunting areas to make the trips smaller? Decisions, decisions.

Mordd was a master at making such 'safe' profiles for all. (Bless his soul, he's vanished and don't know where he got off to.) Mordd used to go through all kinds of gyrations to make squishies grind for a couple of extra levels where things got dicey, then continued again. So, squishies were two levels higher than crunchies when going through certain areas. He also diligently blackspotted all kinds of areas that were questionable for certain levels. He did this before we had all this &lt;If&gt; and &lt;While&gt; stuff is what made it particularly notable.

Obviously, other profile writers now do this too. And the HB machinery has been greatly improved to aid that effort. Also, many of our CCs have improved greatly where mages and rogues survive things they didn't used to.

With the Cata drop, I believe an Eastern Kingdoms resident can quest to level without doing a single grind. You may have to defer some of those 'boss' quests, and come back and do them once you've gained a level or two.

However, the Kalimdor story is quite different. You can quest solidly until you hit Thousand Needles. Then, you get all kinds of problems because its swimming and we simply don't have the behaviors to do a number of those quests. CodenameG tells me even if you grind through the Thousand Needles levels, that Tanaris has the same problems--insufficient behavior support to do the new quests.

Good luck with it all. Profile writing is a design art in and of itself.


cheers,
chinajade
 
Last edited:
Here's the log China. It says now: CastSpellOn(info) @line 167]: Behavior sees 'done'. Skipping behavior.

Haven't tried BasicInteractWith and such because not sure of how to use it in this case. Trying to do the Charge quest iwith warrior.
 

Attachments

Mesger said:
Still need assistance please.

Sorry, was out running errands.


But the good news is we found the problem (and it was simple). Its this line...

HTML:
<CustomBehavior File="CastSpellOn" QuestId="27021" SpellId="100" MobId="44848" NumOfTimes="1" HpLeftAmount="100" MinRange="8" X="-2869.347" Y="-249.1271" Z="59.95384" />

You've used the wrong QuestId, it should be 27020--not 27021. Since 27021 is not in your log, the behavior considered its job 'done'. Sorry I didn't see that initially.

I'm still not sure CastSpellOn is appropriate for melee classes on this task. Please let me know, so I'll know whether to update the Wiki or not.

cheers,
chinajade
 
Sorry, was out running errands.


But the good news is we found the problem (and it was simple). Its this line...

HTML:
<CustomBehavior File="CastSpellOn" QuestId="27021" SpellId="100" MobId="44848" NumOfTimes="1" HpLeftAmount="100" MinRange="8" X="-2869.347" Y="-249.1271" Z="59.95384" />

You've used the wrong QuestId, it should be 27020--not 27021. Since 27021 is not in your log, the behavior considered its job 'done'. Sorry I didn't see that initially.

I'm still not sure CastSpellOn is appropriate for melee classes on this task. Please let me know, so I'll know whether to update the Wiki or not.

cheers,
chinajade

CastSpellOn for Charge does function. I did fix the skip behavior problem and now I have a new one. I order it to go to the dummies, but then it doesn't target them and use Charge, it's until I target them manually with a mouse click it uses Charge and completes the quest. I've made a video showing you.

PHP:
<ElseIf Condition="Me.Class == WoWClass.Warrior">
		<TurnIn QuestName="Simple Note" QuestId="3091" TurnInName="Harutt Thunderhorn" TurnInId="3059" />
                <PickUp QuestName="The First Lesson" QuestId="27020" GiverName="Harutt Thunderhorn" GiverId="3059" />
                <RunTo X="-2871.837" Y="-248.5042" Z="60.14921" />
<If Condition="!HasSpell(100)">
			<CustomBehavior File="ForceSetVendor" QuestId="27020" VendorType="Train" />
		</If>
		<CustomBehavior File="CastSpellOn" QuestId="27020" SpellId="100" MobId="44848" NumOfTimes="1" HpLeftAmount="100" MinRange="8" X="-2869.347" Y="-249.1271" Z="59.95384" />
		<TurnIn QuestName="The First Lesson" QuestId="27020" TurnInName="Harutt Thunderhorn" TurnInId="3059" />

YouTube - wow-20110501-1309477.avi

Thanks for all the help so far mate.
 
Wtb China, or someone who knows what to do :).
 
Always use a
PHP:
<CustomBehavior File="WaitTimer" WaitTime="1000"/>

after
PHP:
<CustomBehavior File="ForceSetVendor"

ForceSetVendor behavior doesn't function like a regular CB. It doesn't finish before processing the next line in your profile, basically all it does is set a flag in HB to go repair on train, then the next line is processed, and thats when HB realizes that it needs to go train/repair. In the middle of this next task in your profile, thus screwing up most CBs. So the only "safe" CB to use after ForceSetVendor is WaitTimer. Even if you don't need it.
 
Thanks Vlad, I'll see if it works, just gotta figure out this Checkpoint Error.
 
Wow.... THANK YOU SO MUCH EVERYONE FOR THE HELP. I ran the priest and it worked like a charm! Thanks for the code Vlad :D. Solved it. Hope it works with other classes now.
 
Back
Top