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

[Quest Behaviors] Cast Spell On Target

Natfoth

Community Developer
Joined
Jan 15, 2010
Messages
1,446
Reaction score
37
Heya guys, I got requests to add this one also. It will target an NPC then cast a spell on it, you can also define how many times to do it.

Features
- Cast Spell on Target
- Define the amount of times to do so


Even if the bot is interrupted it will remember where it was at and how many then continue where it left off. This works amazing and hope you guys can make a lot out of it

Example:
Code:
<CustomBehavior File="CastSpellOn" QuestId="28746" Arguments="635,44564,5,70,-8858.6 -197.16 81.92604" />

Args in order
You have to have all the Args no matter what even if you dont want it, Thats why I put what the default should be for you guys.
As of right now there should be 5 Args

1: Spell ID (Obvious)
2: NPC ID To Cast it On
3: How many Times (Has to be greater then 0)
4: HP of the mob to cast on (100 should be default)
5: Area of the NPCs can be within 100 yards


Install
Place inside of your "Quest Behaviors" folder and add the line to your Quest Profile. Example above.

CastSpellOn should be what you put inside of your profile. It cannot be anything else or it will not work, it has to be exact.

Fixes
Version 1.0.0.3
- Totally Changed the way that it handled so that combat works
- Also added more NPC Location checks so that you can do a Charge if you would like or a far away spell.
Version 1.0.0.2
- Added more move code so that you are always within range
- Added a new feature "Heal Below HP %" Updated Example And Args
Version 1.0.0.1
- Fixed a movement loop that caused it not to work.
 

Attachments

Last edited:
Fixed Movement on it. Was a small bug with it at the start.
 
If I were a dog.... well, you know the rest of that. Fantastic job, I'll be putting this to good use right away.
 
<3
Is there anyway to break combat afterwards, say if we wanted it to hit a target dummy 2-3 times and then stop
 
humm dosent seem to be working...
Code:
<CustomBehavior File="CastSpellOn" QuestId="26919" Arguments="2061,44564,5,-8858.6 -197.16 81.92604" />
 
<3
Is there anyway to break combat afterwards, say if we wanted it to hit a target dummy 2-3 times and then stop
well in theory you could just cast auto attack once to make it stop attacking lol
 
humm dosent seem to be working...
Code:
<CustomBehavior File="CastSpellOn" QuestId="26919" Arguments="2061,44564,5,-8858.6 -197.16 81.92604" />

Can you be more specific on what is not working? You need to make sure it is a valid questID and if you are just doing it as a test make it any questid you currently have on you.

Nvm I see the problem am fixing it now, thanks for the report and example.
 
Last edited:
Can you be more specific on what is not working? You need to make sure it is a valid questID and if you are just doing it as a test make it any questid you currently have on you.

Nvm I see the problem am fixing it now, thanks for the report and example.

heh i have been trying everything, diffrent ways to see if it was a bug with a certian class or something in all trials it will move to location and sit there like it forgot what to do =)
At first i was thinking maybe i shouldnt have a blonde toon... lol
 
Last edited:
Ok it has been updated, Thanks for the post. Try the new one and tell me if it works.
 
Ok it has been updated, Thanks for the post. Try the new one and tell me if it works.

Ok, it works now, but it seems to stop the bot after it's done, and if you restart the bot it wants to do it again similar to how the RunTo code used to do

Edit: it seems this is a HB bug some quests inside a If tag seems bugged getting "Can not turn in quest Hallowed Letter (ID: 3103) because I don't have it in my quest log! (Or do I: False)" right after i used the code to complete the task, it says that then stops, although it would be nice for a check to see if you still have the quest if not skip
 
Last edited:
Version 1.0.0.2
- Added more move code so that you are always within range
- Added a new feature "Heal Below HP %" Updated Example And Args

Edit: I see the error that you are talking about and how it just stops the bot. Let me see if I can fix that.
 
Last edited:
Awesome, This may be exactly what I needed to see for most the issues I am having! Sweet.
 
Version 1.0.0.2
- Added more move code so that you are always within range
- Added a new feature "Heal Below HP %" Updated Example And Args

Edit: I see the error that you are talking about and how it just stops the bot. Let me see if I can fix that.

ok let me know when to test i would love to get my quest profiles with full class quests =P

Edit: i just ran a test using it inside and outside If statement, inside an if statement all the quests crash or stop after each objective, outside it runs smooth Great Job!!
 
Last edited:
ok let me know when to test i would love to get my quest profiles with full class quests =P

Edit: i just ran a test using it inside and outside If statement, inside an if statement all the quests crash or stop after each objective, outside it runs smooth Great Job!!

You mind posting it with your IF Statement so that I may look and see if I cannot fix it?
 
You mind posting it with your IF Statement so that I may look and see if I cannot fix it?

i was using this to test from starter quest for human priest =)

Code:
 <If Condition="Me.Class == WoWClass.Priest">
        <PickUp QuestName="Healing the Wounded" QuestId="26919" GiverName="Priestess Anetta" GiverId="375" />
        <CustomBehavior File="CastSpellOn" QuestId="26919" Arguments="2061,44564,5,100,-8858.6 -197.16 81.92604" />
        <TurnIn QuestName="Healing the Wounded" QuestId="26919" TurnInName="Priestess Anetta" TurnInId="375" />
      </If>

But just so you know this happens with the if statement without your custom behavior as well on occasion
 
Mine seems to be working with the HasQuest and the WoWClass one so maybe it was just a messup.
 
Does'nt work...

<CustomBehavior File="ClassSpells" QuestId="25147" Arguments="100,44820,1,-567.576 -4237.97 38.13395" />
 
Woodi said:
<CustomBehavior File="ClassSpells" QuestId="25147" Arguments="100,44820,1,-567.576 -4237.97 38.13395" />

Should be:
<CustomBehavior File="CastSpellOn" QuestId="25147"
Arguments="100,44820,1,-567.576 -4237.97 38.13395" />

I also see you've only provided four arguments, and Natfoth's OP says you need to provide five.

cheers,
CJ
 
Should be:
<CustomBehavior File="CastSpellOn" QuestId="25147"
Arguments="100,44820,1,-567.576 -4237.97 38.13395" />

I also see you've only provided four arguments, and Natfoth's OP says you need to provide five.

cheers,
CJ

Thanks for helpin out chinajade.

Also updated the Original Post to clarify what china just said to make it easier to understand.
 
Version 1.0.0.3
- Totally Changed the way that it handled so that combat works
- Also added more NPC Location checks so that you can do a Charge if you would like or a far away spell.
 
Back
Top