Buff Bots: $npc->CastSpell vs. quest:selfcast ??
Just wondering if there is a fix for this in quest scripts?
I currently have some buff bots setup using the $npc->CastSpell (spellid) to cast a single buff on a toon. But this command won't cast any group buffs. (HoV,Kei, FoE, etc.) With my GM toon, I can use the #castspell (spellid) and freely cast any group based buff on any toon, but it won't work on a quest script. The quest:selfcast will work fine, but the buff timers are level dependant, so I was trying to set up the bots for full length buffs. |
This likely has nothing to do with the problem so i apologize in advance for potentially side tracking your thread, but when the quest:selfcast is used does it ignore the spells duration all together and use one pre set somewhere else?
Example being, you create a spell that adds X amount of HP for... say 2 hours, it would ignore the two hour duration art dor the spell and create its own? If that is the case, where ous the data being pulled from to create its own timer? |
When a script uses the quest::selfcast , on a level 1 toon, the duration
is only 3 minutes, no matter what the buff is. But if the script uses $npc->CastSpell then the buff is on full timer. For example casting Temp would give a level 1 toon 1 hr & 40 min buff using the $npc->CastSpell But casting the same Temp buff on a level 1 toon using the quest::selfcast would give you a 3 minute buff. Its just the way it works. But the $npc->CastSpell appears not to be any good for GROUP buffs, such as KEI, etc. You have to use the quest::selfcast for those ones. This is what I'm looking for is a fix or work around for it. |
That's because it is dependent on the level of the character activating the quest script.
From http://www.eqemulator.net/wiki/wikka...=QuestTutorial "Forces client to cast spell on themself". So the level ?? NPC is not casting the spell, it is the level 1 PC that is casting the spell. |
Yes, I know that already ....
|
Good.... Then I guess you are set?
|
My question hasnt been answered yet :)
|
is your buff bot level 65... or 1?
|
The buff bots are level 75
|
Quote:
|
That wasn't a cry of impatience Caryatis, it was a response /shrug
|
What if you were to make a copy of whatever group buffs you want the buff bot to use, and change the level of the spell to 1. Obviously it wouldn't be available to players as a memorable spell, purely one for buff bot use.
In theory, would look like a lvl 1 char is casting a level 1 group buff on himself (pet and other party members as well). That is if I'm understanding this all correctly. |
The level of the spell or buff bot doesnt matter in this case since its forcing the client to cast the spell. Therefore if a level 1 character receives a group buff through the selfcast routine, it treats it as a level 1 character casting the spell, which using the buff formula equates to a short duration buff. I would say use $client->CastSpell but I think that would result in the same effect as using selfcast.
Alternatively you could copy the buff and change the duration formula to use a set duration although Im too lazy to look up which formula that would be besides 50(which is perm and probably not desirable). |
11 & 12 both result in the actual spell duration being used. As an example, if a level 1 toon casts Acumen it would last the full duration as it uses formula 11.
|
If you want to cast a spell on the entire group, it would be easiest to just get the group and cycle through each member having the NPC cast the spell on them. Though, if you only want group spells to land on the full group (and not single target), it would probably take a bit more work. I am not aware of any current commands to check if a spell is a group spell or not, but it would probably be really easy to add one to the source if needed.
Here is an example script (not tested) that includes a subroutine for casting a spell on the whole group. You could even add the sub into your plugins folder and make it into a plugin instead if you wanted so it can be accessed from any script (using plugin::CastOnGroup(SpellID, MaxDist)). Code:
sub EVENT_SAY { |
All times are GMT -4. The time now is 12:13 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.